/* ==========================================================================
   STYLE.CSS : DESIGN GLOBAL & DESKTOP
   ========================================================================== */

:root {
    --color-text-main: #0e0e0e;
    --color-bg-nav: #f8f2ea;
    --color-accent: #d89a28;
    
    /* Rappel des variables définies dans fonts.css pour usage global */
    --font-sans: 'Lato', sans-serif;
    --font-serif: 'Didot Custom', 'Didot', 'Playfair Display', 'Times New Roman', serif;
    --font-avenir: 'Avenir Custom', 'Avenir', 'Nunito Sans', 'Avenir Next', Helvetica, Arial, sans-serif; 
}

/* --- LENIS (SCROLL LISSE) --- */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* --- GLOBAL --- */
body {
    font-family: var(--font-avenir);
    color: var(--color-text-main);
    background-color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: auto;
}

/* GRAIN (z-index très élevé mais sous le loader) */
body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 99999; opacity: 0.03; 
}

::selection { background-color: var(--color-accent); color: #fff; }
::-moz-selection { background-color: var(--color-accent); color: #fff; }

body.loading-locked { overflow: hidden !important; height: 100vh; }

h1, h2, h3, h4 { font-family: var(--font-serif); }
a, a:hover { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* ==========================================================================
   MASTER RULE : PADDING UNIVERSEL
   ========================================================================== */
.manifesto-section,
.triptych-section,
.editorial-section,
.vision-interlude,
.values-section-luxe,
.raison-text-section,
.laeti-details-section,
.pillars-section,
.examples-section,
.final-text-section {
    padding: 100px 0;
}

/* --- LOADER --- */
#app-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 10000000; display: flex; justify-content: center; align-items: center;
    visibility: visible; transition: visibility 0s linear 1.2s; 
    background-color: #fff; 
}
.loader-panel {
    position: absolute; left: 0; width: 100%; height: 51%; background-color: #fff; z-index: 1;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
.panel-top { top: 0; transform-origin: top; }
.panel-bottom { bottom: 0; transform-origin: bottom; }
.loader-content { position: relative; z-index: 2; text-align: center; transition: opacity 0.4s ease; }
.loader-logo-img {
    width: 140px; height: auto; opacity: 0;
    animation: loaderEnter 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards, loaderPulse 2s ease-in-out 0.8s infinite;
}
@keyframes loaderEnter { 0% { opacity: 0; transform: scale(0.9); filter: blur(5px); } 100% { opacity: 1; transform: scale(1); filter: blur(0px); } }
@keyframes loaderPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.97); } }

#app-loader.loader-hidden { visibility: hidden; }
#app-loader.loader-hidden .loader-content { opacity: 0; }
#app-loader.loader-hidden .panel-top { transform: translateY(-100%); }
#app-loader.loader-hidden .panel-bottom { transform: translateY(100%); }

/* --- HEADER DESKTOP --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    /* Ombre initiale légère */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    background-color: #fff;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.top-bar {
    background-color: #ffffff; padding: 20px 0; position: relative;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); height: 120px;
    display: flex; align-items: center; overflow: visible; 
}
.brand-container {
    text-align: center; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); width: 100%; z-index: 0;
}
.brand-logo { 
    max-height: 80px; width: auto; display: block; margin: 0 auto; 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* --- COMPORTEMENT SCROLL DESKTOP (CORRECTIF MARGE) --- */
/* C'est ici que la magie opère pour coller le menu en haut */

body.scrolled header {
    /* Ombre portée sur le header global quand on scrolle */
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

body.scrolled .top-bar { 
    height: 0 !important;      /* Force la hauteur à 0 */
    padding: 0 !important;     /* Enlève le padding */
    opacity: 0; 
    pointer-events: none;      /* Empêche de cliquer sur le logo caché */
    overflow: hidden;          /* CRUCIAL : Coupe ce qui dépasse pour éviter la marge blanche */
}

/* Apparition du logo/menu sticky sur les côtés */
body.scrolled .sticky-left-container, 
body.scrolled .sticky-right-container {
    opacity: 1; 
    visibility: visible; 
    transform: translateY(-50%); 
    pointer-events: auto; 
    transition-delay: 0.1s;
}

/* ---------------------------------------------------- */

.top-actions {
    position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; gap: 25px; font-size: 1.1rem;
}
.top-icon { height: 28px; width: auto; transition: all 0.3s ease; display: block; opacity: 0.8; }
.top-icon:hover { opacity: 1; filter: invert(66%) sepia(45%) saturate(797%) hue-rotate(358deg) brightness(91%) contrast(88%); }

/* LANGUE */
.dropdown-lang-container { display: flex; align-items: center; height: 100%; position: relative; margin: 0; }
.lang-toggle {
    font-family: var(--font-sans); font-weight: 400; color: var(--color-text-main) !important;
    font-size: 1.1rem; cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
    display: flex; align-items: center; justify-content: center; height: 28px; padding: 0; margin: 0;
    line-height: 1; border-bottom: 2px solid transparent; position: relative; z-index: 1002;
}
.lang-toggle::after { display: none !important; }
.lang-toggle:hover { color: var(--color-accent) !important; }

.lang-dropdown-menu {
    border: 1px solid #e0d8cf; border-top: 2px solid var(--color-accent); border-radius: 0;
    background-color: #ffffff; box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 10px;
    min-width: 45px; padding: 0; text-align: center; z-index: 1000; display: none; 
}
.lang-dropdown-menu::before { content: ''; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; background: transparent; }
.dropdown-lang-container:hover .lang-dropdown-menu { display: block; animation: fadeInSimple 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
@keyframes fadeInSimple { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.lang-dropdown-menu .dropdown-item {
    font-family: var(--font-sans); font-size: 0.9rem; font-weight: 400; text-align: center;
    padding: 8px 0; color: #888; cursor: pointer; background: transparent; display: block; width: 100%;
    letter-spacing: 1px; transition: all 0.2s ease;
}
.lang-dropdown-menu .dropdown-item:hover { background-color: var(--color-bg-nav) !important; color: var(--color-accent) !important; }
.lang-dropdown-menu .dropdown-item.active { display: none; }

/* NAV BARRE (Bandeau image) */
.nav-bar-custom {
    background-image: url('../img/bandeau_header.jpg'); background-size: cover; background-position: center;
    background-repeat: no-repeat; padding: 0; border-top: 1px solid rgba(0,0,0,0.05); position: relative;
}
.navbar-nav {
    margin: 0 auto; display: flex; flex-direction: row; justify-content: center;
    width: 100%; height: 60px; align-items: center; transition: all 0.3s;
}
.nav-item { margin: 0 25px; position: relative; }

.nav-link {
    font-family: var(--font-serif); font-size: 1rem; color: var(--color-text-main) !important;
    text-transform: uppercase; letter-spacing: 1px; padding: 10px 0 !important; font-weight: 400;
    transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1), text-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative; 
}
.nav-link::before { display: none; }
.nav-link:hover, .nav-item.active .nav-link, .dropdown-item:hover {
    color: var(--color-accent) !important;
    text-shadow: 0 0 0.6px var(--color-accent), 0 0 0.6px var(--color-accent); 
    font-weight: 400;
}

/* STICKY CONTAINERS (Logo gauche / Icones droite au scroll) */
.sticky-left-container, .sticky-right-container {
    position: absolute; top: 50%; transform: translateY(-150%); opacity: 0; visibility: hidden;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; z-index: 1001;
}
.sticky-left-container { left: 40px; }
.sticky-right-container { right: 40px; display: flex; align-items: center; gap: 20px; }
.sticky-right-container .top-icon { height: 22px; }
.sticky-right-container .lang-toggle { font-size: 1rem; height: 22px; padding: 0; }
.sticky-home-logo { height: 35px; width: auto; transition: opacity 0.3s; }
.sticky-home-logo:hover { opacity: 0.8; }

.dropdown-menu {
    background-color: var(--color-bg-nav); border: none; border-radius: 0; margin-top: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); text-align: center;
}
.dropdown-item {
    font-family: var(--font-serif); color: var(--color-text-main); padding: 10px 20px;
    font-size: 0.9rem; background: transparent;
}
.dropdown-item:active { background-color: transparent; color: var(--color-accent); }
.navbar-toggler { border: none; outline: none !important; }

/* --- VIDEO --- */
.video-wrapper {
    width: 100%; margin-top: 180px; background-color: #000; padding: 0;
    height: 65vh; min-height: 400px; overflow: hidden; position: relative; z-index: 1;
}
.video-container { width: 100%; height: 100%; position: relative; top: 0; margin: 0; }
@keyframes cinematicEnter { 0% { transform: scale(1.1); } 100% { transform: scale(1); } }

.plyr { width: 100%; height: 100%; --plyr-color-main: #d89a28; }
.plyr__video-wrapper { width: 100%; height: 100%; }
#qlg-player {
    width: 100%; height: 100%; object-fit: cover;
    animation: cinematicEnter 4s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}
.plyr--video .plyr__controls {
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100% !important; padding: 10px 20px !important;
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.7)) !important; bottom: 0 !important;
}
.plyr--playing .plyr__controls { opacity: 0; transform: translateY(10px); }
.plyr--paused .plyr__controls, .plyr--playing:hover .plyr__controls { opacity: 1; transform: translateY(0); }

.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10; opacity: 0.9; pointer-events: none;
}
.mouse-icon { width: 26px; height: 42px; border: 2px solid #fff; border-radius: 15px; position: relative; }
.wheel {
    width: 2px; height: 6px; background-color: #fff; position: absolute; top: 8px; left: 50%;
    transform: translateX(-50%); animation: scrollMouse 2s infinite;
}
@keyframes scrollMouse { 0% { opacity: 1; top: 8px; } 100% { opacity: 0; top: 20px; } }

/* --- CONTENU HOME --- */
.manifesto-section { background-color: #fff; text-align: center; }
.reveal-text { opacity: 0; transform: translateY(40px); transition: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1); }
.reveal-text.is-visible { opacity: 1; transform: translateY(0); }
.manifesto-title {
    font-family: var(--font-serif); font-size: 2.8rem; text-transform: uppercase;
    letter-spacing: 3px; margin-bottom: 60px; color: var(--color-text-main); font-weight: 400;
}
.manifesto-text {
    font-size: 1.3rem; line-height: 2.2; color: #333; max-width: 900px; margin: 0 auto; font-weight: 300;
}
.manifesto-text p { margin-bottom: 60px; }
.maisons-board { max-width: 100%; width: 800px; height: auto; display: block; margin: 0 auto; opacity: 0; }
img.reveal-text.is-visible { opacity: 0.9; }

/* --- TRYPTIQUE --- */
.triptych-section {
    background-image: url('../img/Fond visuel tryptique.png'); background-size: cover;
    background-position: center; position: relative;
}
.triptych-width-limiter { width: 60%; margin: 0 auto; }
.triptych-row { margin-left: -5px; margin-right: -5px; }
.triptych-col { padding: 0 5px; margin-bottom: 0; }
.triptych-link { display: block; position: relative; text-decoration: none; padding-bottom: 5px; }
.triptych-img-wrapper { 
    overflow: hidden; position: relative; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: box-shadow 0.4s ease; 
}
.triptych-img {
    width: 100%; height: auto; display: block; transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center center; will-change: transform;
}
.triptych-content-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; text-align: center; z-index: 10; padding: 0 15px;
}
.triptych-title {
    font-family: var(--font-serif); color: #fff; font-size: 2rem;
    text-transform: uppercase; margin-bottom: 5px; letter-spacing: 2px; text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.triptych-subtitle {
    font-family: var(--font-avenir); color: #fff; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4); font-weight: 300;
}

.premium-btn {
    display: inline-block; position: relative; 
    border: 1px solid var(--color-accent); background-color: transparent; color: #fff;
    font-family: var(--font-sans); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 2px;
    padding: 12px 28px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); 
    transition: color 0.4s ease, text-shadow 0.4s ease, border-color 0.4s ease;
    white-space: nowrap; overflow: hidden; 
}
.premium-btn::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0;
    background-color: rgba(216, 154, 40, 0.25); z-index: -1;
    transform: scaleY(0); transform-origin: center; transition: transform 0.4s cubic-bezier(0.45, 0, 0.55, 1);
}
.triptych-link:hover .triptych-img { transform: scale(1.08) rotate(2deg); }
.triptych-link:hover .triptych-img-wrapper { box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.triptych-link:hover .premium-btn::before { transform: scaleY(0.6); }
.triptych-link:hover .premium-btn { color: #fff; text-shadow: none; border-color: rgba(216, 154, 40, 0.8); }

/* --- FOOTER --- */
.main-footer { 
    background-color: #0e0e0e; color: #f8f2ea; padding: 60px 0 30px; 
    text-align: center; position: relative; 
}
.footer-logo-container { margin-bottom: 30px; }
.footer-logo { width: 80px; height: auto; opacity: 0.8; transition: opacity 0.4s ease; }
.footer-logo:hover { opacity: 1; }
.footer-nav { 
    display: flex; justify-content: center; gap: 40px; margin-bottom: 30px; flex-wrap: wrap; 
}
.footer-link {
    font-family: var(--font-serif); text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem;
    color: #f8f2ea; text-decoration: none; position: relative; padding-bottom: 5px;
    transition: color 0.4s ease, text-shadow 0.2s ease; display: inline-block; width: fit-content; z-index: 100;
}
.footer-link::after { display: none; }
.footer-link:hover { 
    color: var(--color-accent); text-decoration: none;
    text-shadow: 0 0 0.6px var(--color-accent), 0 0 0.6px var(--color-accent); 
    font-weight: 400;
}
.footer-social-link {
    color: inherit; margin-left: 20px; font-size: 1.4rem; transition: color 0.3s ease; position: relative; z-index: 100;
}
.footer-social-icon-img { width: 34px; height: auto; vertical-align: middle; transition: all 0.3s ease; }
.footer-social-link:hover .footer-social-icon-img { filter: invert(66%) sepia(45%) saturate(797%) hue-rotate(358deg) brightness(91%) contrast(88%); opacity: 1; }
.footer-legal {
    border-top: 1px solid rgba(248, 242, 234, 0.1); padding-top: 25px;
    font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 1px; color: rgba(248, 242, 234, 0.5); display: flex;
    justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; width: 90%;
}

/* --- UI ELEMENTS (BURGER, SCROLLTOP) --- */
.progress-scroll-container {
    position: fixed; bottom: 40px; right: 40px; width: 50px; height: 50px; z-index: 9998;
    cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.progress-scroll-container.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.progress-scroll-container.menu-open-hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.progress-circle-svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.progress-circle-svg path {
    fill: none; stroke: var(--color-accent); stroke-width: 3; stroke-dasharray: 308; stroke-dashoffset: 308; transition: stroke-dashoffset 0.1s linear;
}
.scroll-arrow {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; color: var(--color-accent); font-size: 1.2rem; transition: transform 0.3s ease;
}
.progress-scroll-container:hover .scroll-arrow { transform: translateY(-3px); }

/* --- MENU MOBILE OVERLAY BASE STYLES --- */
/* (Le déclenchement est géré par JS et le responsive.css, mais le style de base est ici) */
.burger-icon { width: 30px; height: 20px; position: relative; cursor: pointer; display: none; z-index: 1003; }
.burger-line {
    position: absolute; width: 100%; height: 2px; background-color: var(--color-text-main);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); right: 0;
}
.burger-line-1 { top: 0; }
.burger-line-2 { top: 50%; transform: translateY(-50%); width: 70%; transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; }
.burger-line-3 { bottom: 0; }
.burger-icon:hover .burger-line-2 { width: 100%; }
.burger-icon:hover .burger-line-1 { top: -2px; }
.burger-icon:hover .burger-line-3 { bottom: -2px; }
.burger-icon.is-active .burger-line-1 { top: 50%; transform: rotate(45deg); background-color: var(--color-accent); }
.burger-icon.is-active .burger-line-2 { opacity: 0; width: 0; }
.burger-icon.is-active .burger-line-3 { bottom: 50%; transform: rotate(-45deg); background-color: var(--color-accent); }

.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: #fff; z-index: 1002;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    background-image: radial-gradient(circle at center, #fff 0%, #fdfbf7 100%);
}
.mobile-menu-overlay.is-open { opacity: 1; visibility: visible; }
.mobile-nav-link, .mobile-sub-link {
    font-family: var(--font-serif); color: var(--color-text-main); text-decoration: none; display: block;
    text-align: center; opacity: 0; transform: translateY(30px); filter: blur(10px); transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}
.mobile-nav-link { font-size: 1.8rem; margin: 10px 0; text-transform: uppercase; letter-spacing: 2px; }
.mobile-nav-link:hover { color: var(--color-accent); }
.mobile-nav-group { margin: 15px 0; text-align: center; }
.mobile-sub-nav { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.mobile-sub-link {
    font-family: var(--font-sans); font-size: 1rem; text-transform: uppercase; letter-spacing: 3px; color: #666; font-weight: 300;
}
.mobile-sub-link:hover { color: var(--color-text-main); transform: scale(1.05); transition: all 0.3s ease; filter: blur(0) !important; }
.mobile-menu-overlay.is-open .mobile-nav-link, .mobile-menu-overlay.is-open .mobile-sub-link { opacity: 1; transform: translateY(0); filter: blur(0); }
.mobile-menu-overlay.is-open .mobile-nav-link:nth-of-type(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.is-open .mobile-nav-link:nth-of-type(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.is-open .mobile-nav-group .mobile-nav-link { transition-delay: 0.3s; }
.mobile-menu-overlay.is-open .mobile-nav-group .mobile-sub-link:nth-child(1) { transition-delay: 0.35s; }
.mobile-menu-overlay.is-open .mobile-nav-group .mobile-sub-link:nth-child(2) { transition-delay: 0.4s; }
.mobile-menu-overlay.is-open .mobile-nav-group .mobile-sub-link:nth-child(3) { transition-delay: 0.45s; }
.mobile-menu-overlay.is-open > .mobile-nav-link:last-of-type { transition-delay: 0.55s; }
.mobile-menu-close-btn {
    position: absolute; top: 30px; right: 30px; font-size: 2rem; color: var(--color-text-main); cursor: pointer; transition: color 0.3s ease;
}
.mobile-menu-close-btn:hover { color: var(--color-accent); }