/* ==========================================================================
   wazesservers.com : L'Atelier

   Système de formes (règle unique, appliquée partout) :
     - contrôles (boutons, jetons, langue)  : pilule (999px)
     - tuiles, rangées, blocs               : 22px (--r-lg)
     - plaques de sceau                     : 14px (--r-md), le rayon de la tuile moins sa marge
     - touches de clavier                   : 8px  (--r-sm)

   Couleur : UNE seule couleur vive, l'ambre de l'éclipse (--brand). Elle se pose en aplat,
   jamais en lueur. Seule exception : l'éclat de l'anneau autour de la photo, qui est une lumière.

   Deux états d'encre : plein pour ce qui est réel, trait seul (pointillé) pour ce qui reste
   à confirmer.

   Échelle des z-index : 100 lien d'évitement. Rien d'autre.
   ========================================================================== */

/* ---------- Polices auto-hébergées (licence OFL) ---------- */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Jetons : la nuit d'abord (scène d'usage : le soir, au divan ou au bureau de jeu) ---------- */
:root {
  color-scheme: dark light;

  --bg: #0e0c15;              /* fond de page : noir indigo */
  --surface: #1a1724;         /* tuiles, réponses */
  --surface-2: #241f31;       /* tuile choisie, bande de soutien */
  --creux: #0a0910;           /* plaque de sceau, en retrait */
  --ink: #ece7df;             /* texte principal */
  --ink-2: #c2bbcb;           /* texte secondaire */
  --ink-3: #9d95ab;           /* aides, provenance (5,9:1 sur --surface) */
  --line: rgba(236, 231, 223, 0.10);
  --line-strong: rgba(236, 231, 223, 0.24);

  --brand: #f08a24;           /* l'ambre de l'éclipse : LA couleur vive */
  --brand-hover: #f7a44c;
  --brand-ink: #14101a;       /* texte posé sur l'ambre */
  --accent-text: #f39a3d;     /* ambre lisible en texte sur fond sombre */
  --eclat: #ffd596;           /* l'éclat de l'anneau de la photo */
  --focus: #f7b066;

  --sceau-a: #d6cfdd;
  --sceau-b: #6d6580;
  --shadow-rgb: 3, 2, 8;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms;            /* retours de survol et de focus */
  --t-base: 280ms;            /* changements d'état */
  --t-slow: 520ms;            /* mise en place au premier affichage */

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --etagere: clamp(3rem, 6.5vw, 5.5rem);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ecebf2;            /* gris lilas froid, sans beige */
    --surface: #f7f6fb;
    --surface-2: #fdfcff;
    --creux: #e1dfeb;
    --ink: #17141f;
    --ink-2: #453f55;
    --ink-3: #5f5872;
    --line: rgba(23, 20, 31, 0.10);
    --line-strong: rgba(23, 20, 31, 0.26);

    --brand-hover: #e57c14;
    --brand-ink: #17141f;
    --accent-text: #a04e08;   /* 5,9:1 sur --surface */
    --eclat: var(--brand);    /* sur fond clair, un éclat pâle éteindrait l'anneau : aplat seul */
    --focus: #a04e08;

    --sceau-a: #2b2638;
    --sceau-b: #9c95ad;
    --shadow-rgb: 23, 20, 31;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
  scrollbar-color: var(--line-strong) transparent;
  accent-color: var(--brand);
  caret-color: var(--brand);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; }
strong { font-weight: 700; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }

/* Les deux langues vivent dans la page ; <html data-lang> choisit laquelle s'affiche. */
html[data-lang="en"] [data-l="fr"],
html[data-lang="fr"] [data-l="en"] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icone { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

.invisible {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.evitement {
  position: absolute; left: 1rem; top: 1rem; z-index: 100;
  padding: 0.7rem 1.1rem; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none;
  transform: translateY(-300%);
}
.evitement:focus-visible { transform: none; border-radius: 999px; }

/* ---------- Charpente : la fiche de Waze à gauche, les étagères à droite ---------- */
.atelier {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  column-gap: clamp(2rem, 4.5vw, 5rem);
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- La fiche ---------- */
.fiche {
  /* Collante. Plus haute que l'écran (petit portable), elle défile avec la page jusqu'à son bas,
     puis reste en place : rien n'y est jamais caché. --fiche-h vient de main.js. */
  position: sticky; top: 0;
  top: min(0px, calc(100dvh - var(--fiche-h, 100dvh)));
  align-self: start;
  display: flex; flex-direction: column; gap: 1.6rem;
  padding-block: clamp(1.5rem, 4.5vh, 3rem);
}

.fiche__tete { display: flex; flex-direction: column; gap: 1.4rem; }
.fiche__nom {
  font-size: clamp(3.25rem, 5.6vw, 5.25rem);
  font-weight: 800; line-height: 0.9; letter-spacing: -0.035em;
}
.fiche__ligne { margin-top: 0.9rem; color: var(--ink-2); font-size: 1rem; line-height: 1.5; max-width: 30ch; }

.fiche__acces { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.fiche__etat { color: var(--ink-2); font-size: 0.9375rem; }
.fiche__etat strong { color: var(--ink); overflow-wrap: anywhere; }
.fiche__note { display: flex; gap: 0.5rem; color: var(--ink-3); font-size: 0.875rem; line-height: 1.45; max-width: 30ch; }
.fiche__note .icone { margin-top: 0.12em; }

.fiche__nav ul { display: flex; flex-direction: column; gap: 2px; margin-inline: -0.75rem; }
.fiche__nav a {
  display: flex; align-items: center; gap: 0.7rem;
  min-height: 44px; padding: 0.45rem 0.75rem;
  border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.fiche__nav a .icone { color: var(--ink-3); transition: color var(--t-fast) var(--ease); }
.fiche__nav a[aria-current] { background: var(--surface); color: var(--ink); }
.fiche__nav a[aria-current] .icone { color: var(--accent-text); }
@media (hover: hover) {
  .fiche__nav a:hover { background: var(--surface); color: var(--ink); }
}

/* Liens de la fiche : GitHub, et le pseudo Discord à copier */
.fiche__liens { display: flex; flex-direction: column; gap: 2px; margin: 0.9rem -0.6rem 0; }
.fiche__liens li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.35rem; }
.fiche__lien, .discord__pseudo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 40px; padding: 0.35rem 0.6rem; border-radius: 999px;
  color: var(--ink-2); font-size: 0.9375rem; line-height: 1.3;
}
.fiche__lien { text-decoration: none; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.fiche__lien:focus-visible { border-radius: 999px; }
.fiche__lien .icone, .discord__pseudo .icone { color: var(--ink-3); transition: color var(--t-fast) var(--ease); }
.icone--petite { width: 1em; height: 1em; }
@media (hover: hover) {
  .fiche__lien:hover { background: var(--surface); color: var(--ink); }
  .fiche__lien:hover .icone { color: var(--ink-2); }
}
.discord__nom { color: var(--ink); -webkit-user-select: all; user-select: all; }

/* Bouton de copie : l'icône passe de « copier » à « copié » (fondu, échelle 0,25 et flou 4 px) */
.copier {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.copier[hidden] { display: none; }
.copier:focus-visible { border-radius: 50%; }
.copier:active { transform: scale(0.98); }
@media (hover: hover) { .copier:hover { background: var(--surface-2); color: var(--ink); } }
.copier__icones { display: grid; }
.copier__icones .icone {
  grid-area: 1 / 1; width: 18px; height: 18px;
  transition: opacity 300ms cubic-bezier(0.2, 0, 0, 1), scale 300ms cubic-bezier(0.2, 0, 0, 1), filter 300ms cubic-bezier(0.2, 0, 0, 1);
}
.copier__ok { color: var(--accent-text); opacity: 0; scale: 0.25; filter: blur(4px); }
.copier--fait .copier__ok { opacity: 1; scale: 1; filter: blur(0); }
.copier--fait .copier__copie { opacity: 0; scale: 0.25; filter: blur(4px); }
.copier__etat {
  flex: 0 1 auto; min-width: 0; padding-inline-start: 0.2rem;
  color: var(--accent-text); font-size: 0.8125rem; font-weight: 700; line-height: 1.35;
  opacity: 0; transition: opacity 200ms var(--ease);
}
.copier__etat.est-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .copier__icones .icone { transition-property: opacity; scale: 1 !important; filter: none !important; }
}

/* ---------- L'emblème : l'avatar de Waze dans un anneau ambre. Un arc de lumière pour le
   visiteur, l'anneau complet pour le membre. ---------- */
.embleme {
  --trait: 2px;     /* épaisseur de l'anneau */
  --ecart: 4px;     /* vide entre l'anneau et la photo */
  position: relative;
  width: clamp(128px, min(13vw, 21vh), 188px); aspect-ratio: 1;
  padding: calc(var(--trait) + var(--ecart));
}
.embleme__photo {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: #000;   /* le fond noir de l'avatar, le temps que l'image arrive */
  box-shadow: 0 12px 22px -14px rgba(var(--shadow-rgb), 0.8);
}
/* L'anneau : un dégradé conique, découpé en cercle mince par un masque. */
.embleme::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--anneau);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--trait) - 0.5px), #000 calc(100% - var(--trait) + 0.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--trait) - 0.5px), #000 calc(100% - var(--trait) + 0.5px));
}
/* Visiteur : l'arc s'allume en haut à droite, du côté de l'étoile du dessin, et s'éteint aux deux bouts. */
.embleme--visiteur { --anneau: conic-gradient(from -25deg, transparent, var(--brand) 45deg, var(--eclat) 70deg, var(--brand) 95deg, transparent 140deg); }
/* Membre : l'anneau se referme. */
.embleme--membre { --anneau: conic-gradient(from 45deg, var(--eclat), var(--brand) 50deg, var(--brand) 310deg, var(--eclat)); }

/* ---------- Contrôles : tous en pilule ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 46px; padding: 0.6rem 1.25rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.bouton:focus-visible { border-radius: 999px; }
.bouton:active { transform: scale(0.98); }
.bouton--plein { background: var(--brand); color: var(--brand-ink); }
.bouton--discret { background: var(--surface); color: var(--ink); border-color: var(--line); }
.bouton--contour { background: transparent; color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) {
  .bouton--plein:hover { background: var(--brand-hover); }
  .bouton--discret:hover { border-color: var(--line-strong); }
  .bouton--contour:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
}

.langue { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.sans-js .langue { display: none; }
.langue__choix {
  min-height: 38px; padding: 0.35rem 0.95rem;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 0.9375rem; font-weight: 500; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.langue__choix:focus-visible { border-radius: 999px; }
/* Le bouton choisi suit <html data-lang>, posé par lang.js avant l'affichage : il est juste dès la
   première image, sans attendre main.js (qui tient aria-pressed à jour). */
html[data-lang="en"] .langue__choix[data-langue="en"],
html[data-lang="fr"] .langue__choix[data-langue="fr"] { background: var(--ink); color: var(--bg); font-weight: 700; }
@media (hover: hover) { .langue__choix:hover { color: var(--ink); } }

.jeton {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 40px; padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.9375rem; color: var(--ink-2);
}
.jeton--lien {
  background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.jeton--lien .icone { color: var(--ink-3); transition: color var(--t-fast) var(--ease); }
.jeton--lien:focus-visible { border-radius: 999px; }
@media (hover: hover) {
  .jeton--lien:hover { background: var(--brand); color: var(--brand-ink); }
  .jeton--lien:hover .icone { color: inherit; }
}
@media (pointer: coarse) {
  .fiche__lien, .jeton { min-height: 44px; }
  .copier { width: 44px; height: 44px; }
}

/* ---------- Les étagères ---------- */
.etageres { min-width: 0; padding-block: clamp(1.5rem, 4.5vh, 3rem) 0; }
.etageres:focus { outline: none; }
.etagere { padding-bottom: var(--etagere); }
.etagere[hidden] { display: none; }
.etagere__tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.25rem; margin-bottom: 1.75rem; }
.etagere h2 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; }
.etagere__intro { color: var(--ink-2); }
.etagere__astuce {
  display: none; align-items: center; gap: 0.6rem;
  margin-top: 1.25rem; color: var(--ink-3); font-size: 0.9375rem;
}
@media (hover: hover) and (pointer: fine) { .js .etagere__astuce { display: flex; } }
.etagere__suite { margin-top: 1.25rem; }

/* ---------- Bibliothèque : des casiers, une place fixe par service ---------- */
.casiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 14px; }

.tuile {
  display: flex; flex-direction: column; gap: 0.9rem; height: 100%;
  padding: 8px 8px 12px; border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 rgba(var(--shadow-rgb), 0.06);
  transition: transform var(--t-base) var(--ease), background-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.tuile:focus-visible { border-radius: var(--r-lg); outline-offset: 4px; }
.tuile__texte { display: flex; flex-direction: column; gap: 0.15rem; padding-inline: 8px; min-width: 0; }
.tuile__nom { font-family: var(--font-display); font-size: 1.3125rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.tuile__genre { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }
.tuile__origine { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.tuile__pied { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; padding-inline: 8px 4px; }
.tuile__action { display: inline-flex; align-items: center; gap: 0.6rem; margin-left: auto; font-weight: 700; font-size: 0.9375rem; }

.pastille {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); color: var(--ink);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.pastille .icone { width: 16px; height: 16px; transition: transform var(--t-base) var(--ease); }

.touche {
  display: none; place-items: center; min-width: 26px; height: 26px; padding-inline: 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-sm);
  color: var(--ink-2); font: 700 0.8125rem/1 var(--font-body);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) { .js .touche { display: inline-grid; } }

/* La tuile choisie se soulève et s'allume ; les autres reculent. Au clavier comme à la souris. */
.tuile:focus-visible { transform: translateY(-4px); background: var(--surface-2); box-shadow: 0 22px 44px -24px rgba(var(--shadow-rgb), 0.85); }
.tuile:focus-visible .pastille { background: var(--brand); color: var(--brand-ink); }
.tuile:focus-visible .pastille .icone { transform: translate(1.5px, -1.5px); }
.tuile:focus-visible .sceau__grille .b { fill: var(--brand); }
.tuile:focus-visible .touche { border-color: var(--brand); color: var(--accent-text); }   /* trait seul : l'aplat reste à la pastille */
.casiers:has(.tuile:focus-visible) .tuile:not(:focus-visible) { opacity: 0.5; }
@media (hover: hover) {
  .tuile:hover { transform: translateY(-4px); background: var(--surface-2); box-shadow: 0 22px 44px -24px rgba(var(--shadow-rgb), 0.85); }
  .tuile:hover .pastille { background: var(--brand); color: var(--brand-ink); }
  .tuile:hover .pastille .icone { transform: translate(1.5px, -1.5px); }
  .tuile:hover .sceau__grille .b { fill: var(--brand); }
  .tuile:hover .touche { border-color: var(--brand); color: var(--accent-text); }
  .casiers:has(.tuile:hover) .tuile:not(:hover):not(:focus-visible) { opacity: 0.5; }
}
.tuile:active { transform: translateY(-1px) scale(0.99); }

/* Un seul service : la tuile s'allonge au lieu de flotter seule dans la grille. */
.casiers:has(> li:only-child) { grid-template-columns: minmax(0, 560px); }
.casiers:has(> li:only-child) .tuile { flex-direction: row; align-items: center; gap: 1.1rem; padding: 8px 14px 8px 8px; }
.casiers:has(> li:only-child) .sceau { width: 112px; aspect-ratio: 1; flex: none; }
.casiers:has(> li:only-child) .tuile__texte { flex: 1; padding-inline: 0; }
.casiers:has(> li:only-child) .tuile__pied { margin-top: 0; padding-inline: 0; }

/* ---------- Sceaux pixel ---------- */
.sceau {
  display: grid; place-items: center; aspect-ratio: 16 / 10;
  min-height: 0; overflow: hidden;
  border-radius: var(--r-md); background: var(--creux); color: var(--ink-3);
}
.sceau__grille { width: min(42%, 124px); height: auto; aspect-ratio: 1; shape-rendering: crispEdges; }
.rangee .sceau__grille, .casiers:has(> li:only-child) .sceau__grille { width: 62%; }
.sceau__grille .a { fill: var(--sceau-a); }
.sceau__grille .b { fill: var(--sceau-b); transition: fill var(--t-base) var(--ease); }
.sceau__lettre { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; color: var(--ink-2); }
.sceau--pret .sceau__lettre { display: none; }

/* Bibliothèque vide : les casiers en creux disent ce qui viendra s'y poser. */
.casiers--vides > li { aspect-ratio: 16 / 12; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); }
.vide__texte { margin-top: 1.5rem; max-width: 56ch; font-size: 1.125rem; }
.vide__suite { margin-top: 0.5rem; color: var(--ink-2); }

/* ---------- Projets : des rangées, comme la vue en liste d'un navigateur de mods ---------- */
.rangees { display: flex; flex-direction: column; gap: 10px; }
.rangee {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 1.1rem;
  padding: 10px 14px 10px 10px; border-radius: var(--r-lg); background: var(--surface);
  color: var(--ink); text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.rangee:focus-visible { border-radius: var(--r-lg); outline-offset: 4px; }
.rangee .sceau { width: 64px; aspect-ratio: 1; }
.rangee__texte { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.rangee__nom { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 700; line-height: 1.2; }
.rangee__genre { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.rangee__origine { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.rangee__action { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 0.9375rem; white-space: nowrap; }
.rangee:focus-visible .pastille { background: var(--brand); color: var(--brand-ink); }
.rangee:focus-visible .pastille .icone { transform: translate(1.5px, -1.5px); }
.rangee:focus-visible .sceau__grille .b { fill: var(--brand); }
@media (hover: hover) {
  .rangee:hover { background: var(--surface-2); }
  .rangee:hover .pastille { background: var(--brand); color: var(--brand-ink); }
  .rangee:hover .pastille .icone { transform: translate(1.5px, -1.5px); }
  .rangee:hover .sceau__grille .b { fill: var(--brand); }
}
.rangee:active { transform: scale(0.99); }

/* ---------- À propos ---------- */
.apropos { display: grid; gap: 1.75rem; max-width: 60rem; }
.apropos__phrase {
  font-family: var(--font-display); font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-weight: 500;
  line-height: 1.22; letter-spacing: -0.02em; max-width: 26ch;
}

.a-confirmer {
  display: flex; gap: 0.8rem; max-width: 68ch; padding: 1rem 1.25rem;
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  color: var(--ink-2); font-size: 0.9688rem;
}
.a-confirmer .icone { margin-top: 0.2em; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.reponses { display: flex; flex-direction: column; gap: 10px; max-width: 72ch; }
.reponse { border-radius: var(--r-lg); background: var(--surface); }
.reponse summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 60px; padding: 0.9rem 1.25rem; border-radius: var(--r-lg);
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1.0625rem;
}
.reponse summary::-webkit-details-marker { display: none; }
.reponse summary:focus-visible { border-radius: var(--r-lg); }
.reponse summary .icone { color: var(--ink-3); transition: transform var(--t-base) var(--ease), color var(--t-fast) var(--ease); }
.reponse[open] summary .icone { transform: rotate(180deg); color: var(--accent-text); }
.reponse__texte { padding: 0 1.25rem 1.2rem; color: var(--ink-2); max-width: 66ch; overflow-wrap: anywhere; }
.reponse__texte p + p { margin-top: 0.75rem; }

/* ---------- Soutien ---------- */
.soutien {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--r-lg); background: var(--surface-2);
}
.soutien p { margin-top: 0.5rem; color: var(--ink-2); max-width: 46ch; }

/* ---------- Pied ---------- */
.pied {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem;
  padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 0.9375rem;
}
.pied a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Mouvement : un seul moment écrit, la mise en place au premier affichage ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .casiers > li { animation: poser var(--t-slow) var(--ease) both; }
  .js .rangees > li { animation: glisser var(--t-slow) var(--ease) both; }
  .js .casiers > li:nth-child(2), .js .rangees > li:nth-child(2) { animation-delay: 45ms; }
  .js .casiers > li:nth-child(3), .js .rangees > li:nth-child(3) { animation-delay: 90ms; }
  .js .casiers > li:nth-child(4) { animation-delay: 135ms; }
  .js .casiers > li:nth-child(5) { animation-delay: 180ms; }
  .js .casiers > li:nth-child(6) { animation-delay: 225ms; }
  .js .casiers > li:nth-child(n + 7) { animation-delay: 270ms; }
  .reponse[open] .reponse__texte { animation: deplier var(--t-base) var(--ease); }
}
@keyframes poser { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes glisser { from { opacity: 0; transform: translateX(-12px); } }
@keyframes deplier { from { opacity: 0; transform: translateY(-4px); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }

/* Mouvement réduit : rien ne se déplace. La tuile ou la rangée choisie garde son fond, son ombre,
   sa pastille ambre et son sceau allumé ; la flèche de la FAQ change de sens sans tourner. */
@media (prefers-reduced-motion: reduce) {
  .tuile:hover, .tuile:focus-visible, .tuile:active,
  .rangee:active, .bouton:active, .copier:active { transform: none; }
  .pastille .icone { transition: none; transform: none !important; }
  .reponse summary .icone { transition-property: color; }
}

/* ---------- Écrans étroits : la fiche devient un en-tête, les étagères s'empilent ---------- */
@media (max-width: 900px) {
  .atelier { grid-template-columns: minmax(0, 1fr); }
  .fiche { position: static; gap: 1.25rem; padding-block: 1.25rem 0.5rem; }
  .fiche__tete { flex-direction: row; align-items: flex-start; gap: 1.1rem; }
  .embleme { width: 96px; flex: none; --ecart: 3px; }   /* photo de 86 px : le sizes du gabarit le suit */
  .fiche__identite { min-width: 0; }
  .fiche__nom { font-size: clamp(2.75rem, 12vw, 3.75rem); }
  .fiche__ligne { margin-top: 0.5rem; font-size: 0.9375rem; max-width: none; }
  .fiche__acces { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .fiche__note { max-width: none; flex-basis: 100%; }
  .fiche__nav { margin-inline: calc(var(--gutter) * -1); }
  /* Bande qui défile : l'aimantation respecte la marge (scroll-padding), et les 6 px en haut et en
     bas laissent passer l'anneau de focus, qu'un conteneur défilant rognerait sinon. */
  .fiche__nav ul {
    flex-direction: row; gap: 6px; margin: -6px 0; padding: 6px var(--gutter);
    overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  }
  .fiche__nav ul::-webkit-scrollbar { display: none; }
  .fiche__nav li { flex: none; scroll-snap-align: start; }
  .fiche__nav a { background: var(--surface); padding-inline: 1rem; }
  .etageres { padding-top: 1.5rem; }
  .rangee { grid-template-columns: 56px minmax(0, 1fr); }
  .rangee .sceau { width: 56px; }
  .rangee__action { grid-column: 2; }
  .casiers:has(> li:only-child) .tuile { flex-wrap: wrap; }
  .casiers:has(> li:only-child) .sceau { width: 84px; }
}

@media (max-width: 600px) {
  .fiche { gap: 1rem; }
  .fiche__etat { display: none; }   /* « Rebonjour, … » le dit juste en dessous : les services remontent */
  .casiers { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .casiers.casiers--vides { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* une rangée de casiers, puis le message */
  .casiers:has(> li:only-child) .tuile { flex-wrap: nowrap; }
  .tuile { flex-direction: row; align-items: center; gap: 0.9rem; padding: 8px 10px 8px 8px; }
  .tuile .sceau { width: 76px; aspect-ratio: 1; flex: none; }
  .tuile .sceau__grille { width: 62%; }
  .tuile__texte { flex: 1; padding-inline: 0; }
  .tuile__nom { font-size: 1.1875rem; }
  .js .touche, .js .etagere__astuce { display: none; }   /* fenêtre étroite : la place va au nom du service */
  .tuile__pied { margin-top: 0; padding-inline: 0; }
  .tuile__action > [data-l] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pastille { width: 44px; height: 44px; }
  .casiers:has(> li:only-child) .sceau { width: 76px; }
}

/* Très petits écrans (et zoom à 400 %) : l'emblème rapetisse et l'adresse GitHub passe sur deux
   lignes (<wbr> dans le gabarit), pour que rien ne dépasse sur le côté. */
@media (max-width: 340px) {
  .embleme { width: 76px; }   /* photo de 66 px */
}
