:root {
    --background-color: #F1EAEA;
    --primary-color: #8DB3BD;
    --primary-hover-color: #37A4B7;
    --info-color: #007AFF;
    --button-color: #21616C;
    --button-hover-color: #236975;
    --link-color: #000000;
    --link-hover-color: #ea4202;
    --menu-submenu-color: #E2E2E2;
    --input-color: #fff7f7;
    --input-text-color: #000;
    --th-header: #f1f1f1;
    --label: black;
    --container-bg: #fff;
    --submenu-bg: #94d3ce;
    --thead-text-color: #000;
    --icon-hover-color: #000;
}

body.dark-mode {
    --background-color: #2B2B2B;
    --primary-color: #3A3A3A;
    --primary-hover-color: #4A4A4A;
    --info-color: #4dacfa;
    --button-color: #555555;
    --button-hover-color: #666666;
    --link-color: #ffffff;
    --link-hover-color: #ea4202;
    --menu-submenu-color: #555555;
    --input-color: #444444;
    --input-text-color: #fff;
    --th-header: #f1f1f1;
    --label: white;
    --container-bg: #3A3A3A;
    --submenu-bg: #4A4A4A;
    --thead-text-color: #fff;
    --icon-hover-color: #4dacfa;
}

a i {
    text-decoration: none;
}

table i{
    color: black;
}

table i:hover{
    color: var(--icon-hover-color);
}
a {
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    text-decoration: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    /* Pour que 10 px = 1rem (utilisez des rem) */
    font-size: 62.5%;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    background-color: var(--background-color);
    height: 100%;
}
.fc .fc-col-header-cell-cushion {
    color:black;
}

button{
    color: white!important;
}
button a{
    display: block;
    text-decoration: none;
    color: var(--background-color);
}


a{
    color: var(--link-color);
}

a img{
    text-decoration: none;
}

a:hover{
    color: var(--link-hover-color);
}

.mainTheme{
    background-color: var(--primary-color);
}
.infoText{
    color: var(--info-color);
}

h1{
    color: var(--label);
    font-size: 3.3rem;
    font-weight: 600;
}

h2{
    color: var(--label);
    font-size: 2.5rem;
    font-weight: 600;
}

.a_button{
    background-color: var(--button-color);
    color: white!important;
    text-decoration: none;
    font-size: 1.5rem;
    padding: 1rem 3rem;
    border-radius: 10px;
}
.modifier-button {
    display: inline-block;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.a_button:hover{
    background-color: var(--button-hover-color);
    color: white!important;
}
p,a,button{
    font-size: 1.2rem;
    font-weight: 600;
}

p{
    color: var(--label);
}
button, .btn-primary{
    background-color: var(--button-color);
    border: none;
    color:var(--background-color);
    border-radius: 10px;
    display: inline-block;
}

.alert-success, .alert-danger{
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
}

button:hover, .btn-primary:hover{
    background-color: var(--button-hover-color);
}

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

.table th, .table td {
    padding: 0.8rem;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: middle;  /* évite les petits décalages verticaux */
}
.table thead tr {
    position: sticky;
    top: -1px;
    background-color: var(--th-header);
    z-index: 10;
    border-bottom: 2px solid #ccc;

}
.create_form select,
.auth_input select,
.form-group select {
    background-color: var(--input-color);
    color: var(--input-text-color);
}



/* Auth Page */

.authPage{
    padding: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}


.authPage section{
    max-width: 439px;
    max-height: 570px;
    width: 100%;
    height: 100%;
    padding: 2rem;
    justify-items: center;
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.25);
}

.authPage h1{
    margin-bottom: 2rem;

}

.auth_input input{
    background-color: var(--input-color);
    color: var(--input-text-color);
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.auth_input{
    display: flex;
    flex-direction: column;
}
.auth_input label{
    margin-right: auto;
    margin-left: 1rem;
    margin-bottom:0.5rem;
    font-size: 1.2rem;
    color: var(--label);
}
.authPage button{
    font-size: 2rem;
    max-width: 290px;
    padding: 5px;
    width: 100%;
    margin-bottom: 2rem;
}
.auth-mdp-oublie{
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.auth-mdp-oublie input{
    font-size: 1.8rem;
    margin: 0 0.5rem 0 0;
}
.auth-mdp-oublie a{
    margin-left: 2rem;
    font-size: 1.2rem;
}
.authPage p{
    margin: 0;
}

.layout-container{
    display: flex;
    min-height: 100vh;
}


/* Left menu bar */

.left-menu-bar {
    background-color: var(--primary-color);
    width: 240px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10rem rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: transform 0.3s ease;
}
.left-menu-bar-icons button i {
    transition: color 0.3s ease;
}
.left-menu-bar-icons button:hover i {
    color: var(--icon-hover-color);
}

.left-menu-bar img {
    width: 136px;
    height: 136px;
    align-self: center;
    margin: 2rem 0;
}

.left-menu-bar-redirection{
    display: flex;
    flex-direction: column;
    margin-bottom: auto;
    overflow-y: auto;
}
.left-menu-bar-redirection::-webkit-scrollbar {
    width: 8px;
}

.left-menu-bar-redirection::-webkit-scrollbar-thumb {
    background-color: grey;
    border-radius: 10px;
}

.left-menu-bar-redirection::-webkit-scrollbar-track {
    background: white;
    border-radius: 20px;
}

.left-menu-bar-redirection a{
    text-decoration: none;
    height: 50px;
    padding: 1.3rem 1.3rem 1.3rem 4rem;
}
.left-menu-bar-redirection p{
    color: var(--label);
    text-decoration: none;
    height: 50px;
    padding: 1.3rem 1.3rem 1.3rem 4rem;
}

.left-menu-bar-redirection a:hover{
    background-color: white;
    color: #000000;
}

.left-menu-bar-icons {
    display: flex;
    margin-bottom: 2rem;
}

.left-menu-bar-icons button {
    background-color: transparent;
    border: none;
    width: 50px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
}

.left-menu-bar-icons i{
    font-size: 3.9rem;
}
.left-menu-bar-icons button:first-child{
    margin-left: 2rem;
    margin-right: auto;
}
.left-menu-bar-icons button:last-child{
    margin-right: 2rem;
}

.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: auto;
    right: 1rem;
    z-index: 99999;
    border: none;
    cursor: pointer;
}

.hamburger i {
    font-size: 3rem;
}

.submenu {
    background-color: var(--submenu-bg);
    border: 1px solid var(--submenu-bg);
}
.submenu a {
    display: block;
    padding: 1.3rem 1.3rem 1.3rem 6rem;
}

/* Profil */

.profil-page {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-left: 10rem;
}

.profil-container {
    background-color: var(--container-bg);
    color: var(--label);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
    margin-bottom: 2rem;
}
.profil-container p,
.profil-container strong,
.profil-container a {
    color: var(--label);
}

.profil-section h2 {
    margin-bottom: 1rem;
}

/* Accueil page */

.accueil-content {
    width: 100%;
    display: flex;
    flex:1;
    flex-direction: column;
}

.accueil-h1 {
    font-size: 3.5rem;
    margin: 2rem 2rem 2rem;
}

.accueil_course_top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 2rem;
    align-items: start;
}

.accueil-container {
    background-color: var(--container-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
    border-radius: 0.5rem;
    text-align: center;
}


.accueil-container-button a {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.accueil-container-button a button {
    display: block;
    width: 100%;
    font-size: 1.4rem;
    padding: 0.5rem 2rem;
    cursor: pointer;
}

.accueil-container p {
    margin-bottom: 1rem;
}

.accueil-container-button {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accueil-container-button button {
    font-size: 1.4rem;
    padding: 0.5rem 2rem;
    cursor: pointer;
}

.accueil_course_bottom {
    margin: 2rem;
}

.accueil_course_trace {
    margin: 2rem 0;
}

.accueil_course_trace .accueil-container {
    width: 100%;
    max-width: none;
}

#divTrace {
    max-height: 520px;
}

.accueil-coureur-avant {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    padding: 0 4rem;
}

.accueil-coureur-avant .accueil-container {
    max-width: 1000px;
    width: 100%;
}
.accueil-coureur-avant .accueil-container h2, .accueil-coureur-avant .accueil-container p{
    margin-bottom: 2rem;
}
.titre-avant-course{
    text-align: initial;
    margin-left: 2rem;
}
.accueil-coureur-avant .accueil_coureur_trace {
    margin-left: auto;
    margin-right: auto;
}
.accueil-coureur-avant .accueil-container-button {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.accueil-coureur-avant .accueil-container-button .a_button {
    padding: 1rem;
    width: 30%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
}

/* Register page */

.registerPage section{
    max-width: 700px;
    max-height: 730px;
}

.registerPage input{
    margin-bottom: 1rem;
}
.registerPage article{
    display: flex;
    justify-content: center;
    gap:1rem;
}


.RegisterPageDiv{
    display: flex;
    flex-direction: column;
}

.registerPage input{
    font-size: 1.3rem;
}

.registerPage label{
    margin-bottom:0.5rem;
    font-size: 1.3rem;
    color: black;
}
.registerPageRole select{
    font-size: 1.3rem;
    margin-bottom: 3rem;
    justify-self: center !important;
}

.registerPage ul{
    list-style: none;
    color: red;
}

.registerPage p{
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.RegisterPageInput{
    display: flex;
    flex-direction: column;
}

.pageRegisterPswd label{
    margin-bottom:1rem;
}
.registerPage button{
    margin-bottom: 0;
}

/* Formulaires page */

.liste_form {
    margin-top: 3rem;
    padding: 0 4rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.liste_form_filtre {
    background-color: white;
    max-height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.liste_form_filtre input{
    max-width: 160px;
}

.liste_form button a{
    font-size: 1.5rem;
}

.liste_form button{
    padding: 1rem;
    border-radius: 0;
}

.liste_form_content a{
    margin-left: 3rem;
    max-width: 195px;
    text-wrap: nowrap;
}

.liste_form_content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 71%;
    max-height: 730px;
}


.table_container table {
    min-width: 600px;
}


.liste_form_content .table_container {
    background-color: white;
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    margin: 0;
    padding: 0;
    box-shadow: 0 0.4rem 0.4rem rgba(0,0,0,0.25);
}
.liste_form_content .table_container::-webkit-scrollbar {
    width: 8px;
}
.liste_form_content .table_container::-webkit-scrollbar-thumb {
    background-color: grey;
    border-radius: 10px;
}
.table th.col-images,
.table td.col-images {
    width: 200px;
    vertical-align: top;
}
td.col-images a{
    display: inline-block;
    white-space: normal;
    word-break: break-all;
    margin: 0 0 0.5rem;
}


.liste_form_content table th, .liste_form_content table td{
    font-size: 1.2rem;
}

.table_action{
    text-align: center;
}

.td_tbody_link {
    text-align: center;
    padding-top: 0.5rem!important;
}
.td_tbody_link a {
    margin: 0 1rem 0 0;
    font-size: 2rem;
}
.td_tbody_link a i{
    color: black;
}

.td_tbody_link a i:hover{
    color: #3b82f6;
}
.img_enter{
    font-size: 2.2rem;
}
.td_tbody_link a:hover{
    color: var(--button-color);
}

/* Create */

.create_form{
    background-color: white;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.25);
    font-size: 1.3rem;
    margin-top: 4rem;
    max-width: 1400px;
}

.create_form input, .create_form textarea{
    background-color: var(--input-color);
    color: var(--input-text-color);
    font-size: 1.3rem;
}

.create_form button{
    padding: 1rem;
    font-weight: 600;
    margin-right: 1rem;
}

.create_form_button{
    display: flex;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.form-grid div textarea{
    max-height: 150px;
    height: 100%;
}
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem; /* espace entre champs */
}

.form-group label {
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}


.form-control {
    width: 100% !important;
    max-width: 100% !important;
}

.form-group input[type="date"] {
    width: 100%;
    /* … */
}
.form-map {
    margin-bottom: 2rem;
}


.retour_button{
    padding-left: 4rem;
    padding-right: 4rem;
    max-width: 135px;
}


.create_form_content{
    padding: 0 5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100vh;
    width: 100%;
}
.create_form_content h1{
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.blue_button {
    color: #127687;
}

.td_tbody_link button i {
    font-size: 2.2rem; /* Ajuste la taille de l'icône si elle est trop petite */
    vertical-align: middle; /* Assure un bon alignement vertical */
}

.accueil_coureur_trace {
    width: 90%;
}

/* Partie tâches des benevoles */
.benevole_taches {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.task-dropdown {
    position: relative;
    display: inline-block;
}

.task-dropdown button {
    background-color: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.task-dropdown button:hover {
    background-color: #0056b3;
}

.task-list {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 250px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

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

.task-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

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

.task-list a {
    background-color: #dc3545;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.task-list a:hover {
    background-color: #b02a37;
}

/* Affichage du dropdown quand on clique */
.task-dropdown:hover .task-list {
    display: block;
}

.benevole_taches .btn-danger {
    background-color: #dc3545;
    border-radius: 5px;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.benevole_taches .btn-danger:hover {
    background-color: #b02a37;
}

/* Partie incidents */
.icone-changement-etat {
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0!important;
    color: inherit;
}

.icone-changement-etat:hover{
    background-color: transparent;
}
.icone-changement-etat:hover i {
    color: #007bff;
}

.actions-container {
    display: flex;
    gap: 10px;
}

/* map balise */
.image-map, .image-map-incident{
    max-width: 150px;
}
.leaflet-popup-content-wrapper{
   width: 250px;
}
.btn-next, .btn-prev, .btn-next-incident, .btn-prev-incident{
    font-size: 3rem;
    cursor: pointer;
}
.leaflet-popup-content .debalise{
    padding: 1rem;
}

/* Conteneur général qui centre le bouton et le mail-container */
.show_mail_container {
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 1000px;
    gap: 2rem;
}

/* Bouton de retour (au-dessus du bloc) */
.retour_mail {
    align-self: flex-start;
}

/* Bloc principal (fond blanc) */
.mail-container {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.25);
}

/* En-tête (expéditeur, dates...) */
.mail-header {
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.mail-header p {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

/* Sous-bloc coloré pour le contenu */
.mail-inner {
    background-color: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
}

/* Sujet */
.mail-subject h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contenu */
.mail-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}




/* Responsive */
@media (max-width: 768px) {
    .accueil-h1{
        font-size: 2.5em;
    }

    h2{
        font-size: 2rem;
    }
    .hamburger {
        display: block;
    }

    .left-menu-bar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        width: 200px;
        z-index: 9999;
    }

    .left-menu-bar.open {
        transform: translateX(0);
    }

    /* Accueil */

    .accueil-content {
        margin-left: 0;
    }

    .accueil-coureur-avant .accueil-container-button .a_button {
        width: 100%;
        max-width: 300px;
    }

    .accueil-coureur-avant {
        margin-top: 2rem;
        padding: 0 4rem;
    }

    .accueil-coureur-avant .accueil-container {
        max-width: 100%;
        padding: 1rem;
    }

    #divTrace {
        height: 300px;
    }


    /* Listes */

    .liste_form {
        margin-top: 1rem;
        padding: 0 1rem;
        gap: 1rem;
    }

    .liste_form_filtre {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        max-height: none;
    }

    .liste_form_filtre input {
        max-width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .forgotPage {
        max-width: 100%;
        margin: 0 1rem;
    }
}

.forgotPage {
    max-width: 450px;
    width: 100%;
    height: auto;
    padding: 2rem;
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.25);
    background-color: var(--primary-color);
}

.button_covoiturage{
    max-width: 22.5rem!important;
}

.media-title {
    text-align: center;
    width: 100%;
    max-width: 800px; /* Empêche de s'étaler trop */
    margin: 20px auto; /* Centre horizontalement */
}

.gallery-container {
    background-color: var(--container-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
    border-radius: 0.5rem;
    text-align: center;
    width: 80%;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    max-height: 600px;
    overflow-y: auto;
}

.media-item {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item img:hover {
    transform: scale(1.1);
    transition: 0.3s ease-in-out;
}

.image-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-preview img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.image-preview .close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.button_groupe_media{
    max-width: 26rem!important;
}
