@font-face {
    font-family: "Open Sans";
    src: url("fonts/open-sans-latin-wdth-normal.woff2") format("woff2");
    font-weight: 300 800;
    font-stretch: 75% 100%;
    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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Open Sans";
    src: url("fonts/open-sans-latin-ext-wdth-normal.woff2") format("woff2");
    font-weight: 300 800;
    font-stretch: 75% 100%;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Open Sans";
    src: url("fonts/open-sans-latin-wdth-italic.woff2") format("woff2");
    font-weight: 300 800;
    font-stretch: 75% 100%;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg: #ffffff;
    --bg-alt: #f8f8f8;
    --ink: #111111;
    --muted: #727272;
    --line: #dddcdc;
    --max: 1180px;
    --text: 42rem;
    --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 300 17px/1.65 "Open Sans", system-ui, sans-serif;
    font-stretch: 87.5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--muted); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--bg); padding: 4px 8px; z-index: 10; }

/* --- En-tête ------------------------------------------------------------- */

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.site-header .inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 22px var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 32px;
}
.brand {
    text-decoration: none;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 18px;
}
.brand-name {
    font-size: 30px;
    font-weight: 300;
    font-stretch: 75%;
    letter-spacing: 0.06em;
    line-height: 1.1;
}
.brand-name b { font-weight: 300; text-transform: uppercase; }
.brand-tag {
    font-size: 15px;
    font-stretch: 75%;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 26px;
}
.nav a {
    text-decoration: none;
    font-size: 15px;
    font-stretch: 75%;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}
.nav a[aria-current] { border-bottom-color: var(--ink); }

/* --- Mise en page générale ----------------------------------------------- */

main {
    flex: 1;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(32px, 6vw, 64px) var(--gutter) 80px;
}

h1, h2, h3 {
    font-weight: 300;
    font-stretch: 75%;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
h1 { font-size: clamp(32px, 5vw, 44px); margin: 0 0 8px; }
h2 { font-size: 26px; margin: 2.2em 0 0.8em; }

.page-head { margin-bottom: clamp(28px, 5vw, 48px); }
.page-head .dates { color: var(--muted); font-stretch: 75%; letter-spacing: 0.08em; font-size: 18px; margin: 0; }

.prose { max-width: var(--text); }
.prose p { margin: 0 0 1.1em; }
.prose figure { margin: 2em 0; }

/* --- Accueil ------------------------------------------------------------- */

.home {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}
.home figure { margin: 0; position: sticky; top: 24px; }
.home blockquote { margin: 0; font-style: italic; }
.home blockquote p { margin: 0 0 1em; }
.home .source { color: var(--muted); font-size: 15px; margin-top: 1.5em; }

figcaption, .caption {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

/* --- Liste des séries ---------------------------------------------------- */

.series-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: clamp(20px, 3vw, 36px);
}
.series-grid a { display: block; text-decoration: none; }
.series-grid .thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--bg-alt);
    overflow: hidden;
}
.series-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, opacity .3s;
}
.series-grid a:hover img { transform: scale(1.03); }
.series-grid a:hover { color: inherit; }
.series-grid .title {
    display: block;
    margin-top: 12px;
    font-size: 20px;
    font-stretch: 75%;
    letter-spacing: 0.04em;
}
.series-grid .dates { color: var(--muted); font-size: 14px; }

/* --- Page d'une série ---------------------------------------------------- */

.works {
    margin-top: clamp(40px, 6vw, 64px);
    columns: 3 280px;
    column-gap: clamp(20px, 3vw, 36px);
}
.works figure {
    break-inside: avoid;
    margin: 0 0 clamp(24px, 3vw, 36px);
}
.works a { display: block; cursor: zoom-in; }
.works img { margin: 0 auto; max-height: 85vh; width: auto; }
.works img:hover { opacity: .9; }
.works .wide { column-span: all; }

.series-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-stretch: 75%;
    letter-spacing: 0.06em;
}
.series-nav a { text-decoration: none; }
.series-nav .next { margin-left: auto; text-align: right; }
.series-nav small { display: block; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.12em; }

/* --- CV ------------------------------------------------------------------ */

.chrono { margin: 0 0 1.5em; display: grid; grid-template-columns: 6.5em 1fr; gap: 0 20px; }
.chrono dt { grid-column: 1; font-weight: 500; font-variant-numeric: tabular-nums; padding-top: 0.6em; }
.chrono dd { grid-column: 2; margin: 0; padding-top: 0.6em; }
.chrono dd + dd { padding-top: 0.15em; }
.prose h2:first-child { margin-top: 0; }

/* --- Contact ------------------------------------------------------------- */

.contact-mail { font-size: 22px; font-stretch: 75%; letter-spacing: 0.04em; }

/* --- Pied de page -------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-alt);
    color: var(--muted);
    font-size: 14px;
}
.site-footer .inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 24px var(--gutter);
}

/* --- Visionneuse --------------------------------------------------------- */

.lightbox {
    border: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
}
.lightbox::backdrop { background: rgba(255, 255, 255, 0.98); }
.lightbox[open] {
    display: grid;
    grid-template-rows: 1fr auto;
}
.lightbox .stage {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px clamp(8px, 7vw, 96px) 12px;
}
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.lightbox .caption {
    text-align: center;
    padding: 0 var(--gutter) 24px;
    max-width: 60rem;
    margin: 0 auto;
    font-size: 15px;
}
.lightbox button {
    position: absolute;
    background: none;
    border: 0;
    color: var(--ink);
    font: inherit;
    font-size: 30px;
    line-height: 1;
    padding: 12px 16px;
    cursor: pointer;
}
.lightbox button:hover { color: var(--muted); }
.lightbox .close { top: 8px; right: 8px; }
.lightbox .prev, .lightbox .next { top: 50%; transform: translateY(-50%); font-size: 40px; }
.lightbox .prev { left: 4px; }
.lightbox .next { right: 4px; }

/* --- Mobile -------------------------------------------------------------- */

@media (max-width: 760px) {
    .home { grid-template-columns: 1fr; }
    .home figure { position: static; }
    .brand-name { font-size: 26px; }
    .chrono { grid-template-columns: 4.8em 1fr; gap: 0 12px; }
    .lightbox .prev, .lightbox .next { top: auto; bottom: 8px; transform: none; }
    .lightbox .caption { padding-bottom: 60px; }
}

/* --- Hommage (accueil) --------------------------------------------------- */

.hommage {
    margin: 0 0 clamp(28px, 5vw, 48px);
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    font-stretch: 75%;
    letter-spacing: 0.06em;
    font-size: 18px;
    color: var(--muted);
}
.hommage a { color: var(--ink); }

/* --- Formulaire de contact ----------------------------------------------- */

.contact-form { margin-top: 2em; display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; letter-spacing: 0.04em; color: var(--muted); }
.contact-form input, .contact-form textarea {
    font: inherit;
    font-size: 17px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 10px 12px;
    width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); }
.contact-form textarea { resize: vertical; }
.contact-form .piege { position: absolute; left: -9999px; }
.contact-form .note { font-size: 14px; color: var(--muted); margin: 0; }
.contact-form button {
    justify-self: start;
    font: inherit;
    font-stretch: 75%;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--bg);
    border: 0;
    padding: 12px 28px;
    cursor: pointer;
}
.contact-form button:hover { background: var(--muted); }
.status { margin: 0; padding: 12px 14px; border-left: 2px solid var(--ink); background: var(--bg-alt); }
.status.err { border-color: #b00020; }
