@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:400 900;font-display:swap;src:url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2")}
@font-face{font-family:"Geist Mono";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/geist-mono-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Geist Mono";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/geist-mono-latin-500-normal.woff2") format("woff2")}

/* Layout : index de projets pleine largeur — grandes lignes typographiques,
   chaque projet a sa couleur qui remplit la ligne au survol + aperçu flottant qui suit le curseur */
:root {
  --bg: #F3F3F1;
  --fg: #111113;
  --muted: #6F6F75;
  --line: #D9D9D6;
  --chip: #E6E6E3;
  --grain-opacity: .05;
  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B0C; --fg: #EDEDEA; --muted: #8B8B90; --line: #242426; --chip: #1A1A1C; --grain-opacity: .07;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B0C; --fg: #EDEDEA; --muted: #8B8B90; --line: #242426; --chip: #1A1A1C; --grain-opacity: .07;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg);
  font-family: var(--f-display); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

/* Grain */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

.page { max-width: 1320px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); }

/* En-tête */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 18px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fade .9s var(--ease-out) both;
}
.name { font-weight: 600; font-size: 1.05rem; letter-spacing: -.02em; text-decoration: none; }
.top-right { display: flex; align-items: center; gap: 6px; }
.ghost {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  font: 500 .8rem var(--f-mono); text-transform: uppercase; letter-spacing: .04em;
  color: var(--fg); background: none; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: background .25s;
}
.ghost:hover { background: var(--chip); }
.ghost svg { width: 16px; height: 16px; }
.theme { width: 36px; padding: 0; justify-content: center; }
.theme .sun, .theme .moon { transition: transform .5s var(--ease-out), opacity .3s; transform-origin: center; }
.theme .sun { position: absolute; }
.is-dark .theme .moon, .theme .sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
.is-dark .theme .sun { opacity: 1; transform: none; }

/* Hero */
.hero { padding-block: clamp(56px, 12vw, 150px) clamp(28px, 5vw, 56px); }
h1 {
  margin: 0; display: flex; align-items: flex-start; gap: .12em;
  font-size: clamp(3.4rem, 12.5vw, 11rem); font-weight: 600; line-height: .9; letter-spacing: -.055em;
}
h1 .w { display: inline-block; overflow: hidden; padding: 0 .12em .22em; margin: 0 -.12em -.22em; }
h1 .c { display: inline-block; animation: rise 1.1s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 32ms + 120ms); }
.count {
  font: 500 clamp(.85rem, 1.4vw, 1.1rem) var(--f-mono); letter-spacing: 0; color: var(--muted);
  margin-top: .5em; animation: fade 1s var(--ease-out) .6s both;
}

/* Liste */
.list { list-style: none; margin: 0 0 clamp(80px, 12vw, 160px); padding: 0; border-top: 1px solid var(--line); }
.row {
  --c: #3046F5; --on-c: #fff;
  position: relative; isolation: isolate; border-bottom: 1px solid var(--line);
  animation: rise-row .9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 380ms);
}
.row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c);
  transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease-out);
}
.row-inner {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 15.5rem; align-items: center;
  gap: 12px 32px; padding: clamp(20px, 2.6vw, 30px) 4px;
  transition: color .35s, padding .55s var(--ease-out);
}
.row h2 { margin: 0; font-size: clamp(1.7rem, 4.2vw, 3.4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; overflow-wrap: anywhere; }
.row h2 a { text-decoration: none; }
.row h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.row p { margin: 0; color: var(--muted); max-width: 40ch; transition: color .35s; }
.actions { position: relative; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  font: 500 .75rem var(--f-mono); text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; transition: background .25s, border-color .25s, color .25s;
}
.pill svg { width: 14px; height: 14px; }
.pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.arrow {
  display: grid; place-items: center; width: 44px; height: 44px; margin-left: 6px; border-radius: 50%;
  border: 1px solid var(--line); transition: transform .55s var(--ease-out), background .35s, border-color .35s, color .35s;
}
.arrow svg { width: 18px; height: 18px; transition: transform .55s var(--ease-out); }

.thumb-inline { display: none; }

@media (hover: hover) and (pointer: fine) {
  .row:hover::before { transform: scaleY(1); }
  .row:hover .row-inner { color: var(--on-c); padding-inline: 24px 20px; }
  .row:hover p { color: color-mix(in srgb, var(--on-c) 78%, transparent); }
  .row:hover .pill { border-color: color-mix(in srgb, var(--on-c) 35%, transparent); }
  .row:hover .pill:hover { background: var(--on-c); color: var(--c); border-color: var(--on-c); }
  .row:hover .arrow { background: var(--on-c); color: var(--c); border-color: var(--on-c); transform: rotate(-45deg); }
  .list:hover .row:not(:hover) .row-inner { opacity: .45; }
  .row-inner { transition: color .35s, padding .55s var(--ease-out), opacity .4s; }
}

/* Aperçu flottant */
.preview {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  width: 300px; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
  opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.6);
  transition: opacity .3s, transform .5s var(--ease-out);
  will-change: transform;
}
.preview.on { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); }
.preview canvas, .preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }

/* Pages légales */
.legal { max-width: 720px; padding-block: clamp(40px, 8vw, 100px) 120px; outline: none; }
.legal h1 { font-size: clamp(2.6rem, 8vw, 5rem); margin-bottom: 40px; }
.legal h2 { margin: 36px 0 6px; font: 500 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legal p { margin: 0; font-size: 1.05rem; max-width: 62ch; }
.legal code { font-family: var(--f-mono); font-size: .88em; }
.ph { background: var(--chip); padding: 1px 6px; border-radius: 4px; }
.legal > * { animation: rise-row .8s var(--ease-out) both; }
.legal > *:nth-child(2) { animation-delay: .06s; }
.legal > *:nth-child(n+3) { animation-delay: .12s; }
.back { display: inline-flex; margin-bottom: 28px; }

/* Pied */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-block: 28px 36px; border-top: 1px solid var(--line);
  font: 400 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { text-decoration: none; position: relative; }
.foot a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.foot a:hover { color: var(--fg); }
.foot a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Transitions de thème / de page */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-fade::view-transition-old(root) { animation: fade-out .25s ease both; }
.vt-fade::view-transition-new(root) { animation: fade .45s var(--ease-out) both; }

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes rise-row { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}

/* Mobile / tactile */
@media (max-width: 760px), (hover: none) {
  .row-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title thumb" "desc thumb" "act act"; gap: 10px 16px; }
  .row h2 { grid-area: title; }
  .row p { grid-area: desc; }
  .actions { grid-area: act; justify-content: flex-start; }
  .arrow { display: none; }
  .thumb-inline { display: block; grid-area: thumb; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; position: relative; }
  .thumb-inline canvas, .thumb-inline img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .row:active::before { transform: scaleY(1); }
  .row:active .row-inner { color: var(--on-c); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Langue ---------- */
html[lang="fr"] [data-l="en"], html[lang="en"] [data-l="fr"] { display: none; }
.lang { width: 40px; padding: 0; justify-content: center; }
html[lang="fr"] .lg-en, html[lang="en"] .lg-fr { display: none; }
