/* ========================================================================= */
/* FICHIER CSS FINAL - V10.19 (Fix Doctolib Infaillible + Vidéos)            */
/* ========================================================================= */

/* -------------------- FONTS & BASE -------------------- */
@font-face { font-family: 'Satisfy-Regular'; src: url('../fonts/Satisfy-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Merriweather'; src: url('../fonts/MerriweatherSans-VariableFont_wght.ttf') format('truetype'); font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; overflow: hidden; }
body {
    height: 100vh; height: 100svh; display: flex; flex-direction: column;
    background-color: black; color: white; font-family: 'Merriweather', serif;
    font-size: 16px; line-height: 1.6;
    overflow: hidden;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    background-attachment: fixed; animation: slideContinuImages 140s linear infinite;
}
body::after { position: absolute; width: 0; height: 0; overflow: hidden; z-index: -1; content: url('https://www.yannick-lambert.fr/wp-content/uploads/2025/08/Gemini_Generated_01.jpeg'); }
body.admin-bar { height: calc(100svh - 32px); }
@media screen and (max-width: 782px) { body.admin-bar { height: calc(100svh - 46px); } }

@keyframes slideContinuImages {
    0% { background-image: url('https://www.yannick-lambert.fr/wp-content/uploads/2025/08/Gemini_Generated_01.jpeg'); }
    100% { background-image: url('https://www.yannick-lambert.fr/wp-content/uploads/2025/08/Gemini_Generated_01.jpeg'); }
}

a { color: #88c0d0; text-decoration: none; border-bottom: 1px dotted #88c0d0; transition: color 0.2s; }
a:hover, a:focus { color: #eceff4; border-bottom-style: solid; }

/* -------------------- HEADER -------------------- */
.header-area { flex-shrink: 0; z-index: 10; }
.navbar-area { background: rgba(0, 0, 0, 0.4); border-bottom: 1px solid #222; padding: 10px 15px; margin: 10px auto; width: 95%; max-width: 1200px; border-radius: 15px; }
.site-navbar { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* LOGO */
.logo-link-navbar { display: block; flex-shrink: 0; border-bottom: none !important; }
.logo-link-navbar:hover, .logo-link-navbar:focus { border-bottom: none !important; }
.profile-pic-navbar { height: 50px; width: 37px; border-radius: 8px; border: 1px solid white; display: block; transition: outline 0.1s; }
.logo-link-navbar:hover .profile-pic-navbar,
.logo-link-navbar:focus .profile-pic-navbar {
    outline: 2px solid white; outline-offset: 2px;
}

.site-navbar ul { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; }
.site-navbar ul li a { font-family: 'Satisfy-Regular', cursive; font-size: 20px; color: white; padding: 8px 12px; display: block; border-radius: 10px; white-space: nowrap; border-bottom: none; }
.site-navbar ul li a:hover, .site-navbar.current-menu-item > a { background-color: rgba(255, 255, 255, 0.6); color: #111; border-bottom: none; }

/* -------------------- ZONE DE CONTENU -------------------- */
.main-container { flex-grow: 1; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 20px 10px; min-height: 0; overflow: hidden; }
.text-area, .resources-content-area {
    width: 100%; max-width: 1000px; background: rgba(0, 0, 0, 0.65);
    border-radius: 20px; padding: 15px clamp(15px, 4vw, 30px) 30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; overflow-x: hidden; max-height: 100%; color: white;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background-color: #555; border-radius: 4px; border: 1px solid #202020; }
::-webkit-scrollbar-track { background: #202020; border-radius: 4px; }

/* -------------------- CONTENU -------------------- */
.text-area h1,.resource-page h1 { font-family: 'Satisfy-Regular', serif; font-weight: normal; text-align: center; font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem); text-shadow: 0 0 8px rgba(255, 255, 255, 0.3); line-height: 1.2; margin-top: 0; margin-bottom: 25px; }
.text-area h2,.resource-page h2 { font-family: 'Satisfy-Regular', serif; font-weight: normal; text-align: center; text-shadow: 0 0 8px rgba(255, 255, 255, 0.3); font-size: clamp(1.6rem, 1.4rem + 1vw, 2.2rem); margin-top: 40px; margin-bottom: 20px; }
.text-area h3,.resource-page h3 { font-family: 'Merriweather', serif; font-weight: 650; text-align: left; color: #E5E9F0; font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.6rem); margin-top: 40px; margin-bottom: 15px; padding-bottom: 0.4em; border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.text-area h4,.resource-page h4 { font-family: 'Merriweather', serif; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem); margin-top: 30px; margin-bottom: 15px; color: #d8dee9; }
.text-area p,.resource-page p { font-family: 'Merriweather', serif; font-size: 14px; line-height: 1.65; text-align: justify; hyphens: auto; margin-bottom: 15px; }
.text-area ul,.resource-page ul { list-style-position: inside; padding-left: 0; text-align: left; margin-bottom: 25px; }
.text-area ul li,.resource-page ul li { font-family: 'Merriweather', serif; text-align: justify; font-size: 14px; hyphens: auto; line-height: 1.65; margin-bottom: 10px; }

/* VIDÉOS YOUTUBE */
.text-area iframe,
.resources-content-area iframe {
    width: 100%;
    max-width: 550px;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    margin: 20px auto !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* -------------------- ICONES & RESSOURCES -------------------- */
.resources-content-area h1 { display: flex; align-items: center; justify-content: center; gap: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 0.8rem; }
.category-row h3 { font-family: 'Merriweather', serif; font-weight: 700; font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem); color: #e5e9f0; margin-bottom: 1.25rem; padding-left: 0.75rem; border-left: 4px solid #b48ead; display: flex; align-items: center; gap: 0.5rem; }
.resources-content-area h1 .svg-inline--fa, .category-row h3 .svg-inline--fa { height: 0.9em; width: auto; vertical-align: -0.1em; color: #81a1c1; flex-shrink: 0; }
.section-intro { font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem); color: #eceff4; margin-bottom: 1.25rem; line-height: 1.7; text-align: left; }
.category-row { margin-bottom: 2rem; }

/* Icon Grid */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.5rem; padding: 0 0.3rem; }
.resource-item { background-color: rgba(46, 52, 64, 0.7); border-radius: 0.5rem; overflow: hidden; text-decoration: none; color: #e5e9f0; transition: transform 0.25s ease, box-shadow 0.25s ease; display: flex; flex-direction: column; border: 1px solid #3b4252; border-bottom: none; }
.resource-item:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6); border-color: #88c0d0; border-bottom: none;}
.resource-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background-color: #2e3440; }
.resource-item p { font-family: 'Merriweather', serif; font-size: 0.8125rem; padding: 0.75rem 0.6rem; margin: 0; line-height: 1.4; text-align: center; background-color: rgba(59, 66, 82, 0.8); min-height: 4rem; display: flex; align-items: center; justify-content: center; flex-grow: 1; }
/* Scroll Horizontal */
.icon-grid.horizontal-scroller { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 0.6rem 0.3rem 1rem 0.3rem; scrollbar-color: #555 #202020; scrollbar-width: thin; }
.icon-grid.horizontal-scroller .resource-item { flex-shrink: 0; width: 160px; }

/* -------------------- FOOTER & BOUTON DOCTOLIB -------------------- */
footer { flex-shrink: 0; text-align: center; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 5; width: 100%; }
.footer-content-wrapper { display: inline-block; background: rgba(0, 0, 0, 0.5); padding: 10px 25px; border-radius: 15px; box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.4); }
.rounded-social-buttons { display: flex; justify-content: center; align-items: center; gap: 15px; }
footer p { font-family: 'Satisfy-Regular', serif; font-size: 13px; margin-top: 8px; margin-bottom: 0; line-height: 1.3; }
.social-button { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; background-color: rgba(255, 255, 255, 0.2); color: white; transition: transform 0.3s ease, background-color 0.3s ease; text-decoration: none; line-height: 1; border-bottom: none;}
.social-button .svg-inline--fa { height: 1em; width: 1em; }
.social-button:hover,.social-button:focus { background-color: rgba(255, 255, 255, 0.6); color: #111; transform: scale(1.15); outline: none; border-bottom: none; }
.legal-info { font-size: 0.7rem; color: #cccccc; text-align: center; margin-top: 2px; margin-bottom: 5px; padding: 0; }
.legal-info a { color: inherit; text-decoration: none; }
.legal-info a:hover { text-decoration: underline; }
.legal-info .separator { margin: 0 8px; color: #888888; }

/* --- DOCTOLIB FIX (LOGIQUE INFAILLIBLE PAR POSITION) --- */
.doctolib-cta { text-align: center; margin-top: 25px; margin-bottom: 15px; }

.cta-button { 
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    color: #fff; 
    padding: 10px 22px; 
    border-radius: 10px; 
    background-color: rgba(255, 255, 255, 0.2); 
    text-decoration: none; 
    transition: background-color 0.3s ease, color 0.3s ease; 
    font-family: 'Merriweather', serif; 
    border: 1px solid transparent; 
    white-space: nowrap; 
    border-bottom: none; 
}

/* Taille des images */
.doctolib-gif-button img { 
    width: 75px; 
    height: auto; 
    vertical-align: middle; 
}

/* === MÉCANIQUE DE BASCULE === */
/* Cible la 2ème image (la bleue) pour la cacher par défaut */
.doctolib-gif-button img:nth-of-type(2) { display: none !important; }
/* Cible la 1ère image (la blanche) pour l'afficher par défaut */
.doctolib-gif-button img:nth-of-type(1) { display: inline-block !important; }

/* Au survol : Inverse les visibilités */
.cta-button:hover img:nth-of-type(1) { display: none !important; }
.cta-button:hover img:nth-of-type(2) { display: inline-block !important; }

/* Style du bouton au survol */
.cta-button:hover, .cta-button:focus { 
    background-color: rgba(255, 255, 255, 0.6); 
    color: #111; 
    outline: 2px solid white; 
    outline-offset: 2px; 
    border-bottom: none; 
}

/* -------------------- MENU MOBILE -------------------- */
.nav-toggler { border: 3px solid #fff; padding: 5px; background: transparent; cursor: pointer; height: 39px; display: none; z-index: 1010; }
.nav-toggler span, .nav-toggler span:before, .nav-toggler span:after { width: 28px; height: 3px; background: #fff; display: block; transition: .3s; }
.nav-toggler span:before { content: ''; transform: translateY(-9px); }
.nav-toggler span:after { content: ''; transform: translateY(6px); }
.nav-toggler.toggler-open span { background: transparent; }
.nav-toggler.toggler-open span:before { transform: translateY(0px) rotate(45deg); }
.nav-toggler.toggler-open span:after { transform: translateY(-3px) rotate(-45deg); }

@media screen and (max-width: 992px) {
    .nav-toggler { display: block; }
    .site-navbar ul {
        position: fixed; left: 0; top: 0; width: 100%; height: 100dvh;
        flex-direction: column; justify-content: center; background: rgba(0,0,0,.95);
        padding: 60px 0; max-height: 0; opacity: 0; visibility: hidden;
        transition: opacity 0.4s, visibility 0s 0.4s, max-height 0s 0.4s; z-index: 1000;
    }
    .site-navbar ul.open { max-height: 100dvh; opacity: 1; visibility: visible; transition: opacity 0.4s; }
    .site-navbar ul li { width: 90%; text-align: center; }
    .site-navbar ul li a { font-size: 26px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    .site-navbar ul.sub-menu {
        display: block; position: static; height: auto; width: 100%;
        max-height: 0; opacity: 0; overflow: hidden;
        background: transparent;
        padding: 0; margin: 0;
        transition: max-height 0.5s ease, opacity 0.5s ease;
    }
    .site-navbar ul.sub-menu li { width: 100%; display: block; text-align: left; }
    .site-navbar ul.sub-menu li a { font-size: 20px; padding: 10px 15px 10px 40px; border-bottom: none; color: #d8dee9; }
    .site-navbar ul.sub-menu li a::before { content: '↳'; margin-right: 10px; color: #88c0d0; }

    .site-navbar li.menu-item-has-children.submenu-open > ul.sub-menu {
        max-height: 1000px; opacity: 1; visibility: visible;
    }
}

/* -------------------- MENU DESKTOP -------------------- */
@media screen and (min-width: 993px) {
    .site-navbar ul li.menu-item-has-children { position: relative; }
    .site-navbar ul li.menu-item-has-children > a { padding-right: 28px; cursor: pointer; }
    .site-navbar ul li.menu-item-has-children > a::after {
        content: '▼'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
        font-size: 0.6em; color: rgba(255,255,255,0.7); transition: 0.3s;
    }

    .site-navbar ul.sub-menu {
        display: block !important;
        position: absolute; top: 100%; left: 0; z-index: 1001; margin-top: 5px;
        min-width: 250px; background: rgba(0,0,0,.95); border-radius: 10px;
        padding: 10px 0; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        opacity: 0; visibility: hidden; transform: translateY(10px);
        transition: all 0.3s ease;
    }

    .site-navbar ul li.menu-item-has-children.submenu-open > .sub-menu {
        opacity: 1; visibility: visible; transform: translateY(0);
    }
    
    .site-navbar ul li.menu-item-has-children.submenu-open > a {
        background: rgba(255,255,255,0.6); color: #111;
    }
    .site-navbar ul li.menu-item-has-children.submenu-open > a::after {
        transform: translateY(-50%) rotate(180deg); color: #111;
    }

    .site-navbar ul.sub-menu li {
        width: 100%; float: none; display: block;
        margin: 0;
    }
    .site-navbar ul.sub-menu li a {
        font-family: 'Satisfy-Regular', cursive; font-size: 19px; color: white;
        padding: 10px 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block; text-align: left;
    }
    .site-navbar ul.sub-menu li a:hover { background: rgba(255,255,255,0.6); color: #111; }
    .site-navbar ul.sub-menu li a:last-child { border-bottom: none; }
}
