* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

p {
    white-space: pre-line; /* Respecte les sauts de ligne (\n), mais réduit les espaces multiples */
}

main {
    padding-bottom:1%;
    overflow-x: hidden;
}

/* La zone principale (le centre) */
.timeline-center {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    justify-items: center;
}

body {
    overflow-x: hidden; /* Empêche le défilement horizontal */
    width: 100%;
}

/* Style général des bandeaux */
header, footer {
    background-color: #FF8C00; /* Orange */
    color: white;
    padding: 15px 0;
    text-align: center;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Assure qu'il passe au-dessus du contenu */
    width: 100%;
}

/* Navigation */
header nav ul {
    list-style: none; /* Enlève les puces */
    padding: 0;
    margin: 0;
    display: flex; /* Active Flexbox */
    justify-content: center; /* Centre horizontalement */
    gap: 20px; /* Espace entre les boutons */
}

/* Style des liens comme des boutons */
header nav ul li a {
    display: block;
    background-color: #E07B00; /* Un orange légèrement plus sombre pour le bouton */
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px; /* Un léger arrondi ou 0 pour un carré parfait */
    font-weight: bold;
    transition: background 0.3s;
}

header nav ul li a:hover {
    background-color: #CC6A00; /* Couleur au survol */
}

footer {
    position: fixed; /* Optionnel : colle au bas de l'écran */
    bottom: 0;
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Couleurs Admin (rouge) */
.admin-theme header, 
.admin-theme footer { 
    background-color: #d32f2f; /* Rouge admin */
}

.admin-theme header nav ul li a { 
    background-color: #b71c1c; /* Rouge plus sombre pour les boutons */
}

/* Optionnel : changer la couleur au survol pour rester cohérent */
.admin-theme header nav ul li a:hover { 
    background-color: #e53935; 
}

.admin-theme .burger-menu {
    background-color: #b71c1c;
}

.event-card {
    background-color: #ffffff; /* Blanc pur pour faire ressortir le contenu */
    border: 2px solid #FF8C00; /* Bordure orange pour rappeler le header */
    border-radius: 15px; /* Bords bien arrondis */
    padding: 20px;
    margin: 15px;
    width: 250px; /* Largeur fixe pour un aspect homogène */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombre légère pour le relief */
    transition: transform 0.2s; /* Petit effet au survol */
}

.event-card:hover {
    transform: translateY(-5px); /* La carte "lévite" légèrement au survol */
}

.event-card h3 {
    color: #E07B00; /* Ton orange foncé */
    margin-bottom: 10px;
    font-size: 1.2em;
}

.event-card p {
    color: #555; /* Un gris sombre pour la lisibilité */
    font-size: 0.9em;
    margin-bottom: 15px;
}

.event-card button {
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.event-card button:hover {
    background-color: #E07B00;
}

.createEventBtn {
    position: fixed;
    bottom: 80px; /* Un peu au-dessus du footer (qui est déjà fixé) */
    left: 50%;
    transform: translateX(-50%); /* Technique pour centrer parfaitement */
    
    /* Design */
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px; /* Forme de pilule */
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999; /* Au-dessus du contenu mais sous le popup */
    transition: background 0.3s, transform 0.2s;
}

.createEventBtn:hover {
    background-color: #E07B00;
    transform: translateX(-50%) scale(1.05); /* Petit zoom au survol */
}

.btn-action {
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
    white-space: nowrap;
}
.btn-join { background-color: #27ae60; }
.btn-cancel { background-color: #c0392b; }

.btn-share {
    background-color: #3498db; /* Bleu pour le partage */
    /* margin-right: 10px; Espace entre le partage et l'inscription */
}

.btn-share:hover {
    background-color: #2980b9;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Aligne le titre et les boutons au centre verticalement */
    flex-wrap: wrap;     /* Permet aux éléments de passer à la ligne si pas assez de place */
    gap: 10px;           /* Espace entre les éléments */
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}
.event-meta { color: #666; font-size: 0.9em; margin-bottom: 10px; }

.requestBtn {
    position: fixed;
    bottom: 60px; /* Un peu au-dessus du footer (qui est déjà fixé) */
    right: 1%;
    /* transform: translateX(-50%); Technique pour centrer parfaitement */
    
    /* Design */
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px; /* Forme de pilule */
    font-size: 0.6em;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999; /* Au-dessus du contenu mais sous le popup */
    transition: background 0.3s, transform 0.2s;
}

.requestBtn:hover {
    background-color: #E07B00;
    transform:  scale(1.05); /* Petit zoom au survol */
}

.promoteBtn {
    background-color : #cfcfcf;
    border: none;
    padding: 10px 25px;
    border-radius: 5px; 
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
}

.promoteBtn:hover {
    background-color: #a7a7a7;
    transform:  scale(1.05); /* Petit zoom au survol */
}

.passwdBtn {
    background-color: #cfcfcf;
    border: none;
    padding: 10px 25px;
    border-radius: 5px; 
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;

}

.passwdBtn:hover {
    background-color: #a7a7a7;
    transform:  scale(1.05); /* Petit zoom au survol */
}

.deleteAccountBtn {
    background-color: #b71c1c;
    border: none;
    padding: 10px 25px;
    border-radius: 5px; 
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;

}

.deleteAccountBtn:hover {
    background-color: #961717;
    transform:  scale(1.05); /* Petit zoom au survol */
}

/* Style par type (bordure latérale colorée) */
.req-type-promote { margin-left: 5px; border-left: 5px solid #3498db; } /* Bleu */
.req-type-error   { border-left: 5px solid #e74c3c; } /* Rouge */
.req-type-reset_password { border-left: 5px solid #f1c40f; } /* Jaune */

/* Indicateur de statut (petit cercle) */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-pending  { background-color: #f39c12; }
.status-approved { background-color: #27ae60; }
.status-rejected { background-color: #c0392b; }
.status-done     { background-color: #7f8c8d; }

tr.status-done {
    opacity: 0.6;
    text-decoration: line-through;
}

.myEvents, .availableEvents, .nextEvents {
    flex-direction: row;
}

/* Centrage strict du popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 100% de la largeur de la fenêtre */
    height: 100vh; /* 100% de la hauteur de la fenêtre */
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Force le popup au premier plan */
}

.popup.active {
    display: flex !important; /* Force l'affichage en flex */
}

.popup-content {
    position: relative; /* Pour positionner le bouton Fermer */
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%; 
    max-width: 600px;
}

/* Style global pour les formulaires dans les popups */
.popup-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.popup-content input, 
.popup-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    font-family: Arial, sans-serif;
}

.popup-content textarea {
    height: 100px;
    resize: vertical; /* Permet d'agrandir la zone de texte si besoin */
}

.popup-content form button {
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
    width: 100%;
}

.popup-content form button:hover {
    background-color: #E07B00;
}

.popup-content a {
    position: absolute;
    bottom: 15px; /* Décalage par rapport au bord du cadre blanc */
    right: 15px;
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
}

.popup-content a:hover {
    background-color: #E07B00;
}

select {
    appearance: none; /* Supprime le style natif OS */
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 5px 25px 5px 10px; /* Espace pour la flèche */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
}

select:hover {
    border-color: #888;
}

select:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Style du bouton Fermer */
.popup-content button[onclick="closeEventPopup()"] {
    position: absolute;
    top: 15px; /* Décalage par rapport au bord du cadre blanc */
    right: 15px;
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
}

.popup-content button:hover[onclick="closeEventPopup()"] {
    background-color: #cc0000;
    transform: scale(1.05);
}

/* Conteneur principal */
#auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #ffffff;
    border: 2px solid #FF8C00;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Titres */
#auth-container h2 {
    color: #E07B00;
    margin-bottom: 20px;
    text-align: center;
}

/* Champs de saisie */
#auth-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
}

/* Boutons principaux */
#auth-container form button {
    width: 100%;
    background-color: #FF8C00;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

#auth-container form button:hover {
    background-color: #E07B00;
}

/* Texte de bas de formulaire */
#auth-container p {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}

/* Bouton basculer (lien) */
#auth-container p button {
    background: none;
    border: none;
    color: #E07B00;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.burger-menu { display: none; }

.admin-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.box { 
    border: 1px solid #ccc; 
    padding: 15px; 
    border-radius: 8px;
    /* Indispensable pour que le scroll ne dépasse pas le cadre */
    overflow: hidden; 
}

table {
    width: 98%;
    border-collapse: collapse;
    margin: 20px 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: #333;
    color: #ffffff;
}

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

/* Couleur de fond très légère selon le type */
.req-type-promote { background-color: #ebf5fb; }
.req-type-error { background-color: #fdedec; }
.req-type-reset_password { background-color: #fef9e7; }

/* Nettoyage : on s'assure que le texte reste lisible */
.requests-table tr {
    transition: all 0.3s ease;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Espace entre les formulaires */
    max-width: 500px;
    margin: 20px auto;
}

.account-form form {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-form label {
    font-weight: bold;
    font-size: 0.9em;
    margin-top: 5px;
}

.account-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Boutons orange par défaut */
.account-form button {
    background-color: orange;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.account-form button:hover {
    background-color: darkorange;
}

/* Bouton suppression spécifique */
.deleteAccountBtn {
    background-color: #e74c3c !important; /* Rouge */
}

.deleteAccountBtn:hover {
    background-color: #c0392b !important;
}

.flash-message {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.flash-success { background-color: #d4edda; color: #155724; }
.flash-error   { background-color: #f8d7da; color: #721c24; }
.flash-info    { background-color: #d1ecf1; color: #0c5460; }

@media (max-width: 600px) {
    main {
        grid-template-columns: 1fr; /* Une seule colonne */
        padding: 10px;
    }
    /* On cache les sidebars sur mobile pour gagner de la place */
    .sidebar-left, .sidebar-right {
        display: none;
    }
    header nav ul {
        gap: 5px; /* Réduit l'espace */
        padding: 5px;
    }
    header nav ul li a {
        padding: 8px 12px; /* Réduit la taille des boutons */
        font-size: 0.9em; /* Texte un peu plus petit */
        white-space: nowrap; /* Empêche le texte de se couper bizarrement */
    }

    .burger-menu { 
        display: block; 
        width: 100%; 
        background-color: #E07B00; /* Un orange légèrement plus sombre pour le bouton */
        color: white;
        padding: 10px 20px;
        text-decoration: none;
        border: none;
        border-radius: 4px; /* Un léger arrondi ou 0 pour un carré parfait */
        font-weight: bold;
        transition: background 0.3s;
    }
    
    /* On cache le menu par défaut sur mobile */
    #nav-links { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
    }
    
    /* Quand on ajoute la classe 'active' via JS */
    #nav-links.active { display: flex; }
    
    header nav ul li { text-align: center; border-bottom: 1px solid #ccc; }
    /* 1. Les cartes en pleine largeur */
    .event-card {
        width: 95% !important; /* Presque toute la largeur */
        height: 60% !important;
        margin: 20px !important; /* Espace vertical important */
        padding: 25px !important;
        border-radius: 20px;
    }
    
    /* 2. Titres plus gros (Police 4 = ~24px - 28px) */
    .event-card h3 {
        font-size: 1.7em !important; 
        margin-bottom: 15px;
    }
    
    /* 3. Texte plus gros et lisible */
    .event-card p {
        font-size: 1.3em !important;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    /* 4. Boutons larges et faciles à toucher */
    .event-card button {
        padding: 20px !important;
        font-size: 1.2em !important;
        width: 100% !important;
    }

    .event-header {
        flex-direction: column; /* Empile le titre et les boutons */
        text-align: center;
    }
    
    .btn-action {
        width: 100%; /* Boutons pleine largeur sur mobile */
    }

    /* 5. Ajustement du conteneur de grille */
    .grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }

    .createEventBtn {
        bottom: 70px;
        padding: 18px 40px;
        font-size: 1.2em;
    }

    .requestBtn {
    position: fixed;
    bottom: 60px; /* Un peu au-dessus du footer (qui est déjà fixé) */
    right: 5%;
    /* transform: translateX(-50%); Technique pour centrer parfaitement */
    padding: 10px 25px;
    }

    #auth-container {
        width: 90%;
        margin: 20px auto;
        padding: 20px;
    }
    
    #auth-container input {
        padding: 15px; /* Plus facile à toucher */
        font-size: 1.1em;
    }
    
    #auth-container form button {
        padding: 15px;
        font-size: 1.1em;
    }

    .popup-content {
        padding: 20px;
        width: 95%;
    }
    .popup-content input, 
    .popup-content textarea,
    .popup-content form button {
        padding: 15px;
        font-size: 1.1em;
    }

    .popup-content button {
        padding: 10px 20px;
        font-size: 1em;
    }

    .admin-container { grid-template-columns: 1fr; }

    .table-container {
    display: block; /* Important pour que le scroll fonctionne */
    width: 100%;
    overflow-x: auto;
    white-space: nowrap; /* Empêche le texte de retourner à la ligne */
}

.table-container table {
    width: 100%;
    min-width: 600px; /* Taille minimale pour forcer l'apparition de la scrollbar */
}

}