/* 1. VARIABLES ET BASE */
:root { --c: #1a1a1a; --bg: #ffffff; --accent: #c00; --gray: #666; }
@media (prefers-color-scheme: dark) { :root { --c: #eeeeee; --bg: #0d0d0d; --gray: #999; } }

*, *::before, *::after { box-sizing: border-box; }

body { 
    margin: 0; 
    font: 1.1rem/1.6 'Inter', sans-serif; 
    color: var(--c); 
    background: var(--bg); 
    padding: 8vh 5vw; 
    display: grid; 
    place-items: center; 
    min-height: 100vh;
}

main { max-width: 1000px; width: 100%; text-align: center; }

/* 2. TYPOGRAPHIE */
h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); font-weight: 900; margin: 0; letter-spacing: -0.02em; }
h1 small { font-size: clamp(1.1rem, 4vw, 1.3rem); display: block; opacity: 0.6; font-weight: 400; margin-top: 0.5rem; }

/* 3. BOUTONS (CTA) */
.cta { 
    display: inline-block; 
    background: var(--c); 
    color: var(--bg); 
    padding: 1.2rem 2.5rem; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 700; 
    margin-bottom: 5rem; /* Valeur exacte de ton index.php original */
    transition: transform 0.2s; 
    border: 2px solid var(--c);
}
.cta:hover { transform: scale(1.03); }
.cta-alt { background: transparent; color: var(--c); margin-bottom: 5rem; margin-left: 10px; }

/* 4. SECTIONS SPÉCIFIQUES */
.price-box { margin: 3rem 0; }
.price-main { font-size: clamp(2.5rem, 10vw, 3.5rem); font-weight: 900; color: var(--accent); }
.price-sub { font-size: 1.1rem; opacity: 0.7; }

.eligible { max-width: 650px; margin: 0 auto 3rem; padding: 2rem; border: 1px solid rgba(128,128,128,0.2); border-radius: 20px; }

/* 5. LE MARQUEE */
.marquee { margin: 6rem 0; overflow: hidden; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.marquee h2 { font-size: 1.1rem; margin-bottom: 3rem; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.15em; }
.track { display: flex; gap: 2rem; width: max-content; animation: scroll 60s linear infinite; }
.site { flex: none; width: 320px; background: var(--bg); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.site img { width: 100%; height: 200px; object-fit: cover; filter: grayscale(100%); transition: 0.4s; }
.site:hover img { filter: grayscale(0%); }
.site a { display: block; padding: 1rem; font-weight: 700; font-size: 0.9rem; text-decoration: none; color: inherit; }

@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* 6. REVIEWS & CERTIF */
.reviews { margin: 4rem 0; }
.stars { color: #f2b01e; font-size: 1.5rem; }
.certif { margin: 5rem 0; font-size: 0.85rem; color: var(--gray); opacity: 0.7; }

/* 7. FOOTER RESPIRANT */
/*footer { 
    padding-top: 2rem; 
    border-top: 1px solid rgba(128,128,128,0.1); 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    width: 100%;
}
.contact-link { color: var(--c); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
*/
/* 7. FOOTER RESPIRANT & COMPLIANCE */
footer { 
    padding: 4rem 0 2rem; 
    border-top: 1px solid rgba(128,128,128,0.1); 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    width: 100%;
    margin-top: 5rem;
}

/* On stylise les blocs du footer pour qu'ils soient égaux */
footer > div { flex: 1; }

.footer-left { text-align: left; }
.footer-center { text-align: center; }
.footer-right { text-align: right; }

.contact-link { 
    color: var(--c); 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 1.1rem; 
    transition: opacity 0.2s;
}
.contact-link:hover { opacity: 0.7; }

/* Responsive : On empile sur mobile */
@media (max-width: 768px) {
    footer { 
        flex-direction: column; 
        align-items: center !important; 
        gap: 2rem; 
        text-align: center; 
    }
    footer > div { text-align: center !important; }
}

/* 8. LOGIN FORM */
form.auth { background: #1a1a1a; padding: 2rem; border-radius: 12px; width: 300px; display: flex; flex-direction: column; gap: 1rem; margin: 0 auto; }
form.auth input { padding: 0.8rem; border-radius: 6px; border: 1px solid #333; background: #000; color: #fff; }

/* DESIGN DES OREILLES DE NAVIGATION */
.nav-ear { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    /* Fond sombre pour qu'il ressorte sur le blanc/gris */
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(4px); /* Effet premium */
    color: #ffffff !important; 
    text-decoration: none; 
    width: 45px; 
    height: 80px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 12px; 
    font-size: 2rem; 
    transition: all 0.3s ease;
    z-index: 99; 
    /* Une petite bordure pour bien délimiter la forme */
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.ear-left { left: -70px; background: #00EE21; }
.ear-right { right: -70px; background: var(--accent); }
.quiz-btn { background: #28a745; border-radius: 50%; width: 60px; height: 60px; right: -75px; font-size: 1.2rem; }

.nav-ear:hover { background: rgba(255,255,255,0.2); transform: translateY(-50%) scale(1.1); }
.ear-right:hover { background: #ff0000; }

/* RESPONSIVE : Mobile & Tablettes */
@media (max-width: 1200px) {
    .nav-ear {
        position: static;
        transform: none;
        width: 48%;
        height: auto;
        padding: 10px;
        display: inline-flex;
        margin-top: 1rem;
    }
    .ear-left { margin-right: 2%; }
    .video-container { text-align: center; }
    .nav-ear:hover { transform: scale(1.02); }
    #btnProg { top: auto; bottom: 20px; transform: none; border-radius: 0 10px 10px 0; }
}

/* --- FORMATION PAGE STYLES --- */

/* Navigation Haute */
.top-nav { position: absolute; top: 15px; right: 15px; display: flex; gap: 15px; align-items: center; z-index: 100; }
.nav-pill { font-size: 0.7rem; opacity: 0.6; color: #8DCEFF/*var(--c)*/; text-decoration: none; border: 1px solid rgba(128,128,128,0.3); padding: 5px 12px; border-radius: 20px; transition: 0.3s; }
.nav-pill:hover { opacity: 1; background: rgba(128,128,128,0.1); }
.nav-logout { font-size: 0.7rem; opacity: 0.5; color: var(--accent); text-decoration: none; font-weight: bold; }

/* Bouton Programme */
#btnProg { position: fixed; left: 0; top: 50%; transform: translateY(-50%); background: #1a1a1a; border: 1px solid #333; border-left: none; color: #fff; padding: 20px 8px; border-radius: 0 10px 10px 0; cursor: pointer; z-index: 1000; backdrop-filter: blur(10px); }
#btnProg span { writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.65rem; letter-spacing: 3px; opacity: 0.7; font-weight: 900; }

/* Header Vidéo */
.video-header { text-align: left; margin-bottom: 2rem; }
.video-header small { opacity: 0.5; text-transform: uppercase; letter-spacing: 1px; }
.video-header h1 { font-size: 2rem; margin-top: 0.5rem; }

/* Oreilles & Container */
.video-container { position: relative; width: 100%; margin-bottom: 2rem; }
.iframe-wrapper { aspect-ratio: 16/9; width: 100%; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); }
.iframe-wrapper iframe { width: 100%; height: 100%; }

.nav-ear { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.05); color: #fff; text-decoration: none; width: 50px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 2rem; transition: 0.3s; z-index: 10; }
.ear-left { left: -70px; background: #00ee28 !important; }
.ear-right { right: -70px; background: var(--accent); }
.quiz-btn { background: #28a745; border-radius: 50%; width: 60px; height: 60px; right: -75px; font-size: 1.2rem; }

/* Sidebar */
#progressionSide { position: fixed; left: -350px; top: 0; width: 320px; height: 100%; background: #0d0d0d; border-right: 1px solid #222; z-index: 2000; transition: 0.3s ease; padding: 2rem; overflow-y: auto; }
.side-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.side-header h3 { margin:0; font-size: 0.8rem; opacity: 0.5; letter-spacing: 2px; }
.side-module { margin-bottom: 1.8rem; }
.side-module.locked { opacity: 0.4; }
.mod-label { font-size: 0.7rem; font-weight: 900; color: #555; }
.side-module.active .mod-label { color: var(--accent); }
.mod-link { text-decoration: none; color: #bbb; font-size: 0.9rem; display: block; margin-top: 4px; }
.side-module.active .mod-link { color: #fff; font-weight: bold; }
.video-list { margin-left: 5px; border-left: 1px solid var(--accent); margin-top: 10px; padding-left: 15px; }
.video-list a { display: block; font-size: 0.8rem; color: #666; text-decoration: none; margin-bottom: 6px; }
.video-list a.current { color: #fff; }
.video-list a span { opacity: 0.3; }

/* TP & Erreurs */
.tp-box { background: var(--accent); color: #fff; padding: 1.5rem; border-radius: 10px; margin: 2rem 0; text-align: left; border-left: 5px solid #000; }
.tp-box a { color: #fff; font-weight: bold; }
.error-screen { text-align:center; padding:5vh; background:#0d0d0d; color:#fff; min-height:100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }

#overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:1500; backdrop-filter: blur(2px); }

/* Responsive */
@media (max-width: 1200px) {
    .nav-ear { position: static; transform: none; width: 48%; display: inline-flex; margin-top: 1rem; height: 50px; }
    .ear-left { margin-right: 2%; }
    .video-container { text-align: center; }
    .top-nav { position: relative; top: 0; right: 0; margin-bottom: 20px; justify-content: center; }
}

/* À mettre tout en haut ou tout en bas de style.css JE V Le MALAXER*/
/*html {
    background-color: #0d0d0d !important;
}

body {
    background-color: #0d0d0d !important;
    transition: opacity 0.2s ease-in; 
}
*/

/* Uniquement quand le body a la classe formation-page */
body.formation-page {
    background: #0d0d0d !important;
    color: #fff !important;
}

body.formation-page main {
    background: #0d0d0d !important;
}

/* Ton accueil (index.php) n'étant pas dans formation-page, il restera normal */


/* Si le bouton programme est présent, on sait qu'on est sur la page cours */
body:has(#btnProg) {
    background-color: #0d0d0d !important;
}

body:has(#btnProg) main {
    background-color: #0d0d0d !important;
    color: #ffffff !important;
}

/* On force le blanc sur les textes de l'accueil pour être sûr */
body:not(:has(#btnProg)) main {
    background-color: transparent; /* Ou ta couleur d'accueil */
    color: inherit;
}

/* Positionnement du logo en arrière-plan au centre */
.bg-logo {
    position: fixed;         /* Reste fixe au centre même quand on scrolle */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;           /* Taille sur PC */
    opacity: 0.05;          /* TRÈS discret pour l'effet profondeur (5%) */
    z-index: -1;            /* Passe derrière TOUT le reste */
    pointer-events: none;   /* On peut pas cliquer dessus par erreur */
    filter: grayscale(1);   /* Optionnel : pour qu'il soit gris/blanc neutre */
}

/* Ajustement pour mobile */
@media screen and (max-width: 768px) {
    .bg-logo {
        width: 250px;       /* Un peu plus petit sur tel */
        opacity: 0.08;      /* Un peu plus d'opacité sur mobile car les écrans sont sombres */
    }
}

/* --- QUIZ PAGE ENHANCEMENTS --- */

/* On force le fond sombre pour la page quiz si nécessaire */
body:has(.quiz-container) {
    background-color: #0d0d0d !important;
}

.quiz-container h1 {
    color: #ffffff; /* Titre principal en blanc pur */
    text-shadow: 0 2px 10px rgba(255,255,255,0.1);
}

.quiz-container p[style*="opacity: 0.6"] {
    color: var(--accent) !important; /* Le nom du module en rouge accent */
    font-weight: bold;
    opacity: 1 !important;
    letter-spacing: 1px;
}

.quiz-card {
    background: #161616; /* Gris très sombre pour détacher du fond */
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid #222;
    transition: border-color 0.3s ease;
}

.quiz-card:hover {
    border-color: #333;
}

/* LA QUESTION : On la colore pour qu'elle ne soit pas grise/blanche fade */
.quiz-card p strong {
    color: #8DCEFF; /* Bleu clair type "code/info" pour la lisibilité */
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}

/* LES OPTIONS */
.option-label {
    display: flex;
    align-items: center;
    padding: 18px;
    margin-bottom: 12px;
    cursor: pointer;
    border-radius: 10px;
    border: 1px solid #222;
    background: #000;
    transition: all 0.2s ease;
    color: #ccc; /* Texte des réponses en gris clair */
}

.option-label:hover {
    background: #1a1a1a;
    border-color: var(--gray);
    color: #fff;
}

/* Quand on coche une option */
.option-label:has(input:checked) {
    border-color: #00EE21; /* Bordure verte si sélectionné */
    background: rgba(0, 238, 33, 0.05);
    color: #fff;
}

.option-label input {
    margin-right: 15px;
    accent-color: #00EE21; /* Checkbox verte */
}

/* BOUTON VALIDER */
.btn-validate {
    background: #00EE21; /* Vert flash */
    color: #000;
    border: none;
    width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s, filter 0.2s;
}

.btn-validate:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.error-box {
    background: #451010; /* Fond rouge sombre */
    color: #ffcfcf;      /* Texte rose très clair pour le contraste */
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 6px solid #ff0000; /* Barre rouge vive à gauche */
    font-size: 1.1rem;
    animation: shake 0.5s ease-in-out; /* Petit effet d'alerte */
}

.error-box strong {
    color: #fff;
    text-transform: uppercase;
    margin-right: 10px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ANIMATION PULSE SUBTILE (Bleu Cloud) 
@keyframes bluePulse {
    0% {
        color: #e0f7fa; /* Ton bleu super clair d'origine (100% opacité) 
        text-shadow: 0 0 5px rgba(224, 247, 250, 0.5); /* Halo discret 
    }
    50% {
        color: rgba(224, 247, 250, 0.4); /* Le bleu s'atténue (40% opacité) 
        text-shadow: 0 0 2px rgba(224, 247, 250, 0); /* Halo disparaît 
    }
    100% {
        color: #e0f7fa; /* Revient au bleu d'origine 
        text-shadow: 0 0 5px rgba(224, 247, 250, 0.5); /* Halo revient 
    }
}

.pulse-blue {
    animation: bluePulse 5s ease-in-out infinite;
     On force la couleur de base pour les navigateurs qui ne gèrent pas les animations 
    color: #e0f7fa !important;
}
*/

@keyframes bluePulse {
    0% {
        color: #e0f7fa; /* Bleu électrique clair */
        text-shadow: 0 0 8px rgba(224, 247, 250, 0.4);
    }
    50% {
        color: #4a90e2; /* Bleu plus profond, type "Linux Terminal" */
        text-shadow: 0 0 2px rgba(74, 144, 226, 0);
    }
    100% {
        color: #e0f7fa;
        text-shadow: 0 0 8px rgba(224, 247, 250, 0.4);
    }
}

.pulse-blue {
    animation: bluePulse 4s ease-in-out infinite !important;
    font-weight: 500;
}

