:root {
  --ink: #0b0b0a;
  --paper: #ece8df;
  --dim: #8a867c;
  --line: #2a2926;
  --acid: #d7ff3a;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font: 400 13px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--acid); color: var(--ink); }

/* Grain de pellicule par-dessus tout */
.grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.07;
  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='.9' 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;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}

.meta { color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }

/* En-tête */
.top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.mark {
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.mark sup { font-size: 8px; color: var(--acid); }
.right { text-align: right; }
#clock { color: var(--paper); }

/* Intro */
.intro { padding: clamp(56px, 12vw, 140px) var(--gutter) clamp(40px, 7vw, 80px); }
.kicker { margin: 0 0 20px; color: var(--acid); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.intro h1 {
  margin: 0;
  font: 400 clamp(44px, 8.4vw, 132px)/0.92 var(--serif);
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.intro h1 em { color: var(--acid); }

/* Index des projets */
.index-head, .row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 260px 70px 170px;
  gap: 20px;
  align-items: center;
  padding-inline: var(--gutter);
}
.index-head {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.index-head span:last-child { text-align: right; }

.index { list-style: none; margin: 0; padding: 0; }
.index li { border-bottom: 1px solid var(--line); }

.row {
  position: relative;
  padding-block: 28px;
  color: var(--paper);
  text-decoration: none;
  isolation: isolate;
}
/* Balayage acide au survol */
.row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--acid);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}
.row:hover::before, .row:focus-visible::before { transform: scaleY(1); }
.row:hover, .row:focus-visible { color: var(--ink); outline: none; }
.row:hover .desc, .row:hover .num, .row:hover .domain, .row:hover .year,
.row:focus-visible .desc, .row:focus-visible .num { color: var(--ink); }

.num { color: var(--dim); }
.name { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.title {
  font: 400 clamp(34px, 5.2vw, 76px)/0.95 var(--serif);
  letter-spacing: -0.015em;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1), font-style 0s;
}
.row:hover .title { transform: translateX(14px); font-style: italic; }
.desc { color: var(--dim); max-width: 60ch; }
.domain, .year { color: var(--dim); }

.state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.state i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 var(--acid);
  animation: pulse 2s infinite;
}
.row:hover .state i { background: var(--ink); animation: none; }
.state-archive i, .state-maquette i { background: var(--dim); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(215 255 58 / 0.6); }
  70% { box-shadow: 0 0 0 8px rgb(215 255 58 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(215 255 58 / 0); }
}
.arrow { font-weight: 400; font-size: 18px; margin-left: 6px; transition: transform 0.3s ease; }
.row:hover .arrow { transform: translate(3px, -3px); }

.empty { color: var(--dim); padding: 48px var(--gutter); }

/* Pied de page */
.bottom { padding: clamp(80px, 14vw, 180px) var(--gutter) 0; overflow: hidden; }
.giant {
  margin: 24px 0 0;
  font: 400 clamp(110px, 30vw, 460px)/0.75 var(--serif);
  letter-spacing: -0.04em;
  color: var(--paper);
  white-space: nowrap;
  transform: translateY(14%);
}
.giant span { font-style: italic; color: var(--acid); }

@media (max-width: 860px) {
  .index-head, .row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; }
  .hide-sm { display: none; }
  .top { grid-template-columns: 1fr auto; }
  .top .meta:not(.right) { display: none; }
  .row { padding-block: 22px; align-items: start; }
  .state { font-size: 10px; padding-top: 6px; }
  .state .arrow { display: none; }
}

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