@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/inter-tight-variable-latin.woff2?v=20261003') format('woff2');
}

:root {
  --ivory: #f3efe6;
  --ink: #141311;
  --ink-soft: #5d5952;
  --font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}

/* lignes fixes : jamais dans le canvas, toujours lisibles */
.kicker, .tagline {
  margin: 0;
  text-align: center;
  font-size: clamp(11px, 1.05vw + 6px, 15px);
  font-weight: 450;
  letter-spacing: 0.22em;
  color: var(--ink);
  padding-inline: 16px;
  user-select: none;
}
.kicker { align-self: end; padding-bottom: clamp(4px, 1vh, 14px); }
.tagline { align-self: start; padding-top: clamp(4px, 1vh, 14px); color: var(--ink-soft); }

/* scène du mot */
.stage {
  position: relative;
  width: 100%;
  touch-action: pan-y;          /* glisser horizontalement déforme, le défilement vertical reste possible */
  -webkit-tap-highlight-color: transparent;
}

/* texte accessible et affichage statique de secours */
.wordmark {
  margin: 0;
  text-align: center;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.9;
  font-size: min(19.5vw, 30vh);
}
.stage canvas {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  display: block;
  opacity: 0;
}
.stage.is-ready .wordmark {
  /* reste dans l'arbre d'accessibilité, retiré visuellement */
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.stage.is-ready canvas { position: relative; opacity: 1; transition: opacity .6s ease; }

/* sélecteur de rendu (outil de comparaison, présence finale à décider) */
.modes {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(20, 19, 17, .18);
  border-radius: 999px;
  background: rgba(243, 239, 230, .8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.no-js .modes { display: none; }
.modes button {
  font: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 36px;
  cursor: pointer;
}
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--ivory); }
.modes button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.proto-note {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 16px;
  margin: 0;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

/* panneau de réglage (?debug) */
.debug {
  position: fixed; right: 12px; top: 12px;
  width: 230px; padding: 10px 12px;
  font: 11px/1.4 ui-monospace, Menlo, monospace;
  background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.15); border-radius: 8px;
}
.debug label { display: grid; grid-template-columns: 1fr 44px; gap: 4px; align-items: center; margin: 4px 0; }
.debug input { grid-column: 1 / -1; width: 100%; }
