/* Théo Blondel — portfolio. Monochrome, suisse, éditorial. */
:root {
  --bg: #f7f6f2;
  --bg-2: #ecebe6;
  --ink: #141414;
  --ink-2: #3d3d3b;
  --ink-3: #7c7c77;
  --line: #d6d5cf;
  --rule: #141414;
  --radius: 4px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  /* Dégradé du CV : orange → rouge → magenta → violet */
  --g1: #ffb347; --g2: #f0473f; --g3: #d1157a; --g4: #6b2a8c;
  --display: "Bricolage Grotesque", "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
/* Sombre uniquement si le visiteur le choisit (bouton en bas de page) */
:root[data-theme="dark"] {
  --bg: #0f0f0f; --bg-2: #1a1a1a; --ink: #f4f3ef; --ink-2: #c4c3be; --ink-3: #85847f; --line: #2b2b2b; --rule: #f4f3ef;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--font); font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 26px; height: auto; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .logo-invert { filter: invert(1); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; }
.nav .cta { color: var(--bg); background: var(--ink); padding: 8px 14px; border-radius: 999px; }
.nav .cta:hover { color: var(--bg); opacity: .85; }
.menu-btn { display: none; background: none; border: 0; color: inherit; font: inherit; padding: 8px; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: none; }
  .nav.open { display: flex; }
  .nav a { font-size: 22px; padding: 10px 0; color: var(--ink); }
  .nav .cta { margin-top: 10px; font-size: 16px; }
}

/* Hero */
.hero { padding-block: clamp(48px, 10vw, 140px) clamp(40px, 6vw, 80px); }
.hero-top { display: flex; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 4vw, 48px); flex-wrap: wrap; }
.hero h1 { font-size: clamp(56px, 13.5vw, 220px); letter-spacing: -0.055em; line-height: .86; font-weight: 800; }
.hero h1 > span { display: block; }
.hero h1 .thin { font-weight: 300; color: var(--ink-3); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 5vw, 80px); margin-top: clamp(32px, 5vw, 64px); align-items: end; }
.hero-lede { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; letter-spacing: -0.01em; margin: 0; max-width: 34ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.stat { padding: 14px 0 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.03em; line-height: 1; font-weight: 700; }
.stat span { font-size: 13px; color: var(--ink-3); }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* Section heads */
.section { padding-block: clamp(56px, 8vw, 120px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(24px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(36px, 6vw, 84px); letter-spacing: -0.045em; }
.index-num { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: inherit; font-size: 14px; color: var(--ink-2); background: transparent; border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); list-style: none; margin: 0; padding: 0; }
.card { grid-column: span 4; }
.card.wide { grid-column: span 6; }
@media (max-width: 1000px) { .card, .card.wide { grid-column: span 6; } }
@media (max-width: 600px) { .card, .card.wide { grid-column: span 12; } }
.card[hidden] { display: none; }
.card a { text-decoration: none; display: block; }
.card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); border-radius: var(--radius); position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card a:hover .thumb img { transform: scale(1.035); }
.card .meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; align-items: baseline; }
.card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.card .tags { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.card .year { font-family: var(--mono); font-size: 12px; color: var(--ink-3); flex-shrink: 0; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--bg); color: var(--ink); font-size: 12px; padding: 4px 8px; border-radius: 999px; }

/* Split / about */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 6vw, 96px); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.big-text { font-size: clamp(24px, 3vw, 40px); line-height: 1.18; letter-spacing: -0.025em; font-weight: 500; }
.big-text .muted { color: var(--ink-3); }
.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin: 1.6em 0 .6em; }
.prose h3 { font-size: 21px; margin: 1.6em 0 .5em; letter-spacing: -0.01em; }

/* Timeline / lists */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows .when { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.rows .what b { font-weight: 600; }
.rows .what span { color: var(--ink-3); }
.rows .tag { font-size: 13px; color: var(--ink-3); text-align: right; }
@media (max-width: 600px) { .rows li { grid-template-columns: 1fr; gap: 4px; } .rows .tag { text-align: left; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 14px; color: var(--ink-2); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 820px) { .cols-3 { grid-template-columns: 1fr; } }
.cols-3 h3 { font-size: 15px; margin-bottom: 12px; font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-size: clamp(18px, 2vw, 22px); font-weight: 500; position: relative; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 26px; font-weight: 300; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; }

/* Project page */
.crumbs { font-size: 14px; color: var(--ink-3); padding-top: 28px; }
.crumbs ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { text-decoration: none; }
.p-head { padding-block: clamp(32px, 6vw, 80px) clamp(28px, 4vw, 56px); }
.p-head h1 { font-size: clamp(40px, 7.5vw, 120px); letter-spacing: -0.05em; line-height: .92; max-width: 16ch; }
.p-intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 6vw, 96px); margin-top: clamp(28px, 4vw, 56px); }
@media (max-width: 820px) { .p-intro { grid-template-columns: 1fr; } }
.p-intro .lede { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.4; letter-spacing: -0.01em; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; font-size: 15px; align-content: start; border-top: 1px solid var(--ink); padding-top: 16px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-size: 15px; font-weight: 500; }
.btn:hover { opacity: .85; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.p-cover { margin-bottom: clamp(16px, 2vw, 24px); }
.p-body { display: flex; flex-direction: column; gap: clamp(8px, 1vw, 16px); }
.p-body figure { margin: 0; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; }
.p-body figure img { width: 100%; cursor: zoom-in; }
.p-body .text-block { padding: clamp(32px, 6vw, 88px) 0; display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.p-body .text-block .label { position: sticky; top: 90px; align-self: start; }
@media (max-width: 820px) { .p-body .text-block { grid-template-columns: 1fr; } .p-body .text-block .label { position: static; } }
.p-body .text-block h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 1.2em 0 .5em; }
.p-body .text-block h2:first-child { margin-top: 0; }
.p-body .text-block p { white-space: pre-line; color: var(--ink-2); max-width: 66ch; }
.embed { position: relative; width: 100%; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed.tall { max-width: 520px; margin: 0 auto; }
.lang-note { font-size: 13px; color: var(--ink-3); }
.p-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 120px); }
.p-nav a { padding: 32px 0; text-decoration: none; display: block; }
.p-nav a + a { text-align: right; border-left: 1px solid var(--line); padding-left: 16px; }
.p-nav small { display: block; color: var(--ink-3); font-size: 13px; margin-bottom: 6px; }
.p-nav strong { font-size: clamp(18px, 2.4vw, 32px); letter-spacing: -0.02em; line-height: 1.1; font-weight: 600; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgb(0 0 0 / .9); }
dialog.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; object-fit: contain; }
dialog.lightbox .close { position: fixed; top: 16px; right: 16px; background: #fff; color: #000; border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 120px) 0 32px; margin-top: clamp(56px, 8vw, 120px); }
.footer-cta { font-size: clamp(40px, 8vw, 128px); letter-spacing: -0.05em; line-height: .92; font-weight: 800; text-decoration: none; display: inline-block; }
.footer-cta:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-top: clamp(40px, 6vw, 80px); font-size: 15px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 4px 0; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-grid h2 { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; letter-spacing: 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; color: var(--ink-3); font-size: 13px; flex-wrap: wrap; }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Identité CV ---------- */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(80vw, 900px); aspect-ratio: 1; right: -18vw; bottom: -30%;
  background:
    radial-gradient(circle at 60% 60%, var(--g4) 0%, transparent 42%),
    radial-gradient(circle at 45% 50%, var(--g3) 0%, transparent 48%),
    radial-gradient(circle at 35% 40%, var(--g2) 0%, transparent 52%),
    radial-gradient(circle at 25% 30%, var(--g1) 0%, transparent 58%);
  filter: blur(60px); opacity: .9; border-radius: 50%;
}
.hero.glow::before { bottom: -25%; }
.site-footer.glow::before { right: -10vw; bottom: -40%; opacity: .75; }
.site-footer { overflow: hidden; }
body { overflow-x: clip; }

.hero h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -0.045em; line-height: .84; }
.hero h1 .kaury { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.hero-words { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4.4vw, 64px); line-height: .95; letter-spacing: -0.035em; margin: 0; }
.hero-words span { display: block; }

/* Filets épais façon CV : label à gauche, contenu à droite */
.section-head { border-top: 3px solid var(--rule); padding-top: 14px; }
.section + .section { border-top: 0; }
.cv-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; border-top: 3px solid var(--rule); padding-top: 14px; }
.cv-row > h2 { font-size: 22px; letter-spacing: -0.02em; }
@media (max-width: 820px) { .cv-row { grid-template-columns: 1fr; } }
.stats { border-top: 3px solid var(--rule); }
.facts { border-top: 3px solid var(--rule); }
.section-head h2, .p-head h1, .footer-cta { font-family: var(--display); font-weight: 800; }
.card h3 { font-family: var(--font); font-weight: 600; letter-spacing: -0.01em; }
.nav .cta { background: linear-gradient(100deg, var(--g2), var(--g3) 60%, var(--g4)); color: #fff; }
.nav .cta:hover { color: #fff; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn { background: var(--ink); }
.hl { background: linear-gradient(100deg, var(--g1), var(--g2) 35%, var(--g3) 70%, var(--g4)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(56px, 12vw, 196px); }
@media (max-width: 820px) { .hero-words { font-size: 34px; } }
.hero h1 .kaury { letter-spacing: -0.01em; -webkit-text-stroke: 1.5px var(--ink); }
.hero.glow::before { bottom: auto; top: 4%; right: -14vw; width: min(70vw, 820px); }
.stat span { color: var(--ink-2); }
@media (max-width: 820px) { .hero.glow::before { top: 18%; width: 110vw; } }

/* ---------- Typo Blondel Display (création de Théo) ---------- */
@font-face { font-family: "Blondel Display"; src: url("/fonts/blondel-display.woff2") format("woff2"); font-display: swap; }
.font-blondel { font-family: "Blondel Display", var(--display); font-weight: 400; letter-spacing: -0.01em; }
.hero h1 .kaury { color: var(--ink); -webkit-text-stroke: 0; text-transform: none; letter-spacing: 0; font-size: 1.04em; line-height: 1; }
.p-head h1.font-blondel { font-weight: 400; letter-spacing: 0; }
.kaury-title { font-size: clamp(56px, 11vw, 180px) !important; line-height: .95 !important; }

/* ---------- Logo 3D (empilement de couches = extrusion) ---------- */
.logo3d { --s: 220px; width: var(--s); aspect-ratio: 380 / 519; perspective: 900px; margin: 40px 0 0; position: relative; }
.logo3d-lg { --s: clamp(160px, 22vw, 300px); position: absolute; right: var(--gutter); top: clamp(24px, 4vw, 64px); margin: 0; }
.p-head { position: relative; }
.logo3d .stack { position: absolute; inset: 0; transform-style: preserve-3d; animation: spin3d 9s cubic-bezier(.45,.05,.55,.95) infinite; }
.logo3d i {
  position: absolute; inset: 0;
  -webkit-mask: url(/logo-mask.png) center / contain no-repeat; mask: url(/logo-mask.png) center / contain no-repeat;
  transform: translateZ(calc((var(--i) - 9) * 1.6px));
  background: color-mix(in srgb, var(--ink) calc(55% + var(--i) * 2.5%), var(--g3));
}
.logo3d i:last-child { background: linear-gradient(135deg, var(--g1), var(--g2) 35%, var(--g3) 70%, var(--g4)); }
.logo3d i:first-child { background: var(--ink); }
.logo3d-shadow { position: absolute; left: 10%; right: 10%; bottom: -14%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .18), transparent); animation: shadow3d 9s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes spin3d { 0% { transform: rotateY(-28deg) rotateX(8deg) translateY(0); } 50% { transform: rotateY(28deg) rotateX(-4deg) translateY(-10px); } 100% { transform: rotateY(-28deg) rotateX(8deg) translateY(0); } }
@keyframes shadow3d { 50% { transform: scaleX(.85); opacity: .7; } }
@media (max-width: 820px) { .logo3d { --s: 140px; } .logo3d-lg { position: relative; right: auto; top: auto; margin-top: 24px; } }

/* ---------- Sphère dégradée ---------- */
.orb { position: relative; width: clamp(160px, 18vw, 260px); aspect-ratio: 1; margin-top: 48px; }
.orb-ball { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff8 0 6%, transparent 22%), radial-gradient(circle at 35% 35%, var(--g1), var(--g2) 38%, var(--g3) 65%, var(--g4) 92%);
  box-shadow: inset -18px -24px 50px rgb(40 0 60 / .45), inset 10px 12px 30px rgb(255 255 255 / .25);
  animation: float 6s ease-in-out infinite; }
.orb-ring { position: absolute; inset: -14% -30%; border: 1.5px solid var(--ink); border-radius: 50%; transform: rotateX(72deg) rotateZ(-14deg); opacity: .55; animation: float 6s ease-in-out infinite; }
.orb-shadow { position: absolute; left: 18%; right: 18%; bottom: -18%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .2), transparent); }
@keyframes float { 50% { translate: 0 -12px; } }
.has-orb .orb-contact { position: absolute; right: var(--gutter); top: clamp(40px, 6vw, 96px); margin: 0; }
@media (max-width: 820px) { .orb { width: 140px; } .has-orb .orb-contact { position: relative; right: auto; top: auto; margin: 0 0 24px auto; } }

/* ---------- Badge rotatif ---------- */
.badge-rot { position: absolute; right: var(--gutter); top: clamp(24px, 5vw, 72px); width: clamp(110px, 12vw, 168px); aspect-ratio: 1; display: grid; place-items: center; }
.badge-rot svg { position: absolute; inset: 0; animation: rot 22s linear infinite; overflow: visible; }
.badge-rot text { font: 600 15px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; fill: var(--ink); }
.badge-rot img { width: 26%; height: auto; }
:root[data-theme="dark"] .badge-rot img { filter: invert(1); }
@keyframes rot { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .badge-rot { width: 92px; top: 16px; } .badge-rot text { font-size: 17px; } }

/* ---------- Schéma process ---------- */
.process { margin: 0 0 clamp(24px, 4vw, 48px); padding: clamp(16px, 3vw, 32px) 0; }
.process svg { width: 100%; height: auto; overflow: visible; }
.proc-n { font: 400 15px var(--mono); fill: var(--ink-3); }
.proc-t { font: 800 26px var(--display); fill: var(--ink); letter-spacing: -0.02em; }
.proc-d { font: 400 16px var(--font); fill: var(--ink-3); }
.proc-line { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s .3s cubic-bezier(.6,0,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 600px) { .proc-t { font-size: 40px; } .proc-d { display: none; } .proc-n { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .proc-line { stroke-dashoffset: 0; } }
.p-head h1.font-blondel, .section-head h2.font-blondel { font-family: "Blondel Display", var(--display); font-weight: 400; letter-spacing: 0; }
.studio-link { display: flex; justify-content: space-between; align-items: center; gap: 24px; text-decoration: none; padding: clamp(20px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); }
.studio-link .font-blondel { font-size: clamp(56px, 11vw, 176px); line-height: 1; }
.studio-link .arrow { font-size: clamp(40px, 6vw, 96px); transition: transform .3s; }
.studio-link:hover .arrow { transform: translate(8px, -8px); }
.studio-link:hover .font-blondel { background: linear-gradient(100deg, var(--g1), var(--g2) 35%, var(--g3) 70%, var(--g4)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head > a { text-decoration: none; color: var(--ink-2); }
.hero h1 .kaury { text-transform: uppercase; letter-spacing: 0.01em; font-size: 1em; }
.case-link { margin-top: clamp(40px, 6vw, 80px); border-top: 3px solid var(--rule); }
.case-link > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.case-link .font-blondel { font-size: clamp(44px, 8vw, 120px); }
.related { margin-top: clamp(56px, 8vw, 120px); }
.related .section-head h2 { font-size: clamp(28px, 4vw, 48px); }
.related .card { grid-column: span 4; }
@media (max-width: 1000px) { .related .card { grid-column: span 6; } }
@media (max-width: 600px) { .related .card { grid-column: span 12; } }
.filters button .n { font-size: 11px; opacity: .6; margin-left: 4px; }
dialog.lightbox .nav { position: fixed; top: 50%; translate: 0 -50%; background: #fff; color: #000; border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 20px; cursor: pointer; }
dialog.lightbox .prev { left: 16px; right: auto; top: 50%; padding: 0; }
dialog.lightbox .next { right: 16px; top: 50%; padding: 0; }
.hero h1 .name-blondel { text-transform: uppercase; letter-spacing: 0.01em; font-weight: 400; }
.kaury-logo { margin: clamp(16px, 2vw, 28px) 0 0; } .kaury-logo img { width: 100%; }

/* ---------- Page Stage ---------- */
.stage-stats { margin-top: 0; }
.stage-intro { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(32px, 5vw, 72px); }
.stage-intro > div { border-top: 3px solid var(--rule); padding-top: 14px; }
.stage-intro h2 { font-size: clamp(22px, 2.2vw, 30px); margin: 6px 0 14px; }
.stage-intro p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 820px) { .stage-intro { grid-template-columns: 1fr; } }

.yt { margin: 0; }
.yt figcaption { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.yt-play { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.yt-play img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.yt-play:hover img { transform: scale(1.04); opacity: .85; }
.yt-icon { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--g2), var(--g3) 60%, var(--g4)); box-shadow: 0 10px 30px rgb(0 0 0 / .35); transition: transform .3s; }
.yt-icon svg { width: 26px; margin-left: 3px; }
.yt-play:hover .yt-icon { transform: scale(1.1); }
.yt-v .yt-play { aspect-ratio: 9 / 16; border-radius: 26px; box-shadow: 0 0 0 6px var(--ink), 0 24px 50px rgb(0 0 0 / .18); }
.yt-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(16px, 2vw, 28px); padding: 6px 6px 0; }
.yt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 28px); margin-top: clamp(40px, 6vw, 80px); }
@media (max-width: 1000px) { .yt-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; } .yt-row .yt { scroll-snap-align: start; } }
@media (max-width: 600px) { .yt-grid { grid-template-columns: 1fr; } .yt-row { grid-auto-columns: 62%; } }

.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1vw, 14px); grid-auto-flow: dense; }
.photo-grid figure { margin: 0; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--bg-2); }
.photo-grid figure.land { grid-column: span 2; aspect-ratio: auto; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.photo-grid figure:hover img { transform: scale(1.03); }
@media (max-width: 700px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* Accueil : disponibilité, sélection */
.dispo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; border: 1px solid var(--ink); border-radius: 999px; padding: 5px 12px 5px 10px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.dispo i { width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 4px rgb(31 157 85 / .18); }
.dispo:hover { background: var(--ink); color: var(--bg); }
.hero-top { align-items: center; }
.hero .btn-row { margin-top: 24px; }
.grid.featured .card { grid-column: span 6; }
.grid.featured .card .thumb { aspect-ratio: 3 / 2; }
.grid.featured .card h3 { font-size: clamp(20px, 1.8vw, 26px); }
@media (max-width: 600px) { .grid.featured .card { grid-column: span 12; } }
/* Accueil : le haut de page tient dans un écran d'ordinateur portable */
@media (min-width: 821px) {
  .hero { padding-top: clamp(32px, 5vw, 72px); }
  .hero h1 { font-size: clamp(56px, 11vw, 180px); }
  .hero-grid { margin-top: clamp(24px, 3vw, 40px); }
}

/* Pages projet : paires d'images côte à côte, à hauteur égale */
.p-body .pair { display: flex; gap: clamp(8px, 1vw, 16px); align-items: flex-start; }
.p-body .pair figure { min-width: 0; }
@media (max-width: 700px) { .p-body .pair { flex-direction: column; } .p-body .pair figure { flex: none !important; width: 100%; } }

/* Accueil : portrait */
.portrait { margin: 16px 0 0; max-width: 320px; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
@media (max-width: 820px) { .portrait { max-width: 60vw; } }

/* Pages projet : galerie en grille à deux colonnes (réalisations du studio) */
.p-body .masonry { columns: 2; column-gap: clamp(8px, 1vw, 16px); }
.p-body .masonry figure { break-inside: avoid; margin-bottom: clamp(8px, 1vw, 16px); }
.p-body .masonry figure:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .p-body .masonry { columns: 1; } }
