/* Anti-UX · Le musée des erreurs d'interface
 * Direction « Vrai musée » : murs clairs, typographie éditoriale, cartels, un seul accent vermillon.
 * Le musée (Fraunces + Inter, vermillon) se distingue des vitrines (interfaces web génériques, bleu, sans-serif).
 */

/* ---------- Jetons ---------- */
:root {
  /* Musée */
  --mur: #f4efe6;
  --mur-2: #ebe4d8;
  --papier: #fffdf9;
  --encre: #1b1712;
  --encre-2: #4f483f;      /* 7,4:1 sur --mur */
  --trait: #d9d0c2;
  --trait-fort: #b9ad9b;
  --vermillon: #b8361a;    /* 5,2:1 sur --mur, 5,9:1 sur blanc */
  --vermillon-fonce: #8f2711;
  --vermillon-pale: #f6ddd4;
  --vert: #2d6a3e;         /* 5,8:1 sur --mur */
  --vert-pale: #dcebdf;
  --or: #a77b2c;

  /* Vitrines : interfaces web génériques */
  --web-fond: #ffffff;
  --web-texte: #1f2328;
  --web-texte-2: #57606a;  /* 6,2:1 sur blanc */
  --web-bord: #c9ced6;
  --web-surface: #f3f5f8;
  --web-accent: #2453c7;   /* 6,5:1 sur blanc */
  --web-accent-fonce: #1a3f9e;
  --web-rouge: #c62828;
  --web-vert: #1e7a3c;

  --t-titre: 'Fraunces', Georgia, 'Times New Roman', serif;
  --t-corps: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-code: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --ombre-cadre: 0 1px 0 rgba(27, 23, 18, 0.06), 0 18px 40px -18px rgba(27, 23, 18, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--t-corps);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--mur);
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

/* Un élément caché le reste, même si un composant lui donne un display. */
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--t-titre);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--vermillon); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--vermillon-fonce); text-decoration-thickness: 2px; }

button { font: inherit; cursor: pointer; }

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

.ico {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: -0.15em;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--encre);
  color: var(--papier);
  border-radius: var(--r-sm);
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; color: var(--papier); }

/* Numéro d'inventaire : petite étiquette mono */
.inv {
  display: inline-block;
  font-family: var(--t-code);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  line-height: 1.4;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--encre-2);
}
.kicker .inv { color: var(--vermillon); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--encre);
  text-decoration: none;
  font-family: var(--t-titre);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo:hover { color: var(--encre); }

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--vermillon);
  color: #fff;
  font-family: var(--t-titre);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 2px;
  transform: rotate(-4deg);
}

.main-nav { display: flex; gap: 0.25rem; }

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  color: var(--encre);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--r-sm);
}
.main-nav a:hover { background: var(--mur-2); color: var(--encre); }
.main-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--vermillon); }

@media (max-width: 30rem) {
  .logo-text { display: none; }
  .main-nav a { padding: 0 0.45rem; font-size: 0.85rem; }
}

/* ---------- Boutons du musée ---------- */
.btn-museum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  background: var(--encre);
  color: var(--papier);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--encre);
  border-radius: 2px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-museum:hover { background: var(--vermillon); border-color: var(--vermillon); color: #fff; text-decoration: none; }
.btn-museum:active { transform: translateY(1px); }
.btn-museum.btn-ghost { background: transparent; color: var(--encre); }
.btn-museum.btn-ghost:hover { background: var(--encre); border-color: var(--encre); color: var(--papier); }

/* ---------- Accueil : hero ---------- */
.hero { padding: 3rem 0 3.5rem; }

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero-lede {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--encre-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.progress {
  margin-top: 1rem;
  font-family: var(--t-code);
  font-size: 0.8rem;
  color: var(--encre-2);
}

/* L'œuvre accrochée au mur */
.cadre {
  display: block;
  padding: 14px;
  background: #2a231b;
  background-image: linear-gradient(135deg, #3a3026 0%, #211b14 100%);
  border-radius: 2px;
  box-shadow: var(--ombre-cadre);
}

.cadre > * {
  display: block;
  background: var(--papier);
  box-shadow: inset 0 0 0 10px #f1ebe0, inset 0 0 0 11px var(--trait);
}

.hero-oeuvre { margin: 0; max-width: 26rem; justify-self: center; width: 100%; }
.hero-oeuvre .cadre { transform: rotate(0.6deg); }

.oeuvre {
  position: relative;
  padding: 2.75rem 1.75rem;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
}

.oeuvre-q { font-size: 1rem; margin-bottom: 1rem; }

.oeuvre-btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: #9a9a9a;
  color: #f0f0f0;
  font-size: 0.85rem;
  border-radius: 3px;
}

.oeuvre-cursor {
  position: absolute;
  left: 58%;
  top: 56%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--vermillon);
  animation: rage 2.4s var(--ease) infinite;
}

@keyframes rage {
  0%, 40%, 100% { transform: scale(1); opacity: 0; }
  10%, 20%, 30% { transform: scale(1.5); opacity: 1; }
  15%, 25%, 35% { transform: scale(0.8); opacity: 1; }
}

.oeuvre-count { margin-top: 1.2rem; font-size: 0.8rem; color: #777; }
.oeuvre-count strong { color: var(--vermillon); }

/* ---------- Cartel ---------- */
.cartel {
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 0 rgba(27, 23, 18, 0.05);
}

.cartel-num {
  font-family: var(--t-code);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--vermillon);
}

.cartel-mini {
  display: grid;
  gap: 0.2rem;
  max-width: 19rem;
  margin: 1.5rem auto 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  color: var(--encre-2);
}
.cartel-mini strong { font-family: var(--t-titre); font-size: 1.05rem; color: var(--encre); }

/* ---------- Comment visiter ---------- */
.visite { border-block: 1px solid var(--trait); background: var(--papier); }

.visite-steps {
  list-style: none;
  margin: 0;
  padding: 1.5rem 0;
  display: grid;
  gap: 1.25rem;
}

.visite-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  color: var(--encre-2);
  font-size: 0.95rem;
}
.visite-steps .inv { grid-row: span 2; align-self: start; color: var(--vermillon); }
.visite-steps strong { color: var(--encre); }

/* ---------- Sections ---------- */
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head h2 { margin-top: 0.9rem; font-size: clamp(2rem, 6vw, 3rem); }
.section-head > p:last-child { margin-top: 1rem; color: var(--encre-2); font-size: 1.05rem; }

/* ---------- Pièce maîtresse ---------- */
.piece-maitresse {
  padding: 4.5rem 0;
  background: var(--encre);
  color: var(--papier);
}
.piece-maitresse .kicker { color: #c9bfae; }
.piece-maitresse .kicker .inv { color: #f0a58f; }
.piece-maitresse .section-head > p:last-child { color: #d6cdbf; }

.diptyque { display: grid; gap: 2rem; }

.panneau {
  display: grid;
  gap: 1.25rem;
  color: var(--papier);
  text-decoration: none;
}
.panneau:hover { color: var(--papier); }
.panneau:hover .cadre { transform: translateY(-4px); }
.panneau .cadre { transition: transform 0.3s var(--ease); background-image: linear-gradient(135deg, #5a4a38, #3a3026); }

.panneau-text { display: grid; gap: 0.6rem; justify-items: start; }
.panneau-text strong { font-family: var(--t-titre); font-weight: 500; font-size: 1.2rem; line-height: 1.35; }
.panneau-link { display: inline-flex; align-items: center; gap: 0.4rem; color: #f0a58f; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.panneau:hover .panneau-link { color: #fff; }

/* Croquis des deux pages */
.mock { aspect-ratio: 16 / 10; padding: 1.25rem; display: flex !important; flex-direction: column; gap: 6px; }
.mock span, .mock i { display: block; border-radius: 2px; }
.mock-nav { display: flex !important; gap: 4px; margin-bottom: 6px; }
.mock-nav i { height: 8px; flex: 1; background: #c4b8a6; }
.mock-banner { height: 22px; background: #e4a08c; }
.mock-title { height: 14px; width: 55%; background: #8f8577; margin-bottom: 4px; }
.mock-field { height: 10px; background: #e3dbcf; }
.mock-btn { height: 16px; width: 35%; margin-top: auto; background: #b8361a; }
.mock-sans .mock-field { width: 92%; }
.mock-sans .mock-field:nth-child(odd) { width: 70%; }
.mock-sans .mock-btn { background: #c4b8a6; width: 20%; }
.mock-avec .mock-nav { width: 50%; margin-left: auto; }
.mock-avec .mock-field { width: 70%; height: 14px; }
.mock-avec .mock-btn { background: var(--vert); }

/* ---------- Étiquettes piège / réparé ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-family: var(--t-code);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
}
.tag-piege { background: var(--vermillon-pale); color: var(--vermillon-fonce); }
.tag-repare { background: var(--vert-pale); color: #1f4d2c; }

/* ---------- Plan du musée ---------- */
.plan { padding: 4.5rem 0 3rem; }

.aile { padding: 2rem 0; border-top: 1px solid var(--trait-fort); }

.aile-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.aile-letter {
  font-family: var(--t-titre);
  font-size: 3.5rem;
  line-height: 0.85;
  color: var(--vermillon);
}
.aile-head h3 { font-size: 1.5rem; }
.aile-head p { margin-top: 0.35rem; color: var(--encre-2); }

.salles-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.salle-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.9rem;
  height: 100%;
  min-height: 44px;
  padding: 1rem 1.1rem;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: 2px;
  color: var(--encre);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.salle-card:hover {
  color: var(--encre);
  border-color: var(--encre);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(27, 23, 18, 0.5);
}
.salle-num { grid-row: span 3; align-self: start; color: var(--vermillon); }
.salle-title { font-family: var(--t-titre); font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.salle-card-text { font-size: 0.9rem; color: var(--encre-2); }
.salle-state:empty { display: none; }
.salle-state {
  justify-self: start;
  margin-top: 0.35rem;
  font-family: var(--t-code);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vert);
}
.salle-card.is-visited { background: #f8f6f1; }
.salle-card.is-visited .salle-num { background: var(--vert); border-color: var(--vert); color: #fff; }

/* ---------- Frustromètre ---------- */
.frustrometre { padding: 3.5rem 0 4.5rem; }

.frustro-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-top: 3rem;
  border-top: 1px solid var(--trait-fort);
}
.frustro-inner h2 { margin-top: 0.9rem; font-size: clamp(1.8rem, 5vw, 2.5rem); }
.frustro-inner p:not(.kicker) { margin-top: 0.75rem; color: var(--encre-2); max-width: 34rem; }

.score-card {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-top: 3px solid var(--vermillon);
}
.score-value { font-family: var(--t-titre); font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--vermillon); font-variant-numeric: tabular-nums; }
.score-label { color: var(--encre-2); }

/* ---------- Pied de page ---------- */
.site-footer {
  padding: 2.5rem 0;
  background: var(--mur-2);
  border-top: 1px solid var(--trait);
  font-size: 0.875rem;
  color: var(--encre-2);
}
.footer-inner { display: grid; gap: 0.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--t-titre); font-size: 1.05rem; color: var(--encre); }
.footer-brand .logo-mark { width: 1.6rem; height: 1.6rem; font-size: 0.9rem; }

/* ---------- Page d'une salle ---------- */
.salle { padding-top: 1.5rem; padding-bottom: 4rem; }

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--encre-2);
}
.breadcrumb li + li::before { content: '/'; margin-right: 0.35rem; color: var(--trait-fort); }
.breadcrumb a { color: var(--encre-2); display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb a:hover { color: var(--vermillon); }
.breadcrumb [aria-current] { display: inline-flex; align-items: center; min-height: 32px; color: var(--encre); font-weight: 600; }

.salle-head { margin: 1.5rem 0 2rem; max-width: 46rem; }
.salle-head h1 { margin-top: 0.9rem; font-size: clamp(2.1rem, 7vw, 3.5rem); }
.lede { margin-top: 0.9rem; font-size: 1.15rem; color: var(--encre-2); }

/* Les deux vitrines */
.vitrines { display: grid; gap: 1.5rem; }

.vitrine {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--web-fond);
  border: 1px solid var(--trait-fort);
  border-top: 4px solid var(--vermillon);
  border-radius: 2px;
  box-shadow: var(--ombre-cadre);
}
.vitrine.good { border-top-color: var(--vert); }
.vitrine.bad.done { border-top-style: dashed; }

.vitrine-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  background: var(--papier);
  border-bottom: 1px solid var(--trait);
}
.vitrine-label h2 { font-size: 1rem; font-family: var(--t-corps); font-weight: 600; color: var(--encre-2); }

.task {
  margin: 1rem 1.1rem 0;
  padding: 0.7rem 0.9rem;
  background: #fff8e6;
  border: 1px solid #ecd9a8;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--encre);
}

/* Contenu des vitrines : un site web quelconque */
.specimen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.25rem 1.1rem 1.5rem;
  font-family: var(--t-corps);
  font-size: 0.95rem;
  color: var(--web-texte);
  overflow-wrap: anywhere;
}
.specimen-content :focus-visible { outline-color: var(--web-accent); }
.specimen-content a { color: var(--web-accent); }

/* Vitrine fermée */
/* Assez haute pour que la sortie « Ouvrir quand même » tienne dans la vitrine, même courte. */
.vitrine.good.blurred { min-height: 17rem; }

.vitrine.good.blurred .specimen-content {
  filter: blur(5px) grayscale(0.6);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.unlock-overlay {
  position: absolute;
  inset: 3.25rem 0 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(255, 253, 249, 0.55);
}
.unlock-overlay.hidden { display: none; }

.unlock-content {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  max-width: 18rem;
  padding: 1.25rem 1.4rem;
  background: var(--papier);
  border: 1px solid var(--trait-fort);
  text-align: center;
  box-shadow: 0 12px 30px -18px rgba(27, 23, 18, 0.6);
}
.unlock-title { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--t-titre); font-weight: 700; font-size: 1.1rem; }
.unlock-hint { font-size: 0.875rem; color: var(--encre-2); }

.btn-reveal {
  min-height: 44px;
  margin-top: 0.35rem;
  padding: 0 1.1rem;
  background: transparent;
  color: var(--encre);
  border: 2px solid var(--encre);
  border-radius: 2px;
  font-weight: 600;
}
.btn-reveal:hover:not(:disabled) { background: var(--encre); color: var(--papier); }
.btn-reveal:disabled { cursor: default; opacity: 0.6; }

.unlock-status { min-height: 1.5rem; margin-top: 0.75rem; font-size: 0.9rem; color: var(--vert); font-weight: 500; }

/* Cartel de la salle */
.salle .cartel { margin-top: 1.5rem; max-width: 46rem; position: relative; }
.salle .cartel::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; bottom: -1px;
  width: 4px;
  background: var(--encre);
}
.salle .cartel dl { margin: 0.75rem 0 0; display: grid; gap: 1.1rem; }
.salle .cartel dt { font-family: var(--t-code); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-2); }
.salle .cartel dd { margin: 0.25rem 0 0; }
.cartel-rule dd { font-family: var(--t-titre); font-size: 1.2rem; line-height: 1.4; font-weight: 500; }

/* Code avant / après */
.code-section {
  margin-top: 1.5rem;
  border: 1px solid var(--trait);
  background: var(--papier);
  border-radius: 2px;
}
.code-section summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  font-weight: 600;
  cursor: pointer;
}
.code-section summary:hover { color: var(--vermillon); }
.code-section[open] summary { border-bottom: 1px solid var(--trait); }

.code-comparison { display: grid; gap: 1.25rem; padding: 1.25rem; }
.code-item { min-width: 0; display: grid; gap: 0.6rem; align-content: start; }
.code-item h3 { font-family: var(--t-corps); font-size: 0.9rem; font-weight: 600; color: var(--encre-2); }

.code-block {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: #211c16;
  color: #f1e9dc;
  font-family: var(--t-code);
  font-size: 0.8rem;
  line-height: 1.6;
  border-radius: 2px;
  tab-size: 2;
}

/* Salles voisines */
.pager {
  display: grid;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--trait-fort);
}
.pager-link {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--trait);
  background: var(--papier);
  color: var(--encre);
  text-decoration: none;
  border-radius: 2px;
}
.pager-link:hover { border-color: var(--encre); color: var(--encre); }
.pager-link.next { text-align: right; justify-items: end; }
.pager-dir { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--vermillon); font-weight: 600; }
.pager-title { font-family: var(--t-titre); font-weight: 700; font-size: 1.05rem; }
.pager-title .inv { font-size: 0.7rem; vertical-align: 0.15em; margin-right: 0.25rem; color: var(--encre-2); }

/* ---------- Largeurs ---------- */
@media (min-width: 40rem) {
  .visite-steps { grid-template-columns: repeat(3, 1fr); padding: 2rem 0; }
  .salles-grid { grid-template-columns: repeat(2, 1fr); }
  .pager { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-inner p:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}

@media (min-width: 56rem) {
  .hero { padding: 5rem 0 5.5rem; }
  .hero-inner { grid-template-columns: 1.25fr 1fr; gap: 4rem; }
  .diptyque { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .salles-grid { grid-template-columns: repeat(3, 1fr); }
  .vitrines { grid-template-columns: 1fr 1fr; }
  .code-comparison { grid-template-columns: 1fr 1fr; }
  .frustro-inner { grid-template-columns: 1.4fr 1fr; }
  .aile-head { grid-template-columns: 5rem 1fr; }
  .aile-letter { font-size: 4.5rem; }
}

/* =====================================================================
 * Composants des vitrines (interfaces web génériques, version ratée ou corrigée)
 * ===================================================================== */

.specimen-content input:not([type="checkbox"]):not([type="radio"]),
.specimen-content select,
.specimen-content textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--web-texte);
  background: #fff;
  border: 1px solid #8c959f;
  border-radius: 6px;
}
.specimen-content input[aria-invalid="true"] { border-color: var(--web-rouge); box-shadow: 0 0 0 1px var(--web-rouge); }
.specimen-content label { font-weight: 600; font-size: 0.9rem; }
.specimen-content fieldset { min-width: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: var(--web-texte);
  background: var(--web-surface);
  border: 1px solid var(--web-bord);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover:not(:disabled) { background: #e6eaf0; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--web-accent); border-color: var(--web-accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--web-accent-fonce); }
.btn-ambre { background: #f0b429; border-color: #f0b429; color: #1f2328; }
.btn-ambre:hover:not(:disabled) { background: #de9e10; }
.btn-rouge { background: var(--web-rouge); border-color: var(--web-rouge); color: #fff; }
.btn-rouge:hover:not(:disabled) { background: #a51f1f; }
.btn-vert { background: var(--web-vert); border-color: var(--web-vert); color: #fff; }
.btn-vert:hover:not(:disabled) { background: #176030; }
.btn-muet { background: #fff; }
.btn-gris { background: #e1e4e8; color: #6a737d; border-color: #e1e4e8; }
.btn-sm { min-height: 36px; padding: 0.35rem 0.8rem; font-size: 0.875rem; }
.btn-big { padding: 0.9rem 1.8rem; font-size: 1.1rem; }

.link-plain {
  min-height: 44px;
  padding: 0 0.25rem;
  background: none;
  border: 0;
  color: var(--web-accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
}

.demo-form { display: flex; flex-direction: column; gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.hint { font-size: 0.85rem; color: var(--web-texte-2); }
.hint.ok { color: var(--web-vert); }
.field-error { font-size: 0.85rem; color: var(--web-rouge); font-weight: 500; }
.field-error:empty { display: none; }
.form-success { color: var(--web-vert); font-weight: 600; }
.form-success:empty { display: none; }
.demo-label { font-weight: 700; }

.error-message,
.error-banner {
  padding: 0.6rem 0.8rem;
  background: #fdecea;
  border: 1px solid var(--web-rouge);
  border-radius: 6px;
  color: #8a1c1c;
}

.error-summary { padding: 0.75rem 1rem; border: 2px solid var(--web-rouge); border-radius: 6px; background: #fff7f6; }
.error-summary p { margin: 0 0 0.25rem; font-weight: 700; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: #8a1c1c; }

.notice { padding: 0.75rem 1rem; border-radius: 6px; background: #eef3fd; border: 1px solid #a9bff0; }
.notice.warn { background: #fff8e6; border-color: #e7c66a; }
.notice.ok { background: #e9f6ee; border-color: #8fcaa4; }

.backstage {
  font-family: var(--t-code);
  font-size: 0.8rem;
  color: var(--web-texte-2);
  padding-top: 0.6rem;
  border-top: 1px dashed var(--web-bord);
}
.backstage:empty { display: none; }
.sr-sim { font-family: var(--t-code); font-size: 0.8rem; color: #1f4d2c; background: #e9f6ee; padding: 0.4rem 0.6rem; border-radius: 4px; }
.sr-sim:empty { display: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.toolbar.wrap .btn { flex: 0 0 auto; }

.check { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.check input, .methods input { width: 1.2rem; height: 1.2rem; accent-color: var(--web-accent); }

.methods { margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--web-bord); border-radius: 6px; display: flex; flex-direction: column; gap: 0.25rem; }
.methods label { display: flex; align-items: center; gap: 0.5rem; min-height: 36px; font-weight: 400; }

.cookie-banner, .cookie-correct, .fake-site, .recap, .doc, .session-box, .card-item, .wizard-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--web-surface);
  border: 1px solid var(--web-bord);
  border-radius: 8px;
}

.cookie-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-options .btn { flex: 1 1 8rem; }

/* Lien minuscule : volontairement mauvais */
.link-tiny { align-self: center; background: none; border: 0; padding: 0.1rem; font-size: 0.7rem; color: #a0a0a0; }

.cookie-settings { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.cookie-settings label { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }

.tracker-count { font-family: var(--t-code); font-size: 0.85rem; }
.consent-bar { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--web-bord); }

/* Placeholder seul : gris pâle volontaire */
.input-ph::placeholder { color: #b0b0b0; }

/* Menu */
.demo-menu { position: relative; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.demo-submenu { list-style: none; margin: 0; padding: 0.35rem; min-width: 12rem; background: #fff; border: 1px solid var(--web-bord); border-radius: 8px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.3); }
.demo-submenu a { display: flex; align-items: center; min-height: 44px; padding: 0 0.75rem; color: var(--web-texte); border-radius: 6px; text-decoration: none; }
.demo-submenu a:hover, .demo-submenu a:focus-visible { background: var(--web-surface); }

/* Chargements */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e1e4e8;
  border-top-color: var(--web-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-box { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; }
.loader-box progress, .activity progress { width: 100%; height: 0.9rem; accent-color: var(--web-accent); }

.orders { min-height: 1.5rem; }
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.order-list li { padding: 0.6rem 0.75rem; background: var(--web-surface); border-radius: 6px; min-height: 2.6rem; font-size: 0.9rem; }
.order-list.skeleton li { background: linear-gradient(90deg, #eceff3, #f7f8fa, #eceff3); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.after-zone { font-size: 0.85rem; color: var(--web-texte-2); }
@keyframes shimmer { to { background-position: -200% 0; } }

.activity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.activity p { flex: 1 1 12rem; font-family: var(--t-code); font-size: 0.85rem; }
.pulse-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--web-vert); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Lisibilité */
.text-low-contrast { color: #c4c4c4; background: #fff; padding: 1rem; border: 1px solid #eee; border-radius: 6px; }
.contrast-small { font-size: 0.75rem; }
.contrast-title { font-weight: 700; }
.text-high-contrast { font-size: 1rem; color: var(--web-texte); padding: 1rem; border: 1px solid var(--web-bord); border-radius: 6px; }
.contrast-ratio { font-family: var(--t-code); font-size: 0.85rem; }
.contrast-ratio.bad { color: var(--web-rouge); }
.contrast-ratio.good { color: var(--web-vert); }
.quiz { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quiz legend { font-weight: 600; margin-bottom: 0.5rem; }

/* Barre de progression */
.bar-visual { height: 0.9rem; background: #e1e4e8; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--web-accent); }

/* Clavier PIN */
.pin { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.pin-dots { font-family: var(--t-code); font-size: 1.4rem; letter-spacing: 0.2em; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 3.25rem); gap: 0.5rem; }
.pin-pad .btn { padding: 0; }
.buzz { animation: buzz 0.4s linear; }
@keyframes buzz {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* Listes filtrées et suggestions */
.filter-list, .suggest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.filter-item { width: 100%; min-height: 44px; text-align: left; padding: 0 0.75rem; background: #fff; color: var(--web-texte); border: 1px solid var(--web-bord); border-radius: 6px; }
.filter-item:hover { border-color: var(--web-accent); }
.suggest-item { padding: 0.4rem 0.6rem; background: #fff; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.combo .suggest li { padding: 0.6rem 0.75rem; background: var(--web-surface); border-radius: 6px; cursor: pointer; }
.combo .suggest li[aria-selected="true"] { outline: 2px solid var(--web-accent); }
.suggest mark { background: #fff1b8; color: inherit; }

/* Fichiers */
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; background: var(--web-surface); border-radius: 6px; flex-wrap: wrap; }
.file-actions { display: flex; gap: 0; }
.file-actions.spaced { gap: 0.75rem; }
.icon-btn { width: 1.6rem; height: 1.6rem; padding: 0; font-size: 0.85rem; background: #e1e4e8; color: var(--web-texte); border: 0; border-radius: 3px; }

.toast { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.9rem; background: #1f2328; color: #fff; border-radius: 8px; }
.toast .link-plain { color: #9ec1ff; }
.toast[hidden] { display: none; }

/* Récapitulatif */
.recap-line { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.recap-line.total { border-top: 1px solid var(--web-bord); padding-top: 0.5rem; }
.notif-pile { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; }

/* Éditeur et voile bloquant */
.editor { position: relative; display: flex; flex-direction: column; gap: 0.4rem; }
.editor-veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(31, 35, 40, 0.85); color: #fff; border-radius: 6px; text-align: center; }
.editor-veil[hidden] { display: none; }
.save-status { font-size: 0.85rem; color: var(--web-texte-2); }

/* Favoris */
.wizard { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; border: 1px dashed #8c959f; border-radius: 6px; }
.wizard[hidden] { display: none; }
.wizard-step { font-weight: 700; font-size: 0.9rem; color: var(--web-accent); }
.fav-btn[aria-pressed="true"] { background: #fdecea; border-color: var(--web-rouge); color: #8a1c1c; }

/* Nouveautés */
.mini-app { position: relative; min-height: 12rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mini-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.mini-menu li { display: flex; align-items: center; gap: 0.5rem; min-height: 2rem; }
.badge-loud { padding: 0.1rem 0.4rem; font-size: 0.65rem; font-weight: 800; background: var(--web-rouge); color: #fff; border-radius: 3px; animation: pulse-scale 1.2s ease-in-out infinite; }
.badge-quiet { padding: 0.05rem 0.45rem; font-size: 0.75rem; border: 1px solid var(--web-accent); color: var(--web-accent); border-radius: 999px; }
.mini-popup { position: absolute; inset: 1rem 0.5rem auto; padding: 1rem; background: #fff; border: 2px solid var(--web-accent); border-radius: 10px; text-align: center; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.35); }
.mini-popup[hidden] { display: none; }
.mini-popup p { margin: 0 0 0.5rem; }
@keyframes pulse-scale { 50% { transform: scale(1.12); } }

/* Article et mode lecture */
.article-frame { position: relative; padding: 1rem; background: #fafafa; color: #222; border: 1px solid #e5e5e5; border-radius: 6px; min-height: 13rem; overflow: hidden; }
.article-frame h4 { margin: 0 0 0.5rem; }
.article-frame p { margin: 0 0 0.5rem; }
.promo-sticky { padding: 0.4rem; background: var(--web-rouge); color: #fff; font-weight: 700; text-align: center; border-radius: 3px; }
.promo-sticky.soft { background: #eceff3; color: #333; font-weight: 400; }
.share-col { position: absolute; right: 0.4rem; top: 3.5rem; writing-mode: vertical-rl; background: #3b5998; color: #fff; padding: 0.4rem 0.2rem; font-size: 0.8rem; }
.newsletter-pop { position: absolute; inset: auto 0.5rem 0.5rem; padding: 0.9rem 2rem 0.9rem 0.9rem; background: #fff; border: 2px solid #222; border-radius: 6px; }
.newsletter-pop[hidden] { display: none; }
.close-tiny { position: absolute; top: 0.15rem; right: 0.15rem; width: 1.1rem; height: 1.1rem; padding: 0; font-size: 0.75rem; line-height: 1; background: none; border: 0; color: #bbb; }
.article-frame.reader { background: #fbf7ef; max-width: 65ch; line-height: 1.75; }

/* Parcours en étapes */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; font-size: 0.9rem; }
.stepper button[aria-current="step"] { color: var(--web-texte); font-weight: 700; text-decoration: none; }
.stepper button:disabled { color: #8c959f; text-decoration: none; cursor: default; }

/* Aide */
.help-zone { display: flex; flex-direction: column; gap: 0.5rem; }
.help-zone[hidden], .help-page[hidden] { display: none; }
.help-page { padding: 1rem; background: #fafafa; color: #222; border: 1px solid #e5e5e5; border-radius: 6px; }
.help-page p { margin: 0 0 0.5rem; }
.label-row { display: flex; align-items: center; gap: 0.5rem; }
.tip-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--web-accent); background: transparent; color: var(--web-accent); font-weight: 800; }
.tip { padding: 0.6rem 0.8rem; background: #eef3fd; border-left: 3px solid var(--web-accent); font-size: 0.9rem; }

/* Navigateur simulé */
.browser { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; background: var(--web-surface); border: 1px solid var(--web-bord); border-radius: 10px; }
.browser-bar { padding: 0.4rem 0.6rem; border-radius: 999px; background: #fff; border: 1px solid var(--web-bord); font-family: var(--t-code); font-size: 0.8rem; overflow-wrap: anywhere; }
.browser-bar.insecure { color: var(--web-rouge); }
.browser-bar.secure { color: var(--web-vert); }
.pay-raw label { font-family: 'Times New Roman', serif; font-weight: 400; }
.pay-raw input { border-radius: 0 !important; font-family: 'Courier New', monospace !important; }

/* Zoom */
.zoom-view { height: 9rem; overflow: hidden; background: #e8f0e0; border-radius: 6px; }
.zoom-view.scroll { overflow: auto; }
.zoom-map { padding: 1rem; font-size: 1.6rem; line-height: 1.6; text-align: center; transform-origin: top left; transition: transform 0.2s; }
.zoom-level { min-width: 4rem; text-align: center; font-family: var(--t-code); }

/* Notation */
.rating { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; border: 0; padding: 0; }
.stars { display: flex; gap: 0.25rem; }
.star, .stars-radio label { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #c4c9d0; background: none; border: 0; cursor: pointer; }
.star.on, .stars-radio label.on { color: #e3a008; }
.stars-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-radio input:focus-visible + label { outline: 3px solid var(--web-accent); outline-offset: 2px; border-radius: 4px; }

/* Présence */
.presence { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: #5b3cc4; }
.avatar { width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #6d4ad8; color: #fff; font-weight: 700; font-size: 0.8rem; }

/* Code à usage unique */
.otp { display: flex; flex-direction: column; gap: 0.75rem; }
.otp-boxes { display: flex; gap: 0.35rem; }
.specimen-content .otp-boxes input { width: 2.6rem; padding: 0; text-align: center; font-family: var(--t-code); font-size: 1.2rem; }

/* Notifications */
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.notif { display: block; width: 100%; text-align: left; padding: 0.55rem 0.75rem; border-radius: 6px; background: #fff; color: var(--web-texte); border: 1px solid var(--web-bord); font-size: 0.9rem; }
.notif.loud { background: #fdecea; border-color: var(--web-rouge); min-height: 44px; }
.notif.urgent { border-color: var(--web-rouge); border-left-width: 4px; }
.notif-groups { display: flex; flex-direction: column; gap: 0.5rem; }
.notif-h { margin: 0.5rem 0 0; font-size: 0.9rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.notif-h.urgent { color: var(--web-rouge); }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .oeuvre-cursor { opacity: 1; }
}
