/* ====== RESET ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;

}

/* Applique le dégradé sur toutes les pages */
body {
    background: linear-gradient(to bottom, #0c223f(12, 34, 63, 1), rgba(12, 34, 63, 0.8), rgba(12, 34, 63, 0.5), rgba(12, 34, 63, 0.2));
    background-attachment: fixed;
    /* Garde le dégradé en place */
    color: #333;
    font-family: 'Arial', sans-serif;

}


/* Autorise le scroll sur les autres pages */
body:not(.home) {
    height: auto;
    overflow: auto;
}

body.home {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    height: 100vh;
    /* La page entière prend la hauteur de l'écran */
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Empêche le défilement */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Gère les espaces */
}





body.home {
    overflow: auto !important;
}


/* ====== CONTENEUR PRINCIPAL ====== */
.container {
    width: 80%;
    max-width: 1000px;
    margin: 30px auto;
    background: rgba(215, 213, 213, 0.8);
    /* semi-transparent, par ex. */
    padding: 20px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#password-container {
    display: none;
}

/* ✅ Style du menu déroulant Admin */
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #ffffff;
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 1px solid #ddd;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* ✅ Style des liens du menu Admin */
.dropdown-menu li {
    text-align: left;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    color: #2c3e50;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: #f39c12;
    color: white;
}

/* ✅ Animation du menu */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== BANNIÈRE ====== */
.banner {
    width: 100%;
    height: 100vh;
    /* Presque toute la page */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    overflow: hidden;
}

.banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(12, 34, 63, 1), rgba(12, 34, 63, 0.8), rgba(12, 34, 63, 0.5), rgba(12, 34, 63, 0));
    z-index: 1;
    /* S'assure que le fond reste derrière */
}

.banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/stage.jpg') no-repeat center center/cover;
    opacity: 0.5;
    z-index: 0;
    /* L'image de fond reste la plus basse */
}


/* ====== TITRE CENTRAL ====== */
.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(233, 226, 226, 0.749);
    /* Augmente l'opacité pour rendre le texte plus lisible */
    padding: 20px;
    border-radius: 10px;
    color: black;
    width: 80%;
    max-width: 800px;
    z-index: 2;
    /* Met la bannière au-dessus */
}

.banner-content h1 {
    font-size: 50px;
    /* Réduit légèrement la taille */
    font-weight: bold;
    margin-bottom: 20px;
    color: black;
}

.banner-content h2 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 15px;
    color: rgb(255, 255, 255);
}


.banner-message {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(72, 71, 71);
}

.banner-btn {
    display: inline-block;
    background: #f39c12;
    color: black;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    margin: 10px 5px;
}

.banner-btn:hover {
    background: #e67e22;
}

/* Correction pour éviter les chevauchements */
.banner-content p {
    margin: 10px 0;
    font-size: 18px;
}


/* ====== NAVIGATION ====== */
.main-nav {
    background-color: #0c223f;
    padding: 40px 40px;
    /* Espace sous le menu */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Force la largeur à couvrir toute l'écran */
    min-width: 100%;
    position: relative;
    z-index: 10;

}

.nav-left {
    display: flex;
    align-items: center;
}

.header-logo {
    position: absolute;
    /* Positionne le logo */
    top: 10px;
    /* Distance du haut */
    left: 10px;
    /* Distance de la gauche */
    width: 140px;
    /* Ajuste la taille */

}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 15px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: #f39c12;
    border-radius: 5px;
}

/* Style pour l'onglet actif */
.nav-menu li a.active {
    background-color: #f39c12;
    border-radius: 5px;
    color: white;
}

/* Corrige le problème de surbrillance sur le dropdown */
.dropdown>a.active {
    background-color: #f39c12;
    border-radius: 5px;
}

/* ====== STYLE DU MENU DÉROULANT ====== */
.dropdown-menu {
    display: none;
    /* Caché par défaut */
    position: absolute;
    background-color: #ffffff;
    /* Fond blanc pour un bon contraste */
    list-style: none;
    padding: 10px 0;
    min-width: 220px;
    /* Légèrement plus large */
    border-radius: 8px;
    /* Coins arrondis pour un design moderne */
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    /* Ombre plus marquée pour bien le distinguer */
    z-index: 1000;
    /* S'assure qu'il passe au-dessus des autres éléments */
    border: 1px solid #ddd;
    /* Ajoute une bordure fine */
}

/* Items du menu */
.dropdown-menu li {
    text-align: left;
}

/* Liens du menu */
.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    /* Plus d’espace pour cliquer */
    color: #2c3e50;
    /* Texte foncé pour lisibilité */
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    /* Animation fluide */
    border-radius: 5px;
    /* Coins arrondis sur les éléments */
}

/* Effet au survol */
.dropdown-menu li a:hover {
    background-color: #f39c12;
    /* orange pour bien ressortir */
    color: white;
    /* Texte blanc pour contraste */
    padding-left: 25px;
    /* Léger effet de mouvement */
}

/* Affichage du menu au survol */
.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
    /* Animation fluide */
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}






/* ====== TITRES ====== */
h1 {
    text-align: center;
    font-size: 28px;
    color: rgb(46, 46, 46);
    margin: 20px 0;
}

h2 {
    text-align: center;
    font-size: 22px;
    color: white;
    margin-bottom: 15px;
}

h3 {
    text-align: center;
    font-size: 18px;
    color: #555;
}

/* ====== STYLE DES BOUTONS ====== */
.dataTables_wrapper .dt-buttons button {
    background-color: #444 !important;
    /* Gris foncé pour le fond */
    color: white !important;
    /* Texte blanc pour un bon contraste */
    border: 1px solid #888;
    /* Bordure plus visible */
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    text-transform: uppercase;
}

.dataTables_wrapper .dt-buttons button:hover {
    background-color: #626262 !important;
    /* Assombrir au survol */
}

.selection-buttons {
    margin-bottom: 15px;
}

.selection-btn {
    background-color: #0c223f;
    color: white;
    padding: 8px 15px;
    /* ... autres styles ... */
}

/* ====== TABLEAU - STRUCTURE ====== */
#stagesTable {
    width: 200px;
    border-collapse: collapse;
    background-color: #797979;
    white-space: normal;
    /* Permet le passage à la ligne */
    word-wrap: break-word;
    /* Coupe les mots longs */
    overflow-wrap: break-word;

    /* Fond clair */
}

/* ====== STYLE DES CELLULES (TH & TD) ====== */
#stagesTable th,
#stagesTable td {
    border: 0.5px solid #444 !important;
    /* Bordure gris foncé */
    padding: 12px;
    text-align: center;
}

/* Style spécifique pour les colonnes très longues (comme description_structure) */
#stagesTable td:nth-child(36),
/* Ajustez l'index selon la position de la colonne */
#stagesTable td:nth-child(37),
#stagesTable td:nth-child(38),
#stagesTable td:nth-child(39) {
    max-width: 300px;
    /* Plus large pour les descriptions longues */
}


/* ====== STYLE DES TITRES (TH) ====== */
#stagesTable th {
    background-color: #706f6f !important;
    /* Fond gris très foncé */
    color: white !important;
    font-weight: bold;
    text-transform: uppercase;
}

/* ====== STYLE DES LIGNES ALTERNÉES ====== */
#stagesTable tr:nth-child(odd) {
    background-color: #e0e0e0;
    /* Gris clair */
}

#stagesTable tr:nth-child(even) {
    background-color: #ffffff;
}

/* ====== STYLE AU SURVOL ====== */
#stagesTable tr:hover {
    background-color: #d6d6d6;
    /* Assombrir légèrement */
    transition: 0.3s ease-in-out;
}

.dataTables_filter {
    margin: 20px 0;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    color: grey !important;
    font-weight: bold;
    font-size: 16px;
}

.dataTables_filter input {
    margin-left: 10px;
    padding: 8px 12px;
    border: 2px solid #0c223f;
    border-radius: 4px;
    width: 250px;
    font-size: 14px;
    color: #333 !important;
    background-color: #fff !important;
}

/* Override pour s'assurer que le texte "Rechercher" est visible */
div.dataTables_wrapper div.dataTables_filter label {
    color: #333 !important;
    font-weight: bold;
}

/* Style pour le sélecteur de colonnes */
#columnSelector {
    background: #ffffff;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#columnSelector label {
    display: inline-block;
    padding: 5px 10px;
    margin: 3px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
}

#columnSelector input[type="checkbox"] {
    margin-right: 5px;
}

#applyColumns {
    display: block;
    width: 200px;
    margin: 15px auto 0;
    padding: 10px;
    background: #0c223f;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

#applyColumns:hover {
    background: #1e3a5f;
}

/* ====== TABLEAU - STRUCTURE ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #f8f8f8;
    /* Fond clair */
}

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

/* ====== TITRES DU TABLEAU ====== */
th {
    background-color: #6b6a6a;
    /* Fond gris foncé */
    color: white;
    /* Texte blanc */
    font-weight: bold;
    text-transform: uppercase;
    padding: 15px;
}

/* ====== EFFET SURVOL ====== */
tr:hover {
    background-color: #e0e0e0;
    /* Gris clair au survol */
    transition: 0.3s ease-in-out;
}

/* ====== ALTERNANCE COULEURS LIGNES ====== */
tr:nth-child(odd) {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #ffffff;
}

/* ====== STYLE DES INFORMATIONS ====== */
td {
    font-size: 14px;
    color: #333;
    /* Texte foncé pour une meilleure lisibilité */
    font-weight: normal;
}

/* ====== TITRES DES COLONNES GRIS AVEC CONTRASTE ====== */
td:first-child {
    background-color: #d6d6d6;
    /* Gris moyen */
    font-weight: bold;
    color: black;
    text-transform: capitalize;
}

/* ✅ Titre principal bien mis en valeur */
h2 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 30px 0 20px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #0c223f, #1e3a5f);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ====== FORMULAIRES (LOGIN, INPUTS, ETC.) ====== */
form {
    width: 100%;
    /* Augmente la largeur */
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.form-group label {
    flex: 1;
    min-width: 150px;
    font-weight: bold;
}


input[type="text"],
input[type="email"],
input[type="password"] {
    flex: 2;
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}


button {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 20px auto;
    padding: 12px;
    background: #3498db;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


button:hover {
    background: #2980b9;
}

.stage-container {
    border: 1px solid #ddd;
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.stage-container2 {
    border: 1px solid #ddd;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    /* Augmente l'espace intérieur */
    width: 100%;
    max-width: 100%;
    /* Empêche le rétrécissement */
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}



.stage-container2 h3 {
    background: #2c3e50;
    color: white;
    padding: 10px;
    text-align: center;
    width: 100%;
    margin: -20px -20px 15px -20px;
    border-radius: 5px 5px 0 0;
}

.stage-container2 label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
}

.stage-container2 select {
    width: 100%;
    max-width: 250px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-top: 5px;
}

.stage-container2 input[type="checkbox"] {
    margin-right: 10px;
}

.stage-container2 .select-container {
    margin-bottom: 15px;
}

.stage-container h3 {
    margin-top: 0;
    font-size: 18px;
    color: #34495e;
}

.stage-container label {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;

}

select {
    width: 100%;
    max-width: 150px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    display: block;
    /* Pour forcer le select à être sur une ligne à part */
    margin-bottom: 10px;
    /* Ajoute un espace sous le select */
}


/* ====== TABLES ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}


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

th {
    background-color: #2c3e50;
    color: white;
}

/* ====== HORAIRES FORM ====== */


.horaires-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.horaires-table th,
.horaires-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.horaire-input {
    width: 100px;
    padding: 5px;
}

#total-heures-container {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.stage-block {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.periode-selection,
.students-selection {
    margin: 10px 0;
}

.periode-selection label,
.students-selection label {
    display: inline-block;
    width: 180px;
    margin-right: 10px;
}

.periode-selection select,
.students-selection select {
    padding: 5px;
    min-width: 250px;
}

/* ====== SECTION DOCUMENTS UTILES ====== */
.documents-container {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto;
    max-width: 800px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.documents-container h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 15px;
}

.documents-container p {
    text-align: center;
    margin-bottom: 20px;
}

.documents-list {
    list-style: none;
    /* Supprime les puces par défaut */
    padding: 0;
    /* Retire la marge interne */
    text-align: center;
    /* Centre la liste */
}

.documents-list li {
    margin: 10px 0;
}

.documents-list a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.documents-list a:hover {
    text-decoration: underline;
}

textarea {
    width: 100%;
    /* Utilise toute la largeur disponible */
    height: 150px;
    /* Augmente la hauteur */
    resize: vertical;
    /* Permet à l'utilisateur de l'agrandir en hauteur */
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
}

textarea.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Page Étudiants - Cards d'options */
.student-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.option-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option-card h3 {
    color: #0c223f;
    margin-top: 0;
}

.btn-student {
    display: inline-block;
    background-color: #0c223f;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.btn-student:hover {
    background-color: #183e6f;
}

/* Page Liste Terrains et Terrains par période */
.filter-section {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.filter-btn,
.reset-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.filter-btn {
    background-color: #0c223f;
    color: white;
}

.filter-btn:hover {
    background-color: #183e6f;
}

.reset-btn {
    background-color: #f1f1f1;
    color: #333;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.reset-btn:hover {
    background-color: #ddd;
}

.results-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-section h2 {
    margin-top: 0;
    color: #0c223f;
    border-bottom: 2px solid #0c223f;
    padding-bottom: 10px;
}

.btn-details {
    background-color: #0c223f;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.btn-details:hover {
    background-color: #183e6f;
}



/* Badges périodes et places */
.periode-badge {
    display: inline-block;
    padding: 6px 10px;
    margin: 3px 0;
    background-color: #e0f2ff;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.periode-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.periode-badge strong {
    color: #333;
}

.places-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 5px;
    background-color: #0c223f;
    color: white;
    border-radius: 50%;
    font-size: 0.8em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.periode-mini-badge {
    display: inline-block;
    padding: 3px 6px;
    margin: 0 2px;
    font-size: 0.8em;
    border-radius: 3px;
    background-color: #f0f0f0;
    color: #333;
}

/* Couleurs pour les différents semestres */
.semestre-s2 {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-left: 2px solid #2196f3;
}

.semestre-s3 {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-left: 2px solid #4caf50;
}

.semestre-s4 {
    background-color: #fff8e1;
    color: #ff6f00;
    border-left: 2px solid #ffc107;
}

.semestre-s5 {
    background-color: #ffebee;
    color: #b71c1c;
    border-left: 2px solid #f44336;
}

.semestre-s6 {
    background-color: #f3e5f5;
    color: #4a148c;
    border-left: 2px solid #9c27b0;
}

/* Navigation */
.back-links {
    margin-top: 30px;
    text-align: center;
}

.btn-back,
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin: 0 10px;
    transition: background-color 0.3s;
}

.btn-back,
.btn-primary {
    background-color: #0c223f;
    color: white;
}

.btn-back:hover,
.btn-primary:hover {
    background-color: #183e6f;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Page de détail terrain */
.terrain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.terrain-header h1 {
    margin: 0;
    color: #0c223f;
}

/* Styles pour les domaines de stage avec les couleurs spécifiées */
.domaine-ssr {
    background-color: #ffeeb3;
    /* Jaune clair pour SSR */
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.domaine-sm {
    background-color: #e0f5e0;
    /* Vert clair pour Santé mentale */
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.domaine-lvie {
    background-color: #e0f0ff;
    /* Bleu clair pour Lieu de vie */
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Style pour le captcha */


.captcha-container {
    margin: 20px 0;
}

.captcha-display {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 5px;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    display: inline-block;
}

.captcha-info {
    font-size: 14px;
    color: #666;
    margin: 5px 0 10px 0;
}

/* Style pour les sections admin */
.admin-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-section-card {
    flex: 1;
    min-width: 300px;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section-card h2 {
    margin-top: 0;
    color: #0c223f;
    border-bottom: 2px solid #0c223f;
    padding-bottom: 10px;
}

.admin-link {
    display: block;
    margin: 10px 0;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s;
}

.admin-link:hover {
    background-color: #2980b9;
}

.admin-link.green {
    background-color: #27ae60;
}

.admin-link.green:hover {
    background-color: #219653;
}

.admin-link.orange {
    background-color: #f39c12;
}

.admin-link.orange:hover {
    background-color: #d35400;
}

/* Style amélioré pour les terrains obligatoires */
.terrain-obligatoire {
    background-color: #fff8e1 !important;
    /* Fond jaune très clair */
    border-left: 4px solid #ffc107;
}

.terrain-obligatoire td:first-child {
    position: relative;
    font-weight: bold;
}

.tag-obligatoire {
    background-color: #ffc107;
    color: #000;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-left: 5px;
    white-space: nowrap;
    font-weight: normal;
}

.terrain-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.terrain-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.terrain-section.full-width {
    grid-column: 1 / -1;
}

.terrain-section h2 {
    color: #0c223f;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0c223f;
    margin-bottom: 15px;
}

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

.detail-table th {
    text-align: left;
    padding: 10px;
    background-color: #f5f5f5;
    width: 40%;
    vertical-align: top;
    color: #0c223f;
    border-bottom: 1px solid #ddd;
}

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

.horaires-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.horaires-table th {
    background-color: #0c223f;
    color: white;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.horaires-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.horaires-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.total-heures {
    margin-top: 20px;
    text-align: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.total-heures h3 {
    margin: 0;
    color: #0c223f;
}

.total-heures .warning {
    color: #dc3545;
    margin-top: 5px;
    font-weight: bold;
}

.description-box {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #0c223f;
    white-space: pre-line;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    padding: 30px;
}

.no-results p:first-child {
    font-size: 18px;
    color: #666;
}

/* DataTables customisation */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0c223f;
    color: white !important;
    border-color: #0c223f;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #183e6f;
    color: white !important;
    border-color: #183e6f;
}

/* ====== Structures différentes ====== */

.structure-list {
    list-style-type: none;
    padding: 0;
}

.structure-item {
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.structure-item:hover {
    transform: translateY(-3px);
}

.structure-label {
    display: block;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.structure-label:hover {
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.structure-header {
    font-size: 18px;
    margin-bottom: 5px;
}

.structure-details {
    color: #666;
    font-size: 14px;
}

.select-btn {
    margin-top: 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.select-btn:hover {
    background-color: #0b7dda;
}

.back-link {
    margin-top: 20px;
    display: inline-block;
    color: #2196F3;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Styles pour stages_par_annee.php */
.refuser-tous-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

.btn-refuser-tous {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-refuser-tous:hover {
    background-color: #f1b0b7;
}

.position-info {
    background-color: #e2f3ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 5px solid #007bff;
}

/* Styles pour admin_attribution_obligatoire.php */
.stats-card {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.stats-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.progress-bar {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #28a745;
}

.attribution-list {
    margin-top: 20px;
}

.attribution-item {
    background: #f0f8ff;
    padding: 10px;
    margin-bottom: 5px;
    border-left: 3px solid #007bff;
}

.periode-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.periode-tab {
    padding: 10px 15px;
    cursor: pointer;
    margin-right: 5px;
}

.periode-tab.active {
    background-color: #007bff;
    color: white;
    border-radius: 5px 5px 0 0;
}

/* Styles pour admin_tirage.php */
.drag-group {
    padding: 10px;
    margin: 5px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: move;
}

.groupe-container {
    display: flex;
    margin: 10px 0;
}

.tirage-section {
    margin-top: 30px;
}

.tirage-etat {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.tirage-etat h3 {
    margin-top: 0;
}

.countdown {
    color: #dc3545;
    font-weight: bold;
}

/* Styles communs */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

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

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

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    margin-right: 10px;
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.btn-back:hover {
    background-color: #5a6268;
    text-decoration: none;
    color: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group select {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ced4da;
}

/* ====== FOOTER ====== */
footer {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {

    /* Structure générale */
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        max-width: 100%;
    }

    body.home {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        padding-bottom: 100px;
        /* Espace pour le footer */
    }

    /* Bannière et contenu */
    .banner {
        height: auto;
        min-height: 70vh;
        padding: 80px 0 40px;
    }

    .banner-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 90%;
        margin: 0 auto;
        padding: 25px 15px;
    }

    .banner-content h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    .banner-content h2 {
        font-size: 18px;
        line-height: 1.4;
    }

    .banner-content p {
        font-size: 16px;
    }

    .banner-message {
        margin: 15px 0;
    }

    .banner-btn {
        display: block;
        width: 80%;
        max-width: 250px;
        margin: 15px auto;
        text-align: center;
    }

    /* Navigation */
    .main-nav {
        padding: 15px;
        flex-direction: column;
    }

    .header-logo {
        position: relative;
        top: 0;
        left: 0;
        width: 100px;
        margin: 0 auto 15px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 10px 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu li a {
        display: block;
        padding: 12px 5px;
    }

    /* Container et formulaires */
    .container {
        width: 95%;
        padding: 15px;
        margin: 20px auto;
    }

    form {
        padding: 15px;

    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        width: 100%;
        margin-bottom: 5px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        width: 100%;
        max-width: 100%;
    }

    /* Corrections pour éviter le chevauchement avec le footer */
    .content-wrapper {
        min-height: calc(100vh - 150px);
        padding-bottom: 30px;
    }

    /* Message de déconnexion */
    .logout-message,
    .alert-message {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: rgba(46, 204, 113, 0.9);
        color: white;
        padding: 10px;
        text-align: center;
        animation: fadeOut 5s forwards;
        margin: 0 auto;
        width: 80%;
        max-width: 300px;
        border-radius: 5px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    @keyframes fadeOut {
        0% {
            opacity: 1;
        }

        70% {
            opacity: 1;
        }

        100% {
            opacity: 0;
            visibility: hidden;
        }
    }

    /* Amélioration des horaires sur mobile */
    .horaires-table {
        border: none;
        background: transparent;
    }

    /* Plus d'espace et meilleure présentation des jours */
    .horaires-table tr {
        margin-bottom: 30px;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        background-color: #f9f9f9;
    }

    /* Titre du jour plus visible */
    .horaires-table td:first-child {
        margin-bottom: 15px;
        font-size: 18px;
        text-align: center;
        padding: 10px;
    }

    /* Agrandir les champs pour faciliter la saisie */
    .horaire-input {
        width: 100%;
        height: 44px;
        font-size: 16px;
        padding: 10px;
        margin: 8px 3px;
        border: 2px solid #0c223f;
        border-radius: 6px;
    }

    /* Espacement vertical entre matin et après-midi */
    .horaires-table td:nth-child(3) {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid #ddd;
    }

    /* Styles améliorés pour les étiquettes Matin/Après-midi */
    .horaires-table td:nth-child(2)::before,
    .horaires-table td:nth-child(3)::before {
        display: block;
        margin-bottom: 10px;
        padding: 5px;
        background-color: #0c223f;
        color: white;
        text-align: center;
        border-radius: 5px;
        font-size: 15px;
    }

    /* Amélioration du total des heures */
    #total-heures-container {
        margin-top: 25px;
        padding: 15px;
        border-radius: 8px;
    }

    #total-heures {
        font-size: 20px;
        font-weight: bold;
    }
}

/* Footer */
footer {
    margin-top: 40px;
    height: auto;
}


/* Adaptation des tableaux pour le mobile - plus de coloration et meilleure organisation */
@media (max-width: 768px) {

    table,
    th,
    td {
        font-size: 14px;
    }

    /* Boutons et contrôles plus grands pour mobile */
    button,
    .banner-btn,
    .select-btn,
    input[type="submit"] {
        padding: 12px 15px;
        font-size: 16px;
        min-height: 44px;
        /* Taille minimale pour une bonne zone de tap */
    }

    /* Fixe le problème du message de déconnexion qui pousse le contenu */
    body.disconnected .banner-content {
        margin-top: 60px;
        /* Espace pour le message de déconnexion */
    }
}

/* Ajustements spécifiques pour les très petits écrans */
@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 24px;
    }

    .banner-content h2 {
        font-size: 16px;
    }

    .banner-btn {
        width: 90%;
    }

    /* Plus d'espace en bas pour éviter les problèmes avec le footer */
    body.home {
        padding-bottom: 120px;
    }
}