/* =======================================================
   1. VARIABLES & CONFIGURATION
   ======================================================= */
:root {
    --vert-eau: #B4D4D4;
    --vert-fonce: #2D4F4F;
    --chocolat: #4E3B31;
    --marron-clair: #A68966;
    
    --blanc-glass: rgba(255, 255, 255, 0.20);
    --border-glass: rgba(255, 255, 255, 0.3);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --blur: 15px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--vert-fonce);
    min-height: 100vh;
    width: 100vw;
    
    /* FOND PAR DÉFAUT (IMAGE) */
    background-image: url('fond.jpg'); 
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-color: var(--vert-eau);
}


/* =======================================================
   2. VIDÉO DE FOND (Uniquement pour l'accueil)
   ======================================================= */
#video-bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
    pointer-events: none !important;
}

/* =======================================================
   3. NAVIGATION SUR PC
   ======================================================= */
nav {
    position: fixed;
    top: 0;
    left: 0; 
    width: 100vw !important; 
    height: 120px;
    
    display: flex !important;
    justify-content: center !important; 
    align-items: center !important;
    
    padding: 0 !important; 
    margin: 0 !important;
    
    z-index: 1000; 
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- LOGO RETOUR ACCUEIL DANS LA BARRE (PC) --- */
.nav-logo-link {
    position: absolute !important;
    left: 40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1002 !important;
    display: flex !important;
    align-items: center !important;
}

.nav-logo {
    height: 75px !important; /* On force la taille max */
    max-height: 75px !important; /* Sécurité anti-géant */
    width: auto !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.nav-logo-link:hover .nav-logo {
    transform: scale(1.05) !important; 
}
/* ---------------------------------------------- */

.nav-links {
    list-style: none;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px; 
    margin: 0 auto !important; 
    padding: 0 !important;
}

/* On cache le bouton burger sur PC */
.menu-burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001; 
}

.menu-burger span {
    width: 35px;
    height: 4px;
    background-color: var(--vert-fonce);
    border-radius: 2px;
}

/* Style des boutons "Glass" */
.glass-style {
    background: var(--blanc-glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    box-shadow: var(--shadow-glass);
    transition: all 0.3s ease;
}

.nav-links li a {
    display: block;
    text-decoration: none;
    color: var(--vert-fonce);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links li a:not(.btn-cta):hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: var(--chocolat);
}

/* --- MENUS DÉROULANTS (SOUS-MENUS PC) --- */
.dropdown-parent { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    padding: 10px 0;
    margin-top: 10px;
    list-style: none;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    display: block;
}

.dropdown-parent:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    font-size: 0.85rem !important;
    padding: 10px 20px !important;
    text-transform: none !important;
    color: var(--vert-fonce);
    text-align: left;
    border-radius: 10px;
    margin: 0 5px; 
    transition: background-color 0.2s, color 0.2s; 
}

.dropdown-menu li a:hover {
    background: var(--vert-fonce) !important;
    color: #FFF !important;
    transform: none !important; 
}

/* Bouton CTA */
.btn-cta {
    background-color: var(--vert-fonce) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(45, 79, 79, 0.4);
}
.btn-cta:hover {
    background-color: var(--chocolat) !important;
    transform: scale(1.05);
}

/* =======================================================
   4. STRUCTURE DES PAGES & CONTENU (PC)
   ======================================================= */

/* --- PAGE D'ACCUEIL --- */
body.home {
    min-height: 100vh; 
}

.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    padding-top: 80px;
}

.central-card {
    padding: 50px 70px;
    text-align: center;
    max-width: 800px;
    border-radius: 30px;
    animation: fadeInUp 1s ease-out;
}

.main-logo {
    width: 280px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
}

.central-card h1 { font-size: 3rem; font-weight: 700; margin-bottom: 10px; color: var(--vert-fonce); }
.central-card h2 { font-size: 1.3rem; font-weight: 400; color: var(--chocolat); letter-spacing: 2px; text-transform: uppercase; margin-top: 10px; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PAGES DE CONTENU --- */
body.page-contenu {
    padding-top: 140px; 
    overflow-y: auto;
}

.content-container {
    max-width: 900px;
    margin: 0 auto 50px auto;
    padding: 40px;
}

/* --- GRILLES & CARTES --- */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 30px; }
.pillar-card { padding: 25px; background: rgba(255, 255, 255, 0.4); border-radius: 15px; transition: transform 0.3s ease; }
.pillar-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.6); }
.pillar-card h3 { color: var(--vert-fonce); margin-bottom: 15px; font-size: 1.1rem; text-align: center; text-transform: uppercase; border-bottom: 2px solid var(--marron-clair); padding-bottom: 10px; }
.pillar-card ul { list-style: none; }
.pillar-card ul li { margin-bottom: 10px; font-size: 0.9rem; line-height: 1.4; position: relative; padding-left: 15px; }
.pillar-card ul li::before { content: "•"; color: var(--marron-clair); font-weight: bold; position: absolute; left: 0; }

.quote-frame { border: 2px solid var(--vert-fonce); padding: 20px; text-align: center; border-radius: 10px; margin: 30px auto; max-width: 600px; background: rgba(255,255,255,0.2); }
.quote-frame p { font-size: 1.3rem; font-style: italic; font-weight: 600; color: var(--vert-fonce); margin: 0; }

/* --- ACCORDÉON (PC) --- */
.accordion-container { margin: 30px 0; }
.accordion-item { margin-bottom: 20px; cursor: pointer; overflow: hidden; transition: all 0.3s ease; }
.accordion-item:hover { background: rgba(255, 255, 255, 0.35); }
.accordion-header { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; }
.accordion-header h3 { margin: 0; font-size: 1.1rem; color: var(--vert-fonce); text-transform: uppercase; font-weight: 600; }
.accordion-icon { font-size: 1.5rem; font-weight: bold; color: var(--marron-clair); transition: transform 0.3s ease; }
.accordion-content { max-height: 0; opacity: 0; padding: 0 25px; overflow: hidden; transition: all 0.5s cubic-bezier(0, 1, 0, 1); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.accordion-item.active { background: rgba(255, 255, 255, 0.5); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.accordion-item.active .accordion-icon { transform: rotate(45deg); color: var(--vert-fonce); }
.accordion-item.active .accordion-content { max-height: 2000px; opacity: 1; padding-bottom: 25px; padding-top: 15px; }
.accordion-content ul { list-style: none; margin-top: 10px; }
.accordion-content ul li { margin-bottom: 12px; position: relative; padding-left: 20px; line-height: 1.6; }
.accordion-content ul li::before { content: "•"; color: var(--marron-clair); font-weight: bold; position: absolute; left: 0; }

.quote-frame-green { border: 2px solid #2D4F4F; padding: 25px; text-align: center; border-radius: 15px; margin: 30px auto; max-width: 700px; background: rgba(255,255,255,0.15); }
.quote-frame-green p { font-size: 1.4rem; font-style: italic; color: var(--vert-fonce); font-weight: 600; margin: 0; }

/* --- TIMELINE --- */
.steps-container { max-width: 800px; margin: 40px auto; }
.step-card { position: relative; padding: 30px 30px 30px 90px; margin-bottom: 30px; overflow: hidden; }
.step-number { position: absolute; top: -10px; left: 10px; font-size: 6rem; font-weight: 800; color: rgba(45, 79, 79, 0.1); z-index: 0; }
.step-content { position: relative; z-index: 1; }
.step-card h3 { color: var(--vert-fonce); margin-bottom: 15px; text-transform: uppercase; border-bottom: 2px solid var(--marron-clair); display: inline-block; padding-bottom: 5px; }
.intro-highlight { text-align: center; font-size: 1.2rem; color: var(--chocolat); font-weight: 600; margin-bottom: 40px; padding: 20px; background: rgba(255, 255, 255, 0.3); border-radius: 15px; border: 1px dashed var(--vert-fonce); }

/* --- TARIFS --- */
.prices-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 40px 0; }
.price-card { padding: 40px 20px; text-align: center; border: 2px solid var(--vert-fonce); border-radius: 20px; background: rgba(255, 255, 255, 0.25); transition: transform 0.3s ease; }
.price-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.4); }
.price-big { font-size: 2.5rem; font-weight: 800; color: var(--vert-fonce); margin-bottom: 15px; line-height: 1.2; }
.payment-section { text-align: center; margin: 40px 0; padding: 20px; border-top: 1px solid rgba(0,0,0,0.1); border-bottom: 1px solid rgba(0,0,0,0.1); }
.cancellation-policy { font-size: 0.95rem; text-align: justify; background: rgba(45, 79, 79, 0.05); padding: 25px; border-radius: 15px; margin-top: 30px; border-left: 4px solid var(--marron-clair); }

/* --- À PROPOS --- */
.about-grid { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 40px; }
.about-text { flex: 1; text-align: justify; }
.about-photo-wrapper { flex: 0 0 300px; position: relative; }
.about-photo { width: 100%; height: auto; border-radius: 20px; border: 4px solid rgba(255, 255, 255, 0.5); box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: rotate(2deg); transition: transform 0.3s ease; }
.about-photo:hover { transform: rotate(0deg) scale(1.02); }
.quote-highlight { font-weight: 600; font-style: italic; color: var(--chocolat); text-align: center; display: block; margin: 15px 0; }
.diploma-container { text-align: center; margin-top: 50px; padding-top: 30px; border-top: 1px solid rgba(0,0,0,0.1); }
.diploma-img { max-width: 80%; height: auto; border-radius: 5px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* --- CONTACT --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; margin-top: 30px; }
.contact-info-box, .contact-form { padding: 30px; background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1); height: fit-content; }
.contact-item { margin-bottom: 25px; font-size: 1rem; line-height: 1.5; }
.contact-item strong { display: block; color: var(--vert-fonce); font-size: 1.1rem; margin-bottom: 5px; text-transform: uppercase; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--vert-fonce); font-weight: 600; }
.form-input, .form-textarea { width: 100%; padding: 15px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.6); font-family: 'Inter', sans-serif; font-size: 1rem; color: #333; transition: all 0.3s ease; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--vert-fonce); background: #FFF; }
.form-textarea { resize: vertical; min-height: 150px; }
.btn-submit { width: 100%; padding: 15px; background-color: var(--vert-fonce); color: #FFFFFF !important; border: none; border-radius: 30px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: transform 0.2s, background 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn-submit:hover { background-color: var(--chocolat); transform: translateY(-2px); }

/* --- FOOTER GÉNÉRAL --- */
footer { position: relative; width: 100%; padding: 30px 20px; margin-top: 50px; display: flex; justify-content: flex-end; align-items: center; gap: 15px; background: transparent; z-index: 10; }
body.home footer { position: fixed !important; bottom: 15px; right: 20px; width: auto; margin: 0; padding: 0; background: none; z-index: 100; }
footer p { margin: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
footer a { font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,0.8); transition: color 0.3s; }
footer a:hover { color: #FFF; text-decoration: underline; }

#footer-accueil { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; align-items: center; gap: 15px; text-align: right; }
#footer-accueil p { margin: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.9); text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
#footer-accueil a { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); text-decoration: none; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
#footer-accueil a:hover { color: #FFF; text-decoration: underline; }


/* =======================================================
   5. NAVIGATION SUR MOBILE (MAX 950px) - LA VERSION FINALE
   ======================================================= */
@media screen and (max-width: 950px) {

    /* --- PAGE D'ACCUEIL : ON DÉBLOQUE TOUT --- */
    html, body.home {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        height: auto !important; 
        
        /* LA CORRECTION ANTI-SAUT EST ICI */
        min-height: 100vh !important; /* Sécurité pour les très vieux téléphones */
        min-height: 100dvh !important; /* S'adapte en douceur à la barre d'adresse */
        
        overflow: visible !important; 
        overflow-y: auto !important; 
        overflow-x: hidden !important;
        padding-bottom: 60px !important; 
        width: 100vw !important;
        position: relative !important;
    }

    body.home .hero { order: 1 !important; position: relative !important; height: auto !important; min-height: 0 !important; padding-top: 40px !important; padding-bottom: 20px !important; display: flex !important; justify-content: center !important; align-items: center !important; }
    body.home .central-card { width: 90% !important; padding: 30px 20px !important; margin: 0 auto !important; }
    body.home nav { order: 2 !important; position: relative !important; height: auto !important; background: transparent !important; border: none !important; padding: 0 20px 40px 20px !important; display: flex !important; justify-content: center !important; }
    body.home .menu-burger { display: none !important; }
    body.home .nav-links { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: 350px !important; margin: 0 auto !important; gap: 15px !important; }
    body.home .nav-links > li > a { background: rgba(255, 255, 255, 0.95) !important; backdrop-filter: blur(5px) !important; color: var(--vert-fonce) !important; box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important; text-align: center !important; }
    body.home .nav-links li { width: 100% !important; }

    /* --- AUTRES PAGES : RESPONSIVE CLASSIQUE --- */
    
    /* --- EMPÊCHE LES IMAGES DE DÉBORDER (Ex: Le Triangle) --- */
    .content-container img {
        max-width: 100% !important; /* L'image ne peut pas dépasser 100% de l'écran */
        height: auto !important; /* Garde les bonnes proportions */
        display: block !important;
        margin: 0 auto !important; /* Centre l'image proprement */
    }
    
    .central-card { width: 90%; padding: 30px 20px; }
    .pillars-grid { grid-template-columns: 1fr; }
    .prices-grid { grid-template-columns: 1fr; }
    .about-grid { flex-direction: column; }
    .about-photo-wrapper { width: 100%; max-width: 300px; margin: 0 auto 30px auto; }
    .contact-grid { grid-template-columns: 1fr; }

    /* --- LOGO RETOUR ACCUEIL (MOBILE) --- */
    .nav-logo-link {
        left: auto !important; /* On annule le PC */
        right: 20px !important; /* On le colle à droite */
    }
    .nav-logo {
        height: 55px !important; /* Plus petit sur mobile */
        max-height: 55px !important;
    }
    /* On le cache sur l'accueil mobile pour ne pas faire doublon */
    body.home .nav-logo-link {
        display: none !important;
    }

    /* --- CAS N°2 : LES AUTRES PAGES (LE MENU BURGER) --- */
    
    body:not(.home) nav {
        height: 80px !important;
        justify-content: flex-start !important; /* Burger à GAUCHE */
        padding: 0 20px !important;
    }

    body:not(.home) .menu-burger {
        display: flex !important;
        z-index: 1001 !important;
    }

    body:not(.home) .nav-links {
        display: flex !important; 
        flex-direction: column !important;
        justify-content: flex-start !important; 
        align-items: flex-start !important; 
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.98) !important;
        padding: 100px 30px 30px 30px !important; 
        gap: 15px !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        
        /* --- L'ANIMATION DU MENU BURGER --- */
        transform: translateY(-100%) !important; 
        opacity: 0 !important; 
        pointer-events: none !important; 
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease !important; 
    }

    /* Force tous les boutons du menu burger à prendre 100% de la largeur */
    body:not(.home) .nav-links > li {
        width: 100% !important;
    }
    
    body:not(.home) .nav-links > li > a {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* La classe activée par le clic sur le burger */
    body:not(.home) .nav-links.mobile-open {
        transform: translateY(0) !important; 
        opacity: 1 !important; 
        pointer-events: auto !important; 
    }

    /* --- RÈGLES COMMUNES : L'ACCORDÉON POUR LES SOUS-MENUS --- */
    .dropdown-parent {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
    }

    /* Le sous-menu fermé */
    .dropdown-menu {
        display: flex !important; 
        flex-direction: column !important;
        position: relative !important; 
        top: auto !important; 
        left: auto !important; 
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        
        /* --- LA MAGIE DE L'ACCORDÉON LISSE EST RESTAURÉE --- */
        max-height: 0 !important; 
        overflow: hidden !important; 
        padding: 0 0 0 10px !important; 
        opacity: 0 !important;
        transform: none !important;
        visibility: hidden !important;
        transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, padding 0.4s ease-in-out !important; 
    }

    /* Le sous-menu ouvert (AVEC L'ESPACE AJOUTÉ !) */
    .dropdown-parent.open .dropdown-menu {
        max-height: 400px !important; 
        padding-top: 10px !important; 
        opacity: 1 !important;
        visibility: visible !important;
        gap: 10px !important; /* L'écart entre les boutons est bien là */
    }

    /* Style des liens secondaires (sous-menus) */
    .dropdown-menu li a {
        font-size: 0.9rem !important;
        padding: 12px 15px !important;
        text-align: left !important;
        background: rgba(255, 255, 255, 0.4) !important;
        border-radius: 50px !important;
        color: var(--vert-fonce) !important;
        display: block !important;
    }

    /* =======================================================
       NOUVELLE ANIMATION AU TOUCHER (PRESSION DU DOIGT)
       ======================================================= */
    .nav-links a, .dropdown-parent > a, .dropdown-menu li a {
        -webkit-tap-highlight-color: rgba(45, 79, 79, 0.2) !important; 
    }

    .nav-links a:active, .dropdown-menu li a:active {
        transform: scale(0.96) !important; 
        transition: transform 0.1s ease !important; 
    }

    @media (hover: none) {
        body.home .nav-links li a:hover, .dropdown-menu li a:hover {
            transform: none !important;
        }
    }
}