.presentation-layout {
    display: flex;
    align-items: flex-start;
    min-height: 80vh;
    width: min(90%, 1600px);
    padding: 0px;
    box-sizing: border-box;
    margin: 20px auto 100px auto;
    background-color: #fff;
}

.presentation-sidebar {
    flex: 0 0 250px;            /* distance depuis le haut */
    display: flex;         /* On passe en flex pour empiler proprement */
    flex-direction: column;
    align-self: flex-start; /* IMPORTANT dans un layout flex */
    height: fit-content;
    margin-top: 100px;
    gap: 90px;
}

.sidebar-title {
    font-size: 1.8em;
    font-weight: 800;
    color: rgba(40, 143, 226, 1);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.sidebar-menu {
    width: 100%;
    text-align: left;
}

nav.sidebar-menu {
    padding: 0; /* Réinitialise le padding */
}

/* MENU LISTE */
.sidebar-menu ul {
    list-style: none;            /* supprime les puces */
    margin: 0;
    padding: 0px;         /* 🔸 retrait du contenu */
    width: 100%;
}

.sidebar-menu li {
    display: block;
    width: 100%;
    text-transform: none;
}

.sidebar-menu a {
    color: #707070;
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease;
    text-align: left;
    display: block;
    text-transform: none;       /* ✅ casse normale */
    position: relative;         /* nécessaire pour le ::before */
}

.sidebar-menu a:hover {
    color: orange;
}


/* --- COLONNE DROITE --- */
.presentation-content {
    width: 100%;
    padding: 20px 60px;
    box-sizing: border-box;
}


.content-columns {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.column {
    flex: 1;
    padding: 0 20px 0 0;
    position: relative; /* nécessaire pour pseudo-élément */
}

/* Ligne verticale entre les colonnes */
.column.left::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;           /* épaisseur de la ligne */
    height: 100%;
    background-color: #ccc; /* couleur grise */
}
.column p.highlight {
    color: rgba(40, 143, 226, 1);
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 20px;
    line-height: 1.5;
    text-align: left;
}

p.normal {
    font-size: 18px;
    line-height: 1.5;
    color: gray;
    text-align: justify;
}

/* Texte bleu pour départements */
.departments-text {
    color: rgba(40, 143, 226, 1);
    font-weight: bold;
    margin-top: 50px;
    margin-bottom: 30px;
    text-align: left;
}

/* Section tuiles en 3 colonnes */
.departments-tiles {
    display: flex;
    gap: 0;
    margin-bottom: 40px;
}

.tile {
    flex: 1;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 0;
    /*box-shadow: 0 2px 6px rgba(0,0,0,0.1);*/
    min-height: 0 !important;
}

.tile h3 {
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    color: white;
}

.tile p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px;
    color: white;
    text-align: left;
}

.departments-tiles h3 {
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin: 0 0 5px 0;
    line-height: 18px;
    color: white; /* ou une autre couleur adaptée à ton thème */
    text-transform: none !important; /* désactive les majuscules */
}

/* Couleurs spécifiques */
.tile.cid {
    background-color: rgba(11, 41, 81, 1);
    border-bottom-right-radius: 60px;
}

.tile.biosis {
    background-color: rgba(22, 81, 156, 1);
    border-bottom-right-radius: 60px;
}

.tile.mpsi {
    background-color: rgba(40, 143, 226, 1);
    border-bottom-right-radius: 60px;
}

/* --- SECTION STATISTIQUES (EN BAS) --- */

.stats-section-wrapper {
    /* Assure que la section a la même largeur et est centrée que le reste du contenu */
    width: 95%;
    margin: 80px 0 80px 0; /* Marge au-dessus et en dessous de la section */
    padding: 0;
}

.stats-container {
    display: flex;
    flex-direction: column; /* Aligner le titre et la bulle verticalement */
    align-items: flex-start; /* Aligner tout à gauche */
    background-color: #fff;
    position: relative;
}

/* --- TITRE PRINCIPAL (270 personnes) --- */
.stats-title-block {
    display: flex;
    align-items: baseline; /* Alignement vertical du nombre et du texte */
    margin-bottom: 5px; /* Espace avant la bulle */
    position: relative;
    z-index: 20;
    background-color: #fff;
    padding-bottom: 5px;
}

.stats-number {
    font-family: 'Raleway', sans-serif;
    font-size: 6em; /* Grande taille pour le nombre */
    font-weight: 800; /* Bold */
    color: #092851; /* Bleu foncé */
    margin-right: 10px;
}

.stats-label {
    font-family: 'Raleway', sans-serif;
    font-size: 2em;
    font-weight: 600;
    color: #092851;
}

/* --- BULLE D'INFORMATIONS DÉTAILLÉE --- */
.stats-bubble {
    display: inline-flex;
    flex-wrap: wrap; /* Pour le responsive */
    padding: 40px 30px;
    border: 2px solid grey;
    border-radius: 15px;
    /* Calcule la largeur de la bulle pour qu'elle corresponde au texte "270 personnes" */
    width: 100%;
    margin-top: -15px;
    z-index: 1;
}

.stat-item {
    flex: 1;
    text-align: left;
    padding: 0; /* Espacement horizontal dans la bulle */
}

.stat-value {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: rgba(40, 143, 226, 1); /* Bleu clair pour les chiffres */
    margin-bottom: 15px;
}

.stat-description {
    display: block;
    font-size: 18px;
    color: rgba(40, 143, 226, 1);
}

/* Style de base pour les stat-item */
.stat-item .stat-value,
.stat-item .stat-description {
    transition: color 0.3s ease;
}

/* --- SÉPARATEUR VERTICAL --- */
.stat-separator {
    width: 1px;
    background-color: #ccc; /* Ligne grise légère */
    margin: 0 15px; /* Petit espacement de chaque côté du séparateur */
    /* Assure que le séparateur a la même hauteur que le contenu */
    align-self: stretch;
}

/* Correction du padding sur le premier/dernier élément */
.stats-bubble .stat-item:first-child {
    padding-left: 0;
}
.stats-bubble .stat-item:last-child {
    padding-right: 0;
}

.video-section {
    /*display: none; !* <--- AJOUTEZ CECI : La section ne prendra plus de place du tout *!*/
    max-width: 1200px;
    margin: 0; /* On peut mettre les marges à 0 */
    padding: 0;
}

.video-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1em;
    font-weight: 500;
    color: #092851; /* Bleu foncé */
    margin-bottom: 40px;
}

/* --- SECTION VIDÉO --- */
.cran-video-section {
    text-align: center;
    margin: 40px auto;
}

.cran-video {
    width: 100%;
    max-width: 1024px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: block;
    margin: 0 auto 15px;
}

#presentation-video {
    /* Ajustez les 150px selon la hauteur de votre header + fil d'ariane */
    scroll-margin-top: 150px;
}

/* Le déclencheur (bouton) */
.video-trigger {
    cursor: pointer;
    background: #0b2951;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 8px;
    width: fit-content;
    transition: background 0.3s;
}
.video-trigger:hover { background: #278EE1; }

/* La fenêtre modale (fond noir) */
.modal-overlay {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

/* Conteneur de la vidéo */
.modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
}

.modal-content video {
    width: 100%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Bouton fermer */
.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
/* --- LIEN YOUTUBE --- */
.youtube-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    text-decoration: none;           /* Supprime le soulignement */
    color: #FF0000;                  /* Rouge YouTube */
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* --- SÉPARATEUR HORIZONTAL DANS LA BARRE LATÉRALE --- */
.sidebar-hr {
    border: none;
    height: 1px;
    background-color: #eee; /* Gris clair */
    width: 100%;
    margin: 20px 0;
    padding: 0;
}

/* --- SECTION DE TÉLÉCHARGEMENT --- */
.sidebar-downloads {
    width: 100%;
    padding: 0px;
    box-sizing: border-box;
}

/* --- Ligne horizontale --- */
.sidebar-hr {
    border: none;
    border-top: 1px solid rgba(11, 41, 81, 1);
    opacity: 1;
    margin: 10px 0;
}

/* --- Layout en deux colonnes --- */
.download-content-layout {
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-content-layout > div:last-child,
.col-droite {
    flex: 1;            /* Elle prend tout l'espace disponible */
    white-space: nowrap; /* OPTIONNEL : Interdit formellement le retour à la ligne */
}

/* --- ICÔNE À GAUCHE --- */
.download-icon-block {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-download-icon {
    /*font-size: 4em; !* grosse icône *!*/
    color: rgba(11, 41, 81, 1);
    transition: transform 0.3s ease, color 0.3s ease;
    vertical-align: middle;
    margin-right: 0;
    width: 80px; /* Ajuste la taille ici */
    height: auto;
    flex-shrink: 0;
}

.large-download-icon:hover {
    transform: scale(1.1);
    color: #f57c00;
}

/* --- LIENS À DROITE --- */
.download-links {
    flex: 1;
}

.download-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.download-links li {
    margin-bottom: 8px;
}


.download-links a {
    display: inline-block;
    color: #0b2951;
    text-decoration: none;
    font-size: 12px;
    font-weight: 200;
    transition: color 0.3s ease, transform 0.2s ease;
    padding-left: 10px;
    position: relative;
}

.download-links a::before {
    position: absolute;
    left: 0;
    color: #f57c00;
    font-weight: bold;
    transition: left 0.2s ease;
}

.download-links a:hover {
    color: #f57c00;
    transform: translateX(3px);
}

.download-links a:hover::before {
    left: -2px;
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .presentation-layout {
        flex-direction: column;
    }

    .presentation-sidebar {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .presentation-content {
        width: 100%;
        padding: 30px 20px;
    }

    .content-columns {
        column-count: 1;
    }
}

@media (max-width: 768px) {
    .presentation-sidebar {
        margin-top: 0px;
        float: none !important; /* Annule le côté 'flottant' du desktop */
        width: 100% !important;
        clear: both; /* Sécurité anti-chevauchement */
    }

    .sidebar-menu {
        display: block !important;
        visibility: visible !important;
        margin-bottom: 20px; /* Une marge plus raisonnable si le clear fonctionne */
    }

    .presentation-content {
        clear: both; /* Force le texte à démarrer APRÈS la sidebar */
        display: block !important;
        width: 100% !important;
        padding: 20px 5px;
    }
    .stats-section-wrapper {
        margin: 40px auto 0px auto;
    }
    .content-columns {
        flex-direction: column; /* On empile les colonnes verticalement */
    }

    .column {
        width: 100%; /* Chaque colonne prend toute la largeur */
    }

    .column p.highlight {
        font-size: 16px;
        line-height: 1;
    }
    .column.right {
        margin-top: 20px; /* Petit espace entre le bloc du haut et celui du bas */
    }
    .column.left::after {
        display: none; /* On cache purement et simplement la barre verticale */
    }

    /* Optionnel : Remplacer par une séparation horizontale */
    .column.left {
        border-bottom: 1px solid #ccc; /* Une ligne entre les deux blocs */
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .departments-tiles {
        flex-direction: column; /* On passe de horizontal à vertical */
    }

    .tile {
        width: 100%; /* La tuile prend toute la largeur de l'écran */
        margin-bottom: 10px; /* Espace entre les tuiles empilées */
    }

    .stats-bubble {
        padding: 10px 5px;
    }
    .stats-number {
        font-size: 4em;
    }

    .stats-label {
        font-size: 1.5em;
    }
    .stat-value {
        font-size: 25px;
    }

    .stats-bubble .stat-item:last-child {
        padding-top: 15px;
    }

    .modal-overlay {
        display: none; /* Piloté par le JS */
        position: fixed;
        z-index: 100000; /* Doit être au-dessus du menu mobile */
        top: 0;
        left: 0;
        width: 100vw; /* Utilise 100vw pour ignorer les scrollbars */
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 0 !important; /* Nettoie toute marge interne */
        margin: 0 !important;
        overflow: hidden; /* Empêche le scroll de la page derrière */
    }

    /* 2. Forcer le flex quand le JS l'affiche */
    .modal-overlay[style*="display: block"] {
        display: flex !important;
    }

    /* 3. Conteneur de la vidéo */
    .modal-content {
        position: relative;
        width: 95%; /* Presque toute la largeur sur mobile */
        max-width: 900px; /* Limite sur PC */
        margin: auto;
    }

    /* 4. Le lecteur vidéo lui-même */
    #player {
        width: 100% !important;
        height: auto !important;
        display: block;
        border-radius: 4px;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
        background: #000; /* Évite un flash blanc au chargement */
    }

    /* 5. Le bouton de fermeture (la croix) */
    .close-modal {
        position: absolute;
        top: -50px; /* Place la croix au-dessus de la vidéo */
        right: 0;
        color: #ffffff;
        font-size: 45px;
        font-family: Arial, sans-serif;
        cursor: pointer;
        line-height: 1;
        padding: 10px;
    }

    p.normal {
        font-size: 14px;
    }
}
