/* =========================================================================
   Théodore Riant — CV "Folio"
   Single editorial page · sticky profile card left · scrolling content right.
   Noir & blanc premium. Helvetica Neue + serif éditorial pour les citations.
   ========================================================================= */

:root {
  --bg: #f1f1ef;
  --card: #ffffff;
  --ink: #0a0a0a;
  --text: #18120f;
  --text-2: #6c6c68;
  --text-3: #9d9d98;
  --line: #e4e4df;
  --line-2: #d8d8d2;
  --black: #0c0c0c;

  --col-left: 380px;
  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 64px);

  --font: "Helvetica Neue", Helvetica, "Inter", Arial, sans-serif;
  --serif: "Hoefler Text", "Iowan Old Style", Garamond, Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.006em;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: #000; color: #fff; }

/* visually hidden, still read by search engines & screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---- vertical brand wordmark, left screen edge — full height (wide screens) ---- */
.brand-edge {
  position: fixed; z-index: 50;
  left: clamp(4px, 0.8vw, 16px); top: 0; height: 100vh;
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: none; align-items: center; justify-content: center;
  font-size: clamp(46px, 13.5vh, 132px); font-weight: 700;
  letter-spacing: -0.01em; line-height: 1; white-space: nowrap;
  user-select: none;
}
.brand-edge .be-name { color: var(--ink); }
.brand-edge .be-suffix { color: var(--text-3); }
/* round dot (font period renders square in Helvetica) */
.brand-edge .be-dot {
  display: inline-block; width: 0.2em; height: 0.2em;
  margin: 0.06em 0; border-radius: 50%; background: var(--ink);
  vertical-align: middle; transform: translateX(-0.14em);
}
@media (min-width: 1340px) { .brand-edge { display: flex; } }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 2.2vw, 28px) var(--pad) clamp(56px, 8vw, 80px);
  display: grid;
  grid-template-columns: 1fr;          /* mobile-first: single column */
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

/* small section eyebrow — pill badge */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); margin: 0 0 24px;
  padding: 7px 13px 7px 11px; border: 1px solid var(--line-2); border-radius: 99px;
  background: var(--card);
}
.kicker .ic { font-size: 12px; line-height: 1; color: var(--text-2); }

/* ============================================================ PROFILE === */
.profile {
  position: static;                    /* mobile-first: in flow, centered */
  background: transparent; border: 0; padding: 0; box-shadow: none;
  width: 100%; max-width: 460px; margin-inline: auto;
}
.profile-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 5;                  /* mobile-first portrait */
  background: #111;
  isolation: isolate;
  box-shadow: 0 22px 50px -28px rgba(0,0,0,0.45);
}
.profile-card img,
.profile-card image-slot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.03);
}
.profile-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.28) 38%, rgba(0,0,0,0) 62%);
  z-index: 1;
}

/* top chrome over the photo */
.pc-top {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.16); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.28);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}
.socials { display: flex; gap: 6px; }
.soc {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
  display: grid; place-items: center; color: #fff;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.soc:hover { background: rgba(255,255,255,0.32); transform: translateY(-1px); }
.soc svg { width: 14px; height: 14px; }

/* available badge — vertical on left edge */
.badge-av {
  position: absolute; left: 12px; top: 54px; z-index: 2;
  writing-mode: vertical-rl;
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 12px 7px; border-radius: 99px;
}
.badge-av .led { width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* bottom intro over the photo */
.pc-intro {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22px 20px 20px; color: #fff;
}
.pc-hi { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.pc-hi .wave { display: inline-block; }
.pc-sub { margin: 9px 0 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.82); max-width: 30ch; }

/* profile footer (floating elements below the photo) */
.pc-foot { padding: 0; margin-top: 16px; }
.pc-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pc-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--card); color: var(--ink); border: 1px solid var(--ink); border-radius: 99px;
  padding: 12px 46px; font-family: var(--font); font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em; cursor: pointer; overflow: hidden;
  box-shadow: 0 12px 26px -14px rgba(0,0,0,0.32);
  transition: background 0.32s var(--ease), color 0.32s var(--ease), transform 0.2s var(--ease);
}
.pc-btn:hover { background: var(--ink); color: var(--card); transform: translateY(-2px); }
.pc-btn .av {
  position: absolute; left: 8px; top: 50%; margin-top: -13px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--ink);
  display: grid; place-items: center;
  transition: left 0.4s var(--ease), background 0.32s var(--ease);
}
.pc-btn .av svg { width: 12px; height: 12px; stroke: var(--card); transition: stroke 0.32s var(--ease); }
.pc-btn:hover .av { left: calc(100% - 34px); background: var(--card); }
.pc-btn:hover .av svg { stroke: var(--ink); }
.pc-dispo { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.dot-g { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; flex: none; animation: dotpulse 2.4s var(--ease) infinite; }
@keyframes dotpulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } }
.pc-links { display: flex; gap: 9px; margin-top: 14px; }
.pc-links a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 8px; box-shadow: 0 10px 22px -14px rgba(0,0,0,0.22); transition: transform 0.2s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.pc-links a:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 0 16px 28px -14px rgba(0,0,0,0.3); }
.pc-links .arr { color: var(--text-3); }

.pc-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: var(--font);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  background: #fff; color: #0a0a0a;
  padding: 11px 18px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.18s var(--ease), background 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn .av { width: 18px; height: 18px; border-radius: 50%; background: #0a0a0a; display: grid; place-items: center; }
.btn .av svg { width: 10px; height: 10px; stroke: #fff; }
.btn-ghost {
  background: transparent; color: #fff; padding: 11px 4px;
  border-radius: 0; font-weight: 500; font-size: 13.5px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { border-color: #fff; }

/* ============================================================ CONTENT === */
.content { min-width: 0; }
.sec { margin-bottom: clamp(64px, 8vw, 116px); scroll-margin-top: 28px; }

/* ---- HERO ---- */
.sec.hero {
  margin-bottom: clamp(48px, 6vw, 88px);
}
.hero-stage { position: relative; }

/* ---- project fan (diagonal flat cards) ---- */
.pfan {
  position: relative; width: 100%; height: clamp(280px, 72vw, 460px);
  margin-top: clamp(24px, 5vw, 48px);
  --pfan-stepx: 13%;
  --pfan-stepy: 54px;
  --pfan-tilt: -8deg;
  --pfan-cardw: clamp(150px, 42vw, 240px);
}
.pfan .card {
  position: absolute; top: 0;
  left: calc(var(--i) * var(--pfan-stepx));
  width: var(--pfan-cardw);
  z-index: calc(var(--i) + 1);
  border-radius: 14px;
  transform: translateY(calc(var(--i) * var(--pfan-stepy))) rotate(var(--pfan-tilt));
  transform-origin: center;
  filter: drop-shadow(0 22px 38px rgba(0,0,0,0.24));
  transition: transform 0.55s var(--ease), filter 0.55s var(--ease), left 0.55s var(--ease);
}
.pfan .card img { width: 100%; height: auto; display: block; border-radius: 14px; opacity: 0; transform: translateY(64px); filter: blur(8px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); }
.pfan .card img.shot-in { opacity: 1; transform: none; filter: blur(0); }
/* hero card entrance handled in JS once each image is fully loaded (.shot-in) */
/* gallery comes alive on hover: the fan spreads, straightens and lifts */
@media (hover: hover) {
  .pfan:hover {
    --pfan-stepx: 16.5%;
    --pfan-stepy: 40px;
    --pfan-tilt: -3deg;
  }
  /* siblings step back so the pointed-at card reads clearly */
  .pfan:hover .card {
    filter: drop-shadow(0 22px 38px rgba(0,0,0,0.2)) brightness(0.88);
  }
  .pfan:hover .card:hover {
    transform: translateY(calc(var(--i) * var(--pfan-stepy) - 22px)) rotate(0deg) scale(1.05);
    filter: drop-shadow(0 44px 68px rgba(0,0,0,0.42)) brightness(1.04);
    z-index: 20;
  }
}

/* ---- clients label + logos, bottom-left of the hero stage ---- */
.hero-clients { position: static; z-index: 7; margin-top: 26px; }
.hc-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0 0 16px; }
.hc-label .ic { color: var(--text-3); font-size: 12px; }
.hero-clients .marquee { border: 0; padding: 0; }
.hero-clients .logo-mark { height: 30px; }
.logo-mark img { height: 100%; width: auto; display: block; }
.logo-lokil { font-family: "Quicksand", var(--font); font-weight: 700; font-size: 25px; line-height: 1; color: #0e8c6e; height: auto; opacity: 1; }
.hero-clients .logo-wide { height: 24px; }

/* ---- key figures, positioned top-right over the stage ---- */
.figs { position: static; z-index: 6; display: flex; flex-direction: row; flex-wrap: wrap; gap: clamp(24px, 6vw, 44px); margin-bottom: 18px; }

/* =====================================================================
   HERO STATS — two columns: figures (left) · roles (right)
   each role = an OUTLINE word with a solid word subtly overlapping it,
   flush to the right. No hover anywhere.
   ===================================================================== */
.hero-stats {
  display: flex; flex-direction: column;
  gap: clamp(28px, 4.2vw, 64px);
  margin-top: clamp(18px, 2.8vw, 36px);
}
.stat {
  display: grid;
  grid-template-columns: auto auto;           /* figures + roles, packed together */
  justify-content: start;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
}
/* left column — the figure, solid and tabular */
.stat-n {
  display: flex; align-items: baseline; gap: 0.06em;
  font-weight: 700; letter-spacing: -0.055em; line-height: 0.82;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  font-size: clamp(66px, 12vw, 152px);
}
.stat-u {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 0.3em; color: var(--text-2); letter-spacing: 0;
}
/* right column — the role, flush right */
.poste {
  justify-self: end;
  display: grid; justify-items: end;
}
/* outline part */
.poste-out {
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.92;
  font-size: clamp(34px, 6.6vw, 82px);
  color: transparent; -webkit-text-stroke: 1.6px var(--ink);
}
/* solid part — subtly overlapping the outline word, still flush right */
.poste-solid {
  margin-top: -0.28em;                          /* the subtle overlap */
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(28px, 5.2vw, 62px);
  color: var(--ink); letter-spacing: -0.01em;
  /* thin bg halo so the solid word reads cleanly over the hollow strokes */
  paint-order: stroke fill; -webkit-text-stroke: 3px var(--bg);
}

/* fan of project images */
.fan {
  margin-top: clamp(36px, 5vw, 60px);
  display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(-40px, -3vw, -20px);
  min-height: 230px;
  perspective: 1400px;
}
.fan image-slot {
  width: clamp(150px, 19vw, 230px);
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  box-shadow: 0 22px 50px -26px rgba(0,0,0,0.55);
  transition: transform 0.4s var(--ease);
  flex: none;
}
.fan image-slot:nth-child(1) { transform: rotate(-9deg) translateY(20px); }
.fan image-slot:nth-child(2) { transform: rotate(-3deg) translateY(2px); z-index: 2; }
.fan image-slot:nth-child(3) { transform: rotate(3deg) translateY(2px); z-index: 3; }
.fan image-slot:nth-child(4) { transform: rotate(9deg) translateY(20px); }
.fan:hover image-slot { transform: rotate(0) translateY(0); }

/* client logos */
.clients {
  margin-top: clamp(32px, 4vw, 52px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.clients .cl { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-3); opacity: 0.85; }

/* unified section title size */
.about h2, .lead-h {
  font-size: clamp(25px, 2.8vw, 33px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin: 0 0 22px; max-width: 30ch; text-wrap: balance;
}
.about p { font-size: 15.5px; color: var(--text-2); line-height: 1.62; margin: 0 0 14px; max-width: 72ch; }
.about p b { color: var(--text); font-weight: 600; }
/* two-tone lead heading (swapped: role muted, statement in ink) */
.about h2 .lead-a { color: var(--text-3); }
.about h2 .lead-b { color: var(--ink); }

/* ---- AWARDS ---- */
.awards-grid { display: grid; grid-template-columns: 1fr clamp(140px, 16vw, 196px); gap: clamp(24px, 3vw, 44px); align-items: start; }
.award-list { border-top: 1px solid var(--line); }
.award {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.award:hover { padding-left: 8px; }
.award .t { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.award .c { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.award .y { font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.award-tile {
  aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  position: sticky; top: 28px;
}

/* ---- TIMELINE ---- */
.timeline { border-top: 1px solid var(--line); }
.tl {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.tl .yr { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl .ti { display: flex; align-items: flex-start; gap: 14px; }
.tl .badge {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--ink); color: #fff; display: grid; place-items: center;
}
.tl .badge svg { width: 17px; height: 17px; }
.tl .badge.badge-fav { background: #fff; border: 1px solid var(--line-2); overflow: hidden; }
.tl .badge.badge-fav img { width: 24px; height: 24px; object-fit: contain; display: block; }
.tl h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.tl .where { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.tl p { margin: 9px 0 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; max-width: 70ch; }

/* ---- HIGHLIGHTS / projects ---- */
.work { display: flex; flex-direction: column; gap: 16px; }
.work-card {
  border-radius: 18px; overflow: hidden; position: relative;
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.work-card:hover { transform: translateY(-3px); box-shadow: 0 26px 60px -34px rgba(0,0,0,0.5); }
.work-card image-slot { width: 100%; aspect-ratio: 16 / 9; }
.work-card.dark { background: var(--black); aspect-ratio: 16 / 7; display: grid; place-items: center; }
.work-card.dark .big {
  font-size: clamp(48px, 9vw, 120px); font-weight: 800; letter-spacing: -0.05em; color: #fff;
  line-height: 1; font-family: var(--font);
}
.work-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  color: #fff; pointer-events: none;
}
.work-meta .wt { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.work-meta .wtag { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }

/* ---- SERVICES (accordion) ---- */
.acc { border-top: 1px solid var(--line-2); }
.acc-item { border-bottom: 1px solid var(--line-2); }
.acc-head {
  width: 100%; appearance: none; background: none; border: 0; cursor: pointer;
  font-family: var(--font); text-align: left; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; font-size: clamp(19px, 2.2vw, 26px); font-weight: 700; letter-spacing: -0.025em;
}
.acc-head .pm { width: 22px; height: 22px; flex: none; position: relative; }
.acc-head .pm::before, .acc-head .pm::after {
  content: ""; position: absolute; background: var(--ink); border-radius: 2px;
  top: 50%; left: 50%; transition: transform 0.3s var(--ease);
}
.acc-head .pm::before { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.acc-head .pm::after { width: 2px; height: 14px; transform: translate(-50%, -50%); }
.acc-item.open .pm::after { transform: translate(-50%, -50%) scaleY(0); }
.acc-body { overflow: hidden; max-height: 0; transition: max-height 0.45s var(--ease); }
.acc-item.open .acc-body { max-height: 640px; }
.acc-inner { padding: 2px 0 26px; }
.acc-inner > p { font-size: 15px; color: var(--text-2); line-height: 1.6; margin: 0 0 18px; max-width: 70ch; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  appearance: none; border: 1px solid var(--line-2); background: var(--card); cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 8px 15px; border-radius: 99px; transition: all 0.22s var(--ease);
}
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel image-slot { width: 100%; aspect-ratio: 16 / 8; border-radius: 12px; }

/* ---- TECH STACK ---- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.tech {
  display: grid; grid-template-columns: 42px 1fr 160px; align-items: center; gap: 18px;
  padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}
.tech .logo { width: 42px; height: 42px; border-radius: 11px; background: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--ink); }
.tech .nm { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.tech .nm small { display: block; font-size: 12.5px; font-weight: 400; color: var(--text-3); margin-top: 2px; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.bar > span { position: absolute; inset: 0; width: 0; background: var(--ink); border-radius: 99px; transition: width 1.1s var(--ease); }

/* ---- TESTIMONIALS ---- */
.testi { display: grid; grid-template-columns: 1fr clamp(120px, 14vw, 168px); gap: clamp(20px, 3vw, 40px); align-items: start; }
.testi-stats { display: flex; gap: 36px; margin: 4px 0 26px; }
.testi-stats .n { font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.testi-stats .l { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.quote { font-size: clamp(18px, 2.1vw, 24px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.35; margin: 0; max-width: 30ch; }
.quote .qm { color: var(--text-3); }
.testi .who { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.testi .who .name { font-size: 14px; font-weight: 600; }
.testi .who .role { font-size: 12.5px; color: var(--text-2); }
.testi-img { aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; }
.testi-img image-slot { width: 100%; height: 100%; }

/* ---- CONTACT ---- */
.contact .lead-h { max-width: 24ch; }
.form { display: flex; flex-direction: column; }
.field { border-bottom: 1px solid var(--line-2); padding: 18px 0; display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.field input, .field textarea {
  font-family: var(--font); font-size: 17px; color: var(--text);
  background: transparent; border: 0; padding: 0; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; flex-wrap: wrap; }
.btn-dark { background: var(--ink); color: #fff; padding: 14px 24px; }
.btn-dark:hover { background: #000; }
.contact-mail { font-size: 15px; color: var(--text-2); }
.contact-mail a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.contact-mail a:hover { border-color: var(--ink); }
.form-ok { font-size: 14px; color: var(--ink); margin: 16px 0 0; display: none; }
.form-ok.show { display: block; }

/* ---- big quote ---- */
.bigq { text-align: left; padding: clamp(40px,6vw,80px) 0; }
.bigq p { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 30px); font-style: italic; line-height: 1.4; margin: 0; max-width: 28ch; }
.bigq .src { margin-top: 16px; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--text-2); }

/* ---- signature ---- */
.sign { grid-column: 1 / -1; padding-top: 24px; overflow: hidden; }
.sign .word {
  display: block; font-weight: 800; letter-spacing: -0.055em; line-height: 0.82;
  color: var(--ink); margin: 0; white-space: nowrap;
}
/* mobile-first: huge, "Théodore" fills the full width; desktop restored ≥961 */
.sign .w-top { font-size: clamp(72px, 23vw, 240px); }
.sign .w-bot {
  font-size: clamp(72px, 23vw, 240px); width: max-content; max-width: 100%; margin-left: auto;
  transform: scaleX(-1); transform-origin: center;
  -webkit-text-stroke: 2.2px var(--ink); color: transparent;
}

/* ---- key figures (borderless blocks) ---- */
.fig-c { padding: 0; }
.fig-c .n { font-size: clamp(34px, 3.8vw, 56px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.fig-c .l { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.4; max-width: 18ch; }

/* ---- client logo marquee ---- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 28px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: clamp(44px, 6vw, 92px); width: max-content; animation: scroll-x 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.logo-mark { flex: none; height: 28px; color: var(--text-3); opacity: 0.7; transition: opacity 0.25s var(--ease), color 0.25s var(--ease); }
.logo-mark:hover { opacity: 1; color: var(--text); }
.logo-mark svg { height: 100%; width: auto; display: block; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- "ce qui me définit" ---- */
.define { margin-top: 24px; padding-left: 18px; border-left: 2px solid var(--ink); max-width: 72ch; }
.define .k { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.define p { font-size: 15.5px; color: var(--text); margin: 0; line-height: 1.55; }

/* ---- experience bullets ---- */
.tl ul { margin: 11px 0 0; padding: 0; list-style: none; }
.tl li { position: relative; padding-left: 18px; margin-bottom: 7px; font-size: 14px; color: var(--text-2); line-height: 1.5; max-width: 70ch; }
.tl li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 1px; background: var(--text-3); }
.tl li b { color: var(--text); font-weight: 600; }
.tl .where a { border-bottom: 1px solid var(--line-2); }
.tl .where a:hover { border-color: var(--ink); }

/* ---- skills ---- */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill-cat { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 22px 22px; }
.skill-cat h4 { margin: 0 0 13px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line); padding: 5px 11px; border-radius: 7px; transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.chip:hover { background: var(--ink); color: var(--card); border-color: var(--ink); transform: translateY(-1px); }
.meta-cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.meta-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.meta-card .k { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 9px; }
.meta-card .v { font-size: 14.5px; color: var(--text); line-height: 1.55; }
.meta-card .v b { font-weight: 600; }

/* ---- project cards ---- */
.proj-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease); }
.proj-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 26px 60px -34px rgba(0,0,0,0.45); }
.proj-card .pc-media { width: 100%; aspect-ratio: 16 / 9; position: relative; background: var(--black); }
.proj-card .pc-media image-slot { width: 100%; height: 100%; }
.proj-card .pc-media .pc-word { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: clamp(30px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; }
.proj-card .pc-body { padding: 22px 24px 24px; }
.proj-card .pc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.proj-card .pc-body h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.025em; }
.proj-card .pc-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.proj-card .pc-desc { margin: 12px 0 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.proj-card .pc-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.proj-card .pc-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.proj-card .pc-link .arrow { transition: transform 0.3s var(--ease); }
.proj-card .pc-link:hover .arrow { transform: translate(2px, -2px); }
.proj-card .pc-priv { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }

/* ---- project info card (overlays the profile while scrolling Projets) ---- */
.proj-info {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 3 / 4.45;
  border-radius: 18px; overflow: hidden;
  background: #0c0c0c; opacity: 0; pointer-events: none; z-index: 3;
  transition: opacity 0.5s var(--ease);
}
.profile.mode-proj .proj-info { opacity: 1; pointer-events: auto; }
.pi-bg {
  position: absolute; inset: -50px; background-size: cover; background-position: center;
  filter: blur(36px) saturate(1.15) brightness(0.5); transform: scale(1.15);
}
.pi-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,8,0.42) 0%, rgba(8,8,8,0.72) 60%, rgba(8,8,8,0.9) 100%); }
.pi-inner { position: relative; z-index: 1; height: 100%; padding: 22px 22px 20px; display: flex; flex-direction: column; color: #fff; }
.pi-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.62); }
.pi-eyebrow .ic { font-size: 12px; }
.pi-name { font-size: clamp(26px, 2vw, 34px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 18px 0 0; }
.pi-desc { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,0.82); margin: 12px 0 0; }
.pi-meta { margin-top: auto; display: flex; gap: 34px; padding-top: 20px; }
.pi-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.pi-v { font-size: 15px; font-weight: 600; margin-top: 5px; }
.pi-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.pi-tag { font-size: 12px; color: #fff; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); padding: 5px 11px; border-radius: 99px; backdrop-filter: blur(4px); }
.pi-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pi-link { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #0a0a0a; display: grid; place-items: center; font-size: 16px; transition: transform 0.25s var(--ease); }
.pi-link:hover { transform: translate(2px, -2px); }
.pi-link.is-disabled { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.7); pointer-events: none; }
.pi-count { font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: 0.1em; color: rgba(255,255,255,0.72); }

/* ---- Tech Stack rows ---- */
.stack { display: flex; flex-direction: column; }
.tech-row {
  display: grid; grid-template-columns: 56px 1fr; row-gap: 10px;
  align-items: center; gap: clamp(14px, 2vw, 26px);
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.tech-row .tech-bar { grid-column: 1 / -1; }   /* mobile: bar on its own row */
.stack .tech-row:first-child { border-top: 1px solid var(--line); }
.tech-row:hover { padding-left: 8px; }
.tech-logo {
  width: 56px; height: 56px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 6px 18px -10px rgba(0,0,0,0.3);
  display: grid; place-items: center; flex: none;
}
.tech-logo img { width: 28px; height: 28px; object-fit: contain; }
.tech-logo--glyph { font-size: 24px; color: var(--ink); }
.tech-name { display: block; font-size: clamp(18px, 1.6vw, 21px); font-weight: 600; letter-spacing: -0.02em; }
.tech-desc { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.tech-bar { position: relative; height: 46px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; }
.tech-fill {
  position: absolute; left: 0; top: 0; bottom: 0; min-width: 64px;
  background: var(--card); border-radius: 99px;
  box-shadow: 0 3px 10px -3px rgba(0,0,0,0.16), inset 0 0 0 1px var(--line);
  display: flex; align-items: center; justify-content: flex-end;
}
.tech-fill em {
  font-style: normal; font-size: 12.5px; font-weight: 600; color: #fff;
  background: #6e6e6a; border-radius: 99px; padding: 6px 11px; margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

/* compact secondary competences */
.skills.also { margin-top: 26px; }

/* ---- skill info card (overlays the profile on Tech Stack hover) ---- */
.skill-info {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 3 / 4.45;
  border-radius: 18px; overflow: hidden;
  background: #0c0c0c; opacity: 0; pointer-events: none; z-index: 4;
  transition: opacity 0.4s var(--ease);
}
.profile.mode-skill .skill-info { opacity: 1; }
.si-inner { position: relative; height: 100%; padding: 24px 22px 22px; display: flex; flex-direction: column; color: #fff; }
.si-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.si-logo { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; margin-top: 22px; }
.si-logo img { width: 28px; height: 28px; object-fit: contain; }
.si-logo.glyph { color: #0c0c0c; font-size: 24px; }
.si-name { font-size: clamp(24px, 2vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 18px 0 0; }
.si-desc { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.82); margin: 12px 0 0; }
.si-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: auto 0 0; padding-top: 18px; }
.si-tag { font-size: 12px; color: #fff; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); padding: 5px 11px; border-radius: 99px; }
.si-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.14); }
.si-cat { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.si-level { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---- skills: 5 display variants ---- */
.skills-view { min-height: 40px; }
.sk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sk-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: var(--card); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.sk-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.sk-card-h { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 13px; }
.sk-cats { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sk-cats .sk-cat { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 22px; }
.sk-cats h4 { margin: 0 0 13px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.sk-index { border-top: 1px solid var(--line); }
.sk-row { display: grid; grid-template-columns: 42px 180px 1fr; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding-left 0.3s var(--ease); }
.sk-row:hover { padding-left: 8px; }
.sk-n { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sk-cat-n { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.sk-items { font-size: 14.5px; color: var(--text-2); line-height: 1.5; }
.sk-cloud { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.sk-tag { color: var(--text); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; transition: color 0.2s var(--ease); }
.sk-tag:hover { color: var(--ink); }
.sk-tag.s1 { font-size: clamp(15px, 1.5vw, 19px); font-weight: 500; color: var(--text-3); }
.sk-tag.s2 { font-size: clamp(21px, 2.3vw, 29px); }
.sk-tag.s3 { font-size: clamp(29px, 3.4vw, 44px); letter-spacing: -0.03em; }

/* ---- work showcase (scroll-stacking cards) ---- */
.ws-stack { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 46px); }
.ws-card {
  position: sticky; top: calc(clamp(20px, 3vw, 40px) + var(--i) * 16px);
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(165deg, var(--bg) 0%, var(--card) 100%);
  box-shadow: 0 26px 64px -34px rgba(0,0,0,0.5);
  transition: box-shadow 0.4s var(--ease);
}
.ws-card img { width: 100%; height: auto; display: block; }
.ws-cap { display: none; }
.ws-detail { display: none; }

/* mobile: tap a réalisation → the info panel replaces the image (in-card) */
@media (max-width: 960px) {
  .ws-card { cursor: pointer; transition: box-shadow 0.4s var(--ease), min-height 0.45s var(--ease); }
  .ws-card.open { min-height: clamp(320px, 84vw, 440px); }

  .ws-cap { display: flex; align-items: center; gap: 12px; padding: 14px 18px 16px; }
  .ws-cap-t { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
  .ws-cap-g { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-2); }
  .ws-cap-x { flex: none; font-size: 22px; line-height: 1; color: var(--text-2); transition: transform 0.35s var(--ease), color 0.35s var(--ease); }
  .ws-card.open .ws-cap-x { transform: rotate(45deg); color: var(--ink); }

  /* info overlay sits over the image and fades in on open */
  .ws-detail { display: block; position: absolute; inset: 0; z-index: 3; background: #0c0c0c; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease); }
  .ws-card.open .ws-detail { opacity: 1; pointer-events: auto; }
  .wd-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.15) brightness(0.5); transform: scale(1.15); }
  .wd-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,8,0.42) 0%, rgba(8,8,8,0.72) 55%, rgba(8,8,8,0.9) 100%); }
  .ws-detail-in { position: relative; z-index: 1; height: 100%; min-height: clamp(320px, 84vw, 440px); display: flex; flex-direction: column; padding: 22px; color: #fff; }
  .wd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .wd-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.62); }
  .wd-close { flex: none; font-size: 24px; line-height: 1; color: rgba(255,255,255,0.7); }
  .wd-name { font-size: clamp(24px, 6.5vw, 34px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 16px 0 0; }
  .wd-desc { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.84); margin: 12px 0 0; }
  .wd-meta { display: flex; gap: 34px; margin-top: auto; padding-top: 18px; }
  .wd-k { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
  .wd-v { display: block; font-size: 14px; font-weight: 600; margin-top: 4px; }
  .wd-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
  .wd-tag { font-size: 12px; color: #fff; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); padding: 5px 11px; border-radius: 99px; }
  .wd-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .wd-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #fff; border: 1px solid rgba(255,255,255,0.35); border-radius: 99px; padding: 9px 16px; }
  .wd-link span { transition: transform 0.3s var(--ease); }
  .wd-link:active span { transform: translate(2px, -2px); }
  .wd-count { font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: 0.1em; color: rgba(255,255,255,0.72); }
}

/* ===================================================== reveal =========== */
.reveal { opacity: 0; transform: translateY(22px); filter: blur(10px); transition: opacity 0.7s var(--ease), transform 0.75s var(--ease), filter 0.75s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: blur(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
}

/* ===================================================== responsive ======= */
/* All base styles above are mobile-first; the layers below progressively
   enhance toward tablet and desktop. */

/* overlays (project / skill cards) are a desktop-only affordance */
.proj-info, .skill-info { display: none; }
/* skill alt-views collapse on phones (default view is "catégories") */
.sk-grid, .sk-row { grid-template-columns: 1fr; }
.sk-row { gap: 4px; }

/* ---- ≥ 560px : tablet portrait — two-up grids, side-by-side timeline ---- */
@media (min-width: 560px) {
  .tl { grid-template-columns: 132px 1fr; gap: clamp(16px, 2.4vw, 36px); padding: 28px 0; }
  .meta-cards { grid-template-columns: 1fr 1fr; }
  .sk-cats, .sk-grid { grid-template-columns: 1fr 1fr; }
  .tech-row { grid-template-columns: 58px minmax(150px, 1fr) minmax(160px, 1.1fr); }
  .tech-row .tech-bar { grid-column: auto; }
}

/* ---- ≥ 720px : title fits on one line, indexed skills get columns ---- */
@media (min-width: 720px) {
  .sk-index .sk-row { grid-template-columns: 42px 180px 1fr; gap: 18px; }
}

/* ---- ≥ 961px : desktop — sticky profile + two-column app layout ---- */
@media (min-width: 961px) {
  .wrap { grid-template-columns: var(--col-left) 1fr; }
  .profile { position: sticky; top: clamp(16px, 2.2vw, 28px); max-width: none; margin-inline: 0; }
  .profile-card { aspect-ratio: 3 / 4.45; }
  .proj-info, .skill-info { display: block; }
  .hero-clients { margin-top: clamp(40px, 4.5vw, 72px); max-width: none; }
  .sign { grid-column: 2 / 3; }
  .sign .w-top, .sign .w-bot { font-size: clamp(52px, 12.5vw, 150px); }
  .sign .w-bot { -webkit-text-stroke: 1.4px var(--ink); }
}

/* ---- 961–1100px : tighten the desktop side column so content keeps room ---- */
@media (min-width: 961px) and (max-width: 1100px) {
  :root { --col-left: 312px; }
}

/* ---- small phones (≤ 400px) : final tightening ---- */
@media (max-width: 400px) {
  .pc-links a { padding: 10px 6px; font-size: 12px; }
}

/* ============================================ NAV DOCK =============== */
/* Two faces of the same nav:
   · < 1280px  → floating bottom pill, 5 shortcuts (.is-m), auto-hides on
                 scroll-down and returns on scroll-up.
   · ≥ 1280px  → vertical pill on the right edge, all 7 shortcuts + to-top.
   Split by media query (not specificity) so the two never collide. */

/* ---- mobile / tablet (< 1280px): floating bottom pill, 5 shortcuts ---- */
@media (max-width: 1279.98px) {
  .dock {
    position: fixed; z-index: 60;
    left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    transition: transform 0.34s var(--ease), opacity 0.3s var(--ease);
  }
  /* hidden state when scrolling down — slides off the bottom edge */
  .dock.is-hidden {
    transform: translate(-50%, calc(100% + 30px));
    opacity: 0; pointer-events: none;
  }

  .dock-list {
    list-style: none; margin: 0; padding: 6px;
    display: flex; flex-direction: row; align-items: center; gap: 4px;
    background: color-mix(in srgb, var(--card) 82%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid var(--line-2); border-radius: 99px;
    box-shadow: 0 1px 2px rgba(12, 12, 12, 0.05),
                0 18px 42px -18px rgba(12, 12, 12, 0.34);
  }
  /* only the 5 mobile shortcuts render; hide the rest + the separator */
  .dock-i { display: none; }
  .dock-sep { display: none; }

  .dock-i.is-m {
    position: relative;
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    color: var(--text-3);
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
                transform 0.16s var(--ease);
  }
  .dock-i.is-m svg {
    width: 21px; height: 21px;
    fill: none; stroke: currentColor; stroke-width: 1.65;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .dock-i-send svg { transform: translate(0.5px, 0.5px); }
  .dock-i.is-m.is-active { color: #fff; background: var(--ink); }
  .dock-i.is-m:active { transform: scale(0.9); }
  .dock-i.is-m:focus-visible {
    outline: none; color: var(--text);
    box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink);
  }
  .dock-i::after { display: none; }        /* no hover tooltip on touch */

  .dock-top { display: none; }             /* "Accueil" doubles as to-top */
}

/* narrow phones (≤ 360px): shave the targets so 5 still fit one row */
@media (max-width: 360px) {
  .dock-i.is-m { width: 44px; height: 44px; }
  .dock-list { gap: 2px; }
}

@media (min-width: 1280px) {
  .dock {
    display: block;
    position: fixed; z-index: 60;
    right: clamp(14px, 1.4vw, 26px); top: 50%;
    transform: translateY(-50%);
  }
  .dock-list {
    list-style: none; margin: 0; padding: 7px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: var(--card);
    border: 1px solid var(--line-2); border-radius: 99px;
    box-shadow: 0 1px 2px rgba(12, 12, 12, 0.04),
                0 14px 34px -16px rgba(12, 12, 12, 0.22);
  }

  .dock-sep {
    width: 18px; height: 1px; margin: 4px 0;
    background: var(--line-2);
  }

  .dock-i {
    position: relative;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: var(--text-3);
    transition: color 0.22s var(--ease), background-color 0.22s var(--ease),
                transform 0.22s var(--ease);
  }
  .dock-i svg {
    width: 19px; height: 19px;
    fill: none; stroke: currentColor; stroke-width: 1.65;
    stroke-linecap: round; stroke-linejoin: round;
  }
  /* the send glyph reads better a touch smaller + nudged */
  .dock-i-send svg { width: 18px; transform: translate(0.5px, 0.5px); }

  .dock-i:hover { color: var(--text); background: var(--bg); }
  .dock-i:active { transform: scale(0.92); }
  .dock-i:focus-visible {
    outline: none; color: var(--text);
    box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink);
  }

  .dock-i.is-active {
    color: #fff; background: var(--ink);
  }

  /* tooltip — white pill to the LEFT, mirrors the reference "Home" chip */
  .dock-i::after {
    content: attr(data-label);
    position: absolute; right: calc(100% + 12px); top: 50%;
    transform: translateY(-50%) translateX(6px);
    padding: 6px 11px;
    font-size: 12px; font-weight: 600; letter-spacing: -0.01em;
    line-height: 1; white-space: nowrap;
    color: var(--text); background: var(--card);
    border: 1px solid var(--line-2); border-radius: 9px;
    box-shadow: 0 10px 24px -14px rgba(12, 12, 12, 0.4);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .dock-i:hover::after,
  .dock-i:focus-visible::after {
    opacity: 1; transform: translateY(-50%) translateX(0);
  }

  /* scroll-to-top — detached circle, bottom-right (reference's lower button) */
  .dock-top {
    display: grid; place-items: center;
    position: fixed; z-index: 60;
    right: clamp(14px, 1.4vw, 26px); bottom: clamp(18px, 3vh, 30px);
    width: 44px; height: 44px; padding: 0;
    color: var(--text-2); background: var(--card);
    border: 1px solid var(--line-2); border-radius: 50%;
    box-shadow: 0 1px 2px rgba(12, 12, 12, 0.04),
                0 14px 34px -16px rgba(12, 12, 12, 0.22);
    cursor: pointer;
    opacity: 0; pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.26s var(--ease), transform 0.26s var(--ease),
                color 0.22s var(--ease), border-color 0.22s var(--ease);
  }
  .dock-top svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .dock-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .dock-top:hover { color: var(--ink); border-color: var(--line); }
  .dock-top:active { transform: scale(0.92); }
  .dock-top:focus-visible {
    outline: none; color: var(--ink);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock, .dock-i, .dock-i::after, .dock-top { transition: none !important; }
}

@media print {
  .profile { position: static; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .brand-edge { display: none !important; }
  .dock, .dock-top { display: none !important; }
}
