/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
}

/* ===== LAYOUT PRINCIPAL ===== */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.sidebar-nav .section-title {
    background-color: #c0392b;  /* rouge foncé */
    color: #2ecc71;             /* vert vif */
    padding: 8px 12px;
    margin: 10px 0 5px 0;
    border-radius: 4px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Styles pour la validation */
.form-control.is-invalid,
.form-check-input.is-invalid ~ label {
    border-color: #dc3545;
}

.text-danger {
    color: #dc3545;
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

/* Progress bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    z-index: 1;
    transform: translateY(-50%);
}

.progress-step {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.progress-step.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}


/* =========================================
   CHAT & MESSAGES PRIVÉS (Nouveaux styles)
   ========================================= */

/* Conteneur principal des messages */
.chat-messages {
    height: 500px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e9ecef;
}

/* Alignement des messages */
.message-item {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

/* Mes messages (à droite) */
.my-message {
    align-self: flex-end;
}

/* Messages des autres (à gauche) */
.other-message {
    align-self: flex-start;
}

/* Bulle de message */
.message-content {
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Style de "Mes messages" */
.my-message .message-content {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom-right-radius: 2px;
}

/* Style des "Messages des autres" */
.other-message .message-content {
    background-color: #ffffff;
    color: #333;
    border-bottom-left-radius: 2px;
    border: 1px solid #e9ecef;
}

/* Info expéditeur et heure */
.sender-info {
    font-size: 0.75rem;
    margin-bottom: 4px;
    opacity: 0.8;
}
.my-message .sender-info {
    justify-content: flex-end;
}
.other-message .sender-info {
    justify-content: flex-start;
}

/* =========================================
   STATUT "EN LIGNE" (Le point vert)
   ========================================= */

.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #28a745; /* Vert */
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 4px #28a745;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* =========================================
   LISTE DES EMAILS ENVOYÉS (Tableau)
   ========================================= */

.email-table-container {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.email-table {
    width: 100%;
    border-collapse: collapse;
}

.email-table th {
    background-color: #343a40;
    color: white;
    padding: 12px;
    text-align: left;
}

.email-table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.email-table tr:hover {
    background-color: #f8f9fa;
}

/* Badge pour l'audience de l'email */
.badge-audience {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}
.badge-all { background-color: #17a2b8; color: white; }
.badge-admins { background-color: #6f42c1; color: white; }

/* =========================================
   LISTE DES CONVERSATIONS (WhatsApp style)
   ========================================= */

.chat-list-item {
    transition: background-color 0.2s;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 15px;
}

.chat-list-item:hover {
    background-color: #e9ecef;
}

.chat-list-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
}


/* Étapes de formulaire */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

/* Résumé de validation */
.validation-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

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

.validation-summary li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.validation-summary li.valid {
    color: #28a745;
}

.validation-summary li.invalid {
    color: #dc3545;
}

/* Champs requis */
.required-field label::after {
    content: ' *';
    color: #dc3545;
}



.sidebar a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sidebar a:hover {
    opacity: 0.8;
}

/* En-tête du sidebar */
.sidebar-header {
    margin-bottom: 30px;
}
/* Styles pour les pages de prêts */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h2 {
    text-align: center;
    color: #c0392b;
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}
input, textarea, select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
button, .btn-primary, .btn-secondary, .btn-approve, .btn-reject {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
}
.btn-primary, .btn-approve {
    background: #2c3e50;
    color: white;
}
.btn-secondary, .btn-reject {
    background: #95a5a6;
    color: white;
}
.btn-approve {
    background: #27ae60;
}
.btn-reject {
    background: #e74c3c;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #fef2f2;
    color: #a00;
}
tr:hover {
    background-color: #f9f9f9;
}
.empty-message {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 0.8rem;
    }
    th, td {
        font-size: 0.8rem;
        padding: 6px;
    }
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
}

.username {
    font-weight: bold;
    font-size: 1.2rem;
}

.user-info a {
    font-size: 0.9rem;
    text-decoration: underline;
    opacity: 0.9;
}

/* Navigation principale */
.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.15);
}

.section-title {
    margin: 20px 0 8px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    padding-left: 8px;
}

/* Sous-menus */
.has-submenu {
    position: relative;
}

.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.has-submenu .fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.has-submenu .submenu {
    display: none;
    list-style: none;
    margin-left: 25px;
    margin-top: 5px;
}

.has-submenu .submenu li {
    margin-bottom: 5px;
}

.has-submenu .submenu a {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.has-submenu.open .submenu {
    display: block;
}

.has-submenu.open .fa-chevron-down {
    transform: rotate(180deg);
}

/* Contacts */
.sidebar-contacts {
    margin-top: 30px;
}

.sidebar-contacts h3 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.sidebar-contacts ul {
    list-style: none;
}

.sidebar-contacts li {
    margin-bottom: 6px;
}

.sidebar-contacts li a {
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.sidebar-contacts li a:hover {
    background: rgba(255,255,255,0.1);
}

/* Footer sidebar */
.sidebar-footer {
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.sidebar-footer a:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== CONTENU PRINCIPAL ===== */
.main-content {
    background: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    min-height: 100vh;
}

.main-content header {
    margin-bottom: 20px;
}

.main-content footer {
    margin-top: auto;
    padding: 10px 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

/* ===== BARRE D'ACTIONS HORIZONTALE ===== */
.action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    align-items: center;
}

.action-bar .btn-action,
.action-bar a.btn-action,
.action-bar li a {
    background-color: #fcd116;
    color: #2d3748;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    list-style: none;
}

.action-bar a.btn-action:hover,
.action-bar li a:hover {
    background-color: #e0b800;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.action-bar li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* ===== TITRES ===== */
h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

h3 {
    color: #4a5568;
    margin: 1rem 0 0.8rem;
    font-size: 1.2rem;
}

/* ===== FORMULAIRES ===== */
form {
    margin-bottom: 1rem;
}

form p {
    margin-bottom: 1rem;
}

form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #2d3748;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form input[type="date"],
form textarea,
form select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

form button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    width: auto;
    min-width: 120px;
}

form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

/* Conteneur de formulaire */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.errorlist, .error {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

/* Pages de formulaire (pour profil, etc.) */
.form-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-title {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 2rem;
    text-align: center;
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, #ce1126 33%, #fcd116 33%, #fcd116 66%, #009460 66%) 1;
    border-bottom-style: solid;
    border-image-slice: 1;
    padding-bottom: 10px;
}

.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

fieldset {
    border: none;
    margin-bottom: 25px;
    padding: 0;
}

legend {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e2e8f0;
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #fc8181;
}

.field-errors .error {
    color: #c53030;
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
}

.help-text {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-warning {
    background: #ecc94b;
    color: #744210;
}

.btn-warning:hover {
    background: #d69e2e;
}

.btn-export {
    background-color: #28a745;
    color: white;
}

.btn-export:hover {
    background-color: #218838;
}

.btn-add {
    background-color: #667eea;
    color: white;
}

.btn-add:hover {
    background-color: #5a67d8;
}

/* Petits boutons pour actions (voir, modifier, supprimer) */
.btn-view,
.btn-edit,
.btn-delete,
.btn-back,
.btn-submit,
.btn-cancel {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.btn-view {
    background-color: #4299e1;
    color: white;
}
.btn-edit {
    background-color: #ecc94b;
    color: #744210;
}
.btn-delete {
    background-color: #f56565;
    color: white;
}
.btn-back {
    background-color: #a0aec0;
    color: white;
}
.btn-submit {
    background-color: #667eea;
    color: white;
    border: none;
    cursor: pointer;
}
.btn-cancel {
    background-color: #cbd5e0;
    color: #2d3748;
}
.btn-view:hover,
.btn-edit:hover,
.btn-delete:hover,
.btn-add:hover,
.btn-back:hover,
.btn-submit:hover,
.btn-cancel:hover {
    opacity: 0.8;
}

/* Boutons pour bloquer/débloquer */
.btn-block,
.btn-unblock,
.btn-reset {
    padding: 3px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-block {
    background: #dc3545;
    color: white;
}
.btn-unblock {
    background: #28a745;
    color: white;
}
.btn-reset {
    background: #ffc107;
    color: #212529;
    margin-left: 5px;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge.active {
    background-color: #d4edda;
    color: #155724;
}

.badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.badge.blocked {
    background-color: #fff3cd;
    color: #856404;
}

.badge.pending {
    background-color: #ffeeba;
    color: #856404;
}

.badge.boursier {
    background-color: #ffd700;
    color: #333;
}

/* ===== TABLEAUX ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f7fafc;
}

/* Tableau des membres */
.member-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    table-layout: fixed;
}

.member-table th,
.member-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
}

.member-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.member-table tr:hover {
    background-color: #f5f5f5;
}

/* Tableau des cotisations */
.contribution-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.contribution-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
}
.contribution-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}
.contribution-table tr:hover {
    background-color: #f5f5f5;
}

/* Tableau des parcours d'études */
.studyhistory-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.studyhistory-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.studyhistory-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.studyhistory-table tr:hover {
    background-color: #f5f5f5;
}

/* ===== GRILLE DES MEMBRES (CARTES) ===== */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.member-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border-top: 5px solid;
    border-image: linear-gradient(to right, #ce1126 33%, #fcd116 33%, #fcd116 66%, #009460 66%) 1;
    border-top-style: solid;
    border-image-slice: 1;
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.member-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.member-info {
    padding: 15px;
    flex-grow: 1;
}

.member-info h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.member-info h3 a {
    color: #2d3748;
    text-decoration: none;
}

.member-info h3 a:hover {
    color: #ce1126;
    text-decoration: underline;
}

.member-info p {
    margin: 5px 0;
    font-size: 0.95rem;
    color: #4a5568;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.member-info p strong {
    min-width: 90px;
    font-weight: 600;
    color: #2d3748;
}

.passport {
    font-family: monospace;
    font-size: 0.85rem;
    color: #2d3748;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.member-actions {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
}

.member-actions a {
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

/* ===== GRILLE DES INFORMATIONS (ACTUALITÉS) ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.info-thumbnail {
    width: 100%;
    height: 150px;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 6px;
}

.info-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.info-thumbnail img:hover {
    transform: scale(1.05);
}

.info-card h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.info-card .meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.info-card .excerpt {
    color: #333;
    margin-bottom: 10px;
}

.info-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

/* ===== DÉTAIL D'UNE INFORMATION ===== */
.info-detail {
    max-width: 800px;
    margin: 0 auto;
}

.info-detail .meta {
    color: #666;
    margin-bottom: 20px;
}

.info-detail .content {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: white;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item p {
    padding: 8px;
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.like-section {
    margin: 20px 0;
}

.btn-like {
    background: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-like.liked {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.comments-list {
    margin: 20px 0;
}

.comment {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comment strong {
    color: #333;
}

.comment p {
    margin: 5px 0 0;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.comment-form button {
    margin-top: 10px;
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ===== FILTRES ===== */
.filter-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 5px solid #ce1126;
    border-right: 5px solid #009460;
}

.filter-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions button,
.filter-actions .btn-clear {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.filter-actions button {
    background: #fcd116;
    color: #2d3748;
}

.filter-actions button:hover {
    background: #e0b800;
}

.filter-actions .btn-clear {
    background: #e2e8f0;
    color: #2d3748;
}

.filter-actions .btn-clear:hover {
    background: #cbd5e0;
}

/* Barre de filtre pour la gestion des utilisateurs */
.filter-bar {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 5px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
    background: white;
}

.btn-filter:hover,
.btn-filter.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ===== PAGINATION ===== */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination .step-links {
    display: inline-block;
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pagination .step-links a,
.pagination .step-links span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 4px;
    text-decoration: none;
    color: #4a5568;
}

.pagination .step-links a:hover {
    background: #edf2f7;
}

.pagination .current {
    background: #667eea;
    color: white !important;
}

/* ===== DASHBOARD RESPONSABLE ===== */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-top: 3px solid #667eea;
}

.stat-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #666;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section h3 {
    margin-top: 0;
    color: #333;
}

.section ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.section li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.section li:last-child {
    border-bottom: none;
}

.section .btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ===== CHAT ===== */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
    clear: both;
}

.message.own {
    float: right;
    background: #dcf8c6;
    border-radius: 10px 10px 0 10px;
}

.message.other {
    float: left;
    background: white;
    border-radius: 10px 10px 10px 0;
}

.message .message-sender {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 3px;
    color: #555;
}

.message .message-content {
    padding: 8px 12px;
    word-wrap: break-word;
}

.message .message-time {
    font-size: 0.7rem;
    color: #999;
    text-align: right;
    padding: 0 8px 8px 8px;
}

.no-messages {
    text-align: center;
    color: #999;
    margin-top: 100px;
}

.chat-input {
    display: flex;
    gap: 10px;
}

#chat-message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

#chat-message-submit {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

#chat-message-submit:hover {
    background: #5a67d8;
}

/* ===== PAGE DE CONNEXION ===== */
.login-page {
    background-image: url('/static/images/ma_photo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 2.5rem;
    width: 100%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.8rem;
    color: #2d3748;
    font-size: 1.8rem;
}

.login-box form button {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.login-box form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== DÉTAIL MEMBRE ===== */
.member-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.member-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.member-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(to right, #f9f9f9, #fff);
    border-bottom: 1px solid #eee;
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    border: 3px solid #667eea;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-title {
    flex: 1;
}

.member-title h2 {
    margin: 0 0 5px;
    font-size: 1.8rem;
    color: #2d3748;
}

.member-status {
    margin-top: 5px;
}

.member-info {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.info-row {
    display: flex;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 5px;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
    width: 140px;
}

.info-value {
    color: #2d3748;
    flex: 1;
}

.member-card h3 {
    margin: 20px 20px 10px;
    color: #2d3748;
    font-size: 1.2rem;
    border-left: 4px solid #667eea;
    padding-left: 10px;
}

.member-card ul {
    margin: 0 20px 20px;
    padding-left: 20px;
}

.member-card li {
    margin-bottom: 8px;
    color: #4a5568;
}

.action-buttons {
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    border-top: 1px solid #e2e8f0;
}

/* ===== MESSAGES FLASH ===== */
.messages {
    list-style: none;
    margin: 1rem 0;
}

.messages li {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

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

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

.messages .info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.messages .warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}
.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

/* Menu déroulant du profil */
.profile-menu {
    position: relative;
    display: inline-block;
}
.profile-dropdown-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.2s;
}
.profile-dropdown-btn:hover {
    background: rgba(255,255,255,0.2);
}
.profile-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
}
.profile-menu.open .profile-dropdown {
    display: block;
}
.profile-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}
.profile-dropdown a:hover {
    background: #f0f0f0;
}
.profile-dropdown a i {
    margin-right: 8px;
    width: 20px;
    color: #667eea;
}

/* Menu déroulant de l'administration */
.admin-dropdown {
    position: relative;
    display: inline-block;
}
.admin-dropdown-btn {
    background-color: #fcd116;
    color: #2d3748;
    border: none;
    border-radius: 40px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-dropdown-content {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
}
.admin-dropdown.open .admin-dropdown-content {
    display: block;
}
.admin-dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}
.admin-dropdown-content a:hover {
    background: #f0f0f0;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #666;
}

.card p {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.card.negative {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.quick-access {
    margin: 30px 0;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.quick-link {
    background: #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-link:hover {
    background: #5a67d8;
}

.profile-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    width: 100%;
}
.profile-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: rgba(255,255,255,0.1);
    transition: background 0.2s;
    width: 100%;
    justify-content: center;
}
.profile-links a:hover {
    background-color: rgba(255,255,255,0.2);
}
.profile-links a i {
    font-size: 0.9rem;
}

.mandate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.mandate-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.mandate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.btn-export {
    background-color: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}
.btn-export:hover {
    background-color: #218838;
}

.mandate-card h3 {
    margin: 0 0 15px;
    font-size: 1.2rem;
    color: #2d3748;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.mandate-card .member-info {
    margin-bottom: 10px;
}

.mandate-card .member-photo-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 10px;
    border: 2px solid #667eea;
}

.btn-delete-message {
    background: none;
    border: none;
    color: #999;
    font-size: 0.7rem;
    padding: 1px 3px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 3px;
}
.btn-delete-message i {
    font-size: 0.7rem;
}
.btn-edit-message {
    background: none;
    border: none;
    color: #999;
    font-size: 0.7rem;
    padding: 1px 3px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 3px;
    margin-left: 5px;
}
.btn-edit-message:hover {
    color: #007bff;
}
.my-message .btn-edit-message {
    color: rgba(255,255,255,0.5);
}
.my-message .btn-edit-message:hover {
    color: #ffffff;
}

.result-count {
    margin: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

.mobile-title {
    font-size: 1.2rem;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.results-table th,
.results-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .results-table thead {
        display: none;
    }
    .results-table tbody tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 10px;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    .results-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        text-align: right;
        border-bottom: 1px solid #eee;
    }
    .results-table td:last-child {
        border-bottom: none;
    }
    .results-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a5568;
        margin-right: 10px;
        text-align: left;
        flex: 1;
    }
    /* Mettre en évidence le gagnant */
    .winner-row td {
        background: #f0fdf4;
        border-color: #86efac;
    }
}

/* Tableau des résultats */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.results-table th,
.results-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Tableau des candidatures */
.candidacy-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.candidacy-table th,
.candidacy-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.candidacy-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .candidacy-table thead {
        display: none;
    }
    .candidacy-table tbody tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 10px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .candidacy-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        text-align: right;
        border-bottom: 1px solid #eee;
    }
    .candidacy-table td:last-child {
        border-bottom: none;
    }
    .candidacy-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a5568;
        margin-right: 10px;
        text-align: left;
        flex: 1;
    }
    /* Ajuster les boutons dans la dernière colonne */
    .candidacy-table td .actions {
        justify-content: flex-end;
    }
    .candidacy-table td form {
        display: inline-block;
        margin: 0 2px;
    }
}
/* Responsive */
@media (max-width: 768px) {
    .results-table thead {
        display: none;
    }
    .results-table tbody tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 10px;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    .results-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        text-align: right;
        border-bottom: 1px solid #eee;
    }
    .results-table td:last-child {
        border-bottom: none;
    }
    .results-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a5568;
        margin-right: 10px;
        text-align: left;
        flex: 1;
    }
    /* Mettre en évidence le gagnant */
    .winner-row td {
        background: #f0fdf4;
        border-color: #86efac;
    }
}
/* ===== MEDIA QUERIES (RESPONSIVE) ===== */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: none;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    .main-content {
        padding: 10px;
    }
    .hamburger.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Barre d'actions compacte */
    .action-bar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .action-bar .btn-action,
    .action-bar a.btn-action,
    .action-bar li a {
        width: auto;
        padding: 3px 8px;
        font-size: 0.75rem;
        flex: 0 1 auto;
    }

    /* Titres */
    h2 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    /* FILTRES HYPER COMPACTS */
    .filter-form {
        gap: 2px !important;
        padding: 4px !important;
        margin-bottom: 8px !important;
    }
    .filter-group {
        margin-bottom: 0 !important;
        gap: 1px !important;
    }
    .filter-group label {
        font-size: 0.6rem !important;
        margin-bottom: 0 !important;
        line-height: 1 !important;
    }
    .filter-group input,
    .filter-group select {
        padding: 2px 4px !important;
        font-size: 0.7rem !important;
        height: auto !important;
        min-height: unset !important;
        line-height: 1.2 !important;
    }
    .filter-actions {
        gap: 2px !important;
        margin-top: 2px !important;
    }
    .filter-actions button,
    .filter-actions .btn-clear {
        padding: 3px 5px !important;
        font-size: 0.7rem !important;
    }

    /* CARTES MEMBRES COMPACTES */
    .member-grid {
        gap: 8px;
    }
    .member-card {
        max-width: 100%;
    }
    .member-photo {
        height: 100px;
    }
    .member-info {
        padding: 6px;
    }
    .member-info h3 {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    .member-info p {
        font-size: 0.75rem;
        gap: 2px;
    }
    .member-info p strong {
        min-width: 55px;
    }
    .member-actions {
        padding: 4px;
    }
    .member-actions a {
        padding: 2px 4px;
        font-size: 0.65rem;
    }

    /* TABLEAUX RESPONSIVES AVEC DATA-LABEL */
    .member-table thead,
    .contribution-table thead,
    .studyhistory-table thead {
        display: none;
    }
    .member-table tbody tr,
    .contribution-table tbody tr,
    .studyhistory-table tbody tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        margin-bottom: 6px;
        background: white;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }
    .member-table td,
    .contribution-table td,
    .studyhistory-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 6px;
        border-bottom: 1px solid #eee;
        text-align: right;
        font-size: 0.75rem;
    }
    .member-table td:last-child,
    .contribution-table td:last-child,
    .studyhistory-table td:last-child {
        border-bottom: none;
    }
    .member-table td::before,
    .contribution-table td::before,
    .studyhistory-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a5568;
        margin-right: 6px;
        text-align: left;
        flex: 1;
        font-size: 0.7rem;
    }
    .member-table td .actions {
        justify-content: flex-end;
    }

    /* AUTRES AJUSTEMENTS */
    .actions {
        flex-wrap: wrap;
        gap: 3px;
    }
    .actions a {
        flex: 1 1 auto;
        text-align: center;
        padding: 3px 5px;
        font-size: 0.7rem;
    }

    .admin-dropdown {
        width: 100%;
    }
    .admin-dropdown-btn {
        width: 100%;
        justify-content: center;
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    .admin-dropdown-content {
        width: 100%;
        position: static;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-top: 3px;
    }
    .admin-dropdown-content a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    @media (max-width: 768px) {
    .pagination .step-links {
        padding: 4px 6px;
    }
    .pagination .step-links a,
    .pagination .step-links span {
        padding: 2px 5px;
        font-size: 0.75rem;
    }
    }
    @media (max-width: 768px) {
    h2 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    }
    @media (max-width: 768px) {
    .action-bar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .action-bar .btn-action,
    .action-bar a.btn-action,
    .action-bar li a {
        width: auto;
        padding: 3px 8px;
        font-size: 0.75rem;
        flex: 0 1 auto;
    }
```}

    .login-box {
        padding: 1rem;
    }
    .login-box h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    .login-box form button {
        padding: 0.5rem;
    }

    .stats-cards,
    .dashboard-sections {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .stat-card,
    .section {
        padding: 10px;
    }
    .stat-card h3,
    .section h3 {
        font-size: 0.9rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .section ul {
        margin: 5px 0;
    }
    .section li {
        padding: 4px 0;
        font-size: 0.8rem;
    }

    .chat-container {
        padding: 8px;
    }
    .chat-messages {
        height: 300px;
        padding: 6px;
    }
    .message {
        max-width: 90%;
    }
    .chat-input {
        flex-direction: column;
        gap: 5px;
    }
    #chat-message-input,
    #chat-message-submit {
        width: 100%;
        padding: 6px;
        font-size: 0.85rem;
    }

    .pagination .step-links {
        padding: 4px 6px;
    }
    .pagination .step-links a,
    .pagination .step-links span {
        padding: 2px 5px;
        font-size: 0.75rem;
    }

    .result-count {
        font-size: 0.75rem;
        margin: 4px 0;
    }
}

@media (max-width: 480px) {
    .action-bar .btn-action,
    .action-bar a.btn-action,
    .action-bar li a {
        padding: 2px 6px;
        font-size: 0.7rem;
    }
    h2 {
        font-size: 1rem;
    }
    .filter-group label {
    font-size: 0.55rem !important;
    }
    .filter-group input,
    .filter-group select {
        padding: 1px 3px !important;
        font-size: 0.65rem !important;
    }
    .filter-actions button,
    .filter-actions .btn-clear {
        padding: 2px 4px !important;
        font-size: 0.65rem !important;
    }

    .member-grid {
        grid-template-columns: 1fr;
    }
    .member-photo {
        height: 90px;
    }
    .member-info h3 {
        font-size: 0.85rem;
    }
    .member-info p {
        font-size: 0.7rem;
    }
    .member-info p strong {
        min-width: 50px;
    }
    .member-actions a {
        padding: 1px 3px;
        font-size: 0.6rem;
    }
    .member-table td {
        font-size: 0.7rem;
        padding: 3px 5px;
    }
    .member-table td::before {
        font-size: 0.65rem;
    }
    .stat-number {
        font-size: 1.3rem;
    }
    .section h3 {
        font-size: 0.85rem;
    }
    .section li {
        font-size: 0.75rem;
    }
}
@media (max-width: 480px) {
    .action-bar .btn-action,
    .action-bar a.btn-action,
    .action-bar li a {
        padding: 2px 6px;
        font-size: 0.7rem;
    }
    h2 {
        font-size: 1rem;
    }
    .filter-group label {
        font-size: 0.55rem !important;
    }
    .filter-group input,
    .filter-group select {
        padding: 1px 3px !important;
        font-size: 0.65rem !important;
    }
    .filter-actions button,
    .filter-actions .btn-clear {
        padding: 2px 4px !important;
        font-size: 0.65rem !important;
    }
    .member-grid {
        grid-template-columns: 1fr;
    }
    .member-photo {
        height: 90px;
    }
    .member-info h3 {
        font-size: 0.85rem;
    }
    .member-info p {
        font-size: 0.7rem;
    }
    .member-info p strong {
        min-width: 50px;
    }
    .member-actions a {
        padding: 1px 3px;
        font-size: 0.6rem;
    }
    .member-table td {
        font-size: 0.7rem;
        padding: 3px 5px;
    }
    .member-table td::before {
        font-size: 0.65rem;
    }
    .stat-number {
        font-size: 1.3rem;
    }
    .section h3 {
        font-size: 0.85rem;
    }
    .section li {
        font-size: 0.75rem;
    }
}
@media (max-width: 768px) {
    .chat-container {
        padding: 8px;
    }
    .chat-messages {
        height: 300px;
        padding: 6px;
    }
    .message {
        max-width: 90%;
    }
    .chat-input {
        flex-direction: column;
        gap: 5px;
    }
    #chat-message-input,
    #chat-message-submit {
        width: 100%;
        padding: 6px;
        font-size: 0.85rem;
    }
}
@media (max-width: 768px) {
    .stats-cards,
    .dashboard-sections {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .stat-card,
    .section {
        padding: 10px;
    }
    .stat-card h3,
    .section h3 {
        font-size: 0.9rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .section ul {
        margin: 5px 0;
    }
    .section li {
        padding: 4px 0;
        font-size: 0.8rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-navigation {
        flex-direction: column;
    }
    
    .form-navigation button {
        width: 100%;
    }
    
    .progress-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
