/* ==========================================================================
   Histoire des sables — charte reprise de la couverture du livre
   (CV000654-couv.pdf) : ciel cévenol bleu-gris, barque turquoise, herbe kaki.
   Typographie : ITC Franklin Gothic X-Condensed de la couverture, transposée
   en Oswald (titres) et Libre Franklin (texte courant), auto-hébergées.
   ========================================================================== */

/* ==================== FONTS ==================== */
@font-face {
    font-family: 'Oswald';
    src: url('fonts/Oswald-normal-latin.woff2') format('woff2');
    font-weight: 300 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Oswald';
    src: url('fonts/Oswald-normal-latin-ext.woff2') format('woff2');
    font-weight: 300 700; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Libre Franklin';
    src: url('fonts/LibreFranklin-normal-latin.woff2') format('woff2');
    font-weight: 300 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Libre Franklin';
    src: url('fonts/LibreFranklin-normal-latin-ext.woff2') format('woff2');
    font-weight: 300 700; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Libre Franklin';
    src: url('fonts/LibreFranklin-italic-latin.woff2') format('woff2');
    font-weight: 400; font-style: italic; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Libre Franklin';
    src: url('fonts/LibreFranklin-italic-latin-ext.woff2') format('woff2');
    font-weight: 400; font-style: italic; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==================== BASE ==================== */
:root {
    /* Couleurs relevées sur la couverture */
    --nuit: #16202B;          /* ombres de la photo */
    --ink: #1D2B3A;           /* texte courant */
    --ink-soft: #435667;      /* texte secondaire */
    --ink-faint: #556772;     /* mentions, légendes */
    --bleu: #2C4763;          /* titres — bleu profond du ciel */
    --bleu-clair: #5C7EA0;    /* ciel médian */
    --eau: #0D6E82;          /* barque, couleur d'accent — assombrie pour le contraste AA */
    --eau-vive: #1A91AD;      /* barque en pleine lumière */
    --kaki: #5B5335;          /* herbe rase du causse */
    --bg: #E9F0EE;            /* blanc nuage */
    --bg-clair: #F5F9F8;
    --bg-raised: #DCE7E6;
    --line: #C2D0D0;
    --line-fort: #A8BBBC;

    --titre: 'Oswald', 'Helvetica Neue', Arial Narrow, sans-serif;
    --texte: 'Libre Franklin', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --wrap: 780px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--texte);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--eau); text-decoration: none; }
a:hover { color: var(--nuit); }
a:focus-visible { outline: 2px solid var(--eau); outline-offset: 3px; }

h1, h2, h3 {
    font-family: var(--titre);
    font-weight: 600;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.005em;
    color: var(--bleu);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px 80px; }

/* Marqueur de contenu à écrire — supprimer la règle quand le site est rempli */
.todo {
    color: var(--bg-clair);
    background: var(--eau);
    padding: 0 6px;
    font-size: 0.78em;
    font-family: var(--titre);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* ==================== TOPBAR ==================== */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(245, 249, 248, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
    height: 64px; display: flex; align-items: center; gap: 28px;
}

.brand {
    font-family: var(--titre); font-weight: 600; font-size: 1.05rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--bleu); white-space: nowrap;
}
.brand:hover { color: var(--eau); }

.menu {
    display: flex; list-style: none; gap: 22px;
    margin-right: auto;
    font-family: var(--titre); font-weight: 400; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.menu a { color: var(--ink-soft); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a.active { color: var(--nuit); border-bottom-color: var(--eau); }

.langs {
    display: flex; list-style: none; gap: 10px;
    font-family: var(--titre); font-size: 0.8rem; letter-spacing: 0.1em;
}
.langs a { color: var(--ink-faint); }
.langs a:hover { color: var(--nuit); }
.langs a.current { color: var(--eau); font-weight: 600; }

.burger {
    appearance: none; background: transparent; border: 0; cursor: pointer;
    display: none; flex-direction: column; gap: 5px; padding: 4px;
}
.burger span { width: 26px; height: 2px; background: var(--eau-vive); }

/* ==================== HERO ====================
   Reprend la mise en page de la couverture : titre haut à gauche sur le ciel,
   la barque et le causse occupent le bas de l'image. */
.hero {
    position: relative;
    min-height: min(88vh, 760px);
    padding: 46px max(24px, calc((100vw - 1180px) / 2)) 90px;
    display: grid;
    grid-template-columns: minmax(0, 570px) minmax(330px, 480px);
    column-gap: 48px;
    justify-content: space-between;
    align-content: start;
    text-align: left;
    background:
        linear-gradient(to right,
            rgba(233, 240, 238, 0.28) 0%,
            rgba(233, 240, 238, 0.16) 30%,
            rgba(233, 240, 238, 0.05) 52%,
            rgba(233, 240, 238, 0) 68%) 0 0 / 100% 100% no-repeat,
        linear-gradient(to bottom,
            rgba(233, 240, 238, 0.56) 0%,
            rgba(233, 240, 238, 0.22) 34%,
            rgba(233, 240, 238, 0.04) 62%,
            rgba(22, 32, 43, 0.12) 100%) 0 0 / 100% 100% no-repeat,
        url('assets/hero-barque.jpg') center top / cover no-repeat,
        var(--bg);
    border-bottom: 1px solid var(--line);
}
.hero > * { width: 100%; margin-inline: 0; }
.hero-main { grid-column: 1; }
.hero-side {
    grid-column: 2;
    max-width: 480px;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}
.hero .lead {
    margin: 0;
    padding: 12px 18px;
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1.5;
    background: linear-gradient(to right, rgba(233, 240, 238, 0.76), rgba(233, 240, 238, 0.46));
    backdrop-filter: blur(2px);
}
.hero .lead em { font-style: italic; }
.hero .cta {
    margin-top: 0;
    margin-bottom: 0;
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
}
.hero .cta .btn { padding-inline: 22px; }

.eyebrow {
    font-family: var(--titre); font-weight: 400;
    text-transform: uppercase; letter-spacing: 0.24em;
    font-size: 0.76rem; color: var(--ink-soft); margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(3rem, 11vw, 6.4rem);
    font-weight: 700;
    letter-spacing: -0.005em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(245, 249, 248, 0.45);
}
.hero h1 .of { color: var(--bleu-clair); font-style: normal; }

.meta {
    font-family: var(--titre); font-weight: 300;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 28px;
}

.lead {
    font-style: italic; font-size: 1.2rem; line-height: 1.6;
    color: var(--ink); max-width: 29em;
}

.cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-block; padding: 13px 28px;
    font-family: var(--titre); font-weight: 500;
    font-size: 0.94rem; letter-spacing: 0.1em; text-transform: uppercase;
    border: 2px solid var(--eau); transition: background .2s, color .2s;
}
.btn-primary { background: var(--eau); color: var(--bg-clair); }
.btn-primary:hover { background: var(--nuit); border-color: var(--nuit); color: var(--bg-clair); }
.btn-ghost { color: var(--eau); background: rgba(245, 249, 248, 0.82); }
.btn-ghost:hover { background: var(--eau); color: var(--bg-clair); }

/* ==================== EN-TÊTE DE PAGE ==================== */
.page-head {
    padding: 78px 24px 54px; text-align: center;
    background:
        linear-gradient(to bottom,
            rgba(233, 240, 238, 0.86) 0%,
            rgba(233, 240, 238, 0.97) 82%,
            var(--bg) 100%),
        url('assets/ciel.jpg') center 30% / cover no-repeat,
        var(--bg);
    border-bottom: 1px solid var(--line);
}
.page-head > * { max-width: var(--wrap); margin-inline: auto; }
.page-head h1 {
    font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700;
    margin-bottom: 18px;
    text-shadow: 2px 2px 0 rgba(245, 249, 248, 0.45);
}

/* ==================== BLOCS ==================== */
.block { padding: 54px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }

.block h2 {
    font-size: 1.7rem; font-weight: 600; letter-spacing: 0.03em;
    color: var(--eau); margin-bottom: 22px;
    padding-bottom: 10px; border-bottom: 2px solid var(--line-fort);
}

.block p { margin-bottom: 16px; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.block p:last-child { margin-bottom: 0; }

.role {
    font-family: var(--titre); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.14em;
    font-size: 0.8rem; color: var(--kaki); margin-bottom: 10px !important;
}

.signature {
    margin-top: 28px;
    text-align: right !important;
    font-family: var(--titre);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
}

.block h3 {
    margin: 34px 0 14px;
    font-size: 1.08rem;
    letter-spacing: 0.07em;
    color: var(--bleu);
}

/* Photogrammes et images de tournage */
.film-still {
    margin: 28px 0 34px;
}

.film-still img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 1px solid var(--line-fort);
}

.film-still figcaption {
    margin-top: 9px;
    font-family: var(--titre);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.film-still-wide { margin-block: 10px 26px; }
.film-still-wide img { aspect-ratio: 16 / 6.6; }
.influence-visual img { aspect-ratio: 16 / 7.6; object-position: center 44%; }
.team-photo {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 820px;
    justify-self: center;
    margin: 54px 0 6px;
}
.team-photo img { aspect-ratio: 4 / 3; }

/* Portraits de l’équipe — chaque contribution occupe la même place. */
.team-grid {
    max-width: 1180px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 48px;
}

.portrait {
    display: flex;
    flex-direction: column;
}

.portrait h2 { font-size: 1.42rem; }
.portrait .role { min-height: 2.8em; }

.credits-list {
    list-style: none;
    margin-bottom: 24px;
}

.credits-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.credits-list li:last-child { border-bottom: 0; }

/* Fiche technique */
.specs {
    display: grid; grid-template-columns: max-content 1fr;
    gap: 10px 28px; font-size: 0.95rem;
}
.specs dt {
    font-family: var(--titre); font-weight: 400;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-faint);
}
.specs dd { color: var(--ink); }

/* Parcours */
.timeline { list-style: none; }
.timeline li {
    padding: 16px 0 16px 22px; border-left: 2px solid var(--line-fort);
    position: relative;
}
.timeline li::before {
    content: ''; position: absolute; left: -5px; top: 25px;
    width: 8px; height: 8px; background: var(--eau-vive); border-radius: 50%;
}
.timeline .when {
    display: inline-block; min-width: 4.5em;
    font-family: var(--titre); font-weight: 500; letter-spacing: 0.06em;
    color: var(--eau); font-size: 0.9rem;
}

/* Citations */
blockquote {
    background: var(--bg-raised); border-left: 3px solid var(--eau-vive);
    padding: 26px 30px; margin: 8px 0 22px;
    font-style: italic; font-size: 1.1rem; color: var(--nuit);
}
blockquote cite {
    display: block; margin-top: 14px;
    font-family: var(--titre); font-style: normal; font-weight: 400;
    text-transform: uppercase; letter-spacing: 0.09em;
    font-size: 0.8rem; color: var(--ink-faint);
}

/* Téléchargements */
.downloads { list-style: none; }
.downloads li {
    padding: 14px 0; border-bottom: 1px solid var(--line);
    display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline;
}
.downloads li:last-child { border-bottom: 0; }

/* Vidéo */
.video-frame {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; background: var(--nuit); border: 1px solid var(--line-fort);
}
.video-frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
}

/* ==================== FOOTER ==================== */
footer {
    text-align: center; padding: 44px 24px;
    background: var(--bg-raised);
    border-top: 1px solid var(--line);
    font-size: 0.85rem; color: var(--ink-soft);
}
footer p { margin-bottom: 6px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .menu {
        position: fixed; top: 64px; left: -100%;
        width: 100%; height: calc(100vh - 64px);
        background: var(--bg); flex-direction: column; align-items: center;
        padding-top: 54px; gap: 26px; font-size: 1.25rem;
        transition: left .3s; margin-right: 0;
    }
    .menu.active { left: 0; }
    .burger { display: flex; }
    .langs { margin-left: auto; }
    .brand { font-size: 0.95rem; }
    .hero {
        min-height: min(92svh, 760px);
        padding: 54px 24px 250px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        background:
            linear-gradient(to bottom,
                rgba(233, 240, 238, 0.97) 0%,
                rgba(233, 240, 238, 0.94) 32%,
                rgba(233, 240, 238, 0.72) 48%,
                rgba(233, 240, 238, 0.12) 66%,
                rgba(233, 240, 238, 0) 78%) 0 0 / 100% 100% no-repeat,
            url('assets/hero-barque-1100.jpg') 58% 118% / auto 72% no-repeat,
            var(--bg);
    }
    .hero > * { max-width: 570px; }
    .hero-main .meta { margin-bottom: 0; }
    .hero-side {
        max-width: 570px;
        margin-top: 28px;
        padding: 0;
        gap: 0;
        align-items: flex-start;
        background: none;
        backdrop-filter: none;
    }
    .hero .lead {
        align-self: flex-start;
        margin-bottom: 0;
        padding: 0;
        font-style: normal;
        font-size: 1.2rem;
        line-height: 1.6;
        background: none;
        backdrop-filter: none;
    }
    .hero .cta {
        margin-top: 38px;
        margin-bottom: 0;
        gap: 14px;
        flex-direction: row;
        align-items: stretch;
    }
    .hero .cta .btn { padding-inline: 28px; }
    .block p { text-align: left; }
    .specs { grid-template-columns: 1fr; gap: 2px 0; }
    .specs dd { margin-bottom: 12px; }
    .team-grid { grid-template-columns: 1fr; }
    .portrait .role { min-height: 0; }
    .film-still-wide,
    .influence-visual,
    .team-photo { margin-inline: -24px; }
    .film-still figcaption { padding-inline: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
