/* Layout : la page se lit comme une timeline de montage. Chaque section porte le timecode
   où elle commence, une tête de lecture suit le scroll, le parcours est dessiné en pistes. */
:root {
  --bg: #F7F6FA;
  --surface: #FFFFFF;
  --ink: #15131D;
  --muted: #5F5C6E;
  --line: #E3E0EC;
  --accent: #3B2CFF;
  --blue: #4A3AFF;
  --violet: #A77BFF;
  --pink: #F07AD3;
  --frame: #100F16;
  --frame-ink: #F1EFF7;
  --frame-muted: #9D99AE;
  --grad: linear-gradient(100deg, var(--blue), var(--violet) 55%, var(--pink));

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s-0: 0.8125rem;
  --s-1: 1rem;
  --s-2: 1.25rem;
  --s-3: clamp(1.5rem, 2.6vw, 2rem);
  --s-4: clamp(2rem, 4.4vw, 3.25rem);
  --s-5: clamp(2.75rem, 9vw, 7rem);

  --wrap: 1180px;
  --radius: 10px;
  --header-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0C12; --surface: #17151F; --ink: #F2F0F8; --muted: #A39FB4; --line: #2A2737;
    --accent: #8E7DFF; --blue: #5B4DFF; --frame: #08070C; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0C12; --surface: #17151F; --ink: #F2F0F8; --muted: #A39FB4; --line: #2A2737;
  --accent: #8E7DFF; --blue: #5B4DFF; --frame: #08070C; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: var(--s-1); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.mono { font-family: var(--f-mono); font-size: var(--s-0); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Header + tête de lecture ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 0.95rem;
  letter-spacing: 0.04em; text-decoration: none; text-transform: uppercase; white-space: nowrap;
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color .2s; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.tc { color: var(--muted); white-space: nowrap; }
.tc b { color: var(--ink); font-weight: 500; }
.header-cta {
  text-decoration: none; font-weight: 600; font-size: 0.875rem; padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--bg); white-space: nowrap;
}
.scrub { position: relative; height: 2px; background: var(--line); }
.scrub-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); }
.scrub-head { position: absolute; top: -5px; left: 0; width: 2px; height: 12px; background: var(--ink); transform: translateX(-1px); }
.scrub-head::before {
  content: ""; position: absolute; top: -4px; left: -4px;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--ink);
}
.scrub-mark { position: absolute; top: -3px; width: 1px; height: 8px; background: var(--muted); opacity: .5; }
.nav-contact, .menu-btn { display: none; }
@media (max-width: 860px) {
  .tc { margin-left: auto; }
  .header-cta { display: none; }
  .menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, background .25s; }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
  .menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav.is-open { display: flex; }
  .nav a { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 1.5rem; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav-contact { display: block; }
}
@media (max-width: 420px) { .tc .tc-label { display: none; } }

/* ---------- Libellés de section ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.label { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-bottom: 20px; }
.label .tcode { color: var(--accent); }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 120px; }
h2 {
  font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: var(--s-4);
  line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 20px; text-wrap: balance;
}
.lede { color: var(--muted); max-width: 60ch; margin: 0; font-size: 1.0625rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 80px); align-items: end; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 28px; flex-wrap: wrap; }
.rec { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.name {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: var(--s-5);
  line-height: 0.88; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 28px;
}
.name span { display: block; }
.role-title { font-family: var(--f-display); font-stretch: 108%; font-weight: 700; font-size: var(--s-3); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
.roles { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 24px; padding: 0; list-style: none; font-weight: 500; color: var(--muted); }
.roles li { display: flex; align-items: center; gap: 14px; }
.roles li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.pitch { color: var(--muted); max-width: 52ch; margin: 0 0 32px; font-size: 1.0625rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-weight: 600; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink);
  transition: transform .2s, background .2s, color .2s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; }
.btn:hover { transform: translateY(-2px); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.portrait { position: relative; max-width: 420px; justify-self: end; width: 100%; }
.portrait-glow { position: absolute; inset: 12% -8% -6% 8%; background: var(--grad); filter: blur(48px); opacity: .45; border-radius: 40%; z-index: 0; }
.viewfinder { position: relative; z-index: 1; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--frame); }
.viewfinder img { width: 100%; height: 100%; object-fit: cover; }
.vf-corner { position: absolute; width: 22px; height: 22px; border: 2px solid #fff; opacity: .9; }
.vf-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.vf-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.vf-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.vf-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.vf-hud { position: absolute; left: 16px; right: 16px; bottom: 44px; display: flex; justify-content: space-between; color: #fff; font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: .06em; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.vf-cross { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); opacity: .5; }
.vf-cross::before, .vf-cross::after { content: ""; position: absolute; background: #fff; }
.vf-cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.vf-cross::after { top: 50%; left: 0; right: 0; height: 1px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { justify-self: start; max-width: 340px; order: -1; }
}

/* ---------- Showreel ---------- */
.reel { display: block; position: relative; text-decoration: none; color: var(--frame-ink); background: var(--frame); border-radius: var(--radius); overflow: hidden; aspect-ratio: 2.39 / 1; min-height: 200px; isolation: isolate; }
.reel-bg { position: absolute; inset: 0; background: var(--grad); opacity: .55; z-index: -2; transition: opacity .4s, transform .8s; }
.reel-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 110%, rgba(8,7,12,.9), rgba(8,7,12,.15) 60%); }
.reel:hover .reel-bg { opacity: .75; transform: scale(1.03); }
.reel-bars { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 80px); }
.reel-inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(16px, 3vw, 32px); }
.reel-top, .reel-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: .06em; color: rgba(255,255,255,.8); }
.reel-title { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); }
.play { flex: none; width: clamp(52px, 7vw, 84px); aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform .3s; }
.play::before { content: ""; margin-left: 12%; border-left: 18px solid #100F16; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.reel:hover .play { transform: scale(1.08); }
.reel-title strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(1.5rem, 4.5vw, 3.5rem); line-height: 1; text-transform: uppercase; color: #fff; }
@media (max-width: 520px) { .reel { aspect-ratio: 16 / 9; } .reel-top span:last-child { display: none; } }

/* ---------- Clients ---------- */
.clients { border-block: 1px solid var(--line); padding-block: 22px; overflow: hidden; }
.clients-row { display: flex; align-items: center; gap: 28px; }
.clients-label { flex: none; color: var(--muted); }
.marquee { overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: slide 48s linear infinite; }
.marquee-track span { font-family: var(--f-display); font-stretch: 110%; font-weight: 600; font-size: 1.05rem; color: var(--muted); padding-inline: 22px; white-space: nowrap; }
.marquee-track span::after { content: "·"; margin-left: 44px; color: var(--line); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (max-width: 600px) { .clients-label { display: none; } }

/* ---------- Profil ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.statement { font-family: var(--f-display); font-stretch: 105%; font-weight: 500; font-size: var(--s-3); line-height: 1.3; margin: 0; text-wrap: balance; }
.statement em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-text p { margin: 0 0 16px; color: var(--muted); max-width: 60ch; }
.profile-text p strong { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.fact b { display: block; font-family: var(--f-display); font-stretch: 115%; font-weight: 700; font-size: 1.75rem; line-height: 1.1; }
.fact span { color: var(--muted); font-size: 0.875rem; }
@media (max-width: 820px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 440px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Projets ---------- */
.projects-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; transition: all .2s;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { font-family: var(--f-mono); font-size: 0.75rem; opacity: .6; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
@media (max-width: 680px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { display: block; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; width: 100%; }
.card-media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--frame); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media::after { content: ""; position: absolute; inset: 0; background: var(--grad); mix-blend-mode: color; opacity: 0; transition: opacity .35s; }
.card:hover .card-media::after { opacity: .55; }
.card-hover { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; color: #100F16; font-weight: 600; font-size: 0.8125rem; opacity: 0; transform: translateY(6px); transition: all .3s; }
.card:hover .card-hover, .card:focus-visible .card-hover { opacity: 1; transform: none; }
.card-tc { position: absolute; top: 12px; right: 12px; z-index: 2; color: #fff; font-family: var(--f-mono); font-size: 0.6875rem; padding: 3px 7px; border-radius: 4px; background: rgba(8,7,12,.6); }

/* Vignette de secours quand l'image YouTube ne charge pas */
.thumb-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; color: var(--frame-ink); }
.thumb-fallback::before { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 120% at var(--gx, 80%) 110%, var(--hue, var(--violet)), transparent 65%); opacity: .7; }
.thumb-fallback > * { position: relative; }
.thumb-fallback .tf-cat { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--frame-muted); }
.thumb-fallback .tf-title { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(1.25rem, 3vw, 2rem); line-height: .95; text-transform: uppercase; max-width: 14ch; }
.card-media.has-img .thumb-fallback { display: none; }

.card-body { padding-top: 16px; display: grid; gap: 6px; }
.card-meta { color: var(--muted); display: flex; gap: 10px; text-transform: uppercase; }
.card-meta .dot { color: var(--accent); }
.card-title { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 1.375rem; line-height: 1.15; margin: 0; text-wrap: balance; }
.card-client { color: var(--muted); font-size: 0.9375rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.tag { font-size: 0.75rem; font-weight: 500; padding: 4px 9px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--ink); }
.tag.lead { background: var(--ink); color: var(--bg); }
.projects-note { margin-top: 40px; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Fiche projet ---------- */
dialog.sheet {
  width: min(1040px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0;
  border-radius: 14px; background: var(--surface); color: var(--ink); overflow: auto;
  box-shadow: 0 40px 120px rgba(8, 7, 12, .45);
}
dialog.sheet::backdrop { background: rgba(8, 7, 12, .72); backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: rise .35s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.sheet-video { position: relative; aspect-ratio: 16 / 9; background: var(--frame); }
.sheet-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sheet-video .poster { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; color: #fff; }
.sheet-video .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.sheet-video .poster .thumb-fallback { z-index: 0; }
.sheet-video .poster-cta { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; font-weight: 600; }
.sheet-video .poster:hover .play { transform: scale(1.08); }
.sheet-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 3; width: 44px; height: 44px;
  border-radius: 50%; border: 0; cursor: pointer; background: rgba(8,7,12,.65); color: #fff; font-size: 1.25rem; line-height: 1;
}
.sheet-body { padding: clamp(20px, 4vw, 44px); }
.sheet-head { margin-bottom: 28px; }
.sheet-head .card-meta { margin-bottom: 10px; }
.sheet-title { font-family: var(--f-display); font-stretch: 115%; font-weight: 800; font-size: var(--s-4); line-height: 1; margin: 0 0 10px; text-wrap: balance; }
.sheet-client { color: var(--muted); font-size: 1.0625rem; margin: 0; }
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.sheet-block + .sheet-block { margin-top: 26px; }
.sheet-block h3 { font-family: var(--f-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.sheet-block p { margin: 0; max-width: 62ch; }
.sheet-aside { background: var(--bg); border-radius: var(--radius); padding: 22px; align-self: start; }
.role-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.role-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.role-list li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); transform: translateY(-1px); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools span { font-family: var(--f-mono); font-size: 0.75rem; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.sheet-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.sheet-nav button { cursor: pointer; background: none; border: 0; padding: 6px 0; text-align: left; color: var(--muted); max-width: 48%; }
.sheet-nav button:last-child { text-align: right; }
.sheet-nav button:hover { color: var(--ink); }
.sheet-nav b { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .sheet-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Savoir-faire ---------- */
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 40px; }
.skill { padding: 28px 24px 8px 0; }
.skill + .skill { padding-left: 24px; border-left: 1px solid var(--line); }
.skill h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 1.25rem; line-height: 1.2; margin: 0 0 14px; }
.skill ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); font-size: 0.9375rem; }
.toolbelt { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbelt .mono { color: var(--muted); margin-right: 8px; }
.toolbelt span.t { font-family: var(--f-mono); font-size: 0.8125rem; padding: 6px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 960px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill:nth-child(3) { padding-left: 0; border-left: 0; }
  .skill:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 540px) {
  .skills { grid-template-columns: minmax(0, 1fr); }
  .skill + .skill { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Parcours (pistes de montage) ---------- */
.tracks-scroll { overflow-x: auto; margin-top: 44px; padding-bottom: 8px; }
.tracks { min-width: 1000px; position: relative; }
.ruler { position: relative; height: 28px; margin-left: 132px; border-bottom: 1px solid var(--line); }
.ruler span { position: absolute; bottom: 6px; transform: translateX(-50%); color: var(--muted); font-family: var(--f-mono); font-size: 0.6875rem; }
.ruler span::after { content: ""; position: absolute; left: 50%; top: 100%; margin-top: 6px; width: 1px; height: 6px; background: var(--line); }
.track { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); min-height: 76px; }
.track-name { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-right: 12px; }
.track-lane { position: relative; height: 76px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 20 - 1px), color-mix(in srgb, var(--line) 60%, transparent) calc(100% / 20 - 1px) calc(100% / 20)); }
.clip { position: absolute; top: 8px; bottom: 8px; gap: 2px; border-radius: 6px; padding: 7px 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.clip b { font-size: 0.8125rem; font-weight: 600; line-height: 1.2; }
.clip small { font-family: var(--f-mono); font-size: 0.625rem; color: var(--muted); white-space: nowrap; }
.clip.key { background: var(--grad); border: 0; color: #fff; }
.clip.key small { color: rgba(255,255,255,.85); }
.clip.now { border: 1px dashed var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.clip.edu { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.playhead-now { position: absolute; top: 28px; bottom: 0; width: 2px; background: #E5484D; z-index: 2; pointer-events: none; }
.playhead-now::before { content: none; position: absolute; top: 4px; left: 6px; font-family: var(--f-mono); font-size: 0.625rem; color: #E5484D; white-space: nowrap; }
.tracks-hint { display: none; color: var(--muted); margin-top: 10px; }
@media (max-width: 820px) { .tracks-hint { display: block; } }
.edu-list { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.edu-item { padding-top: 14px; border-top: 2px solid var(--ink); }
.edu-item b { display: block; font-weight: 600; }
.edu-item span { color: var(--muted); font-size: 0.875rem; }
@media (max-width: 680px) { .edu-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact { background: var(--frame); color: var(--frame-ink); position: relative; overflow: hidden; isolation: isolate; }
.contact::before { content: ""; position: absolute; inset: auto -10% -60% 30%; height: 120%; background: var(--grad); filter: blur(90px); opacity: .35; z-index: -1; }
.contact .label { color: var(--frame-muted); }
.contact .label .tcode { color: var(--violet); }
.contact .label::after { background: rgba(255,255,255,.15); }
.contact h2 { font-size: clamp(2.25rem, 6.5vw, 5rem); font-stretch: 122%; font-weight: 800; text-transform: uppercase; line-height: .95; color: #fff; }
.contact .lede { color: var(--frame-muted); }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact-card { border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; align-content: start; background: rgba(255,255,255,.03); min-width: 0; }
.contact-card .mono { color: var(--frame-muted); text-transform: uppercase; letter-spacing: .08em; font-size: 0.6875rem; }
.contact-card .value { font-size: 1.125rem; font-weight: 600; color: #fff; overflow-wrap: anywhere; user-select: all; }
.contact-card a.value { text-decoration: none; user-select: auto; }
.contact-card a.value:hover { text-decoration: underline; }
.copy { justify-self: start; cursor: pointer; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 0.8125rem; }
.copy:hover { background: rgba(255,255,255,.1); }
@media (max-width: 560px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 72px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: var(--frame-muted); }

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

/* ---------- Ajouts v2 ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-row { position: relative; }
.portrait { margin: 0; }
.card-note { color: var(--frame-muted); font-size: .9375rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.empty { color: var(--muted); padding: 24px 0; }

/* Archives */
.archives { margin-top: clamp(64px, 8vw, 104px); padding-top: 40px; border-top: 1px solid var(--line); }
.archives-head { margin-bottom: 28px; }
.archives-title { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: var(--s-3); margin: 0 0 8px; display: flex; align-items: baseline; gap: 12px; }
.archives-title .count { color: var(--muted); font-weight: 400; }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
@media (max-width: 900px) { .mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }
.mini { display: grid; gap: 8px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; }
.mini .card-media { border-radius: 6px; }
.mini .tf-title { font-size: clamp(.95rem, 1.6vw, 1.15rem); }
.mini .tf-cat { font-size: .625rem; }
.mini-title { font-weight: 600; font-size: .9375rem; line-height: 1.25; }
.mini-meta { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more { margin: 32px auto 0; display: flex; }

/* Galerie et avant/après dans la fiche */
.sheet-media { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.sheet-media h3 { font-family: var(--f-mono); font-weight: 500; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; background: var(--bg); }
.gallery figcaption { font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.ba { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--frame); --pos: 50%; touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba-line::after { content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #100F16; display: grid; place-items: center; font-weight: 700; }
.ba-tag { position: absolute; top: 12px; padding: 4px 8px; border-radius: 4px; background: rgba(8,7,12,.65); color: #fff; font-family: var(--f-mono); font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
.ba-tag.l { left: 12px; } .ba-tag.r { right: 12px; }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-caption { font-size: .8125rem; color: var(--muted); margin-top: 8px; }
.sheet.is-light .sheet-body { padding-bottom: clamp(20px, 3vw, 32px); }
