/* ═══════════════════════════════════════════════════════════════════════
   NILINK ATELIER · main.css
   Mobile-first. Angles vifs, filets 1px, photographie et typographie
   font le travail : aucun dégradé décoratif, aucune ombre gratuite,
   aucun arrondi générique. Le rouge est un événement, pas un décor.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
::selection { background: var(--red); color: var(--bone); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--bone); color: var(--ink); padding: 0.75rem 1.25rem;
  font-family: var(--font-mono); font-size: var(--t-label); text-transform: uppercase;
}
.skip-link:focus { left: 0; }

.frame { max-width: var(--frame); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Vocabulaire typographique ────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--w-display);
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
}
.serial {           /* 001/077 : le motif graphique signature de NILINK  */
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.lede { font-size: var(--t-title); line-height: 1.35; font-weight: 400; color: var(--bone); max-width: 36ch; }
.muted { color: var(--steel); }

/* Filet rouge court : la ponctuation visuelle de la marque. */
.tick { display: block; width: 2.5rem; height: 2px; background: var(--red); }

/* ── Boutons : deux registres, pas douze ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.75rem; min-height: 3.25rem; padding: 0 2rem;
  font-family: var(--font-mono); font-size: var(--t-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  border: 1px solid var(--line-strong);
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn:hover { border-color: var(--bone); }
.btn-solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.btn-solid:hover { background: var(--red); border-color: var(--red); color: var(--bone); }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); height: 4.25rem;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-head.is-scrolled { background: rgba(8, 8, 8, 0.88); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.brand {
  font-family: var(--font-display); font-weight: 800; font-stretch: var(--w-display);
  font-size: 1.3rem; letter-spacing: 0.02em; text-transform: uppercase;
}
.site-nav { display: none; }
.lang-switch { display: flex; gap: 0.6rem; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.1em; }
.lang-switch .is-active { border-bottom: 2px solid var(--red); }
.nav-toggle { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; }
.nav-toggle span { display: block; width: 1.4rem; height: 1px; background: var(--bone); margin: 3px 0; transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast); }

@media (min-width: 60rem) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; gap: 2.5rem; }
  .site-nav a {
    font-family: var(--font-mono); font-size: var(--t-label); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.14em; color: var(--bone-60);
    padding-block: 0.4rem; border-bottom: 2px solid transparent;
    transition: color var(--dur-fast), border-color var(--dur-fast);
  }
  .site-nav a:hover { color: var(--bone); }
  .site-nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--red); }
}

/* Tiroir mobile : plein écran, noir franc, navigation en très grand.
   Monté dans <body>, jamais dans un conteneur à filter/transform.        */
.drawer {
  position: fixed; inset: 0; z-index: 150; background: var(--ink);
  display: flex; flex-direction: column; padding: 4.5rem var(--gutter) 2.5rem;
  transform: translateY(-102%); transition: transform var(--dur-base) var(--ease-cine);
  visibility: hidden;
}
.drawer.is-open { transform: translateY(0); visibility: visible; }
.drawer-close { position: absolute; top: 0.75rem; right: var(--gutter); width: 2.75rem; height: 2.75rem; display: grid; place-items: center; font-size: 1.4rem; }
.drawer nav { display: grid; gap: 0.4rem; margin-top: 1rem; }
.drawer nav a {
  font-family: var(--font-display); font-weight: 800; font-stretch: var(--w-display);
  text-transform: uppercase; font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1.12;
  color: var(--bone); border-bottom: 1px solid var(--line); padding-block: 0.55rem;
}
.drawer nav a[aria-current="page"] { color: var(--red); }
.drawer-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

/* ── Placeholders d'assets (préproduction honnête) ────────────────────
   Tant que les photos/vidéos de campagne n'existent pas, le thème
   affiche un cadre travaillé qui DIT qu'il attend l'asset : grain,
   filets, libellé mono. Jamais une fausse photo.                        */
.ph {
  position: relative; overflow: clip;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(245,243,239,0.05), transparent 55%),
    var(--ink-2);
  border: 1px solid var(--line);
}
.ph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.28) 3px 4px);
}
.ph-tag {
  position: absolute; left: 1rem; bottom: 0.9rem; z-index: 1;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--steel);
}
.ph-tag::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; background: var(--red); margin-right: 0.6rem; }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding-bottom: clamp(2rem, 6vh, 4rem); }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media .ph, .hero-media video, .hero-media img.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Couverture typographique : la campagne AVANT la campagne — un choix,
   pas un manque. Mot géant détouré + numéro signature, grain conservé. */
.hero-cover { display: grid; place-items: center; }
.hero-cover-word {
  font-size: clamp(6rem, 26vw, 24rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong);
  user-select: none; transform: rotate(-4deg);
}
.hero-cover-serial { position: absolute; right: 8%; bottom: 18%; color: var(--red); font-size: clamp(1rem, 2.4vw, 1.6rem); letter-spacing: 0.1em; }
.hero-media::after {      /* voile bas : le texte reste lisible sur toute campagne */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,8,0.25) 0%, rgba(8,8,8,0.05) 45%, rgba(8,8,8,0.92) 100%);
}
/* width:100% : enfant de grid, les marges auto de .frame le réduiraient
   au contenu et le centreraient. On force la pleine largeur de piste. */
.hero-inner { display: grid; gap: 1.5rem; width: 100%; }
.hero-word {
  font-size: var(--t-colossal); margin-left: -0.04em;
  display: flex; flex-wrap: wrap;
}
.hero-word span { display: inline-block; transform: translateY(110%); opacity: 0; }
.is-ready .hero-word span {
  transition: transform var(--dur-slow) var(--ease-cine), opacity var(--dur-slow) var(--ease-out);
  transform: translateY(0); opacity: 1;
}
.hero-claim { font-family: var(--font-display); font-stretch: var(--w-condensed); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: clamp(0.95rem, 2.4vw, 1.4rem); color: var(--bone-60); }
.hero-sub { max-width: 34ch; color: var(--steel); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.hero-scroll { position: absolute; right: var(--gutter); bottom: 1.25rem; writing-mode: vertical-rl; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.3em; color: var(--steel); text-transform: uppercase; }

/* ── Sections : charpente commune, intentions distinctes ──────────────── */
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: clamp(2rem, 6vh, 4rem); }
.section-head > * { min-width: 0; }
.section-head .display { overflow-wrap: anywhere; }
.section-index { font-family: var(--font-mono); font-size: var(--t-label); color: var(--steel); letter-spacing: 0.14em; }

/* LE DROP : composition éditoriale asymétrique. L'image domine,
   la fiche technique vit dans une colonne mono serrée.                   */
.drop-feature { display: grid; gap: 2rem; }
.drop-visual { aspect-ratio: 4 / 5; }
.drop-meta { display: grid; gap: 1.5rem; align-content: start; }
.drop-name { font-size: var(--t-display); }
.drop-specs { display: grid; border-top: 1px solid var(--line); }
.drop-specs > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; border-bottom: 1px solid var(--line); }
.drop-specs dt { font-family: var(--font-mono); font-size: var(--t-label); text-transform: uppercase; letter-spacing: 0.14em; color: var(--steel); }
.drop-specs dd { margin: 0; font-family: var(--font-mono); font-size: var(--t-small); }
.drop-specs dd.is-red { color: var(--red); }
@media (min-width: 64rem) {
  .drop-feature { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
  .drop-visual { aspect-ratio: 3 / 4; }
}

/* LA PIÈCE : visionneuse AVANT / DOS / PATCH / PASSEPORT. */
.piece-views { display: grid; gap: 1.5rem; }
.piece-stage { position: relative; aspect-ratio: 4 / 5; max-height: 72vh; }
.piece-stage .view { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.piece-stage .view.is-active { opacity: 1; }
.piece-tabs { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); }
.piece-tabs button {
  flex: 1 1 auto; min-height: 3rem; padding: 0 1rem;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--steel); border-right: 1px solid var(--line);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.piece-tabs button:last-child { border-right: 0; }
.piece-tabs button[aria-selected="true"] { color: var(--ink); background: var(--bone); }
@media (min-width: 64rem) {
  .piece-views { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
  .piece-copy { max-width: 44ch; }
}

/* AUTHENTICITÉ : trois temps, numérotés comme un protocole. */
.auth-steps { display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: step; }
.auth-step { border-bottom: 1px solid var(--line); padding: 2rem 0; display: grid; gap: 0.75rem; }
.auth-step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.14em; color: var(--red);
}
.auth-step h3 { font-family: var(--font-display); font-stretch: var(--w-display); font-weight: 700; text-transform: uppercase; font-size: var(--t-title); }
.auth-step p { color: var(--steel); max-width: 42ch; }
@media (min-width: 64rem) { .auth-steps { grid-template-columns: repeat(3, 1fr); } .auth-step { padding: 2.5rem 2rem 2.5rem 0; border-bottom: 0; } }

/* CRÉATEURS : marquee sobre d'emplacements, en attendant les vrais. */
.marquee { overflow: clip; border-block: 1px solid var(--line); padding-block: 1.75rem; }
.marquee-track { display: flex; gap: 4rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-slot { font-family: var(--font-display); font-stretch: var(--w-condensed); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bone-24); white-space: nowrap; font-size: 1.4rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* COMMUNAUTÉ : grille éditoriale décalée, pas un damier uniforme. */
.community-grid { display: grid; gap: 2px; grid-template-columns: repeat(2, 1fr); }
/* min-width/height 0 : sans eux, aspect-ratio + étirement de ligne font
   déborder les carrés hors de leur colonne (vécu au contrôle 375px). */
.community-grid .ph { aspect-ratio: 1; min-width: 0; min-height: 0; width: 100%; }
@media (min-width: 64rem) {
  .community-grid { grid-template-columns: repeat(4, 1fr); }
  .community-grid .ph:nth-child(5n) { grid-row: span 2; aspect-ratio: auto; }
}

/* PROCHAIN DROP : compte à rebours en chiffres massifs + liste d'attente. */
.next-drop { text-align: left; display: grid; gap: 2.5rem; }
.countdown { display: flex; gap: clamp(1rem, 5vw, 3rem); }
.countdown div { display: grid; gap: 0.35rem; }
.countdown b { font-family: var(--font-display); font-weight: 800; font-stretch: var(--w-display); font-size: clamp(2.6rem, 9vw, 6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); }
.waitlist { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 34rem; }
.waitlist input {
  flex: 1 1 16rem; min-height: 3.25rem; padding: 0 1.1rem;
  background: transparent; border: 1px solid var(--line-strong); color: var(--bone);
  font-family: var(--font-mono); font-size: var(--t-small);
}
.waitlist input::placeholder { color: var(--steel); }
.waitlist input:focus { outline: none; border-color: var(--bone); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; }
.foot-grid { display: grid; gap: 2.5rem; }
.foot-word { font-size: clamp(3rem, 16vw, 12rem); color: var(--ink-2); -webkit-text-stroke: 1px var(--line-strong); line-height: 0.9; user-select: none; }
.foot-cols { display: grid; gap: 2rem; }
.foot-cols nav { display: grid; gap: 0.6rem; align-content: start; }
.foot-cols a { color: var(--steel); font-size: var(--t-small); transition: color var(--dur-fast); }
.foot-cols a:hover { color: var(--bone); }
.foot-legal { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1.5rem; }
@media (min-width: 64rem) { .foot-cols { grid-template-columns: repeat(4, 1fr); } }

/* ── Révélations au scroll (IntersectionObserver, voir atelier.js) ────── */
.reveal { opacity: 0; transform: translateY(26px); }
.is-inview { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-cine); }
.reveal[data-delay="1"].is-inview { transition-delay: 90ms; }
.reveal[data-delay="2"].is-inview { transition-delay: 180ms; }
.reveal[data-delay="3"].is-inview { transition-delay: 270ms; }

/* Parallaxe discrète : UNIQUEMENT sur les médias, via transform.         */
.parallax-media { will-change: transform; }

/* ── Sélecteur de numéro (rendu par NILINK Core sur la fiche produit) ─── */
.nilink-selector { margin: 2rem 0; }
.nilink-selector-title { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); margin-bottom: 0.9rem; }
.nilink-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.nilink-cell {
  min-height: 3rem; background: var(--ink);
  font-family: var(--font-mono); font-size: var(--t-small); font-variant-numeric: tabular-nums;
  color: var(--bone); transition: background var(--dur-fast), color var(--dur-fast);
}
.nilink-cell:hover:not(:disabled) { background: var(--ink-2); }
.nilink-cell.is-selected { background: var(--red); color: var(--bone); }
.nilink-cell.is-sold { color: var(--bone-24); text-decoration: line-through; }
.nilink-cell.is-unavailable { color: var(--bone-24); }
.nilink-cell:disabled { cursor: not-allowed; }
.nilink-selector-msg { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-top: 0.75rem; min-height: 1.2em; }

/* ── Page DROPS : rangées éditoriales ─────────────────────────────────── */
.drop-list { display: grid; gap: clamp(3rem, 8vh, 5rem); }
.drop-row { display: grid; gap: 1.5rem; }
.drop-row-media { aspect-ratio: 4 / 5; max-width: 560px; }
.drop-row-media img { width: 100%; height: 100%; object-fit: cover; }
.drop-row-meta { display: grid; gap: 1rem; align-content: center; justify-items: start; }
@media (min-width: 64rem) {
  .drop-row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); }
  .drop-row:nth-child(even) .drop-row-media { order: 2; justify-self: end; }
}

/* ── Page COLLECTIONS : index typographique ───────────────────────────── */
.collections-index { width: 100%; border-collapse: collapse; max-width: 900px; }
.collections-index td { border-top: 1px solid var(--line); padding: 1.1rem 1rem 1.1rem 0; vertical-align: baseline; }
.collections-index tr:last-child td { border-bottom: 1px solid var(--line); }
.collections-index .display { font-size: clamp(1.1rem, 3vw, 1.6rem); }
.collections-index .serial { color: var(--steel); }

/* ── Page AUTHENTICITÉ : chapitres ────────────────────────────────────── */
.auth-chapter { border-top: 1px solid var(--line); padding: 2.5rem 0; display: grid; gap: 1rem; }
.auth-chapter-grid { display: grid; gap: 1.5rem; }
.auth-chapter-grid > p { max-width: 44ch; }
@media (min-width: 64rem) { .auth-chapter-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; } }

/* Maquette de passeport : TOUJOURS accompagnée de sa légende démonstration. */
.passport-demo { margin: 0; display: grid; gap: 0.75rem; max-width: 22rem; }
.passport-card {
  display: grid; gap: 0.9rem; padding: 1.75rem;
  background: var(--ink-2); border: 1px solid var(--line-strong);
}
.passport-serial { font-size: 2.2rem; color: var(--red); }

/* ── Page CONCEPT : quatre piliers ────────────────────────────────────── */
.concept-grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
.concept-grid > div { border-bottom: 1px solid var(--line); padding: 1.75rem 0; display: grid; gap: 0.6rem; }
.concept-grid p { max-width: 38ch; }
@media (min-width: 64rem) {
  .concept-grid { grid-template-columns: 1fr 1fr; column-gap: 4rem; }
}

/* ── Formulaires NILINK (liste d'attente, candidature) ────────────────── */
.nilink-wl-msg { font-family: var(--font-mono); font-size: var(--t-small); color: var(--red); letter-spacing: 0.06em; }
.nilink-wl-consent { flex-basis: 100%; font-family: var(--font-mono); font-size: var(--t-label); color: var(--steel); letter-spacing: 0.08em; margin: 0.25rem 0 0; }
.nilink-apply { max-width: 34rem; display: grid; gap: 0.5rem; }
.nilink-apply label { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); }
.nilink-apply input, .nilink-apply textarea {
  width: 100%; margin-top: 0.4rem; padding: 0.8rem 1rem;
  background: transparent; border: 1px solid var(--line-strong); color: var(--bone);
  font-family: var(--font-text); font-size: var(--t-small);
}
.nilink-apply input:focus, .nilink-apply textarea:focus { outline: none; border-color: var(--bone); }

/* ── Pages internes génériques ────────────────────────────────────────── */
.page-plain { padding-top: 9rem; }
.page-plain .entry { max-width: 68ch; }
.page-plain .entry h2 { font-family: var(--font-display); font-stretch: var(--w-display); text-transform: uppercase; font-size: var(--t-title); margin: 2.5rem 0 0.75rem; }
.page-plain .entry p { margin: 0 0 1rem; color: var(--bone-60); }
.page-plain .entry a { border-bottom: 1px solid var(--red); }
