/* Déclaration de la police Bootzy TM */
@font-face {
    font-family: 'Bootzy TM';
    src: url('fonts/BootzyTM.ttf') format('truetype'),
         url('src/fonts/BootzyTM.woff') format('woff'),
         url('src/fonts/BootzyTM.otf') format('opentype'),
         url('src/fonts/BootzyTM.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #ffffff;
    --text-primary: #222222;
    --text-title: #1a1a1a;
    --accent-color: #ff8fab; /* Rose mode jour */
    --banner-bg: #ff8fab;    /* Encart rose en mode jour */
    --banner-text: #ffffff;
    --btn-shadow: rgba(255, 143, 171, 0.3);
    --nav-link-color: #2b2b2b;
    --dropdown-bg: #ffffff;
    --dropdown-border: rgba(0, 0, 0, 0.08);
    --gutter-mobile: max(20px, env(safe-area-inset-left));
    --gutter-mobile-right: max(20px, env(safe-area-inset-right));
}

body.dark-mode {
    --bg-color: #121214;
    --text-primary: #f0f0f0;
    --text-title: #ffffff;
    --accent-color: #fdd38b; /* Jaune mode nuit */
    --banner-bg: #fdd38b;    /* Encart jaune en mode nuit */
    --banner-text: #121214;
    --btn-shadow: rgba(253, 211, 139, 0.2);
    --nav-link-color: #e0e0e0;
    --dropdown-bg: #1b1b1f;
    --dropdown-border: rgba(255, 255, 255, 0.1);
}

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

html,
body {
    overflow-x: clip;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Header Navbar (Bureau) */
.navbar {
    width: 100%;
    padding: 30px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.nav-icons {
    position: absolute;
    left: 50px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 1002;
}

.home-icon {
    width: 28px;
    height: 28px;
    color: var(--nav-link-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.3s ease;
}

.home-icon:hover {
    transform: scale(1.15);
    color: var(--accent-color);
}

.home-icon svg {
    width: 100%;
    height: 100%;
}

/* Bouton burger caché sur bureau */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nav-link-color);
    padding: 6px;
    z-index: 1002;
}

.nav-panel {
    display: contents;
}

.nav-links {
    display: inline-flex;
    gap: 15px;
    align-items: center;
    font-family: 'Figtree', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.nav-links a {
    text-decoration: none;
    color: var(--nav-link-color);
    transition: opacity 0.2s, color 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.6;
}

.nav-links span {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.nav-controls {
    position: absolute;
    right: 50px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Figtree', sans-serif;
    font-size: 0.95rem;
    color: var(--nav-link-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-option {
    opacity: 0.4;
    font-weight: 700;
}

.lang-option.active {
    opacity: 1;
    color: var(--accent-color);
}

.lang-divider {
    opacity: 0.3;
}

.theme-icon {
    font-size: 1.3rem;
    color: var(--accent-color);
}

/* Titre principal "logofolio" */
.edition-title-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 10px 0 30px 0;
    z-index: 50;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
}

.page-title {
    font-family: 'Bootzy TM', 'Montserrat', sans-serif;
    font-size: 3.8rem;
    color: var(--accent-color);
    text-transform: lowercase;
    font-weight: normal;
    letter-spacing: 0.05em;
    transition: color 0.4s ease;
}

.arrow-icon {
    font-size: 1.2rem;
    color: var(--accent-color);
    transition: transform 0.3s ease, color 0.4s ease;
}

.dropdown-header.active .arrow-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    list-style: none;
    padding: 10px 0;
    margin-top: 5px;
    box-shadow: 0 4px 15px var(--btn-shadow);
    display: none;
    min-width: 200px;
    z-index: 60;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* --- ENCART COLORÉ COMPACT ET CENTRÉ --- */
.intro-banner {
    width: 100%;
    background-color: var(--banner-bg);
    color: var(--banner-text);
    padding: 28px 30px;
    margin-bottom: 35px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.intro-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.intro-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 600;
}

/* --- BANDEAU DÉFILANT CONTINU --- */
.logos-marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 25px 0;
    margin-bottom: 10px;
    background-color: transparent;
}

.logos-track {
    display: flex;
    width: max-content;
    gap: 60px;
    will-change: transform;
    animation: scrollMarquee 35s linear infinite;
}

.logos-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    width: 140px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.marquee-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    transition: transform 0.3s ease;
}

.marquee-item img.marquee-logo-elma {
    transform: scale(1.4);
}

.marquee-item img:hover {
    transform: scale(1.1);
}

.marquee-item img.marquee-logo-elma:hover {
    transform: scale(1.5);
}

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

/* --- BARRE DE SÉPARATION --- */
.project-divider {
    border: none;
    height: 10px;
    background-color: var(--accent-color);
    width: 100%;
    margin: 40px 0;
    transition: background-color 0.4s ease;
}

/* --- SCROLLYTELLING VERTICAL --- */
.scrollytelling-wrapper {
    position: relative;
    height: 550vh;
    width: 100%;
}

.scrolly-sticky-viewport {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 35px 0;
    background-color: var(--bg-color);
    transition: background-color 0.4s ease;
}

.scrolly-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.scrolly-counter {
    font-family: 'Figtree', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 0.12em;
}

.scrolly-hint {
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: lowercase;
    opacity: 0.65;
}

.scrolly-stage {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scrolly-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    padding: 20px 40px;
    will-change: transform, opacity;
}

.scrolly-logo-box {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    width: 100%;
}

.scrolly-logo-box img {
    max-width: 440px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.scrolly-logo-box img.logo-small {
    max-width: 260px;
}

.logo-bottom-caption {
    width: 90%;
    max-width: 650px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.85;
    transition: color 0.4s ease;
}

.scrolly-progress-bar {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 180px;
    background-color: rgba(128, 128, 128, 0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 10;
}

.scrolly-progress-fill {
    width: 100%;
    height: 0%;
    background-color: var(--accent-color);
    transition: height 0.1s linear, background-color 0.4s ease;
}

/* --- GRILLE RÉCAPITULATIVE DE FIN DE PAGE --- */
.all-logos-grid-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px 80px 40px;
    width: 100%;
}

.all-logos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: center;
}

.grid-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 140px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.grid-logo-item:hover {
    transform: scale(1.08);
}

.grid-logo-item img {
    max-width: 180px;
    max-height: 100px;
    object-fit: contain;
}

/* =========================================
   ADAPTABILITÉ MOBILE, MENU DÉROULANT & POLICE
   ========================================= */
@media (max-width: 900px) {
    /* Tout ce qui était en police Bootzy TM passe en Montserrat Black sur téléphone */
    .page-title {
        font-family: 'Montserrat', sans-serif;
        font-weight: 900;
        letter-spacing: 0.01em;
        font-size: 2.5rem;
    }

    /* Navbar identique à l'accueil */
    .navbar {
        padding: max(18px, env(safe-area-inset-top)) var(--gutter-mobile-right) 18px var(--gutter-mobile);
        justify-content: space-between;
    }

    .nav-icons {
        position: static;
        gap: 14px;
    }

    .home-icon {
        width: 26px;
        height: 26px;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .mobile-menu-btn:hover {
        color: var(--accent-color);
    }

    .burger-lines,
    .burger-lines::before,
    .burger-lines::after {
        display: block;
        width: 22px;
        height: 2.5px;
        background-color: currentColor;
        border-radius: 2px;
        position: relative;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .burger-lines::before,
    .burger-lines::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .burger-lines::before { top: -7px; }
    .burger-lines::after { top: 7px; }

    .mobile-menu-btn[aria-expanded="true"] .burger-lines {
        background-color: transparent;
    }
    .mobile-menu-btn[aria-expanded="true"] .burger-lines::before {
        top: 0;
        transform: rotate(45deg);
    }
    .mobile-menu-btn[aria-expanded="true"] .burger-lines::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Menu déroulant sous le header */
    .nav-panel {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        position: absolute;
        top: 100%;
        left: var(--gutter-mobile);
        right: var(--gutter-mobile-right);
        background-color: var(--dropdown-bg);
        border: 1px solid var(--dropdown-border);
        border-radius: 18px;
        padding: 18px 20px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
        z-index: 999;
    }

    .nav-panel.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        font-size: 1.05rem;
    }

    .nav-dot {
        display: none;
    }

    .nav-controls {
        position: static;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid var(--dropdown-border);
        gap: 12px;
    }

    .edition-title-container {
        padding: 0 var(--gutter-mobile-right) 0 var(--gutter-mobile);
        margin: 8px 0 20px 0;
    }

    .intro-banner {
        padding: 22px var(--gutter-mobile-right) 22px var(--gutter-mobile);
        margin-bottom: 24px;
    }

    .intro-content p {
        font-size: 0.92rem;
    }

    .logos-track {
        gap: 40px;
    }

    .marquee-item {
        width: 110px;
        height: 56px;
    }

    .scrolly-sticky-viewport {
        padding: 24px 0;
    }

    .scrolly-slide {
        padding: 16px 36px 16px var(--gutter-mobile);
        gap: 16px;
    }

    .scrolly-logo-box img {
        max-width: 260px;
    }

    .scrolly-logo-box img.logo-small {
        max-width: 170px;
    }

    .logo-bottom-caption {
        font-size: 0.88rem;
    }

    .scrolly-progress-bar {
        right: 14px;
        height: 120px;
    }

    .all-logos-grid-section {
        padding: 24px var(--gutter-mobile-right) max(48px, calc(32px + env(safe-area-inset-bottom))) var(--gutter-mobile);
    }

    .all-logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .grid-logo-item {
        height: 110px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .all-logos-grid {
        gap: 18px;
    }

    .grid-logo-item img {
        max-width: 130px;
        max-height: 76px;
    }
}