/* ==========================================================================
   JUSK — Juliette Simonneau-Krol portfolio theme
   Ported faithfully from the approved home mockup. Display face is self-hosted
   Anton (SIL OFL) instead of the mockup's Impact placeholder.
   ========================================================================== */

/* ---------- Anton (display) — self-hosted, SIL OFL ---------- */
@font-face {
    font-family: "Anton";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/anton-latin.woff2") format("woff2");
    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: "Anton";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/anton-latin-ext.woff2") format("woff2");
    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;
}

:root {
    /* palette — light "paper" world */
    --paper: #FCFBF7;
    --paper-2: #F5F2E9;
    --grid: rgba(74, 120, 140, 0.13);
    --grid-bold: rgba(74, 120, 140, 0.20);
    --ink: #17191B;
    --ink-soft: #56635F; /* neutral biased toward teal */
    --teal: #125E58;
    --teal-deep: #0B4340;
    --orange: #E86D2E;
    --cream: #F1EDE0;
    --line: rgba(23, 25, 27, 0.16);
    --card-ink: #FCFBF7;
    /* hero desert scene — theme-aware so text stays readable */
    --hero-sky: #EAE7DE;
    --hero-d1: #22302C;
    --hero-d2: #1B2723;
    --hero-d3: #14201D;
    --hero-d4: #0F1917;
    --hero-ink: #191B1D;
    --hero-ink-soft: #5A5F5B;
    --logo: #337C78;
    --hero-logo: #337C78;

    /* Self-hosted Anton (SIL OFL) replaces the mockup's Impact placeholder. */
    --display: "Anton", "Impact", "Haettenschweiler", "Franklin Gothic Bold", "Arial Narrow Bold", sans-serif;
    --serif: Georgia, "Times New Roman", serif;
    --body: "Helvetica Neue", Helvetica, Arial, sans-serif;

    --wrap: 1180px;
    --step: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #121413;
        --paper-2: #171A19;
        --grid: rgba(120, 180, 172, 0.10);
        --grid-bold: rgba(120, 180, 172, 0.16);
        --ink: #ECE9DF;
        --ink-soft: #95A5A0;
        --teal: #3FBFB2;
        --teal-deep: #2A8F86;
        --orange: #F0824A;
        --cream: #1C201E;
        --line: rgba(236, 233, 223, 0.18);
        --card-ink: #FCFBF7;
        --hero-sky: #191C1B;
        --hero-d1: #22302C;
        --hero-d2: #1B2723;
        --hero-d3: #14201D;
        --hero-d4: #0F1917;
        --hero-ink: #EFECE2;
        --hero-ink-soft: #A6B4AF;
        --logo: #5CC6BA;
        --hero-logo: #5CC6BA;
    }
}

:root[data-theme="dark"] {
    --paper: #121413;
    --paper-2: #171A19;
    --grid: rgba(120, 180, 172, 0.10);
    --grid-bold: rgba(120, 180, 172, 0.16);
    --ink: #ECE9DF;
    --ink-soft: #95A5A0;
    --teal: #3FBFB2;
    --teal-deep: #2A8F86;
    --orange: #F0824A;
    --cream: #1C201E;
    --line: rgba(236, 233, 223, 0.18);
    --card-ink: #FCFBF7;
    --hero-sky: #191C1B;
    --hero-d1: #22302C;
    --hero-d2: #1B2723;
    --hero-d3: #14201D;
    --hero-d4: #0F1917;
    --hero-ink: #EFECE2;
    --hero-ink-soft: #A6B4AF;
    --logo: #5CC6BA;
    --hero-logo: #5CC6BA;
}

:root[data-theme="light"] {
    --paper: #FCFBF7;
    --paper-2: #F5F2E9;
    --grid: rgba(74, 120, 140, 0.13);
    --grid-bold: rgba(74, 120, 140, 0.20);
    --ink: #17191B;
    --ink-soft: #56635F;
    --teal: #125E58;
    --teal-deep: #0B4340;
    --orange: #E86D2E;
    --cream: #F1EDE0;
    --line: rgba(23, 25, 27, 0.16);
    --card-ink: #FCFBF7;
    --hero-sky: #EAE7DE;
    --hero-d1: #22302C;
    --hero-d2: #1B2723;
    --hero-d3: #14201D;
    --hero-d4: #0F1917;
    --hero-ink: #191B1D;
    --hero-ink-soft: #5A5F5B;
    --logo: #337C78;
    --hero-logo: #337C78;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.page {
    font-family: var(--body);
    color: var(--ink);
    background-color: var(--paper);
    /* graph-paper grid — un seul petit carreau uniforme, répété à l'infini */
    background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 46px 46px, 46px 46px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* clip horizontal overflow WITHOUT creating a scroll container (keeps position:sticky working) */
html, body {
    overflow-x: clip;
    max-width: 100%;
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 56px);
}

a {
    color: inherit;
}

/* ---------- top bar ---------- */
.bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(20px, 5vw, 56px);
    backdrop-filter: blur(6px);
    background: color-mix(in srgb, var(--paper) 78%, transparent);
    border-bottom: 1px solid var(--line);
}

.mark {
    font-family: var(--display);
    font-size: 20px;
    line-height: 0.82;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    opacity: 0;
    will-change: opacity; /* revealed once the hero JUSK docks here */
}

/* Non-home pages: the travelling hero doesn't exist, so the nav mark is shown at rest. */
.page:not(.is-home) .mark {
    opacity: 1;
}

.mark b {
    display: inline-block;
}

.mark .star {
    color: var(--orange);
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 30px);
}

.nav a {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .14em;
    text-decoration: none;
    color: var(--ink-soft);
    padding: 4px 0;
    border-bottom: 1.5px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav a:hover, .nav a.active {
    color: var(--ink);
    border-color: var(--orange);
}

.navlinks {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 30px);
}

.nav .util {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* `.nav` prefix so this beats `.chipbtn { display:inline-flex }` (same class,
   defined later) — otherwise the burger would show on desktop too. */
.nav .navtoggle {
    display: none; /* desktop: hidden — revealed under 720px */
    font-size: 15px;
    padding: 5px 10px;
}

.chipbtn {
    font-family: var(--body);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 6px 11px;
    line-height: 1;
    transition: border-color .2s, background .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.chipbtn:hover {
    border-color: var(--teal);
}

.chipbtn:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.chipbtn[aria-disabled="true"] {
    opacity: .4;
    pointer-events: none;
}

@media (max-width: 720px) {
    /* Mobile nav : burger visible, liens repliés dans un panneau déroulant
       ancré sous la barre (la barre sticky sert de conteneur positionné). */
    .nav .navtoggle { display: inline-flex; }

    .navlinks {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px clamp(20px, 5vw, 56px) 14px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 26px -18px rgba(0, 0, 0, .45);
    }
    .bar.is-open .navlinks { display: flex; }

    .navlinks .lnk {
        padding: 13px 2px;
        font-size: 14px;
        border-bottom: 1px solid var(--line);
    }
    .navlinks .lnk:last-child { border-bottom: 0; }
}

/* ---------- hero scene (scrollytelling, pinned) ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.scene {
    position: relative;
    height: 320vh;
}

.stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: grid;
    place-items: center;
    text-align: center;
}

.stage-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    will-change: transform;
}

.stage-bg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.desert-svg .sky {
    fill: var(--hero-sky);
}

/* Petit ajustement fin de la hauteur des vagues (unités SVG, viewBox 0→800).
   La hauteur de base est définie par les coordonnées des 4 <path> (home.twig).
   Ce translate ne sert qu'à nudger de quelques unités : au-delà de ~60, les
   vagues du bas sortent sous la viewBox et on n'en voit plus que 2. */
.desert-svg .dunes {
    transform: translateY(var(--dune-drop, 0px));
}

.desert-svg .d1 {
    fill: var(--hero-d1);
}

.desert-svg .d2 {
    fill: var(--hero-d2);
}

.desert-svg .d3 {
    fill: var(--hero-d3);
}

.desert-svg .d4 {
    fill: var(--hero-d4);
}

.stage-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Fade only the TOP of the scene into the page (blend under the bar). A
       bottom/edge veil towards --paper lightened the dunes in light mode and
       inverted the wave order — so we leave the dunes at their true colours. */
    background: linear-gradient(to bottom,
        color-mix(in srgb, var(--paper) 60%, transparent) 0%,
        transparent 42%);
}

.cap {
    grid-area: 1 / 1;
    z-index: 3;
    width: min(92vw, 760px);
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
}

.cap.on {
    pointer-events: auto;
}

.cap-mark {
    font-family: var(--display);
    text-transform: uppercase;
    line-height: .76;
    font-size: clamp(5rem, 25vw, 19rem);
    color: var(--hero-ink);
    letter-spacing: .01em;
    transform-origin: 50% 50%;
    will-change: transform;
}

.cap-mark span {
    display: block;
}

.cap-mark i {
    color: var(--orange);
    font-style: normal;
}

/* JUSK* mark */
.jusk {
    display: block;
    color: var(--logo);
}

.jusk path {
    fill: currentColor;
}

.jusk--nav {
    height: 30px;
    width: auto;
}

.jusk--hero {
    width: min(56vw, 560px);
    height: auto;
    color: var(--hero-logo);
    transform-origin: 50% 50%;
    will-change: transform;
}

/* travelling logo layer, above the sticky bar */
.logo-fly {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.cap-big {
    font-family: var(--display);
    text-transform: uppercase;
    line-height: .9;
    font-size: clamp(2.6rem, 9vw, 6.4rem);
    color: var(--hero-ink);
    letter-spacing: .01em;
}

.cap-sub {
    margin: 18px auto 0;
    max-width: 40ch;
    font-size: var(--step);
    color: var(--hero-ink-soft);
}

.cap-sub b {
    color: var(--hero-ink);
}

.practice {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.practice li {
    font-family: var(--display);
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.02;
    font-size: clamp(1.7rem, 6vw, 4rem);
    color: var(--hero-ink-soft);
}

.practice li:nth-child(2) {
    color: var(--teal);
}

.practice li:nth-child(4) {
    color: var(--orange);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--teal);
}

.badge .ov {
    position: relative;
    padding: 4px 14px;
    font-weight: 700;
}

.badge .ov svg {
    position: absolute;
    inset: -5px -2px;
    width: calc(100% + 4px);
    height: calc(100% + 10px);
    overflow: visible;
}

.badge .ov svg path {
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.6;
}

.lede {
    margin: 0 auto;
    max-width: 42ch;
    font-size: var(--step);
    color: var(--ink-soft);
}

.lede b {
    color: var(--ink);
    font-weight: 700;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
    justify-content: center;
}

.scene .btn-ghost {
    border-color: var(--hero-ink);
    color: var(--hero-ink);
}

.scene .btn-ghost:hover {
    border-color: var(--orange);
    color: #fff;
}

/* progress dots */
.steps {
    position: absolute;
    right: clamp(16px, 3vw, 40px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: grid;
    gap: 12px;
}

.steps b {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
    transition: background .3s, transform .3s;
}

.steps b.act {
    background: var(--orange);
    transform: scale(1.5);
}

@media (max-width: 720px) {
    .steps {
        display: none;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 13px 22px;
    border-radius: 2px;
    transition: transform .18s, background .2s, color .2s;
    cursor: pointer;
    border: 0;
    font-family: var(--body);
}

.btn-primary {
    background: var(--teal);
    color: var(--card-ink);
}

.btn-primary:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1.5px solid var(--ink);
    color: var(--ink);
    background: transparent;
}

.btn-ghost:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    transform: translateY(-2px);
}

.hero-figure {
    position: absolute;
    bottom: 12vh;
    left: clamp(20px, 6vw, 90px);
    z-index: 2;
    width: 26px;
    opacity: .75;
    pointer-events: none;
}

.scrollcue {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 5;
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--ink-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scrollcue .rail {
    width: 1px;
    height: 34px;
    background: var(--ink-soft);
    animation: drop 1.8s ease-in-out infinite;
    transform-origin: top;
}

@keyframes drop {
    0%, 100% {
        transform: scaleY(.4);
        opacity: .4;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* ---------- section shell ---------- */
.sec {
    padding: clamp(70px, 11vh, 140px) 0;
    position: relative;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0 0 22px;
}

.eyebrow .n {
    font-family: var(--display);
    font-size: 15px;
    color: var(--ink);
    letter-spacing: 0;
}

.h2 {
    font-family: var(--display);
    text-transform: uppercase;
    line-height: .9;
    font-size: clamp(2.1rem, 6vw, 4.4rem);
    margin: 0;
    letter-spacing: .01em;
}

/* about */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(30px, 5vw, 72px);
    align-items: start;
}

@media (max-width: 860px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about p {
    margin: 0 0 18px;
    max-width: 60ch;
}

.about p.big {
    font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem);
    color: var(--ink);
    line-height: 1.35;
}

.about p.big .w {
    transition: opacity .15s linear;
    opacity: .16;
}

.tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.tool {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 13px;
    background: var(--ink);
    color: var(--paper);
    display: grid;
    place-items: center;
    font-family: var(--body);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: .01em;
    transition: transform .18s ease;
}

.tool::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1.5px solid var(--teal);
    border-radius: 8px;
    opacity: .55;
}

.tool span {
    position: relative;
}

.tool:hover, .tool:focus-visible {
    transform: translateY(-3px);
}

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

.tool:last-child::before {
    border-color: var(--orange);
}

.tool-ico {
    position: relative;
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* rollover / tooltip on the software tiles (accessible: also exposed via title + aria-label) */
.tool[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--body);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .04em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity .16s ease, transform .16s ease;
}

.tool[data-tip]:hover::after, .tool[data-tip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.portrait {
    position: relative;
    border-radius: 30px;
    background: radial-gradient(120% 90% at 60% 10%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(160deg, var(--teal-deep), #223 120%);
    overflow: hidden;
    border: 1px solid var(--line);
    /* No fixed height: the figure hugs the photo exactly (no dark band below). */
}

/* Container adapts to the photo's own ratio — no crop, no distortion. */
.portrait img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
}

.portrait .tape {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 120px;
    height: 26px;
    background: color-mix(in srgb, var(--cream) 82%, transparent);
    opacity: .6;
}

/* Scrim dégradé en bas (même traitement que .thumb::after sur les vignettes)
   pour que la légende (texte clair) reste lisible même sur une photo claire
   (t-shirt blanc, fond clair…). */
.portrait::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    background: linear-gradient(180deg,
        rgba(10, 10, 12, 0) 0%,
        rgba(10, 10, 12, .35) 45%,
        rgba(10, 10, 12, .82) 100%);
    pointer-events: none;
}

.portrait figcaption {
    position: absolute;
    z-index: 1; /* au-dessus du scrim ::after */
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #EDEAE0;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}

/* Placeholder (no photo yet): it alone gives the figure a height, so the container
   only reserves space in the empty dev state — never behind a real photo. */
.portrait .ph {
    min-height: 300px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* index 01 / 02 / 03 */
.index {
    display: grid;
    gap: 0;
    margin-top: 8px;
    border-top: 1px solid var(--line);
}

.irow {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: clamp(16px, 4vw, 44px);
    padding: clamp(22px, 4vh, 40px) 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    transition: padding-left .25s, color .2s;
}

.irow:hover {
    padding-left: 14px;
}

.irow:hover .iname {
    color: var(--orange);
}

.irow .inum {
    font-family: var(--display);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--teal);
}

.irow .iname {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(1.6rem, 5vw, 3.2rem);
    line-height: .95;
    letter-spacing: .01em;
    transition: color .2s;
}

.irow .idesc {
    color: var(--ink-soft);
    font-size: 13px;
    text-align: right;
    max-width: 24ch;
    justify-self: end;
}

@media (max-width: 680px) {
    .irow {
        grid-template-columns: auto 1fr;
    }

    .irow .idesc {
        display: none;
    }
}

/* work grid */
.worknote {
    color: var(--ink-soft);
    font-size: 13.5px;
    max-width: 54ch;
    margin: 14px 0 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 44px;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    position: relative;
    text-decoration: none;
    display: block;
}

.thumb {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    color: var(--card-ink);
    border: 1px solid rgba(0, 0, 0, .08);
    background: var(--pc, #333);
    transition: transform .3s ease, box-shadow .3s ease;
}

.card:hover .thumb {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .5);
}

.thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image: linear-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .6) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* Scrim : voile dégradé en bas de vignette pour que le titre (blanc cassé)
   reste lisible même sur des planches claires (Dunkin', We Love Green…). */
.thumb::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 62%;
    background: linear-gradient(180deg,
        rgba(10, 10, 12, 0) 0%,
        rgba(10, 10, 12, .35) 45%,
        rgba(10, 10, 12, .78) 100%);
    pointer-events: none;
}

.thumb .big {
    position: relative;
    z-index: 1; /* au-dessus du scrim ::after */
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: .9;
    letter-spacing: .01em;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.card .meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 12px;
    gap: 12px;
}

.card .cat {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.card .tag {
    font-size: 13px;
    color: var(--ink);
    max-width: 30ch;
    margin: 4px 0 0;
}

/* news + contact */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(30px, 5vw, 64px);
    align-items: center;
}

@media (max-width: 820px) {
    .split {
        grid-template-columns: 1fr;
    }
}

.news-item {
    border-top: 1px solid var(--line);
    padding: 20px 0;
    display: block;
    text-decoration: none;
}

.news-list .news-item:last-child {
    border-bottom: 1px solid var(--line);
}

.news-item .date {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--orange);
}

.news-item h3 {
    font-family: var(--body);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 6px 0 4px;
}

.news-item p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.news-item:hover h3 {
    color: var(--orange);
}

.contact-card {
    background: var(--ink);
    color: var(--paper);
    border-radius: 30px;
    padding: clamp(28px, 4vw, 44px);
}

.contact-card .h2 {
    color: var(--paper);
}

.contact-card a {
    color: var(--paper);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
    display: grid;
    gap: 14px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: var(--step);
}

.contact-list .k {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--orange);
    width: 92px;
    flex: none;
}

.contact-list a:hover {
    color: var(--orange);
}

/* ---------- generic page shell (portfolio, item, blog, post, contact, error) ---------- */
.page-head {
    padding: clamp(48px, 8vh, 110px) 0 0;
}

.page-head .h1 {
    font-family: var(--display);
    text-transform: uppercase;
    line-height: .9;
    font-size: clamp(2.6rem, 8vw, 6rem);
    margin: 8px 0 0;
    letter-spacing: .01em;
}

.lead {
    font-size: var(--step);
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 20px 0 0;
}

.prose {
    max-width: 66ch;
}

.prose h2 {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 2em 0 .4em;
    letter-spacing: .01em;
}

.prose h3 {
    font-family: var(--body);
    font-weight: 700;
    margin: 1.6em 0 .3em;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.prose a {
    color: var(--teal);
    text-underline-offset: 3px;
}

/* project (item) page */
.item-hero {
    aspect-ratio: 16/9;
    border-radius: 30px;
    overflow: hidden;
    margin-top: 32px;
    background: var(--pc, #333);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.item-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 30px;
}

.item-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-hero .big {
    position: relative;
    font-family: var(--display);
    text-transform: uppercase;
    color: var(--card-ink);
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: .9;
}

.item-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 28px;
}

@media (max-width: 640px) {
    .item-gallery {
        grid-template-columns:1fr;
    }
}

.item-gallery img {
    width: 100%;
    border-radius: 30px;
}

/* cover parallax: the image is scaled a touch so the JS translateY never
   exposes an edge; site.js drives the transform (skipped under reduced motion). */
.item-hero img[data-parallax] {
    will-change: transform;
}

/* ---- Click-to-zoom lightbox (project images) ------------------------------
   Every hero/gallery image carrying data-zoom becomes a zoomable control
   (site.js wires the click / keyboard / dialog). No hover trigger. */
.item-hero img[data-zoom],
.item-gallery img[data-zoom] {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
}
.lightbox::backdrop {
    background: rgba(8, 8, 10, .93);
    backdrop-filter: blur(2px);
}
.lightbox__fig {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 56px);
}
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
    cursor: zoom-out;
    animation: lb-in .22s ease;
}
@keyframes lb-in {
    from { opacity: 0; transform: scale(.97); }
    to   { opacity: 1; transform: none; }
}
.lightbox__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lightbox__prev  { left:  clamp(8px, 2vw, 24px); }
.lightbox__next  { right: clamp(8px, 2vw, 24px); }
.lightbox__close {
    top: clamp(8px, 2vw, 20px);
    right: clamp(8px, 2vw, 24px);
    transform: none;
}
.lightbox__count {
    position: absolute;
    bottom: clamp(10px, 2.4vw, 22px);
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}
/* single image → no prev/next/counter chrome */
.lightbox[data-single] .lightbox__prev,
.lightbox[data-single] .lightbox__next,
.lightbox[data-single] .lightbox__count { display: none; }

@media (prefers-reduced-motion: reduce) {
    .lightbox__img { animation: none; }
}

.prevnext {
    display: grid;
    grid-template-columns:1fr auto 1fr;
    align-items: stretch;
    gap: 16px;
    border-top: 1px solid var(--line);
    margin-top: 60px;
    padding-top: 24px;
}

.prevnext a {
    text-decoration: none;
    color: var(--ink-soft);
}

.prevnext .pn {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0;
}

.prevnext .pn-next {
    align-items: flex-end;
    text-align: right;
}

.prevnext .pn-dir {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.prevnext .pn-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prevnext .pn-next .pn-body {
    flex-direction: row-reverse;
}

.prevnext .pn-thumb {
    flex: none;
    width: 56px;
    height: 42px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--pc, #333);
    border: 1px solid rgba(0, 0, 0, .08);
}

.prevnext .pn-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prevnext .pn-title {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(1rem, 2.4vw, 1.5rem);
    line-height: 1;
    letter-spacing: .01em;
    color: var(--ink);
    transition: color .3s ease;
}

.prevnext .pn:hover .pn-title {
    color: var(--orange);
}

.prevnext .pn:hover .pn-dir {
    color: var(--orange);
}

.prevnext .pn:hover .pn-thumb {
    transform: translateY(-3px);
}

.prevnext .pn-thumb {
    transition: transform .3s ease;
}

.prevnext .pn-all {
    align-self: center;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0 4px;
}

.prevnext .pn-all:hover {
    color: var(--orange);
}

@media (max-width: 640px) {
    .prevnext {
        grid-template-columns:1fr 1fr;
    }

    .prevnext .pn-all {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
        margin-bottom: 6px;
    }

    .prevnext .pn-title {
        font-size: 1rem;
    }
}

/* contact form (Grav Form plugin, skinned via jusk.php class vars) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

@media (max-width: 820px) {
    .form-grid {
        grid-template-columns:1fr;
    }
}

.form-wrapper form {
    display: grid;
    gap: 18px;
}

.jform-group {
    display: block;
}

.jform-label {
    display: block;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.jform-label .required {
    color: var(--orange);
}

.jform-input {
    width: 100%;
    font-family: var(--body);
    font-size: var(--step);
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 3px;
    padding: 12px 14px;
}

.jform-input:focus {
    outline: none;
    border-color: var(--teal);
}

textarea.jform-input {
    min-height: 150px;
    resize: vertical;
}

.jform-errors {
    color: var(--orange);
    font-size: 13px;
    margin-top: 4px;
}

.jform-actions {
    margin-top: 6px;
}

.form-messages {
    margin-bottom: 18px;
}

.form-messages .alert, .alert {
    padding: 12px 16px;
    border-radius: 3px;
    border: 1.5px solid var(--line);
    font-size: 14px;
    margin-bottom: 12px;
}

.alert.success {
    border-color: var(--teal);
    color: var(--teal);
}

.alert.error, .alert.danger {
    border-color: var(--orange);
    color: var(--orange);
}

/* error page */
.errbox {
    text-align: center;
    padding: clamp(80px, 18vh, 220px) 0;
}

.errbox .code {
    font-family: var(--display);
    font-size: clamp(5rem, 22vw, 14rem);
    line-height: .8;
    color: var(--teal);
}

.errbox .msg {
    font-size: var(--step);
    color: var(--ink-soft);
    margin: 18px 0 30px;
}

/* footer */
.foot {
    border-top: 1px solid var(--line);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: .06em;
}

.foot a {
    text-decoration: none;
}

.foot a:hover {
    color: var(--orange);
}

/* Smartphone uniquement : empiler et centrer les 3 lignes du footer
   (le desktop garde son space-between horizontal). */
@media (max-width: 640px) {
    .foot {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s, transform .7s;
}

.stagger.in > * {
    opacity: 1;
    transform: none;
}

.stagger.in > *:nth-child(2) {
    transition-delay: .06s;
}

.stagger.in > *:nth-child(3) {
    transition-delay: .12s;
}

.stagger.in > *:nth-child(4) {
    transition-delay: .18s;
}

.stagger.in > *:nth-child(5) {
    transition-delay: .24s;
}

.stagger.in > *:nth-child(6) {
    transition-delay: .30s;
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .scrollcue .rail {
        animation: none;
    }

    .scrollcue {
        display: none;
    }

    .steps {
        display: none;
    }

    .bar .mark {
        opacity: 1 !important;
    }

    .logo-fly {
        display: none;
    }

    .scene {
        height: auto;
    }

    .stage {
        position: static;
        height: auto;
        overflow: visible;
        padding: 10vh 0;
        gap: 8vh;
    }

    .stage-bg, .stage-veil {
        display: none;
    }

    .cap {
        grid-area: auto;
        opacity: 1 !important;
        transform: none !important;
        position: static;
        margin: 6vh auto;
    }

    .cap-mark {
        font-size: clamp(4rem, 20vw, 12rem);
    }

    .about p.big .w {
        opacity: 1 !important;
    }

    .tool[data-tip]::after {
        transition: none;
        transform: translateX(-50%);
    }

    .tool[data-tip]:hover::after, .tool[data-tip]:focus-visible::after {
        transform: translateX(-50%);
    }
}

/* --- Nav polish: logo hover (retour accueil) + segmented language switch --- */
.mark {
    transition: transform .18s ease;
}

.mark:hover {
    transform: scale(1.06);
}

.mark:hover .jusk {
    color: var(--orange);
}

/* Pill "slider" holding two round options; the active one is a filled teal disc. */
.langsw {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper) 60%, transparent);
}

.langsw__opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    border-radius: 50%;
    font-family: var(--body);
    font-weight: 800;
    font-size: 10px;
    letter-spacing: .04em;
    color: var(--ink-soft);
    text-decoration: none;
    line-height: 1;
    background: transparent;
    transition: background .2s, color .2s, transform .12s;
}

.langsw__opt:hover {
    color: var(--ink);
}

.langsw__opt.is-on {
    background: var(--teal);
    color: var(--card-ink);
}

.langsw__opt.is-on:hover {
    color: var(--card-ink);
}

.langsw__opt:active {
    transform: translateY(1px);
}

.langsw__opt:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* theme toggle: rounded square to match the switch */
.chipbtn {
    border-radius: 9px;
}

/* --- Portfolio: grouped sections --- */
.pf-group {
    margin-top: 56px;
    scroll-margin-top: 90px;
}

.pf-group__title {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    letter-spacing: .01em;
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 22px;
}

.pf-group__num {
    color: var(--teal);
    font-size: .75em;
}

/* --- prev/next bars: guarantee left / centre / right in the 1fr auto 1fr grid --- */
.prevnext > * {
    justify-self: start;
}

.prevnext > *:nth-child(2) {
    justify-self: center;
}

.prevnext > *:last-child {
    justify-self: end;
}

/* --- Real software logos: no dark tile, the icon fills the square --- */
.tool--logo {
    background: transparent;
}

.tool--logo::before {
    content: none;
}

.tool--logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --- Back to top --- */
.back-top {
    text-align: center;
    margin-top: 64px;
}

.back-top a {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
}

.back-top a:hover {
    color: var(--orange);
}

/* beat the more-specific .nav a font-size so the switch labels stay small */
.nav .langsw__opt {
    font-size: 10px;
}

/* Small constraint hints shown under each contact-form field (name / email / message). */
.form-description {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ink-soft);
}

/* ===== Guide (centre d'aide interne, /guide) ===== */
.guide-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}
.guide-toc { position: sticky; top: 88px; }
.guide-toc__title {
    text-transform: uppercase; letter-spacing: .14em;
    font-size: 11px; color: var(--ink-soft); margin: 0 0 12px;
}
.guide-toc nav { display: flex; flex-direction: column; gap: 8px;
    border-left: 2px solid var(--line); padding-left: 14px; }
.guide-toc a { color: var(--ink-soft); text-decoration: none; font-size: 13px; line-height: 1.35; }
.guide-toc a:hover { color: var(--teal); }
/* ---- Page « Publier » (plugin jusk-publish, recette uniquement) ---------- */
.pub-status {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 18px;
    margin: 24px 0;
}
.pub-msg {
    border-radius: 4px;
    padding: 12px 16px;
    margin: 20px 0;
    font-size: 14px;
}
.pub-msg--ok   { background: rgba(46, 160, 67, .12);  border: 1px solid rgba(46, 160, 67, .45); }
.pub-msg--warn { background: rgba(198, 144, 38, .12); border: 1px solid rgba(198, 144, 38, .45); }
.pub-msg--err  { background: rgba(201, 60, 55, .12);  border: 1px solid rgba(201, 60, 55, .45); }
.pub-form { margin: 28px 0 10px; }
.pub-cred {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
@media (max-width: 560px) { .pub-cred { grid-template-columns: 1fr; } }
.pub-cred label { font-size: 13px; color: var(--muted, #888); display: block; }
.pub-cred input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
}
.pub-btn { font-size: 15px; padding: 14px 26px; cursor: pointer; }
.pub-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pub-note { font-size: 13px; color: var(--muted, #888); max-width: 52ch; }

.guide-body { max-width: 70ch; }
/* Captures d'écran du guide : centrées, jamais plus larges que la colonne. */
.guide-body img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.guide-body h2 { scroll-margin-top: 88px; }
.guide-body h2:first-child { margin-top: 0; }
.guide-body h3 { scroll-margin-top: 88px; }
/* kbd-style inline for menu paths / buttons */
.guide-body kbd {
    font-family: var(--body); font-size: .82em; font-weight: 700;
    background: var(--paper-2); border: 1px solid var(--line);
    border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
@media (max-width: 860px) {
    .guide-layout { grid-template-columns: 1fr; }
    .guide-toc { position: static; margin-bottom: 20px; }
    .guide-body { max-width: none; }
}
