/* Styles généraux */
body {
    background: #f4f4f4;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Conteneur de connexion */
.login-container {
    max-width: 40%;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.dashboard-container {
max-width: 40%;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
/* Groupes de formulaires */
.form-group {
    margin-bottom: 15px;
}
/* Champ select */
.form-group select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Boutons primaires */
.btn-primary {
    width: 100%;
	align-self: center;
    background: #007bff;
    border-color: #007bff;
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Options (liens) */
.options {
    margin-top: 20px;
    text-align: center;
}

.options a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
}

.options a:hover {
    text-decoration: underline;
}

/* Entête du tableau de bord admin */
.dashboard-header {
    text-align: center;
    margin-bottom: 20px;
}


/* Dashboard Container */
.dashboard-container {
    display: flex;
    max-width: 80%;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Menu des tâches */
.menu {
    flex: 0 0 250px; /* Largeur fixe pour le menu */
    padding: 20px;
    background: #007bff; /* Bleu principal */
    color: white;
    border-right: 1px solid #0069d9; /* Bordure droite pour séparation */
    text-align: left;
}

.menu h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin-bottom: 10px;
}

.menu a {
    display: flex; /* Aligner icônes et texte */
    align-items: center;
    text-decoration: none;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.menu a i {
    margin-right: 10px; /* Espacement entre icône et texte */
    font-size: 18px;
}

.menu a:hover {
    background: #0069d9; /* Teinte plus foncée au survol */
    transform: translateX(10px); /* Effet de décalage horizontal */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombre subtile */
}

.menu a.active {
    background: #0062cc; /* Couleur active */
    font-weight: bold;
}
.menu.collapsed {
    flex: 0 0 60px; /* Réduit la largeur du menu */
    overflow: hidden;
    transition: flex 0.3s ease;
}

.menu.collapsed li {
    display: none; /* Masque les liens */
}

.menu.collapsed h3 {
    font-size: 14px;
    text-align: center;
}

/* Contenu principal */
.content {
    flex: 1;
    padding-left: 20px;
}

/* Statistiques */
.statistics {
    margin-bottom: 20px;
}

.stat-item {
    margin: 10px 0;
    font-size: 16px;
}

/* Liste des pays */
.countries-statistics ul {
    list-style: none;
    padding: 0;
}

.countries-statistics li {
    margin: 5px 0;
    font-size: 14px;
}

/* Graphique Container */
.chart-container {
    margin-top: 20px;
	text-align: center;
}

 /* ///////////////////////////////////////////////////// */
.logout-link {
    text-align: right;
    margin-bottom: 20px;
}

.logout-link a {
    color: #007bff;
    text-decoration: none;
}

.logout-link a:hover {
    text-decoration: underline;
}

/* Messages d'erreur/succès */
.message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Formulaire de modification */
.edit-answer-container {
    max-width: 60%;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Titres des sections */
h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #007bff;
}

/* Liste des pays */
.countries ul {
    list-style: none;
    padding: 0;
}

.countries li {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu {
        flex: 0 0 100%; /* Menu plein écran sur petit écran */
        border-right: none;
        border-bottom: 1px solid #0069d9;
    }

    .content {
        flex: 1 1 100%; /* Contenu plein écran sur petit écran */
    }
}

/* /////////////////////////////////////////////////////////// */
/* Styles généraux pour les tableaux */
.table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    font-size: 14px;
    overflow-x: auto; /* Pour gérer les larges colonnes sur petit écran */
}

/* En-têtes du tableau */
.table th {
    background-color: #007bff;
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-weight: bold;
    border: none;
}

/* Cellules du tableau */
.table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

/* Alternance des couleurs des lignes */
.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Hover effect pour les lignes */
.table tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

/* Style pour les actions (boutons ou liens) */
.table .action-btn {
    display: inline-block;
    margin-right: 5px;
    padding: 5px 10px;
    font-size: 12px;
    color: white;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.table .action-btn.edit {
    background-color: #28a745; /* Vert pour "Modifier" */
}

.table .action-btn.delete {
    background-color: #dc3545; /* Rouge pour "Supprimer" */
}

.table .action-btn.view {
    background-color: #007bff; /* Bleu pour "Voir" */
}

.table .action-btn:hover {
    opacity: 0.9;
}

/* Responsive Design pour les tableaux */
@media (max-width: 768px) {
    .table {
        font-size: 12px; /* Réduire la taille du texte sur petit écran */
    }

    .table th,
    .table td {
        padding: 8px 10px; /* Réduire l'espacement */
    }

    /* Afficher le tableau sous forme de cartes sur très petits écrans */
    .table-responsive {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .table tbody tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
    }

    .table tbody tr td {
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;
    }

    .table tbody tr td:last-child {
        margin-bottom: 0;
    }
}
