/* ============================================================
   maximevermeulen.com — feuille de style unique
   Fond blanc, typo Dosis, sobriété.
   ============================================================ */

@font-face {
    font-family: 'Dosis';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/assets/fonts/dosis-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Dosis';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/assets/fonts/dosis-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --fg: #1a1a1a;
    --fg-soft: #666;
    --bg: #fff;
    --gap: 6px;
    --header-h: 72px;
    --ease: cubic-bezier(.25, .1, .25, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Dosis', sans-serif;
    font-weight: 400;
    color: var(--fg);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.6;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 24px;
    background: var(--bg);
    transition: background .4s var(--ease);
}

.logo img { height: 34px; width: auto; }
.logo .logo-white { display: none; }

.site-nav {
    display: flex;
    gap: 28px;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 13px;
    font-weight: 500;
}

.site-nav a { opacity: .85; transition: opacity .2s; }
.site-nav a:hover { opacity: 1; }
.lang-switch { padding: 1px 8px; }

/* Header transparent au-dessus du diaporama */
.site-header.over-hero {
    background: transparent;
    color: #fff;
}
.site-header.over-hero .logo-black { display: none; }
.site-header.over-hero .logo-white { display: block; }

/* ---------- Diaporama fullscreen ---------- */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #111;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s var(--ease);
}
.hero-slide.is-active { opacity: 1; }

.hero-slide img,
.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* léger voile pour la lisibilité du header */
.hero::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 140px;
    background: linear-gradient(rgba(0, 0, 0, .35), transparent);
    pointer-events: none;
}

.hero-caption {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .25em;
    font-weight: 300;
}

.hero-scroll {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: .8;
    animation: bounce 2.2s infinite;
}
.hero-scroll:hover { opacity: 1; }

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* ---------- Grille (accueil + projet) ---------- */

.grid {
    columns: 3;
    column-gap: var(--gap);
    padding: var(--gap);
}

.cell {
    position: relative;
    display: block;
    margin-bottom: var(--gap);
    break-inside: avoid;
    overflow: hidden;
}

.cell img, .cell video { width: 100%; height: auto; }

/* Légende au survol */
.cell-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .35s var(--ease);
}
.cell:hover .cell-caption,
.cell:focus-visible .cell-caption { opacity: 1; }

.cell-title {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 15px;
    font-weight: 500;
}
.cell-credit {
    font-weight: 300;
    font-size: 13px;
    letter-spacing: .08em;
}

/* ---------- Pages ---------- */

.page {
    min-height: 60vh;
    padding: calc(var(--header-h) + 40px) 24px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.page h1 {
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: .25em;
    font-size: 26px;
    text-align: center;
    margin-bottom: 48px;
}

/* Projet : grille pleine largeur */
.project-page { max-width: none; padding-left: 0; padding-right: 0; }
.project-head { padding: 0 24px; margin-bottom: 40px; text-align: center; }
.project-head h1 { margin-bottom: 6px; }
.project-credit {
    color: var(--fg-soft);
    font-weight: 300;
    letter-spacing: .1em;
    text-align: center;
}

/* À propos */
.about-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 48px;
    align-items: start;
}
.about-text p { margin-bottom: 1.2em; text-align: justify; font-weight: 300; }
.about-text strong { font-weight: 600; }
.about-text ul, .about-text ol { margin: 0 0 1.2em; padding-left: 2em; }
.about-portrait img { width: 100%; }

/* Contact */
.contact-page { text-align: center; }
.contact-links { display: flex; flex-direction: column; gap: 14px; font-size: 18px; font-weight: 300; letter-spacing: .06em; }
.contact-links a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 24px 36px;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: .12em;
    color: var(--fg-soft);
}
.site-footer .insta { color: var(--fg); opacity: .8; transition: opacity .2s; }
.site-footer .insta:hover { opacity: 1; }

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .97);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox img {
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.lb-photo { position: relative; }

.lightbox button,
.hero-nav {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fg);
    padding: 16px;
    opacity: .7;
    transition: opacity .2s;
}
.lightbox button:hover,
.hero-nav:hover { opacity: 1; }
.hero-nav { color: #fff; z-index: 2; }
.lightbox .lb-prev, .lightbox .lb-next { color: #fff; }
.lb-close { top: 10px; right: 14px; }
.lb-prev, .hero-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next, .hero-next { right: 6px; top: 50%; transform: translateY(-50%); }
.hero-nav svg, .lb-prev svg, .lb-next svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.lb-counter {
    position: absolute;
    top: 100%;
    right: 12px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: .08em;
}

/* ---------- Responsive ---------- */

@media (min-width: 1101px), (max-width: 700px) {
    .grid { font-size: 0; }
    .cell {
        display: inline-block;
        width: 100%;
        vertical-align: top;
        font-size: 1rem;
    }
}

@media (min-width: 1101px) {
    :root { --gap: 20px; }
    .cell-caption { background: rgba(0, 0, 0, .7); }
    .lang-switch { padding: 0; }
}

@media (max-width: 1100px) {
    .grid { columns: 2; }
}

@media (max-width: 1100px) and (orientation: landscape) {
    .lang-switch { padding: 0; }
}

@media (max-width: 700px) {
    :root { --header-h: 60px; --gap: 4px; }
    .logo img { height: 26px; }
    .site-nav { gap: 16px; font-size: 11px; letter-spacing: .12em; }
    .site-nav a:first-child { display: none; } /* "Accueil" : le logo suffit */
    .lang-switch { padding: 0; }

    .site-header.over-hero { background: var(--bg); color: var(--fg); }
    .site-header.over-hero .logo-black { display: block; }
    .site-header.over-hero .logo-white { display: none; }

    .hero { height: auto; margin-top: var(--header-h); }
    .hero-slide.is-active { position: relative; }
    .hero-slide img, .hero-slide video { height: auto; object-fit: contain; }
    .hero::after { display: none; }
    .hero-nav svg, .hero-scroll svg, .lb-prev svg, .lb-next svg {
        width: clamp(18px, 5vw, 22px);
        height: clamp(18px, 5vw, 22px);
    }
    .hero-scroll {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    .grid { columns: 2; }
    .project-grid { columns: 1; --gap: 20px; }
    .cell-caption { background: rgba(0, 0, 0, .7); padding: 8px; gap: 2px; }
    .cell-title { font-size: 12px; letter-spacing: .08em; line-height: 1.3; }
    .cell-credit { font-size: 11px; line-height: 1.3; }

    .about-layout { grid-template-columns: 1fr; }
    .page h1 { font-size: 20px; margin-bottom: 32px; }
    .project-page { padding-top: calc(var(--header-h) + 32px); }
    .project-head { margin-bottom: 28px; }
    .project-head h1 { margin-bottom: 4px; line-height: 1.3; }
    .project-credit { line-height: 1.4; }

    .lightbox img { max-width: 100vw; max-height: calc(100svh - 120px); }
    .lightbox .lb-prev, .lightbox .lb-next { position: absolute; color: #fff; opacity: 1; }
}

@media (max-width: 700px) and (hover: none) {
    #grid .cell:hover .cell-caption { opacity: 0; }
    #grid .cell.is-preview .cell-caption,
    #grid .cell:focus-visible .cell-caption { opacity: 1; }
}
