/* les polices, servies par le site (licence SIL OFL, voir assets/fonts/) */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
/* Le lab — le site : une banque de composants.
   En ouverture le nom et une phrase ; puis les catégories à gauche (avec leurs comptes) et, à droite, un rayon par catégorie :
   une grille de tuiles de tailles variées (bento). Une tuile ouvre la page du composant : l'aperçu en grand, son code, ses
   réglages. La page reste blanche et discrète, les composants portent la couleur. Tout ce qui se règle (couleurs, lentille,
   titres) passe par ces jetons : les composants les lisent aussi. */
:root {
  --paper: #ffffff;
  --paper-2: #eceef3;
  --paper-3: #f6f7f9;
  --line-2: rgba(21, 23, 28, 0.2);
  --ink: #15171c;
  --ink-2: #5c6170;
  --ink-3: #9a9fab;
  --blue: #1f36ff;
  --orange: #ff7a1a;
  --on-blue: #ffffff;
  --line: rgba(21, 23, 28, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-2: rgba(255, 255, 255, 0.34);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --glass-line: rgba(21, 23, 28, 0.08);
  --glass-shadow: rgba(21, 23, 28, 0.16);
  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --title-wdth: 80;
  --title-wght: 760;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1.05);
  --gutter: clamp(16px, 3.6vw, 56px);
  --max: 1480px;
  --head: 64px;
  /* le bord gauche (et droit) de la colonne de texte, pour aligner le bain sur le reste de la page */
  --col: max(var(--gutter), calc((100% - var(--max)) / 2));
  color-scheme: light;
}

/* ── socle ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  /* au doigt, rien ne se surligne en bleu quand on touche un bouton, un lien ou un composant */
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 24px + env(safe-area-inset-top, 0px));
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--paper);
}
a {
  color: inherit;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
/* les commandes et les composants ne se sélectionnent pas comme du texte (un appui long, un double tap) */
button,
.btn,
.seg,
.top,
.sheet,
.tank,
.bench,
.index,
le-scotch,
affiche-papier {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
::selection {
  background: color-mix(in srgb, var(--blue) 22%, transparent);
}
code,
pre,
kbd {
  font-family: var(--font-mono);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 60;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus {
  transform: none;
}
.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ── verre (l'interface posée sur les scènes) ── */
.glass {
  background: linear-gradient(180deg, var(--glass-bg), var(--glass-bg-2));
  backdrop-filter: blur(22px) saturate(1.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 0 0 1px var(--glass-line),
    0 24px 48px -28px var(--glass-shadow),
    0 2px 8px -3px rgba(21, 23, 28, 0.05);
}

/* contrôles segmentés : un indicateur glisse sous le choix */
.seg {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  isolation: isolate;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar {
  display: none;
}
.seg .ind {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  z-index: -1;
  opacity: 0;
  transition:
    transform 0.5s var(--ease),
    width 0.5s var(--ease),
    opacity 0.3s;
}
.seg .ind.on {
  opacity: 1;
}
.seg button,
.seg a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 540;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.25s,
    transform 0.25s var(--ease);
}
.seg button:hover,
.seg a:hover {
  color: var(--ink);
}
.seg button:active {
  transform: scale(0.96);
}
.seg [aria-pressed='true'],
.seg [aria-current='true'] {
  color: var(--paper);
}
.seg svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.85;
}
/* l'anneau de focus se dessine dedans : le bord de la rangée ne le coupe pas */
.seg :focus-visible {
  outline-offset: -3px;
}

/* boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 560;
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  transition:
    background 0.2s,
    transform 0.2s var(--ease),
    box-shadow 0.2s;
}
.btn:hover {
  box-shadow: inset 0 0 0 1px var(--ink-3);
}
.btn:active {
  transform: scale(0.97);
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.btn-ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}
.btn-ink:hover {
  box-shadow: none;
  background: color-mix(in srgb, var(--ink) 86%, var(--paper));
}
.btn-blue {
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-blue:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  filter: brightness(1.07);
}

/* ── l'en-tête : trois pastilles de verre au-dessus de tout ── */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  pointer-events: none;
}
.top > * {
  pointer-events: auto;
}
.top {
  transition: transform 0.35s var(--ease);
}
.top.away {
  transform: translateY(calc(-100% - 8px));
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 16px 0 8px;
  text-decoration: none;
  min-width: 0;
}
.mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mark svg {
  width: 19px;
  height: 19px;
  transition: transform 0.5s var(--ease);
}
.brand:hover .mark svg {
  transform: translateX(2px) rotate(-8deg);
}
.brand-t {
  min-width: 0;
}
.brand-t b {
  display: block;
  font-weight: 650;
  font-size: 15.5px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand-t small {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink-2);
  white-space: nowrap;
}
.nav {
  flex: 0 1 auto;
  min-width: 0;
}
.acts {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  flex: none;
}
.icon-btn,
.tune-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--ink);
  transition:
    background 0.2s,
    transform 0.2s var(--ease);
}
.tune-btn {
  padding: 0 14px 0 11px;
  font-weight: 560;
  font-size: 14px;
}
.icon-btn:hover,
.tune-btn:hover {
  background: var(--glass-bg);
}
.icon-btn:active,
.tune-btn:active {
  transform: scale(0.95);
}
.icon-btn svg,
.tune-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.tune-btn[aria-expanded='true'],
.menu-btn[aria-expanded='true'] {
  background: var(--ink);
  color: var(--paper);
}
.tune-btn .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px var(--paper);
}
#pauseBtn .i-play,
#pauseBtn[aria-pressed='true'] .i-pause {
  display: none;
}
#pauseBtn[aria-pressed='true'] .i-play {
  display: block;
}
.menu-btn {
  display: none;
}

/* le sommaire (écrans étroits) et les réglages : des feuilles de verre sous l'en-tête */
.sheet {
  position: fixed;
  z-index: 45;
  top: calc(var(--head) + 18px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  width: min(380px, calc(100vw - 2 * max(16px, env(safe-area-inset-left, 0px))));
  max-height: calc(100dvh - var(--head) - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 86%, transparent), color-mix(in srgb, var(--paper) 74%, transparent));
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.sheet > p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 34ch;
}
.menu-links {
  display: grid;
  gap: 2px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.menu-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.menu-links a small {
  font-weight: 450;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink-2);
}
.menu-links a:hover,
.menu-links a[aria-current='true'] {
  background: var(--glass-bg);
}
.tune fieldset {
  margin: 0;
  padding: 14px 0 16px;
  border: 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.tune legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 620;
  font-size: 14px;
}
.tune .seg {
  width: max-content;
  max-width: 100%;
  background: var(--glass-bg-2);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.tune .seg button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
}
.tune .note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.swatch {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 4px 7px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--ink-2);
  transition: background 0.2s;
}
.swatch:hover {
  background: var(--glass-bg);
}
.swatch[aria-pressed='true'] {
  background: var(--glass-bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.swatch i {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sw-paper);
  box-shadow: inset 0 0 0 1px rgba(21, 23, 28, 0.14);
  overflow: hidden;
}
.swatch i::before,
.swatch i::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.swatch i::before {
  width: 16px;
  height: 16px;
  left: 6px;
  top: 14px;
  background: var(--sw-ink);
}
.swatch i::after {
  width: 14px;
  height: 14px;
  right: 6px;
  top: 7px;
  background: var(--sw-accent);
}
.custom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.custom label {
  display: grid;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.custom input[type='color'] {
  width: 100%;
  height: 34px;
  padding: 3px;
  border: 0;
  border-radius: 12px;
  background: var(--glass-bg-2);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  cursor: pointer;
}
.custom input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}
.custom input[type='color']::-webkit-color-swatch {
  border: 0;
  border-radius: 9px;
}
.custom input[type='color']::-moz-color-swatch {
  border: 0;
  border-radius: 9px;
}
.range {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.range + .range {
  margin-top: 8px;
}
.range output {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}
.range input {
  width: 100%;
  accent-color: var(--ink);
}
.tune .reset {
  margin-top: 6px;
}

/* le message éphémère (copié, enregistré…) */
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 16px;
  font-size: 14px;
  color: var(--ink);
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease);
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ── les fiches : ce que c'est, les gestes, la balise ── */
.fiche {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(20px, 3vw, 48px);
  margin: 0;
  padding-block: 28px 0;
}
.fiche > div {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.fiche dt {
  margin-bottom: 8px;
  font-weight: 640;
  font-size: 14px;
  letter-spacing: -0.005em;
}
.fiche dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}
.fiche dd b {
  color: var(--ink);
  font-weight: 620;
}
.fiche .f-sub {
  margin-top: 22px;
}
.code {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--paper-2);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.code .t {
  color: var(--ink);
  font-weight: 700;
}
.code .a {
  color: var(--ink-2);
}
.code .v {
  color: var(--blue);
}
.code-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.weight {
  margin-left: 4px;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* le contenu des démos du scotch : un bouton, une entrée de site */
.cta {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s var(--ease);
}
.cta:active {
  transform: scale(0.97);
}
.spec-gate le-scotch {
  width: min(520px, 100%);
}
.gate {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--line),
    0 22px 40px -26px var(--glass-shadow);
}
.gate-site {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: clamp(20px, 5%, 40px);
}
.gate-site b {
  font-weight: var(--title-wght);
  font-stretch: calc(var(--title-wdth) * 1%);
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.gate-site p {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}
.gate-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  transition: transform 0.9s var(--ease) 0.12s;
}
.gate-cover b {
  font-weight: var(--title-wght);
  font-stretch: calc(var(--title-wdth) * 1%);
  font-size: clamp(48px, 9vw, 92px);
  line-height: 0.8;
  letter-spacing: -0.055em;
}
.gate-cover span {
  font-size: 14px;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}
/* le ruban parti, la porte se lève */
le-scotch[decolle] .gate-cover {
  transform: translateY(-101%);
}

/* l'éditeur du plan de site */
.planner {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
}
.field > span {
  font-size: 13px;
  color: var(--ink-2);
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s;
}
.field textarea {
  min-height: 178px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1.5px var(--blue),
    0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent);
}
.field small,
.planner > small {
  font-size: 12.5px;
  color: var(--ink-3);
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
/* les réglages de la feuille, sous les champs : des choix courts, côte à côte tant qu'il y a la place */
.field-segs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 4px;
}
.field-segs .field {
  min-width: 0;
  max-width: 100%;
}
.field-segs .seg {
  justify-self: start;
  max-width: 100%;
}


.kit {
  padding-block: clamp(96px, 12vw, 180px) 0;
}
.kit-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 5vw, 80px);
  align-items: end;
}
.kit h2 {
  font-size: clamp(40px, 6vw, 92px);
}
.kit-head p {
  margin: 0 0 16px;
  max-width: 50ch;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
}
.kit-head .btn {
  min-height: 46px;
  padding: 0 20px;
  font-size: 15px;
}
.kit-use {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 5vw, 80px);
  margin-top: 44px;
}
.kit-use h3,
.kit-list h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 640;
}
.kit-use .code {
  font-size: 13px;
}
.kit-use > div:first-child p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 60ch;
}
.where {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  margin: 0;
}
.where div {
  min-width: 0;
}
.where dt {
  font-weight: 620;
  font-size: 14.5px;
}
.where dd {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.where code,
.kit-use p code {
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.kit-list {
  margin-top: 56px;
}
.kit-table {
  width: 100%;
  border-collapse: collapse;
}
.kit-table th {
  padding: 0 12px 10px 0;
  text-align: left;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.kit-table td {
  padding: 16px 12px 16px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.kit-table tbody tr {
  transition: background 0.2s;
}
.kit-table tbody tr:hover {
  background: color-mix(in srgb, var(--paper-2) 45%, transparent);
}
.kit-table .k-name b {
  display: block;
  font-weight: 640;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.kit-table .k-name span {
  display: block;
  margin-top: 3px;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.kit-table .k-tag code {
  font-size: 13px;
  white-space: nowrap;
}
.kit-table .k-size {
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kit-table .k-acts {
  padding-right: 0;
  text-align: right;
  white-space: nowrap;
}
.kit-table .k-acts .btn {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13.5px;
}
.kit-table .k-acts .btn + .btn {
  margin-left: 6px;
}
.kit-group td {
  padding: 30px 0 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 640;
  font-size: 14px;
}

/* ── le pied de page ── */
.foot {
  margin-top: clamp(96px, 12vw, 180px);
  padding-block: 0 calc(36px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  color: var(--ink-2);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.foot p {
  margin: 0;
  max-width: 62ch;
}
.foot a {
  color: var(--ink);
}
/* ── l'en-tête : la marque, la recherche au milieu, les actions ── */
.search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  min-width: 0;
  min-height: 48px;
  margin-inline: auto;
  padding: 0 10px 0 16px;
  cursor: text;
  transition: box-shadow 0.2s;
}
.search > svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ink-3);
}
.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  border: 0;
  background: none;
  outline: none;
  font-size: 15px;
}
.search input::placeholder {
  color: var(--ink-3);
}
.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.search kbd {
  flex: none;
  padding: 1px 7px;
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-2, var(--line));
}
.search:focus-within {
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 0 0 1.5px var(--blue),
    0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent),
    0 24px 48px -28px var(--glass-shadow);
}
.search:focus-within kbd {
  display: none;
}
.top-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 560;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.top-link:hover {
  background: var(--glass-bg);
}

/* ── l'ouverture : le nom en très grand, une phrase, les comptes ── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  align-items: end;
  gap: 24px clamp(24px, 4vw, 72px);
  padding-block: calc(var(--head) + clamp(40px, 6vw, 92px) + env(safe-area-inset-top, 0px)) clamp(36px, 5vw, 72px);
}
.hero h1,
.rayon-head h2,
.fp-head h1,
.kit h2 {
  margin: 0;
  font-weight: var(--title-wght);
  font-stretch: calc(var(--title-wdth) * 1%);
  font-variation-settings: 'opsz' 96;
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-wrap: balance;
}
.hero h1 {
  font-size: clamp(76px, 15vw, 232px);
  letter-spacing: -0.055em;
  line-height: 0.8;
}
.hero-lede {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-stats {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.hero-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

/* ── la banque : les catégories à gauche, les rayons à droite ── */
.banque {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
}
.cats {
  position: sticky;
  top: calc(var(--head) + 26px + env(safe-area-inset-top, 0px));
}
.cats-t {
  margin: 0 0 10px 10px;
  font-size: 13px;
  font-weight: 640;
}
.cats ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}
.cats a:hover {
  color: var(--ink);
  background: var(--paper-3, var(--paper-2));
}
.cats a[aria-current='true'] {
  color: var(--ink);
  font-weight: 600;
  background: var(--paper-2);
}
.compte {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.rayons {
  display: grid;
  gap: clamp(64px, 8vw, 120px);
  min-width: 0;
}
.rayon {
  scroll-margin-top: calc(var(--head) + 30px + env(safe-area-inset-top, 0px));
}
.rayon-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 20px;
}
.rayon-head h2 {
  font-size: clamp(32px, 3.8vw, 56px);
}
.rayon-head .compte {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--paper-2);
}
.rayon-head p {
  flex: 1 0 100%;
  margin: 2px 0 0;
  max-width: 64ch;
  font-size: 15.5px;
  color: var(--ink-2);
}
.vide {
  margin: 0;
  padding: 40px 0;
  font-size: 17px;
  color: var(--ink-2);
}

/* ── le bento : douze colonnes ; une tuile s (4), m (6), l (8 sur deux rangs), xl (12 sur deux rangs) ── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(280px, 25vw, 340px);
  grid-auto-flow: row dense;
  gap: 14px;
}
.t-s {
  grid-column: span 4;
}
.t-m {
  grid-column: span 6;
}
.t-l {
  grid-column: span 8;
  grid-row: span 2;
}
.t-xl {
  grid-column: span 12;
  grid-row: span 2;
}
.t-w {
  grid-column: span 12;
}
.tuile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line);
  transition:
    box-shadow 0.25s,
    transform 0.4s var(--ease);
}
/* le filet de la tuile, par-dessus son contenu */
.tuile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
  transition: box-shadow 0.25s;
}
.tuile:hover {
  box-shadow: 0 22px 44px -30px var(--glass-shadow);
  transform: translateY(-2px);
}
.tuile:hover::after {
  box-shadow: inset 0 0 0 1px var(--line-2, var(--line));
}
.tuile:focus-visible {
  outline-offset: 4px;
}
.t-scene {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--paper-3, var(--paper));
}
.t-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s;
}
.t-live {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s;
}
.t-live > * {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.t-live > le-scotch {
  width: auto;
  height: auto;
}
.t-live > le-scotch[bandes] {
  width: min(78%, 460px);
}
.t-pret .t-live {
  opacity: 1;
}
.t-pret .t-vignette {
  opacity: 0;
}
/* une tuile WebGL sans vignette, avant que le composant n'arrive : un fond qui respire */
.t-sans .t-scene {
  background: linear-gradient(110deg, var(--paper-3, var(--paper-2)) 30%, var(--paper-2) 50%, var(--paper-3, var(--paper-2)) 70%) 0 0 / 300% 100%;
  animation: t-attente 1.6s ease-in-out infinite;
}
@keyframes t-attente {
  to {
    background-position: -150% 0;
  }
}
.t-ouvrir {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.2s,
    transform 0.35s var(--ease);
}
.tuile:hover .t-ouvrir,
.tuile:focus-visible .t-ouvrir {
  opacity: 1;
  transform: none;
}
.t-meta {
  display: grid;
  gap: 1px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.t-num {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 640;
  font-size: 14.5px;
  letter-spacing: -0.01em;
}
.t-new {
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 50%;
  font-size: 0;
  background: #ffd23f;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ffd23f 28%, transparent);
}
.t-nom {
  overflow: hidden;
  font-weight: 450;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.t-resume {
  display: none;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-3);
}
.t-l .t-resume,
.t-xl .t-resume {
  display: block;
}

/* ── la page d'un composant ── */
.fp {
  padding-block: calc(var(--head) + 34px + env(safe-area-inset-top, 0px)) 24px;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-3);
}
.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs [aria-current] {
  color: var(--ink);
}
.fp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 24px;
}
.fp-head h1 {
  font-size: clamp(40px, 5.8vw, 88px);
}
.fp-resume {
  margin: 12px 0 0;
  max-width: 58ch;
  font-size: 17px;
  color: var(--ink-2);
}
.fp-nav {
  display: flex;
  flex: none;
  gap: 6px;
}
.fp-nav .icon-btn {
  box-shadow: inset 0 0 0 1px var(--line);
}
.fp-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.fp-bar .seg {
  background: var(--paper-2);
  border-radius: 999px;
}
.fp-install {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s;
}
.fp-install:hover {
  background: var(--paper-2);
}
.fp-install code {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fp-install svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-2);
}
.fp-bar-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.fp-cadre::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}
.fp-cadre {
  --dot: color-mix(in srgb, var(--ink) 10%, transparent);
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(460px, 72svh, 880px);
  overflow: hidden;
  border-radius: 26px;
  background-color: var(--paper-3, var(--paper-2));
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.fp-scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  transition:
    width 0.45s var(--ease),
    height 0.45s var(--ease),
    border-radius 0.45s var(--ease);
}
.fp-cadre[data-ecran='telephone'] .fp-scene,
.fp-cadre[data-ecran='tablette'] .fp-scene {
  height: calc(100% - 44px);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px var(--line-2, var(--line)),
    0 28px 60px -34px var(--glass-shadow);
}
.fp-cadre[data-ecran='telephone'] .fp-scene {
  width: min(390px, calc(100% - 32px));
}
.fp-cadre[data-ecran='tablette'] .fp-scene {
  width: min(820px, calc(100% - 32px));
}
.fp-scene > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.fp-scene[data-enveloppe='cta'],
.fp-scene[data-enveloppe='gate'] {
  display: grid;
  place-items: center;
}
.fp-scene[data-enveloppe='cta'] > le-scotch,
.fp-scene[data-enveloppe='gate'] > le-scotch {
  position: relative;
  inset: auto;
  width: auto;
  height: auto;
}
.fp-scene[data-enveloppe='gate'] > le-scotch {
  width: min(520px, calc(100% - 48px));
}
.fp-codebox .code {
  max-height: 72svh;
  overflow: auto;
  white-space: pre;
  font-size: 13px;
}
.f-plan .planner .seg {
  justify-self: start;
  max-width: 100%;
  background: var(--paper-2);
  border-radius: 999px;
}
.field-act {
  justify-items: start;
}
.fp-voisins {
  margin-top: clamp(56px, 7vw, 96px);
}
.fp-voisins h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.bento-mini {
  grid-auto-rows: 240px;
}
.bento-mini .tuile {
  grid-column: span 3;
  grid-row: span 1;
}

/* ── tailles d'écran ── */
@media (max-width: 1180px) {
  .banque {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: clamp(260px, 34vw, 340px);
  }
  .t-s {
    grid-column: span 3;
  }
  .t-m,
  .t-l,
  .t-xl,
  .t-w {
    grid-column: span 6;
  }
  .t-l {
    grid-row: span 1;
  }
  .bento-mini .tuile {
    grid-column: span 3;
  }
}
@media (max-width: 980px) {
  .fiche {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .fiche .f-code {
    grid-column: 1 / -1;
  }
  .kit-head,
  .kit-use {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  :root {
    --head: 56px;
  }
  .top {
    gap: 8px;
  }
  .brand {
    padding-right: 8px;
  }
  .brand-t {
    display: none;
  }
  .search {
    min-height: 44px;
  }
  .search kbd,
  .top-link {
    display: none;
  }
  .tune-btn span {
    display: none;
  }
  .tune-btn {
    width: 40px;
    padding: 0;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .banque {
    grid-template-columns: minmax(0, 1fr);
  }
  .cats {
    position: static;
  }
  .cats-t {
    display: none;
  }
  .cats ul {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px)));
    padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .cats ul::-webkit-scrollbar {
    display: none;
  }
  .cats a {
    flex: none;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 12px;
  }
  .bento .tuile,
  .bento-mini .tuile {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .t-scene {
    flex: none;
    aspect-ratio: 5 / 4;
  }
  .t-ouvrir {
    display: none;
  }
  .fp-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .fp-bar-r {
    margin-left: 0;
  }
  #fpEcran {
    display: none;
  }
  .fp-cadre {
    height: min(78svh, 640px);
    border-radius: 20px;
  }
  .fiche {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .where {
    grid-template-columns: minmax(0, 1fr);
  }
  /* le tableau du kit devient une liste */
  .kit-table thead {
    display: none;
  }
  .kit-table,
  .kit-table tbody,
  .kit-table tr,
  .kit-table td {
    display: block;
  }
  .kit-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .kit-table tbody tr:hover {
    background: none;
  }
  .kit-table td {
    padding: 0;
    border: 0;
  }
  .kit-table .k-name {
    grid-column: 1 / -1;
  }
  .kit-table .k-tag {
    grid-column: 1;
  }
  .kit-table .k-size {
    grid-column: 2;
    text-align: right;
  }
  .kit-table .k-acts {
    grid-column: 1 / -1;
    text-align: left;
    margin-top: 6px;
  }
  .kit-table .kit-group {
    display: block;
    padding: 26px 0 6px;
  }
  .kit-table .kit-group td {
    padding: 0;
    border: 0;
  }
  .sheet {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: auto;
  }
}
@media (max-width: 420px) {
  .seg button,
  .seg a {
    padding: 0 12px;
    font-size: 13.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .seg .ind,
  .toast,
  .top,
  .tuile,
  .fp-scene,
  body {
    transition: none;
  }
}
