/* Portfolio — refonte DA (branche refonte-da), d'après les maquettes 001-005 et le décor MASTER.
   Décor : textures répétables (mur noir, papier) + déchirures posées à cheval sur les jonctions.
   Aucune animation décorative dans cette passe. */

@font-face { font-family: Manrope; src: url(/assets/manrope-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(/assets/manrope-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Kalam; src: url(/assets/kalam-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --black: #090909;
  --ink: #f2f0eb;
  --ink-2: #c4c3c9;
  --paper-ink: #141415;
  --paper-ink-2: #4a4a50;
  --muted-paper: #6d6d73;
  --muted-dark: #a3a2aa;
  --line-dark: #ffffff26;
  --line-paper: #14141526;
  --spectrum: linear-gradient(90deg, #ff2d3d 0 25%, #ffd21f 25% 50%, #19c37d 50% 75%, #1f6bff 75%);
  /* Continuous spectrum after the reference image: hues blend, they never form blocks. */
  --spec: linear-gradient(90deg, #ff3b4e, #ff8a2a, #ffd23a, #8be04e, #2fd8a8, #1fc8ff, #3b7bff, #8f5bff, #e04fff, #ff4f9a, #ff3b4e);
  --spec-frame: linear-gradient(125deg, #ff3b4e, #ff8a2a, #ffd23a, #8be04e, #1fc8ff, #3b7bff, #8f5bff, #e04fff, #ff3b4e);
  --spec-glow: -5px 0 16px #ff3b4e59, 5px 0 16px #3b7bff59, 0 -3px 14px #ffd23a40, 0 3px 14px #2fd8a840;
  --gutter: 5%;
  --header-h: 76px;
  --radius: 14px;
  /* Décor (1600 px par défaut ; 800 px sur mobile, 2560 px sur grands écrans). */
  --cover: url(/assets/decor/cover-v2-1600.webp);
  --paper-tile: url(/assets/decor/paper-tile-1600.webp);
  --paper-tile-2: url(/assets/decor/paper-tile-2-1600.webp);
  --dark-tile: url(/assets/decor/dark-tile-1600.webp);
  --premiere: url(/assets/decor/premiere-top-1600.webp);
  --premiere-2: url(/assets/decor/premiere-bottom-1600.webp);
  --strip-thin: url(/assets/decor/strip-thin-1600.webp);
  --tear-pd-1: url(/assets/decor/tear-paper-dark-1-1600.webp);
  --tear-pd-2: url(/assets/decor/tear-paper-dark-2-1600.webp);
  --tear-pd-3: url(/assets/decor/tear-paper-dark-3-1600.webp);
  --tear-dp-1: url(/assets/decor/tear-dark-paper-1-1600.webp);
  --tear-dp-2: url(/assets/decor/tear-dark-paper-2-1600.webp);
}
@media (max-width: 800px) {
  :root {
    --cover: url(/assets/decor/cover-v2-800.webp);
    --paper-tile: url(/assets/decor/paper-tile-800.webp);
    --paper-tile-2: url(/assets/decor/paper-tile-2-800.webp);
    --dark-tile: url(/assets/decor/dark-tile-800.webp);
    --premiere: url(/assets/decor/premiere-top-800.webp);
    --premiere-2: url(/assets/decor/premiere-bottom-800.webp);
    --strip-thin: url(/assets/decor/strip-thin-800.webp);
    --tear-pd-1: url(/assets/decor/tear-paper-dark-1-800.webp);
    --tear-pd-2: url(/assets/decor/tear-paper-dark-2-800.webp);
    --tear-pd-3: url(/assets/decor/tear-paper-dark-3-800.webp);
    --tear-dp-1: url(/assets/decor/tear-dark-paper-1-800.webp);
    --tear-dp-2: url(/assets/decor/tear-dark-paper-2-800.webp);
  }
}
@media (min-width: 1700px) {
  :root {
    --cover: url(/assets/decor/cover-v2-2560.webp);
    --paper-tile: url(/assets/decor/paper-tile-2560.webp);
    --paper-tile-2: url(/assets/decor/paper-tile-2-2560.webp);
    --dark-tile: url(/assets/decor/dark-tile-2560.webp);
    --premiere: url(/assets/decor/premiere-top-2560.webp);
    --premiere-2: url(/assets/decor/premiere-bottom-2560.webp);
    --strip-thin: url(/assets/decor/strip-thin-2560.webp);
    --tear-pd-1: url(/assets/decor/tear-paper-dark-1-2560.webp);
    --tear-pd-2: url(/assets/decor/tear-paper-dark-2-2560.webp);
    --tear-pd-3: url(/assets/decor/tear-paper-dark-3-2560.webp);
    --tear-dp-1: url(/assets/decor/tear-dark-paper-1-2560.webp);
    --tear-dp-2: url(/assets/decor/tear-dark-paper-2-2560.webp);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body { margin: 0; background: var(--black); color: var(--ink); font: 400 16px/1.6 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: #1f6bff; color: #fff; }
:focus-visible { outline: 2px solid #ffd21f; outline-offset: 4px; border-radius: 4px; }
.sr-only, .thumb-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 12px 18px; background: #fff; color: #000; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.hand { font-family: Kalam, 'Comic Sans MS', cursive; font-weight: 400; line-height: 1.15; letter-spacing: .01em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.dot { display: inline-block; width: .16em; height: .16em; margin-left: .06em; background: linear-gradient(90deg, #ff2d3d 0 33%, #ffd21f 33% 66%, #1f6bff 66%); vertical-align: baseline; }
/* Square full stop with a chromatic split (red/yellow left, cyan/blue right) and two glitch streaks. */
/* Full stop of the titles: the glitch dot image. The box is the dark square itself; the image
   (coloured edges and streaks) overflows around it. */
.cdot { position: relative; display: inline-block; width: .17em; height: .19em; margin: 0 .09em 0 .07em; vertical-align: baseline; }
.cdot::before { content: ''; position: absolute; left: -.144em; top: -.024em; width: .518em; height: .23em; pointer-events: none;
  background: url(/assets/decor/glitch-dot-160.webp) center / 100% 100% no-repeat; }
@media (min-width: 1100px) { .cdot::before { background-image: url(/assets/decor/glitch-dot-480.webp); } }
/* Sur fond noir (Montage, Miniatures), le carré est blanc. */
.dark .cdot::before { background-image: url(/assets/decor/glitch-dot-blanc-160.webp); }
@media (min-width: 1100px) { .dark .cdot::before { background-image: url(/assets/decor/glitch-dot-blanc-480.webp); } }
.muted { color: var(--muted-paper); }
.dark .muted, .about .muted, .contact .muted { color: #b9b8bf; }
h1, h2 { font-weight: 700; letter-spacing: -.065em; line-height: .94; }
h2 { font-size: clamp(42px, 5.2vw, 80px); }

/* Sections et décor */
main > section, .site-footer { position: relative; }
.paper { background: var(--paper-tile) top center / 100% auto repeat-y; color: var(--paper-ink); }
.dark { background: var(--dark-tile) top center / 100% auto repeat-y; color: var(--ink); }
/* Déchirure posée à cheval sur la jonction avec la section précédente (::before des sections suivantes). */
.montage, .motion, .thumbnails, .creation { padding-inline: var(--gutter); }
.montage::before, .motion::before, .thumbnails::before, .creation-intro::before, .creation::before { content: ''; position: absolute; z-index: 2; left: 0; right: 0; top: 0; aspect-ratio: 2560 / var(--tear-h, 500); transform: translateY(-50%); background: var(--tear) center / 100% 100% no-repeat; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.montage { --tear: var(--tear-pd-1); --tear-h: 450; }
.motion { --tear: var(--tear-dp-1); --tear-h: 460; }
.thumbnails { --tear: var(--tear-pd-2); overflow-x: clip; }
.creation-intro { --tear: var(--tear-dp-2); }
.creation { --tear: var(--tear-pd-3); }
.montage, .motion, .thumbnails, .creation-intro, .creation { padding-top: calc(5vw + 30px); }
.hero, .montage, .motion, .thumbnails { padding-bottom: calc(5vw + 30px); }
.creation-intro { padding-bottom: calc(6vw + 34px); }
/* Content sits above the tears (whose outer edges fade out), so sections can stay compact. */
main > section:not(.cover) > :not(.strip, .scroll-hint, .about-note) { position: relative; z-index: 3; }
.strip { position: relative; z-index: 3; aspect-ratio: 2560 / 600; margin: -7vw 0; background: var(--strip-thin) center / 100% 100% no-repeat; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.section-inner, .section-head, .subhead, .carousel, .shorts-grid, .longs-grid, .platforms, .source-note, .split, .thumb-grid { max-width: 1340px; margin-inline: auto; }
.split { display: grid; grid-template-columns: minmax(270px, 24%) minmax(0, 1fr); gap: 3.5%; align-items: center; max-width: 1480px; }
.montage, .motion { padding-inline: 3.5%; }
.split-copy .eyebrow { margin-bottom: 18px; }
.split-copy h2 { margin-bottom: 26px; font-size: clamp(42px, 4.6vw, 74px); }
.split-copy p:not(.eyebrow) { max-width: 360px; font-size: 15px; line-height: 1.6; }
.split-copy p + p:not(.eyebrow) { margin-top: 14px; }
.dark .split-copy p:not(.eyebrow) { color: var(--ink-2); }
.paper .split-copy p:not(.eyebrow) { color: var(--paper-ink-2); }
.split-media { min-width: 0; }
.split-media .subhead { grid-template-columns: auto auto; justify-content: start; }
.split .carousel { max-width: none; }

/* ---------- En-tête ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; gap: 32px; padding: 0 var(--gutter); color: var(--ink); }
.logo { font-size: 24px; font-weight: 700; letter-spacing: -.06em; line-height: 1; white-space: nowrap; }
.logo-dot { color: #ff2d3d; }
.site-header nav { display: flex; gap: 12px; margin: 0 auto; font-size: 14px; }
/* Chapter buttons: neon frame in the chapter's colour, mixed with white light. */
.site-header nav a { --c: #fff; padding: 7px 15px; border: 1.5px solid transparent; border-radius: 30px; color: #f4f2ee;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #0b0b0e), #0b0b0ee6 70%) padding-box, linear-gradient(135deg, #ffffffd9, var(--c) 32%, var(--c) 70%, #ffffffb3) border-box;
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 10px color-mix(in srgb, var(--c) 22%, transparent); }
.site-header nav a:hover { box-shadow: 0 0 20px color-mix(in srgb, var(--c) 80%, transparent), 0 0 4px #ffffffb3, inset 0 0 14px color-mix(in srgb, var(--c) 35%, transparent); }
.site-header nav a[href='#montage'] { --c: #ff2d3d; }
.site-header nav a[href='#motion'] { --c: #ffd21f; }
.site-header nav a[href='#miniatures'] { --c: #2f8bff; }
.site-header nav a[href='#creation'] { --c: #9b5cff; }
.site-header nav a[href='#apropos'] { --c: #2fd47a; }
.header-cta { display: inline-flex; align-items: center; gap: 28px; padding: 12px 20px; border: 1px solid #ffffff4d; border-radius: 40px; font-size: 14px; white-space: nowrap; }
.cta-short { display: none; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid #ffffff4d; border-radius: 50%; background: transparent; place-items: center; }
.menu-toggle svg { width: 18px; height: 18px; }
.menu-toggle[aria-expanded="true"] .icon-open, .menu-toggle[aria-expanded="false"] .icon-close { display: none; }

/* ---------- Couverture (le mot PORTFOLIO est dans le décor) ---------- */
.cover { aspect-ratio: 2560 / 950; padding: 0; background: var(--black) var(--cover) top center / 100% auto no-repeat; }
.cover-note { position: absolute; margin: 0; font-size: 1.7vw; color: #ecebe6; text-transform: uppercase; transform: rotate(-9deg); }
.cover-note::after { content: ''; position: absolute; width: 2.4em; height: 1.4em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 28' fill='none' stroke='%23ecebe6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6c8 14 22 18 38 14'/%3E%3Cpath d='M33.5 17.1 41 20l-5.3 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.cover-word { position: absolute; left: 26.9%; top: 20.7%; width: 46.1%; height: auto; }
.cover-note--montage { left: 16.5%; top: 19%; }
.cover-note--montage::after { left: 3.2em; top: 2.2em; transform: rotate(-4deg); }
.cover-note--thumbs { right: 13.5%; top: 17%; transform: rotate(-11deg); }
.cover-note--thumbs::after { left: -1.9em; top: 1.5em; transform: scaleX(-1) rotate(-12deg); }
/* Motion design comes from the right: text below-right of the F, arrow rising to the F. */
.cover-note--motion { left: 54.5%; top: 47%; transform: rotate(-8deg); }
.cover-note--motion::after { left: -2.9em; top: -1.7em; width: 2.6em; height: 2.2em; transform: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40' fill='none' stroke='%23ecebe6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M45 31H21c-7 0-11-4-11-11V5'/%3E%3Cpath d='M4.6 10.4 10 4.6l5.4 5.8'/%3E%3C/svg%3E"); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 4%; align-items: center; padding: 0 var(--gutter) calc(5vw + 30px); margin-top: -3vw; }
.hero-copy { max-width: 560px; }
.hero .eyebrow { color: #3c3c42; letter-spacing: .2em; }
.hero h1 { margin: 22px 0 26px; font-size: clamp(52px, 6.5vw, 104px); }
.hero-text { max-width: 470px; color: var(--paper-ink-2); font-size: 17px; line-height: 1.6; }
.pill { display: inline-flex; align-items: center; gap: 40px; margin-top: 30px; padding: 16px 26px; border-radius: 40px; background: var(--paper-ink); color: #fff; font-size: 15px; font-weight: 500; }
.pill:hover { background: #2a2a2e; }
.hero-collage { position: relative; height: clamp(440px, 42vw, 640px); }
.collage-card { position: absolute; display: block; border-radius: 10px; border: 3px solid #fafaf7; background: #000; overflow: hidden; box-shadow: 0 22px 40px #0000004d; }
.collage-card img { width: 100%; height: 100%; object-fit: cover; }
.collage-card:hover { z-index: 20; }
.collage-card { translate: calc(var(--px, 0) * var(--dx, 0px)) calc(var(--py, 0) * var(--dy, 0px)); }
.collage-card--ads { --dx: -20px; --dy: -16px; }
.collage-card--podcast { --dx: 14px; --dy: 10px; }
.collage-card--motion { --dx: -13px; --dy: -9px; }
.collage-card--thumb { --dx: 18px; --dy: 14px; }
.collage-card--reel { --dx: -10px; --dy: 12px; }
.collage-card--ads { left: 3%; top: 2%; width: 27%; aspect-ratio: 9 / 16; transform: rotate(-5deg); z-index: 3; }
.collage-card--podcast { left: 37%; top: 6%; width: 58%; aspect-ratio: 16 / 9; transform: rotate(4deg); z-index: 2; }
.collage-card--motion { left: 22%; top: 44%; width: 38%; aspect-ratio: 16 / 9; transform: rotate(5deg); z-index: 4; }
.collage-card--thumb { left: 0; top: 63%; width: 47%; aspect-ratio: 16 / 9; transform: rotate(4deg); z-index: 5; }
.collage-card--reel { right: 9%; top: 38%; width: 25%; aspect-ratio: 9 / 16; transform: rotate(5deg); z-index: 6; }
.card-duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: #0b0b0ccc; color: #fff; font-size: 11px; font-weight: 700; }
.scroll-hint { position: absolute; left: 50%; bottom: calc(5vw - 4px); transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; color: #3c3c42; font-size: 13px; z-index: 3; }

/* ---------- Titres de section ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 6%; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-aside { max-width: 380px; display: grid; gap: 20px; justify-items: start; font-size: 15px; line-height: 1.6; }
.dark .section-aside p { color: var(--ink-2); }
.paper .section-aside p { color: var(--paper-ink-2); }
.subhead { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 16px 40px; margin-bottom: 26px; }
.subhead h3 { display: flex; align-items: center; gap: 22px; font-size: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.spectrum { width: 30px; height: 7px; background: var(--spectrum); }
.subhead-note { font-size: 19px; transform: rotate(-6deg); color: #e6e5e0; }
.subhead-aside { justify-self: end; max-width: 330px; font-size: 14px; color: var(--ink-2); }
.subhead--stacked { grid-template-columns: auto auto; justify-content: start; }
.subhead-text { grid-column: 1 / -1; max-width: 520px; font-size: 15px; color: var(--ink-2); }
.ghost-btn { display: inline-flex; align-items: center; gap: 14px; padding: 11px 18px; border: 1px solid #ffffff59; border-radius: 30px; background: transparent; font-size: 14px; }
.ghost-btn:hover { background: #ffffff14; }

/* ---------- Carrousels ---------- */
.carousel { position: relative; padding: 0 64px; }
.carousel-track { position: relative; display: flex; gap: 22px; overflow-x: auto; list-style: none; margin: 0; padding: 16px 2px 24px; scroll-padding-inline: 2px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { flex: none; scroll-snap-align: start; }
.carousel-btn { position: absolute; top: calc(50% - 22px); width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #ffffff73; border-radius: 50%; background: #0909098c; font-size: 18px; z-index: 2; }
.paper .carousel-btn { border-color: #14141559; background: #ffffffb3; }
.carousel-btn:hover:not(:disabled) { background: var(--ink); color: var(--black); }
.carousel-btn:disabled { opacity: .3; cursor: default; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-progress { width: min(240px, 50%); height: 3px; margin: 18px auto 0; background: #ffffff26; border-radius: 3px; overflow: hidden; }
.paper .carousel-progress { background: #14141522; }
.carousel-bar { display: block; height: 100%; width: calc(var(--size, 1) * 100%); background: currentColor; border-radius: 3px; transform: translateX(calc(var(--progress, 0) * (1 / var(--size, 1) - 1) * 100%)); }
.carousel.is-static .carousel-btn, .carousel.is-static .carousel-progress { display: none; }
/* Everything fits: let hovered cards grow past the track's edges. */
.carousel.is-static .carousel-track { overflow: visible; }
.carousel-item:hover { position: relative; z-index: 2; }

/* Cartes vidéo */
.video-card { margin: 0; }
.card-media { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid #ffffff2e; background: #000; box-shadow: 0 16px 34px #00000073; }
.paper .card-media { border: 3px solid #fafaf7; box-shadow: 0 16px 30px #0000002e; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.is-vertical .card-media { aspect-ratio: 9 / 16; }
.is-wide .card-media { aspect-ratio: 16 / 9; }
.is-square .card-media { aspect-ratio: 1; }
.card-tag { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 20px; background: #0b0b0cb3; color: #fff; font-size: 11px; font-weight: 700; }
.play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; border-radius: 50%; background: #ffffffe6; color: #000; box-shadow: 0 6px 16px #0000004d; }
.play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; margin-left: 2px; }
.card-media:hover .play, .short-card:hover .play, .long-card:hover .play { background: #fff; transform: scale(1.06); }
.video-card figcaption { margin-top: 12px; font-size: 14px; font-weight: 600; }
.carousel--vertical .carousel-item { width: clamp(170px, 17.5vw, 262px); }
.carousel--wide .carousel-item { width: clamp(300px, 38vw, 600px); }
@media (min-width: 901px) { .carousel--wide .carousel-item { flex: 1 1 0; width: auto; min-width: 0; } }
.carousel--mixed .carousel-item:has(.is-wide) { width: clamp(300px, 33vw, 500px); }
.carousel--mixed .carousel-item:has(.is-square) { width: clamp(169px, 18.6vw, 281px); }

/* ---------- Montage (fond Premiere, deux fois comme dans MASTER : formats courts, puis formats longs) ---------- */
/* Both interfaces sit on a layer under the content; each fades into the black wall through its own mask. */
.montage::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(#09090940, #09090940), var(--premiere) top center / 100% auto no-repeat, var(--premiere-2) bottom center / 100% auto no-repeat;
  -webkit-mask: linear-gradient(#000 40%, transparent 76%) top / 100% calc(100vw * 950 / 2560) no-repeat, linear-gradient(transparent, #000 30%, #000 85%, transparent) bottom / 100% calc(100vw * 1850 / 2560) no-repeat;
  mask: linear-gradient(#000 40%, transparent 76%) top / 100% calc(100vw * 950 / 2560) no-repeat, linear-gradient(transparent, #000 30%, #000 85%, transparent) bottom / 100% calc(100vw * 1850 / 2560) no-repeat; }
.montage > .strip { z-index: 3; }
.montage .subhead-text, .montage .split-copy p { text-shadow: 0 1px 12px #000, 0 0 2px #000; }
.montage .strip { width: 100vw; aspect-ratio: 2560 / 350; margin: 0 0 0 calc(50% - 50vw); background-image: var(--strip-thin);
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }

/* ---------- Motion ---------- */
.motion { background-image: var(--paper-tile-2); }

/* ---------- Miniatures ---------- */
.thumb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 28px; margin-top: 10px; padding: 0; list-style: none; }
.thumb { position: relative; display: block; overflow: hidden; border-radius: 12px; border: 2px solid #f4f2ec; box-shadow: 0 18px 34px #00000080; }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* Hovered thumbnail grows; its neighbours step aside (offsets set by script.js). */
.thumb-grid li { translate: var(--push-x, 0px) var(--push-y, 0px); }
.thumb-grid li:hover { position: relative; z-index: 2; }
.thumb-grid li:nth-child(4n+1) .thumb { transform: rotate(-1.5deg); }
.thumb-grid li:nth-child(4n+2) .thumb { transform: rotate(1deg) translateY(4px); }
.thumb-grid li:nth-child(4n+3) .thumb { transform: rotate(-.8deg) translateY(-3px); }
.thumb-grid li:nth-child(4n) .thumb { transform: rotate(1.4deg) translateY(5px); }

/* ---------- Projet personnel ---------- */
.creation-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6%; padding-inline: var(--gutter); }
.creation-copy { max-width: 680px; }
.creation-copy .eyebrow { margin-bottom: 18px; }
.creation-copy h2 { margin-bottom: 22px; font-size: clamp(42px, 4.8vw, 74px); }
.creation-copy p:last-child { max-width: 520px; color: var(--paper-ink-2); font-size: 16px; }
.creation-note { font-size: clamp(18px, 1.7vw, 26px); text-transform: uppercase; transform: rotate(-8deg); color: #232326; margin-right: 6%; }
.creation .subhead { margin-top: 56px; }
.creation .subhead:first-child { margin-top: 0; }
.shorts-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.short-card { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 12px; border: 1px solid #ffffff2e; background: #000; box-shadow: 0 14px 30px #00000080; }
.short-card img { width: 100%; height: 100%; object-fit: cover; }
.short-card { transform: translateY(var(--base-y, 0px)) rotate(var(--base-r, 0deg)); }
.short-card:nth-child(odd) { --base-r: -1.5deg; }
.short-card:nth-child(even) { --base-r: 1.5deg; --base-y: 8px; }
.short-platform { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px; background: #0b0b0cb3; color: #fff; font-size: 11px; font-weight: 700; }
.short-platform .dot, .short-platform circle.dot { fill: currentColor; }
.short-views { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 2px 8px #000; }
.longs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.long-card { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid #ffffff2e; box-shadow: 0 16px 34px #00000080; }
.long-card img { width: 100%; height: 100%; object-fit: cover; }
.long-card::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #000000d9); }
.long-meta { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.long-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.long-views { flex: none; padding: 2px 8px; border-radius: 6px; background: #0b0b0ccc; font-size: 12px; font-weight: 700; }
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.pill--light { margin-top: 0; background: #fff; color: var(--paper-ink); }
.pill--light:hover { background: #e9e8e4; }
.pill--light svg:first-child { width: 22px; height: 22px; color: #ff1f30; }
.pill--light .fill, .ghost-btn .fill { fill: currentColor; stroke: none; }
.source-note { margin-top: 26px; text-align: center; font-size: 12px; color: var(--muted-dark); }
.creation { padding-bottom: 60px; }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6%; align-items: center; padding: 50px var(--gutter) calc(5vw + 24px); }
.about::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: -110px; height: 220px; pointer-events: none;
  background: linear-gradient(#09090900, #090909d9 35%, #090909d9 65%, #09090900); }
.about-copy .eyebrow { margin-bottom: 18px; color: var(--ink-2); }
.about h2 { margin-bottom: 28px; font-size: clamp(46px, 5.6vw, 90px); }
.about-copy p:not(.eyebrow) { max-width: 500px; color: var(--ink-2); font-size: 17px; line-height: 1.65; }
.about-copy p + p { margin-top: 14px; }
.about-photo { position: relative; justify-self: center; width: min(560px, 100%); container-type: inline-size; }
.about-name { position: absolute; left: 51%; top: 89%; margin: 0; transform: translate(-50%, -50%) rotate(-4.5deg); font-size: 6.2cqw; color: #2a2a2e; white-space: nowrap; }
.about-photo img { width: 100%; filter: drop-shadow(0 24px 40px #000000a6); }
.about-photo { translate: calc(var(--px, 0) * -7px) calc(var(--py, 0) * -5px); }
.about-note { position: absolute; right: 40%; top: 46px; font-size: clamp(16px, 1.5vw, 24px); text-transform: uppercase; transform: rotate(-9deg); color: #ecebe6; }
.strip--about { aspect-ratio: 2560 / 350; margin: -4vw 0; background-image: var(--strip-thin); -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }

/* ---------- Contact ---------- */
.contact { padding: 60px var(--gutter) calc(4vw + 30px); }
.contact-head { display: flex; align-items: end; gap: 8%; max-width: 1340px; margin: 0 auto 50px; }
.contact-head .eyebrow { margin-bottom: 18px; color: var(--ink-2); }
.contact h2 { font-size: clamp(44px, 5.2vw, 82px); }
.contact-text { color: var(--ink-2); font-size: 16px; line-height: 1.6; padding-bottom: 8px; }
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1340px; margin: 0 auto; padding: 0; list-style: none; }
/* Platform colours (--c1, --c2) as a neon frame mixed with white light. */
.channel { --c1: #fff; --c2: #fff; --frame: linear-gradient(135deg, #ffffffcc, var(--c1) 30%, var(--c2) 72%, #ffffffb3);
  display: flex; align-items: center; gap: 18px; height: 100%; padding: 22px 26px; border: 1.5px solid transparent; border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 14%, #0b0b0e), #0b0b0ef2 60%) padding-box, var(--frame) border-box;
  box-shadow: 0 0 16px color-mix(in srgb, var(--c1) 45%, transparent), 0 0 44px color-mix(in srgb, var(--c2) 26%, transparent), inset 0 0 22px color-mix(in srgb, var(--c1) 16%, transparent), inset 0 1px 0 #ffffff47; }
.channel:hover { box-shadow: 0 0 22px color-mix(in srgb, var(--c1) 70%, transparent), 0 0 64px color-mix(in srgb, var(--c2) 42%, transparent), inset 0 0 28px color-mix(in srgb, var(--c1) 24%, transparent), inset 0 1px 0 #ffffff70; }
.channel--whatsapp { --c1: #25d366; --c2: #128c7e; }
.channel--instagram { --c1: #e1306c; --c2: #833ab4; --frame: linear-gradient(135deg, #ffffffcc, #feda75 18%, #fa7e1e 36%, #d62976 56%, #962fbf 76%, #4f5bd5 92%); }
.channel--email { --c1: #4facfe; --c2: #1f6bff; }
.channel img { width: 60px; height: 60px; border-radius: 14px; }
.channel > span { display: grid; flex: 1; }
.channel strong { font-size: 17px; }
.channel > span > span { color: var(--ink-2); font-size: 14px; }
.channel > svg { width: 18px; height: 18px; }
.channel:hover strong { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Pied de page (papier, comme le bas de MASTER) ---------- */
.site-footer { padding: calc(4vw + 10px) var(--gutter) 30px; background: var(--paper-tile) top center / 100% auto repeat-y; color: var(--paper-ink); }
.site-footer::before { content: ''; position: absolute; z-index: 2; left: 0; right: 0; top: 0; aspect-ratio: 2560 / 500; transform: translateY(-50%); background: var(--tear-dp-2) center / 100% 100% no-repeat; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.site-footer > * { position: relative; z-index: 3; }
.site-footer :focus-visible { outline-color: #1f6bff; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 48px; max-width: 1340px; margin: 0 auto; padding: 24px 0 36px; border-bottom: 1px solid var(--line-paper); }
.footer-brand p { margin-top: 12px; color: var(--paper-ink-2); font-size: 14px; }
.footer-nav { display: flex; gap: 40px; padding-left: 48px; border-left: 1px solid var(--line-paper); font-size: 15px; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.to-top { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #14141573; border-radius: 50%; font-size: 20px; }
.to-top:hover { background: var(--paper-ink); color: #fff; }
.footer-legal { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1340px; margin: 22px auto 0; font-size: 13px; color: var(--paper-ink-2); }
.footer-legal nav { display: flex; gap: 26px; }
.footer-legal a:hover { color: var(--paper-ink); text-decoration: underline; }

/* ---------- Barre de navigation du bas (créée par script.js) ---------- */
.chapter-dock { position: fixed; z-index: 40; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 4px; max-width: calc(100% - 20px); padding: 6px; border: 1px solid #ffffff26; border-radius: 40px;
  background: #111113eb; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px #0000008c; transform: translate(-50%, calc(100% + 30px)); transition: transform .35s ease; }
.chapter-dock.is-visible { transform: translate(-50%, 0); }
.chapter-dock a { padding: 10px 15px; border-radius: 30px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.chapter-dock a:hover { background: #ffffff1a; color: var(--ink); }
.chapter-dock a[aria-current="true"] { background: var(--ink); color: var(--black); }
.chapter-dock .dock-contact { margin-left: 4px; background: #ff2d3d; color: #fff; font-weight: 700; }
.chapter-dock .dock-contact:hover { background: #e01f2f; color: #fff; }
.chapter-dock a:focus-visible { outline-offset: 2px; }

/* ---------- Fenêtre vidéo et consentement (repris du site actuel) ---------- */
.media-dialog { padding: 18px 22px 22px; border: 1px solid #fff3; border-radius: 18px; background: #151517; color: #fff; width: min(1150px, 94vw); max-height: 95dvh; overflow: auto; }
.media-dialog::backdrop { background: #08080bdd; backdrop-filter: blur(18px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.dialog-header h2 { font-size: 18px; letter-spacing: -.02em; line-height: 1.3; }
.dialog-close { flex: none; padding: 10px 16px; border: 1px solid #fff5; border-radius: 30px; background: transparent; color: #fff; }
.media-content { display: flex; justify-content: center; }
.media-content img { object-fit: contain; max-height: 76dvh; max-width: 100%; border-radius: 5px; }
.media-dialog.is-vertical { width: min(470px, 94vw); }
.media-dialog.is-square { width: min(780px, 94vw); }
.video-frame { position: relative; width: 100%; max-width: calc(75dvh * 16 / 9); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000; isolation: isolate; }
.media-dialog .video-frame iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; border-radius: inherit; }
.media-dialog.is-vertical .video-frame { aspect-ratio: 9 / 16; max-width: calc(75dvh * 9 / 16); }
.media-dialog.is-square .video-frame { aspect-ratio: 1; max-width: 75dvh; }
.image-navigation { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 14px; }
.image-navigation button { width: 44px; height: 44px; border: 1px solid #fff5; border-radius: 50%; background: transparent; color: #fff; }
.image-navigation[hidden] { display: none; }
.external-video { display: inline-block; margin-top: 14px; text-decoration: underline; text-underline-offset: 4px; }
.external-video[hidden] { display: none; }
.video-consent { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; overflow: hidden; background: #000; }
.video-consent::before { content: ''; position: absolute; inset: -12px; background: var(--poster, none) center / cover no-repeat; filter: blur(6px) brightness(.22); }
.video-consent-panel { position: relative; display: grid; justify-items: center; gap: 16px; max-width: 420px; text-align: center; font-size: 14px; line-height: 1.6; }
.video-consent-panel a { text-decoration: underline; text-underline-offset: 3px; }
.video-consent-panel .pill-button { display: inline-flex; align-items: center; gap: 30px; padding: 14px 24px; border: 0; border-radius: 40px; background: #fff; color: #141415; }
.video-consent-panel label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c8c8ce; cursor: pointer; }
.video-consent-panel input { width: 18px; height: 18px; accent-color: #fff; }
.video-consent-panel :focus-visible { outline-color: #fff; }

/* ---------- Animations (adaptées du site en ligne) ---------- */
/* Large screens (class set by script.js): cards tilt with their place in the carousel, the thumbnails wall sways,
   the Création shorts open like a fan. */
.enhanced-motion .carousel:not(.is-static) .carousel-item { transform: perspective(1200px) rotateY(var(--tilt, 0deg)) scale(var(--tilt-scale, 1)); }
.enhanced-motion .thumb-grid { transform: perspective(1400px) rotateX(var(--wall-rx, 0deg)) rotateY(var(--wall-ry, 0deg)) rotateZ(var(--wall-rz, 0deg)); }
/* Reading progress: a liquid spectrum bar. The colours keep flowing even when the page is still. */
.page-progress { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 12px; pointer-events: none; }
.progress-fill { position: absolute; left: 0; top: 0; height: 5px; width: calc(var(--p, 0) * 100%); border-radius: 0 4px 4px 0;
  background: radial-gradient(40% 140% at 30% 50%, #ffffff8c, transparent 70%) 0 0 / 50% 100%, var(--spec) 0 0 / 200% 100%;
  background-blend-mode: soft-light, normal; animation: liquid 7s linear infinite, liquid-shine 4.3s ease-in-out infinite alternate; }
.progress-fill::after { content: ''; position: absolute; inset: -2px 0; background: inherit; background-size: inherit; animation: inherit; filter: blur(7px); opacity: .85; z-index: -1; }
@keyframes liquid { to { background-position: 0 0, 200% 0; } }
@keyframes liquid-shine { from { background-position: -30% 0, 0 0; } to { background-position: 130% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .progress-fill, .progress-fill::after { animation: none; } }
.carousel.is-ring .carousel-btn { display: grid; }
.carousel.is-ring .carousel-track { cursor: grab; }
.carousel.is-ring.is-grabbing .carousel-track { cursor: grabbing; user-select: none; }
.carousel.is-ring .carousel-item img { -webkit-user-drag: none; user-select: none; }
.carousel.is-ring .carousel-progress { display: none; }
.carousel.is-ring .carousel-item:not(.is-front) .play { opacity: 0; }
.carousel--wide.is-book .carousel-item:first-child { transform: perspective(1600px) translateX(calc((1 - var(--book, 1)) * 16px)) rotateY(calc((1 - var(--book, 1)) * 15deg)); transform-origin: right center; }
.carousel--wide.is-book .carousel-item:last-child { transform: perspective(1600px) translateX(calc((1 - var(--book, 1)) * -16px)) rotateY(calc((1 - var(--book, 1)) * -15deg)); transform-origin: left center; }
.enhanced-motion .shorts-grid.is-fan .short-card { transform:
  translate(calc(var(--o, 0) * (var(--spread, 1) - 1) * 52%), calc(var(--base-y, 0px) + var(--o, 0) * var(--o, 0) * (1 - var(--spread, 1)) * 4px))
  rotate(calc(var(--base-r, 0deg) + var(--o, 0) * (1 - var(--spread, 1)) * 3.6deg)); }
@media (prefers-reduced-motion: no-preference) {
  .cover-word { animation: cover-arrive 240ms cubic-bezier(.2, .65, .3, 1) both; }
  .hero-copy, .hero-collage { animation: soft-entrance 1.15s cubic-bezier(.19, 1, .22, 1) both; }
  .hero-collage { animation-delay: .08s; }
  .cover.is-in-view .cover-note--montage { animation: note-float-a 6s ease-in-out infinite; }
  .cover.is-in-view .cover-note--thumbs { animation: note-float-b 8s ease-in-out -2s infinite; }
  .cover.is-in-view .cover-note--motion { animation: note-float-c 10s ease-in-out -4s infinite; }
  .short-card img, .long-card img, .collage-card img, .thumb img { transition: transform .6s cubic-bezier(.19, 1, .22, 1); }
  .short-card:hover img, .long-card:hover img, .thumb:hover img { transform: scale(1.05); }
  .collage-card { transition: scale .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s; }
  .collage-card:hover { scale: 1.13; box-shadow: 0 30px 60px #00000080; }
  .video-card { transition: scale .45s cubic-bezier(.19, 1, .22, 1); }
  .video-card:hover { scale: 1.07; }
  .thumb-grid li { transition: translate .55s cubic-bezier(.19, 1, .22, 1); }
  .thumb { transition: scale .4s cubic-bezier(.19, 1, .22, 1), box-shadow .35s; }
  .thumb:hover { scale: 1.08; box-shadow: 0 26px 46px #000000a6; }
  .channel { transition: box-shadow .35s; }
  .play { transition: transform .3s, background-color .3s; }
  .pill, .ghost-btn, .header-cta, .to-top, .carousel-btn, .legal-back, .chapter-dock a { transition: background-color .25s, color .25s, translate .3s cubic-bezier(.19, 1, .22, 1); }
  .pill:hover, .to-top:hover { translate: 0 -3px; }
  .channel img { transition: transform .35s cubic-bezier(.19, 1, .22, 1); }
  .channel:hover img { transform: rotate(-8deg) scale(1.06); }
  .channel > svg { transition: translate .3s cubic-bezier(.19, 1, .22, 1); }
  .channel:hover > svg { translate: 3px -3px; }
}
@keyframes cover-arrive { from { transform: scale(.97); } to { transform: scale(1); } }
@keyframes soft-entrance { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes note-float-a { 0%, 100% { translate: 0 0; } 50% { translate: 4px -6px; } }
@keyframes note-float-b { 0%, 100% { translate: 0 0; } 50% { translate: -5px 7px; } }
@keyframes note-float-c { 0%, 100% { translate: 0 0; } 50% { translate: 6px -4px; } }

@media (min-width: 901px) {
  .split .carousel--vertical { padding: 0; }
  .split .carousel--vertical .carousel-track { gap: 18px; }
  .split .carousel--vertical .carousel-item { flex: 1 1 0; width: auto; min-width: 0; }
}
/* Formats longs : texte à gauche comme les formats courts, deux grandes vidéos visibles à droite (flèches pour la suite). */
.split--longs .subhead--stacked { grid-template-columns: auto; justify-content: start; gap: 14px; margin-bottom: 0; }
.split--longs .split-copy .subhead-note { max-width: none; font-size: 19px; line-height: 1.25; color: #e6e5e0; }
@media (max-width: 600px) { .split--longs .split-copy .subhead-note { font-size: 16px; } }
@media (min-width: 901px) {
  .split--longs .carousel { padding: 0; }
  .split--longs .carousel--wide .carousel-item { flex: 0 0 calc((100% - 22px) / 2); }
  .split--longs .carousel-prev { left: -23px; }
  .split--longs .carousel-next { right: -23px; }
}

/* ---------- Motion en manège ----------
   The ring layout and its starting positions are pure CSS, so the page never jumps when script.js takes over
   (it then only animates the same transforms). Sizes follow the column width (container units). */
@media (prefers-reduced-motion: no-preference) {
  .motion { overflow-x: clip; }
  .motion .split-media { container-type: inline-size; }
  .motion .carousel--mixed { --track: calc(100cqw - 120px); --wide: min(calc(var(--track) * .46), 460px); --lift: calc(var(--wide) * 9 / 16 * .85);
    --ring-r: max(120px, calc(var(--track) / 2 - var(--wide) * .36)); padding: 0 60px; }
  .motion .carousel--mixed .carousel-track { display: block; height: calc(var(--wide) * 9 / 16 + 70px + var(--lift)); overflow: visible; padding: 0; }
  .motion .carousel--mixed .carousel-item { position: absolute; left: 50%; top: calc(50% + var(--lift) / 2); margin: 0; will-change: transform, opacity; }
  .motion .carousel--mixed .carousel-item:has(.is-wide) { width: var(--wide); }
  .motion .carousel--mixed .carousel-item:has(.is-square) { width: calc(var(--wide) * 9 / 16); }
  .motion .carousel--mixed .carousel-progress { display: none; }
  /* Starting positions for five videos (same maths as script.js): front, left, back-left, back-right, right. */
  .motion .carousel--mixed .carousel-item:nth-child(1) { transform: translate(-50%, -50%); z-index: 100; }
  .motion .carousel--mixed .carousel-item:nth-child(2) { transform: translate(-50%, -50%) translate3d(calc(var(--ring-r) * -.951), calc(var(--lift) * -.345), 0) scale(.834); opacity: .765; z-index: 65; }
  .motion .carousel--mixed .carousel-item:nth-child(3) { transform: translate(-50%, -50%) translate3d(calc(var(--ring-r) * -.588), calc(var(--lift) * -.905), 0) scale(.566); opacity: .385; z-index: 10; }
  .motion .carousel--mixed .carousel-item:nth-child(4) { transform: translate(-50%, -50%) translate3d(calc(var(--ring-r) * .588), calc(var(--lift) * -.905), 0) scale(.566); opacity: .385; z-index: 10; }
  .motion .carousel--mixed .carousel-item:nth-child(5) { transform: translate(-50%, -50%) translate3d(calc(var(--ring-r) * .951), calc(var(--lift) * -.345), 0) scale(.834); opacity: .765; z-index: 65; }
}

/* Phones and tablets: bigger front card, the ring fills the column, arrows under it; swipe to turn. */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .motion .carousel--mixed { --track: 100cqw; --wide: min(calc(var(--track) * .64), 460px); --ring-r: max(90px, calc(var(--track) / 2 - var(--wide) * .36)); padding: 0; }
  .motion .carousel--mixed .carousel-track { height: calc(var(--wide) * 9 / 16 + 110px + var(--lift)); touch-action: pan-y; }
  .carousel.is-ring .carousel-btn { top: auto; bottom: 0; width: 42px; height: 42px; }
}

/* ---------- Miniatures en pile (téléphone, class set by script.js) ----------
   The 20 thumbnails become a deck of photos: swipe the top one away (or use the arrows) to see the next. */
.thumb-grid.is-deck { display: block; position: relative; width: 88%; max-width: 480px; aspect-ratio: 16 / 9; margin: 64px auto 0; touch-action: pan-y; }
.thumb-grid.is-deck li { position: absolute; inset: 0; z-index: calc(30 - var(--d, 0));
  transform: translate(calc(var(--d, 0) * 9px + var(--dx, 0px)), calc(var(--d, 0) * -16px)) rotate(calc(var(--r, 0deg) + var(--tilt, 0deg))) scale(calc(1 - var(--d, 0) * .06));
  transition: transform .45s cubic-bezier(.19, 1, .22, 1), opacity .3s; }
.thumb-grid.is-deck li.is-dragging { transition: none; }
.thumb-grid.is-deck li.is-gone { opacity: 0; }
.thumb-grid.is-deck li:nth-child(3n+1) { --r: calc(var(--d, 0) * -3.5deg); }
.thumb-grid.is-deck li:nth-child(3n+2) { --r: calc(var(--d, 0) * 3deg); }
.thumb-grid.is-deck li:nth-child(3n) { --r: calc(var(--d, 0) * -1.5deg); }
.thumb-grid.is-deck li.is-hidden { opacity: 0; visibility: hidden; }
.thumb-grid.is-deck .thumb { transform: none !important; height: 100%; }
.thumb-grid.is-deck .thumb img { height: 100%; }
.deck-controls { display: none; }
.deck-controls.is-on { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 30px; }
.deck-controls button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #ffffff73; border-radius: 50%; background: #0909098c; font-size: 18px; }
.deck-count { min-width: 64px; text-align: center; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.deck-hint { margin-top: 10px; text-align: center; font-size: 13px; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .thumb-grid.is-deck li { transition: none; } }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
  .site-header nav { gap: 22px; font-size: 13px; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
  .header-cta { gap: 14px; }
  .shorts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr auto; }
  .footer-nav { grid-column: 1 / -1; grid-row: 2; padding-left: 0; border-left: 0; flex-wrap: wrap; gap: 14px 30px; }
}
@media (max-width: 900px) {
  :root { --gutter: 6%; --header-h: 68px; }
  .site-header { position: relative; gap: 14px; background: var(--black); }
  .menu-toggle { display: grid; }
  .header-cta { margin-left: auto; }
  .menu-toggle { margin-left: 0; }
  .site-header nav { display: none; position: absolute; top: calc(100% + 6px); left: 4%; right: 4%; flex-direction: column; gap: 0; padding: 10px 20px; border: 1px solid #ffffff26; border-radius: 16px; background: #111113f2; font-size: 17px; }
  .site-header nav.is-open { display: flex; }
  .site-header nav a { padding: 12px 0; border-bottom: 1px solid #ffffff14; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 20px; }
  .hero-copy { max-width: none; }
  .hero-collage { height: min(110vw, 620px); }
  .section-head { flex-direction: column; align-items: start; gap: 22px; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .thumb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .subhead { grid-template-columns: auto 1fr; }
  .subhead-aside { grid-column: 1 / -1; justify-self: start; }
  .creation-intro { grid-template-columns: 1fr; }
  .creation-note { justify-self: end; }
  .about { grid-template-columns: 1fr; gap: 50px; }
  .about-note { display: none; }
  .contact-head { flex-direction: column; align-items: start; gap: 22px; }
  .channels { grid-template-columns: 1fr; gap: 16px; }
  .channel { padding: 18px 20px; }
  .carousel { padding: 0; }
  .carousel--vertical .carousel-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; overflow: visible; }
  .carousel--vertical .carousel-item { width: auto; }
  /* Cards snap into place on touch screens only: with a trackpad, snapping cancelled small horizontal gestures. */
  .carousel-track { scroll-snap-type: x proximity; }
  .carousel-btn { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  /* The whole decor is too small under the header on narrow screens: show the cover below it, zoomed on the word. */
  .cover { margin-top: 0; aspect-ratio: auto; height: clamp(150px, 42vw, 330px); background-size: 165% auto; background-position: 50% 2%; }
  .cover-note { display: none; }
  /* Same zoom as the cover background above (165 %, anchored at 50 % 2 %). */
  .cover-word { left: 11.9%; width: 76.1%; top: calc((clamp(150px, 42vw, 330px) - 61.23vw) * .02 + 12.67vw); }
  /* The cover's own tear is cropped out at this zoom: lay a real dark-to-paper tear on the junction. */
  .hero { --tear: var(--tear-dp-2); padding-top: calc(5vw + 30px); margin-top: 0; }
  .hero::before { content: ''; position: absolute; z-index: 2; left: 0; right: 0; top: 0; aspect-ratio: 2560 / 500; transform: translateY(-50%); background: var(--tear) center / 100% 100% no-repeat; pointer-events: none;
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
}
@media (max-width: 600px) {
  .logo { font-size: 21px; }
  .header-cta { padding: 9px 14px; font-size: 13px; }
  .hero h1 { font-size: clamp(48px, 15vw, 70px); }
  .hero-collage { height: 118vw; }
  .collage-card--ads { width: 34%; }
  .collage-card--podcast { left: 40%; width: 60%; }
  .collage-card--motion { left: 18%; top: 42%; width: 50%; }
  .collage-card--thumb { top: 66%; width: 58%; }
  .collage-card--reel { width: 32%; top: 44%; right: 6%; }
  .scroll-hint { display: none; }
  .video-card:active { scale: 1.03; }
  .chapter-dock { left: 8px; right: 8px; justify-content: space-between; gap: 0; max-width: none; padding: 4px; transform: translateY(calc(100% + 30px)); }
  .chapter-dock.is-visible { transform: none; }
  .chapter-dock a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font-size: 11px; letter-spacing: -.01em; }
  .chapter-dock .dock-contact { margin-left: 2px; padding: 0 10px; }
  .subhead-note { font-size: 16px; }
  .carousel--vertical .carousel-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: visible; }
  .carousel--vertical .carousel-item { width: auto; }
  .carousel--wide .carousel-track { flex-direction: column; overflow: visible; }
  .carousel--wide .carousel-item { width: 100% !important; }
  .carousel--wide.is-book .carousel-item:first-child { transform: perspective(1200px) translateY(calc((1 - var(--book, 1)) * 14px)) rotateX(calc((1 - var(--book, 1)) * -18deg)); transform-origin: center bottom; }
  .carousel--wide.is-book .carousel-item:last-child { transform: perspective(1200px) translateY(calc((1 - var(--book, 1)) * -14px)) rotateX(calc((1 - var(--book, 1)) * 18deg)); transform-origin: center top; }
  .carousel--mixed .carousel-item:has(.is-wide) { width: 82vw; }
  .carousel--mixed .carousel-item:has(.is-square) { width: 46vw; }
  .thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .shorts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .longs-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; align-items: start; }
  .footer-legal nav { flex-wrap: wrap; gap: 10px 22px; }
}

@media (max-width: 380px) {
  /* Not enough room for six links: Contact stays in the header and at the end of the page. */
  .chapter-dock .dock-contact { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Cadres spectre (image de référence : couleurs fondues avec un léger halo) ---------- */
.header-cta, .pill, .ghost-btn, .carousel-btn, .to-top, .deck-controls button, .dialog-close, .image-navigation button {
  --inner: #0b0b0e; border: 1.5px solid transparent; color: #f4f2ee;
  background: linear-gradient(var(--inner), var(--inner)) padding-box, var(--spec-frame) border-box; background-size: 100% 100%, 200% 200%;
  box-shadow: var(--spec-glow); }
.pill { --inner: var(--paper-ink); }
.pill.pill--light { --inner: #fff; color: var(--paper-ink); }
.paper .carousel-btn, .to-top { --inner: #f7f5f0; color: var(--paper-ink); }
:is(.header-cta, .pill, .ghost-btn, .carousel-btn, .to-top, .deck-controls button, .dialog-close, .image-navigation button):hover:not(:disabled) {
  background: linear-gradient(var(--inner), var(--inner)) padding-box, var(--spec-frame) border-box; background-size: 100% 100%, 200% 200%;
  box-shadow: -6px 0 22px #ff3b4e80, 6px 0 22px #3b7bff80, 0 -4px 18px #ffd23a66, 0 4px 18px #2fd8a866, 0 0 3px #fff; }
.motion .card-media { border: 3px solid transparent; background: linear-gradient(#000, #000) padding-box, var(--spec-frame) border-box; background-size: 100% 100%, 200% 200%;
  box-shadow: var(--spec-glow), 0 16px 30px #0000002e; }
.motion .card-media:hover { box-shadow: -8px 0 26px #ff3b4e8c, 8px 0 26px #3b7bff8c, 0 -6px 22px #ffd23a73, 0 6px 22px #2fd8a873, 0 16px 30px #0000002e; }
.thumb:hover, .thumb-grid.is-deck li.is-top .thumb { border: 3px solid transparent; margin: -1px; background: linear-gradient(#111, #111) padding-box, var(--spec-frame) border-box; background-size: 100% 100%, 200% 200%;
  box-shadow: -6px 0 22px #ff3b4e80, 6px 0 22px #3b7bff80, 0 -4px 18px #ffd23a66, 0 4px 18px #2fd8a866, 0 26px 46px #000000a6; }
@media (prefers-reduced-motion: no-preference) {
  :is(.header-cta, .pill, .ghost-btn, .carousel-btn, .to-top, .deck-controls button):hover, .motion .card-media:hover, .thumb:hover { animation: frame-flow 3s linear infinite; }
  .thumb-grid.is-deck li.is-top .thumb, .carousel.is-ring .is-front .card-media { animation: frame-flow 6s linear infinite; }
}
@keyframes frame-flow { 0% { background-position: 0 0, 0% 50%; } 50% { background-position: 0 0, 100% 50%; } 100% { background-position: 0 0, 0% 50%; } }
/* Phone menu: the chapter buttons stack with their neon frames. */
@media (max-width: 900px) {
  .site-header nav { gap: 10px; padding: 14px; }
  .site-header nav a { padding: 12px 16px; border-bottom: 1.5px solid transparent; }
}
