/* =========================================================================
   Vérificateur de mots — Agora des Mots
   Feuille de style de production.
   Valeurs reprises littéralement de la maquette 1A (voir handoff/SPEC.md).
   Les écarts avec la maquette sont limités et commentés « PROD ».
   ========================================================================= */

/* ------------------------------ Design tokens --------------------------- */
:root {
  /* Typographie */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;

  /* Verts */
  --green-card-bg: #0b1f18;
  --green-header: #0e1c16;   /* aligné sur le header du jeu Mots & Stratégie */
  --green-hero-1: #0d4433;
  --green-hero-2: #07301f;
  --green-hero-3: #02150d;
  --green-deep: #05110c;     /* fond de page, sous et autour du héros */
  --green-veil-1: rgba(6, 58, 38, .42);
  --green-veil-2: rgba(4, 40, 26, .22);
  --green-vignette-l: #02140dfa;
  --green-vignette-r: #0b302180;
  --green-result-1: rgba(17, 80, 58, .85);
  --green-result-2: rgba(6, 42, 29, .85);
  --green-btn-fill: rgba(10, 45, 35, .75);
  --green-btn-inset: rgba(3, 24, 16, .45);
  --green-glow-1: rgba(70, 190, 130, .16);
  --green-glow-2: rgba(40, 150, 100, .14);
  --green-glow-3: rgba(60, 175, 120, .14);
  --green-glow-4: rgba(40, 150, 100, .10);
  --green-accepted: #8fce9b;
  --green-input-icon: #5d6b60;
  --green-input-text: #1d2b23;

  /* Dorés */
  --gold: #d9a94a;
  --gold-ds: #b68235;
  --gold-btn-top: #e5b95c;
  --gold-btn-bottom: #c08f2e;
  --gold-btn-border: #f0d191;
  --gold-tagline: #9d8a63;
  --gold-hairline: rgba(217, 169, 74, .30);
  --gold-border-soft: rgba(217, 169, 74, .45);
  --gold-border-pill: rgba(217, 169, 74, .60);
  --gold-header-rule: rgba(182, 130, 53, .35);
  --gold-mobile-rule: rgba(217, 169, 74, .28);

  /* Crèmes et neutres */
  --cream-100: #f7f2e6;
  --cream-200: #f7f1e4;
  --cream-300: #f2ece0;
  --cream-400: #ece7da;
  --cream-450: #ece6d8;
  --cream-500: #e4ddcf;
  --cream-600: #d9d2c2;
  --cream-700: #d5cdba;
  --cream-800: #cfc7b6;
  --cream-850: #c9c2b1;
  --cream-900: #b9b1a0;
  --input-bg: #efe9dd;
  --input-icon-dark: #14140f;
  --btn-label-dark: #2a1e07;
  --avatar-bg: rgba(242, 236, 224, .12);
  --ink: #201f1d;

  /* Ombres (desktop uniquement, cf. SPEC §2.4) */
  --shadow-input: 0 2px 14px rgba(0, 0, 0, .35);
  --shadow-gold-btn: 0 0 0 4px rgba(217, 169, 74, .12), 0 4px 16px rgba(0, 0, 0, .4);
  --shadow-result: 0 0 0 1px rgba(217, 169, 74, .15),
                   0 0 34px 6px var(--green-glow-1),
                   0 0 90px 18px var(--green-glow-2),
                   0 10px 40px rgba(0, 0, 0, .45);
  --shadow-secondary: 0 0 22px 3px var(--green-glow-3),
                      0 0 60px 12px var(--green-glow-4),
                      inset 0 0 20px var(--green-btn-inset);

  /* Rayons */
  --r-input: 8px;
  --r-btn: 8px;
  --r-btn-secondary: 6px;
  --r-result: 10px;
  --r-pill: 999px;

  /* Espacements */
  --sp-2: 2px;  --sp-4: 4px;  --sp-6: 6px;  --sp-8: 8px;  --sp-9: 9px;
  --sp-10: 10px; --sp-11: 11px; --sp-12: 12px; --sp-13: 13px; --sp-14: 14px;
  --sp-16: 16px; --sp-18: 18px; --sp-20: 20px; --sp-22: 22px; --sp-24: 24px;
  --sp-26: 26px; --sp-30: 30px; --sp-34: 34px; --sp-40: 40px; --sp-44: 44px;

  /* Tuiles de lettres (composant local, inspiré des tuiles ivoire du jeu) */
  --tile-face-1: #fbf3dd;
  --tile-face-2: #f1e4bf;
  --tile-face-3: #e4ce98;
  --tile-letter: #2c2114;
  --tile-value: rgba(74, 53, 27, .72);
  --tile-ring: rgba(217, 169, 74, .38);
  --tile-size: 44px;   /* recalculé par longueur via .vm-tiles--* */

  /* Statuts de verdict */
  --verdict-present: #8fce9b;
  --verdict-absent: #e39a86;
  --verdict-invalid: #e7c98a;

  /* Grille du héros (desktop) */
  --hero-col-right: 400px;
  --hero-col-gap: 44px;
  --content-max: 1300px;
  --prose-max: 760px;

  /* Breakpoint — cf. SPEC §4 */
  --bp-mobile: 900px;
}

/* --------------------------------- Base --------------------------------- */
* { box-sizing: border-box; }

/* l'attribut [hidden] doit l'emporter sur les display: flex/grid des composants */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* Fond de page = vert très profond : le héros et le header forment des
     bandes pleine largeur ; seul le CONTENU est borné (cf. §3 du brief). */
  background: var(--green-deep);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--gold-ds); }
a:hover { color: #8f6526; }

.vm-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* PROD : focus lisible sur fond doré */
.vm-btn-primary:focus-visible { outline-color: var(--btn-label-dark); }

/* --------------------------- Bandes pleine largeur --------------------- */
.vm-header-band {
  position: relative;
  z-index: 30;               /* le menu déroulant mobile passe au-dessus du héros */
  background: var(--green-header);
  border-bottom: 1px solid var(--gold-header-rule);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(247, 241, 227, .06);
}

/* -------------------------------- Header -------------------------------- */
.vm-header {
  position: relative;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  padding: var(--sp-12) var(--sp-26);
  gap: var(--sp-34);
}

.vm-brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; }
.vm-brand-icon {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}
/* Bloc de marque calé sur l'équilibre du logo Mots & Stratégie :
   les deux lignes partagent le même interlettrage modéré, cadrées à gauche,
   de largeurs proches — sans sur-espacer les lettres du nom. */
.vm-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
}

.vm-brand-name {
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: .1em;
  line-height: .86;
  color: var(--gold);   /* marque en or, comme le header du jeu */
}

.vm-brand-tagline {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(247, 241, 227, .82);   /* crème lisible, reste discret */
}

.vm-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-left: var(--sp-22);
  font-size: 14px;
  color: var(--cream-500);
}

/* Entrées de navigation — même esprit que le menu de Mots & Stratégie :
   sobre au repos, fond vert + liseré or au survol / focus, soulignement
   doré animé, état « sélectionné » temporaire au clic (section à venir). */
.vm-nav-item {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 10px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--cream-500);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease,
    box-shadow .16s ease, transform .16s ease;
}
.vm-nav-item::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity .16s ease, transform .16s ease;
}
.vm-nav-item:hover,
.vm-nav-item:focus-visible {
  color: var(--cream-100);
  border-color: rgba(217, 169, 74, .3);
  background-color: rgba(20, 43, 35, .7);
  box-shadow: 0 7px 13px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(247, 241, 227, .08);
  transform: translateY(-1px);
}
.vm-nav-item:hover::after,
.vm-nav-item:focus-visible::after { opacity: 1; transform: scaleX(1); }
/* état sélectionné temporaire (proche de l'onglet actif du jeu) */
.vm-nav-item.is-selected {
  color: var(--cream-100);
  border-color: rgba(217, 169, 74, .4);
  background-color: rgba(20, 43, 35, .82);
  box-shadow: 0 8px 14px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(247, 241, 227, .1);
}
.vm-nav-item.is-selected::after { opacity: .82; transform: scaleX(1); }

/* Panneau « section à venir » — petit rectangle premium sous le header */
.vm-nav-toast {
  position: fixed;
  z-index: 1000;
  top: clamp(76px, 9vh, 108px);
  left: 50%;
  width: min(460px, calc(100vw - 28px));
  padding: 12px 18px;
  border: 1px solid var(--gold-border-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 52, 40, .97), rgba(4, 20, 14, .97));
  color: var(--cream-100);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 246, 223, .08);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.vm-nav-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.vm-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-12);
}

.vm-favorites {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  border: 1px solid var(--gold-border-pill);
  border-radius: var(--r-pill);
  padding: var(--sp-8) var(--sp-16);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--cream-300);
  background: transparent;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.vm-favorites:hover,
.vm-favorites:focus-visible,
.vm-favorites[aria-expanded="true"] {
  color: var(--cream-100);
  border-color: var(--gold);
  background-color: rgba(20, 43, 35, .55);
}
.vm-favorites[aria-expanded="true"] .vm-fav-icon { fill: var(--gold); }
.vm-fav-count {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #201a0d;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.vm-fav-count:empty { display: none; }

/* Panneau Favoris — petit panneau premium sous le header (pas une modale) */
.vm-fav-panel {
  position: fixed;
  z-index: 1001;
  top: clamp(72px, 9vh, 104px);
  right: clamp(12px, 4vw, 44px);
  width: min(300px, calc(100vw - 24px));
  max-height: min(62vh, 440px);
  overflow-y: auto;
  padding: var(--sp-14) var(--sp-16) var(--sp-16);
  border: 1px solid var(--gold-border-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 52, 40, .98), rgba(4, 20, 14, .98));
  box-shadow: 0 18px 36px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 246, 223, .08);
  color: var(--cream-200);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.vm-fav-panel.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.vm-fav-head {
  margin: 0 0 var(--sp-10);
  font-family: var(--font-heading);
  font-size: 18px;
  font-variant-caps: all-small-caps;
  letter-spacing: .08em;
  color: var(--gold);
}
.vm-fav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.vm-fav-list:empty { display: none; }
.vm-fav-item { display: flex; align-items: center; gap: var(--sp-6); }
.vm-fav-word {
  flex: 1;
  min-width: 0;
  padding: var(--sp-8) var(--sp-10);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--cream-200);
  font-family: var(--font-heading);
  font-size: 17px;
  font-variant-caps: all-small-caps;
  letter-spacing: .06em;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .14s ease, border-color .14s ease, background-color .14s ease;
}
.vm-fav-word:hover,
.vm-fav-word:focus-visible {
  color: var(--cream-100);
  border-color: rgba(217, 169, 74, .3);
  background-color: rgba(217, 169, 74, .1);
}
.vm-fav-del {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--cream-700);
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease;
}
.vm-fav-del svg { width: 15px; height: 15px; }
.vm-fav-del:hover,
.vm-fav-del:focus-visible { color: var(--verdict-absent); background-color: rgba(227, 154, 134, .12); }
.vm-fav-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cream-700);
}
.vm-fav-empty span { display: block; margin-top: 3px; font-size: 12px; color: var(--cream-900); }
.vm-fav-list:not(:empty) + .vm-fav-empty { display: none; }
.vm-fav-note {
  margin: var(--sp-10) 0 0;
  font-size: 12px;
  font-style: italic;
  color: var(--gold-ds);
}

/* Carte résultat : étoile pleine quand le mot est en favori */
.vm-result-link--fav .vm-fav-star { transition: fill .16s ease; }
.vm-result-link--fav[aria-pressed="true"] .vm-fav-star { fill: var(--gold); }

.vm-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bouton burger — masqué en desktop, affiché sous le breakpoint */
.vm-burger {
  display: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.vm-burger svg { width: 100%; height: 100%; }

/* --------------------------------- Héros -------------------------------- *
 * Bande pleine largeur : fond, décor et ambiance débordent jusqu'aux bords ;
 * seul .vm-hero-inner est borné et centré (cf. §3 du brief).               */
.vm-hero {
  position: relative;
  display: block;
  overflow: hidden;                    /* le décor ne provoque pas de scroll */
  padding: clamp(38px, 5.5vw, 80px) 0 clamp(56px, 7vw, 108px);
  background:
    radial-gradient(150% 120% at 22% 4%,
      var(--green-hero-1) 0%, var(--green-hero-2) 42%, var(--green-hero-3) 100%),
    var(--green-deep);
}
/* fondu doux vers le contenu crème plutôt qu'une coupure nette */
.vm-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(3, 15, 10, 0), rgba(3, 15, 10, .5));
  pointer-events: none;
}

.vm-hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-40);
}

/* Décorations : ordre de superposition = ordre du DOM (aucun z-index) */
.vm-temple {
  position: absolute;
  left: clamp(0px, 3vw, 90px);   /* ramené vers la droite : piliers/plantes visibles en entier */
  bottom: -12px;
  width: clamp(520px, 52vw, 920px);
  height: auto;
  opacity: .82;
  mix-blend-mode: screen;
  filter: saturate(1.3) brightness(.98);
  pointer-events: none;
  /* fondu des bords : le décor se dissout au lieu d'être coupé net */
  -webkit-mask-image: radial-gradient(115% 118% at 44% 58%, #000 52%, rgba(0,0,0,.4) 78%, transparent 94%);
          mask-image: radial-gradient(115% 118% at 44% 58%, #000 52%, rgba(0,0,0,.4) 78%, transparent 94%);
}

.vm-temple-veil {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(60vw, 960px);
  height: 520px;
  background: radial-gradient(70% 80% at 16% 94%,
              var(--green-veil-1),
              var(--green-veil-2) 55%,
              rgba(0, 0, 0, 0) 80%);
  pointer-events: none;
}

.vm-plume {
  position: absolute;
  right: clamp(0px, 2.5vw, 70px);   /* rapprochée vers la gauche : plus coupée par le bord droit */
  top: -30px;
  height: clamp(500px, 54vw, 760px);
  width: auto;
  opacity: .46;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(95% 105% at 58% 42%, #000 46%, rgba(0,0,0,.32) 76%, transparent 93%);
          mask-image: radial-gradient(95% 105% at 58% 42%, #000 46%, rgba(0,0,0,.32) 76%, transparent 93%);
}

.vm-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
              var(--green-vignette-l),
              rgba(0, 0, 0, 0) 34%,
              rgba(0, 0, 0, 0) 66%,
              var(--green-vignette-r)),
    radial-gradient(120% 60% at 50% 100%, rgba(2, 16, 11, .55), rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.vm-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--hero-col-right);
  gap: var(--hero-col-gap);
  align-items: center;   /* recherche + bouton centrés verticalement face à la carte */
}

/* ------------------------ Colonne gauche : recherche -------------------- */
.vm-search-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  /* le contenu de recherche profite de la largeur du héros élargi,
     tout en gardant une limite lisible */
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding-top: var(--sp-8);
}

.vm-ornament { width: 300px; height: auto; display: block; opacity: .95; }

.vm-title {
  margin: var(--sp-12) 0 var(--sp-6);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(42px, 5.2vw, 64px);
  font-variant-caps: all-small-caps;
  letter-spacing: .02em;
  line-height: 1.08;
  color: var(--cream-100);
  text-align: center;
  text-shadow: 0 2px 24px rgba(2, 18, 12, .45);
}

.vm-subtitle {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--cream-700);
  text-align: center;
}

.vm-search-row {
  display: flex;
  gap: var(--sp-16);
  align-items: center;   /* bouton centré sur la hauteur du champ, pas accroché en haut */
  width: 100%;
  margin-top: var(--sp-30);
}

/* Rectangle de recherche à DEUX niveaux, dans le même bloc :
   ligne 1 = icône + <input> natif (texte réellement visible) + croix ;
   ligne 2 = le même mot en tuiles (aria-hidden), sous un filet léger.
   Vide = clair. Rempli = fond vert/foncé (texte en crème). */
.vm-input {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--input-bg);
  border: 1px solid rgba(217, 169, 74, 0);
  border-radius: var(--r-input);
  padding: var(--sp-12) var(--sp-20);
  box-shadow: var(--shadow-input);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.vm-input.is-filled {
  background: linear-gradient(180deg, #123227, #0b2419);
  border-color: rgba(217, 169, 74, .35);
}
.vm-input:focus-within {
  border-color: var(--gold-border-pill);
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(217, 169, 74, .22);
}

/* Ligne 1 : la saisie texte native */
.vm-input-row {
  display: flex;
  align-items: center;
  gap: var(--sp-14);
  min-height: 34px;
}

.vm-input-icon { width: 21px; height: 21px; flex: none; transition: stroke .2s ease; }
.vm-input.is-filled .vm-input-icon { stroke: var(--cream-600); }

.vm-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-family: var(--font-heading);
  font-size: 22px;
  font-variant-caps: all-small-caps;
  letter-spacing: .08em;
  color: var(--green-input-text);
  caret-color: var(--green-input-text);
  -webkit-text-fill-color: currentColor;
  transition: color .2s ease;
}
/* Rempli = fond vert foncé : le texte natif passe en crème et reste
   parfaitement lisible sur la ligne 1 (caret natif conservé). */
.vm-input.is-filled input {
  color: var(--cream-100);
  caret-color: var(--cream-200);
  -webkit-text-fill-color: var(--cream-100);
}
.vm-input.is-filled input::selection { background: rgba(217, 169, 74, .35); }
.vm-input input:focus { outline: none; }
.vm-input input::placeholder { color: var(--green-input-icon); }
.vm-input.is-filled input::placeholder { color: var(--cream-700); }

.vm-input-clear {
  width: 20px;
  height: 20px;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vm-input-clear svg { width: 100%; height: 100%; transition: stroke .2s ease; }
.vm-input.is-filled .vm-input-clear svg { stroke: var(--cream-600); }

/* Ligne 2 : le même mot en tuiles, sous un filet doré léger.
   Purement visuel (aria-hidden) — suit `input.value`. */
.vm-input-tiles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: var(--sp-10);
  padding-top: var(--sp-10);
  border-top: 1px solid rgba(217, 169, 74, .18);
  pointer-events: none;
}
.vm-input-tiles:empty { display: none; }

.vm-btn-primary {
  flex: none;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, var(--gold-btn-top), var(--gold-btn-bottom));
  border: 1px solid var(--gold-btn-border);
  border-radius: var(--r-btn);
  padding: 0 var(--sp-30);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--btn-label-dark);
  box-shadow: var(--shadow-gold-btn);
  cursor: pointer;
  white-space: nowrap;
}

/* Exemples : petits objets de curiosité lexicale (§13) — chips discrètes */
.vm-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-10);
  width: 100%;
  margin: var(--sp-20) 0 0;
  font-size: 13px;
  color: var(--cream-900);
}

.vm-examples > span {
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--cream-900);
}

.vm-examples a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid rgba(217, 169, 74, .32);
  border-radius: var(--r-pill);
  background: rgba(247, 241, 227, .05);
  color: var(--cream-500);
  font-size: 14px;
  text-decoration: none;
}
.vm-examples a:hover {
  border-color: var(--gold-border-pill);
  color: var(--cream-200);
  background: rgba(247, 241, 227, .09);
}

.vm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-16);
  width: 100%;
  margin-top: var(--sp-24);
}

/* Avec moins de 4 ressources, on borne la largeur pour ne pas étirer un
   bouton isolé sur toute la rangée. */
.vm-actions--1 .vm-btn-secondary { flex: 0 1 300px; }
.vm-actions--2 .vm-btn-secondary,
.vm-actions--3 .vm-btn-secondary { flex: 0 1 240px; }

.vm-btn-secondary {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-11);
  border: 1px solid var(--gold-border-soft);
  border-radius: var(--r-btn-secondary);
  padding: var(--sp-13) 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--cream-450);
  background: var(--green-btn-fill);
  box-shadow: var(--shadow-secondary);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.vm-btn-secondary img { width: 20px; height: 20px; object-fit: contain; flex: none; }

/* Panneau « Valeur du mot » : comparaison de deux barèmes
   (PROD : absent de la maquette, sobre et neutre entre les deux barèmes). */
.vm-value {
  width: 100%;
  margin-top: var(--sp-14);
  padding: var(--sp-18) var(--sp-20);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-btn-secondary);
  background: rgba(10, 45, 35, .55);
  color: var(--cream-450);
}
.vm-value-title {
  margin: 0 0 var(--sp-14);
  font-family: var(--font-heading);
  font-size: 20px;
  font-variant-caps: all-small-caps;
  letter-spacing: .04em;
  color: var(--cream-100);
}
.vm-value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12) var(--sp-20);
}
.vm-value-col {
  padding: var(--sp-12) var(--sp-14);
  border: 1px solid var(--gold-hairline);
  border-radius: 4px;
  background: rgba(217, 169, 74, .05);
}
.vm-value-scale {
  margin: 0;
  font-size: 14px;
  color: var(--gold);
}
.vm-value-points {
  margin: var(--sp-4) 0 var(--sp-2);
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--cream-100);
}
.vm-value-points strong {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .02em;
  margin-right: 4px;
}
.vm-value-sub { margin: 0; font-size: 12px; color: var(--cream-700); }
.vm-value-variant {
  margin: var(--sp-12) 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--cream-700);
  line-height: 1.5;
}
.vm-value-note { margin: var(--sp-12) 0 0; font-size: 13px; color: var(--cream-800); line-height: 1.5; }
.vm-value-indep { margin: var(--sp-8) 0 0; font-size: 12px; color: var(--cream-700); line-height: 1.5; }

/* Desktop : panneau « Valeur du mot » un peu plus lisible.
   Le nombre de points reste l'élément dominant ; couleurs, structure à
   deux cartes et alignement inchangés. Tablette / mobile gardent les
   tailles de base (viewport plus étroit). */
@media (min-width: 1025px) {
  .vm-value { padding: var(--sp-22) var(--sp-24); }
  .vm-value-title { font-size: 22px; margin-bottom: var(--sp-16); }
  .vm-value-grid { gap: var(--sp-14) var(--sp-22); }
  .vm-value-col { padding: var(--sp-16) var(--sp-18); }
  .vm-value-scale { font-size: 15.5px; }
  .vm-value-points { font-size: 16px; margin: var(--sp-6) 0 var(--sp-4); }
  .vm-value-points strong { font-size: 34px; }
  .vm-value-sub { font-size: 13.5px; }
  .vm-value-variant { font-size: 14.5px; line-height: 1.55; margin-top: var(--sp-14); }
  .vm-value-note { font-size: 14.5px; line-height: 1.55; margin-top: var(--sp-14); }
  .vm-value-indep { font-size: 13px; line-height: 1.55; }
}

/* Ressource indisponible : bouton présent mais non navigable (SPEC produit §12) */
.vm-btn-secondary[aria-disabled="true"],
.vm-result-link[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

/* ======================= Colonne droite : résultat ===================== */
.vm-result { min-width: 0; }

.vm-result-inner {
  border: 1px solid var(--gold-border-soft);
  border-radius: var(--r-result);
  padding: var(--sp-24) var(--sp-24) var(--sp-20);
  background: linear-gradient(160deg, var(--green-result-1), var(--green-result-2));
  box-shadow: var(--shadow-result);
}

/* --- Statut du verdict : grand libellé en tête, aligné avec l'icône (§4) --- */
.vm-verdict {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
.vm-verdict-mark { flex: none; display: flex; align-items: center; }
.vm-result-badge { width: 42px; height: 42px; object-fit: contain; }
.vm-verdict-warn { width: 34px; height: 34px; display: none; }
/* pictogramme d'alerte pour saisie invalide / erreur (pas un verdict lexical) */
.vm-result-inner.is-invalid .vm-result-badge,
.vm-result-inner.is-error   .vm-result-badge { display: none; }
.vm-result-inner.is-invalid .vm-verdict-warn,
.vm-result-inner.is-error   .vm-verdict-warn { display: block; }
.vm-result-inner.is-error   .vm-verdict-warn { stroke: var(--verdict-absent); }

.vm-verdict-status {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--verdict-present);
}
.vm-result-inner.is-absent  .vm-verdict-status { color: var(--verdict-absent); }
.vm-result-inner.is-invalid .vm-verdict-status,
.vm-result-inner.is-error   .vm-verdict-status { color: var(--verdict-invalid); }

/* Le mot, sous le statut : élément fort de la carte (pas de tuiles ici),
   grandes petites capitales, aligné à gauche sur le bord de la carte. */
.vm-result-word {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 32px;
  font-variant-caps: all-small-caps;
  letter-spacing: .05em;
  line-height: 1.05;
  color: var(--cream-100);
  word-break: break-word;
}

.vm-verdict-label {
  margin: var(--sp-6) 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
  color: var(--cream-600);
}

/* liseré latéral coloré selon l'état (renfort non chromatique = icône + libellé) */
.vm-result-inner { border-left: 3px solid var(--verdict-present); }
.vm-result-inner.is-absent  { border-left-color: var(--verdict-absent); }
.vm-result-inner.is-invalid,
.vm-result-inner.is-error   { border-left-color: var(--verdict-invalid); }

/* Invalide / erreur : pas de mot, l'explication passe juste sous le libellé */
.vm-result-inner.is-invalid .vm-result-word,
.vm-result-inner.is-error   .vm-result-word { display: none; }
.vm-result-inner.is-invalid .vm-verdict,
.vm-result-inner.is-error   .vm-verdict { margin-bottom: var(--sp-8); }

/* --- Métadonnées --- */
.vm-result-meta:not(:empty) { margin-top: var(--sp-16); }
.vm-result-meta > *:first-child { margin-top: 0 !important; }

.vm-result-class {
  margin: var(--sp-14) 0 0;
  font-size: 18px;
  color: var(--gold);
}
.vm-result-lemma {
  margin: var(--sp-4) 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--cream-700);
}
.vm-result-def {
  margin: var(--sp-10) 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--cream-300);
}
/* Définition mise en valeur quand elle est le seul contenu enrichi */
.vm-result-inner.is-present .vm-result-meta .vm-result-def {
  padding-left: var(--sp-12);
  border-left: 2px solid var(--gold-hairline);
}

.vm-result-inner.is-invalid .vm-result-def,
.vm-result-inner.is-error   .vm-result-def {
  margin-top: var(--sp-8);
  color: var(--cream-400);
  border-left: 0;
  padding-left: 0;
}

.vm-result-hr {
  height: 1px;
  background: var(--gold-hairline);
  margin: var(--sp-18) 0 var(--sp-4);
  border: 0;
}
.vm-result-inner.is-invalid .vm-result-hr,
.vm-result-inner.is-error   .vm-result-hr { display: none; }

/* ------------------------------ Tuiles de lettres --------------------- *
 * Composant local (aucune dépendance au runtime du jeu). HTML/CSS pur,
 * aucune image. Utilisées UNIQUEMENT sur la ligne 2 du rectangle de
 * recherche (.vm-input-tiles, aria-hidden) ; la carte résultat est en
 * texte seul. Le mot reste disponible en texte (input natif ligne 1).    */

/* séparateur (apostrophe / trait d'union entre deux tuiles) */
.vm-tile-sep {
  align-self: center;
  padding: 0 1px;
  font-family: var(--font-heading);
  font-size: calc(var(--tile-size, 42px) * .5);
  color: var(--cream-700);
}
/* caractère non valide (@, #, chiffre, emoji…) : marqué visuellement */
.vm-tile-sep--bad {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(227, 154, 134, .16);
  color: var(--verdict-absent);
  font-family: var(--font-body);
  font-size: calc(var(--tile-size, 42px) * .42);
  font-weight: 700;
}

.vm-tile {
  --s: var(--tile-size);
  position: relative;
  width: var(--s);
  height: calc(var(--s) * 1.06);
  flex: none;
  border-radius: 6px;
  background: linear-gradient(158deg, var(--tile-face-1), var(--tile-face-2) 54%, var(--tile-face-3));
  box-shadow:
    inset 0 0 0 1px var(--tile-ring),
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -2px 3px rgba(120, 96, 54, .18),
    0 3px 7px rgba(18, 12, 4, .28);
  display: grid;
  place-items: center;
}
.vm-tile-letter {
  /* Cormorant Garamond 700 : vrai poids de la police (chargé), lettre plus
     nette sur la tuile sans faux-bold. Vaut pour barre / mots courts et
     longs / desktop / tablette / mobile (une seule règle, taille en em). */
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: calc(var(--s) * .62);
  line-height: 1;
  color: var(--tile-letter);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.vm-tile-value {
  /* petit chiffre de valeur : volontairement plus discret que la lettre */
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-family: var(--font-body);
  font-size: calc(var(--s) * .24);
  font-weight: 500;
  line-height: 1;
  color: var(--tile-value);
}
/* Taille adaptative par longueur du mot (5 paliers) : on réduit la tuile
   AVANT de laisser le mot passer à la ligne. court ≤8 · moyen ≤10 · long
   ≤12 · très long ≤15 · extra 16+. Seuils calés pour qu'un mot tienne sur
   UNE ligne dans la barre élargie tant que possible ; wrap seulement si
   réellement nécessaire.                                                  */
.vm-input-tiles .vm-tile              { --tile-size: 44px; }
.vm-input-tiles.vm-tiles--md .vm-tile { --tile-size: 36px; }
.vm-input-tiles.vm-tiles--sm .vm-tile { --tile-size: 29px; }
.vm-input-tiles.vm-tiles--xs .vm-tile { --tile-size: 23px; }
.vm-input-tiles.vm-tiles--xxs .vm-tile { --tile-size: 18px; }
.vm-input-tiles.vm-tiles--sm .vm-tile-value,
.vm-input-tiles.vm-tiles--xs .vm-tile-value,
.vm-input-tiles.vm-tiles--xxs .vm-tile-value { display: none; }

.vm-result-link {
  display: flex;
  align-items: center;
  gap: var(--sp-14);
  width: 100%;
  padding: var(--sp-10) 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--cream-450);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.vm-result-link img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.vm-result-link span { flex: 1; }
.vm-result-link svg { width: 16px; height: 16px; flex: none; }
.vm-result-link:hover { color: var(--cream-100); }

/* « Copier le lien » : icône de tête 20 px, pas de chevron, confirmation brève */
.vm-result-link-lead { width: 20px !important; height: 20px !important; }
.vm-result-link--copy .vm-copy-flash {
  flex: none;
  font-size: 13px;
  font-style: italic;
  color: var(--green-accepted);
}
.vm-result-link--copy .vm-copy-flash:empty { display: none; }

/* ------------------------------ Encart FFSc ----------------------------- */
.vm-ffsc {
  position: relative;
  margin: var(--sp-26) 0 0;
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-btn-secondary);
  padding: var(--sp-14) var(--sp-22);
  display: flex;
  align-items: center;
  gap: var(--sp-14);
  font-size: 15px;
  color: var(--cream-800);
}

.vm-ffsc-i {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold-border-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 17px;
}

.vm-ffsc svg { flex: none; }

.vm-ffsc a {
  color: var(--cream-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===================== Mini-jeu Anagrammes (V1) ======================= *
 * Overlay léger + carte premium. Même identité que le Vérificateur.       */
.vm-ana {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-20);
}
.vm-ana-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 8, .58);
  opacity: 0;
  transition: opacity .18s ease;
}
.vm-ana.is-open .vm-ana-backdrop { opacity: 1; }

.vm-ana-card {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - var(--sp-40));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-26) var(--sp-26) var(--sp-24);
  border: 1px solid var(--gold-border-soft);
  border-radius: 14px;
  background: linear-gradient(165deg, #123227 0%, #0a2418 60%, #061a11 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 246, 223, .07);
  color: var(--cream-300);
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}
.vm-ana.is-open .vm-ana-card { opacity: 1; transform: none; }

.vm-ana-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cream-600);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.vm-ana-close svg { width: 16px; height: 16px; }
.vm-ana-close:hover,
.vm-ana-close:focus-visible { color: var(--cream-100); background-color: rgba(217, 169, 74, .12); }

.vm-ana-title {
  margin: 0 40px 0 0;
  font-family: var(--font-heading);
  font-size: 26px;
  font-variant-caps: all-small-caps;
  letter-spacing: .08em;
  color: var(--gold);
}
.vm-ana-sub {
  margin: var(--sp-6) 0 var(--sp-18);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--cream-600);
}

.vm-ana-tiles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 var(--sp-12);
}
.vm-ana-tiles .vm-tile { --tile-size: 46px; }
.vm-ana-tiles.vm-tiles--md .vm-tile { --tile-size: 38px; }
.vm-ana-tiles.vm-tiles--sm .vm-tile { --tile-size: 30px; }
.vm-ana-tiles.vm-tiles--xs .vm-tile { --tile-size: 24px; }
.vm-ana-tiles.vm-tiles--xxs .vm-tile { --tile-size: 19px; }
.vm-ana-tiles .vm-tile-value { display: none; }   /* pas de valeur ici */
.vm-ana-tiles .vm-tile.is-swap { animation: vm-ana-pop .28s ease; }
@keyframes vm-ana-pop { 40% { transform: translateY(-6px); } }

.vm-ana-shuffle {
  display: block;
  margin: 0 auto var(--sp-18);
  padding: var(--sp-6) var(--sp-14);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--cream-600);
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.vm-ana-shuffle:hover,
.vm-ana-shuffle:focus-visible { color: var(--cream-100); border-color: var(--gold-border-pill); background-color: rgba(217, 169, 74, .08); }

.vm-ana-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
  font-family: var(--font-body);
}
.vm-ana-count { font-size: 15px; color: var(--cream-300); }
.vm-ana-score { font-size: 15px; color: var(--gold); font-weight: 700; }

.vm-ana-form {
  display: flex;
  gap: var(--sp-10);
  align-items: stretch;
}
.vm-ana-form input {
  flex: 1;
  min-width: 0;
  padding: var(--sp-11) var(--sp-14);
  border: 1px solid var(--gold-border-soft);
  border-radius: var(--r-input);
  background: var(--input-bg);
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 600;              /* mot saisi plus visible pendant la frappe */
  font-variant-caps: all-small-caps;
  letter-spacing: .06em;
  color: var(--green-input-text);
  caret-color: var(--green-input-text);
}
.vm-ana-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.vm-ana-validate {
  flex: none;
  min-height: 44px;
  padding: 0 var(--sp-20);
  border: 1px solid var(--gold-btn-border);
  border-radius: var(--r-btn);
  background: linear-gradient(180deg, var(--gold-btn-top), var(--gold-btn-bottom));
  color: var(--btn-label-dark);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .1em;
  cursor: pointer;
}
.vm-ana-validate:hover { background: linear-gradient(180deg, #efc670, #cf9b33); }

.vm-ana-msg {
  min-height: 20px;
  margin: var(--sp-10) 0 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--cream-600);
}
.vm-ana-msg.is-ok { color: var(--verdict-present); }
.vm-ana-msg.is-soft { color: var(--cream-400); }

.vm-ana-found { margin-top: var(--sp-16); }
.vm-ana-found-label {
  margin: 0 0 var(--sp-8);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream-700);
}
.vm-ana-chips { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
/* Pastilles des solutions — lisibilité renforcée (contraste + fond + graisse) */
.vm-ana-chip {
  padding: var(--sp-8) var(--sp-13);
  border: 1px solid var(--gold-border-pill);
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(217, 169, 74, .18), rgba(217, 169, 74, .09));
  box-shadow: inset 0 1px 0 rgba(255, 246, 223, .07);
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: .06em;
  color: var(--cream-100);
}
.vm-ana-chip.is-new { animation: vm-ana-chip-in .3s ease; }
@keyframes vm-ana-chip-in { from { opacity: 0; transform: translateY(4px); } }
.vm-ana-chip--missed {
  color: var(--cream-500);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  border-color: var(--gold-hairline);
  border-style: dashed;
}

.vm-ana-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-10);
  margin-top: var(--sp-18);
}
.vm-ana-hint,
.vm-ana-reveal {
  padding: var(--sp-8) var(--sp-14);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-btn-secondary);
  background: rgba(10, 45, 35, .5);
  color: var(--cream-500);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.vm-ana-hint:hover, .vm-ana-hint:focus-visible,
.vm-ana-reveal:hover, .vm-ana-reveal:focus-visible {
  color: var(--cream-100);
  border-color: var(--gold-border-pill);
}
.vm-ana-hint[disabled] { opacity: .4; cursor: default; pointer-events: none; }

.vm-ana-confirm {
  margin-top: var(--sp-14);
  padding: var(--sp-14) var(--sp-16);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-btn-secondary);
  background: rgba(4, 20, 14, .5);
}
.vm-ana-confirm p { margin: 0 0 var(--sp-12); font-size: 13.5px; line-height: 1.45; color: var(--cream-400); }
.vm-ana-confirm-row { display: flex; gap: var(--sp-10); }
.vm-ana-confirm-yes,
.vm-ana-confirm-no {
  padding: var(--sp-8) var(--sp-16);
  border-radius: var(--r-btn-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}
.vm-ana-confirm-yes { border: 1px solid var(--gold-border-pill); background: rgba(217, 169, 74, .12); color: var(--cream-100); }
.vm-ana-confirm-no { border: 1px solid var(--gold-hairline); background: transparent; color: var(--cream-500); }

.vm-ana-end { text-align: center; padding: var(--sp-10) 0 var(--sp-4); }
.vm-ana-end-title {
  margin: 0 0 var(--sp-6);
  font-family: var(--font-heading);
  font-size: 22px;
  font-variant-caps: all-small-caps;
  letter-spacing: .05em;
  color: var(--cream-100);
}
.vm-ana-end-score { margin: 0 0 var(--sp-16); font-family: var(--font-body); font-size: 16px; color: var(--gold); font-weight: 700; }
.vm-ana-end .vm-ana-chips { justify-content: center; margin-bottom: var(--sp-18); }
.vm-ana-end-actions { display: flex; justify-content: center; gap: var(--sp-12); }
.vm-ana-replay,
.vm-ana-quit {
  min-height: 44px;
  padding: 0 var(--sp-20);
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
}
.vm-ana-replay { border: 1px solid var(--gold-btn-border); background: linear-gradient(180deg, var(--gold-btn-top), var(--gold-btn-bottom)); color: var(--btn-label-dark); }
.vm-ana-quit { border: 1px solid var(--gold-border-soft); background: transparent; color: var(--cream-400); }

/* Desktop : fenêtre Anagrammes — saisie et solutions un peu plus lisibles.
   Tablette / mobile gardent les tailles de base. */
@media (min-width: 1025px) {
  .vm-ana-form input { font-size: 26px; padding: var(--sp-12) var(--sp-16); }
  .vm-ana-chip { font-size: 18.5px; padding: var(--sp-8) var(--sp-14); }
  .vm-ana-found-label { font-size: 12.5px; }
  .vm-ana-end .vm-ana-chips { gap: var(--sp-10); }
}

@media (max-width: 480px) {
  .vm-ana { padding: var(--sp-12); align-items: flex-start; }
  .vm-ana-card { padding: var(--sp-20) var(--sp-16) var(--sp-18); max-height: calc(100vh - var(--sp-24)); }
  .vm-ana-title { font-size: 22px; }
  .vm-ana-form { flex-direction: column; }
  .vm-ana-form input { font-size: 22px; }
  .vm-ana-validate { min-height: 46px; }
  .vm-ana-tiles .vm-tile { --tile-size: 40px; }
  .vm-ana-tiles.vm-tiles--md .vm-tile { --tile-size: 33px; }
  .vm-ana-tiles.vm-tiles--sm .vm-tile { --tile-size: 27px; }
  .vm-ana-tiles.vm-tiles--xs .vm-tile { --tile-size: 22px; }
  .vm-ana-tiles.vm-tiles--xxs .vm-tile { --tile-size: 18px; }
}

/* ------------------------- Contenu éditorial (SEO) --------------------- *
 * PROD : bloc absent de la maquette. Panneau parchemin sous le héros,
 * palette Agora (crème / encre / or), pensé pour la lecture longue.      */
.vm-content {
  background: #efe9dd;
  color: #2b2620;
  padding: 64px 24px 72px;
}

.vm-content-inner {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.65;
}

.vm-content-inner h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: .01em;
  color: #1f2b23;
  margin: 40px 0 12px;
}
.vm-content-inner h2:first-child { margin-top: 0; }

.vm-content-inner p { margin: 0 0 14px; }
.vm-content-inner ul,
.vm-content-inner ol { margin: 0 0 14px; padding-left: 22px; }
.vm-content-inner li { margin: 0 0 6px; }

.vm-content-inner a { color: var(--gold-ds); }
.vm-content-inner code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .9em;
  background: rgba(31, 43, 35, .08);
  border-radius: 4px;
  padding: 1px 5px;
}

.vm-content-inner h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  color: #2b3a30;
  margin: 22px 0 8px;
}

/* Groupes d'exemples de saisie (formes particulières) */
.vm-cases { margin: 0 0 8px; }
.vm-cases li { margin: 0 0 8px; line-height: 1.55; }
.vm-cases b {
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: .03em;
  color: #1f2b23;
}

.vm-faq { margin: 0; }
.vm-faq dt { font-weight: 600; margin-top: 16px; }
.vm-faq dd { margin: 4px 0 0; color: #4a443b; }

/* --------------------------- États interactifs ------------------------- *
 * La maquette est statique. Transitions sobres, sans changement de
 * géométrie (SPEC §6, §18).                                              */
.vm-btn-primary,
.vm-btn-secondary,
.vm-result-link {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.vm-btn-primary:hover { background: linear-gradient(180deg, #efc670, #cf9b33); }
.vm-btn-primary:active { background: linear-gradient(180deg, #c99a35, #a87a24); }
.vm-btn-secondary:hover { border-color: var(--gold-border-pill); background: rgba(14, 58, 44, .85); }
.vm-btn-secondary:active { background: rgba(6, 32, 24, .9); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ===================== Palier desktop étroit ========================== */
@media (min-width: 1025px) and (max-width: 1240px) {
  :root { --hero-col-right: 360px; --hero-col-gap: 36px; }
  .vm-header { gap: var(--sp-20); }
  .vm-nav { gap: var(--sp-20); margin-left: var(--sp-18); }
  .vm-hero-inner { padding: 0 var(--sp-26); }
}

/* ================= Tablette + mobile (portrait & paysage) ============= *
 * En dessous de 1025 px : colonne unique centrée, capée en largeur.
 * couvre iPad portrait (~820) et petits paysages jusqu'à ~1024.        */
@media (max-width: 1024px) {
  .vm-header-band {
    background: linear-gradient(180deg, var(--green-header), rgba(14, 28, 22, .92));
    box-shadow: 0 10px 22px rgba(0, 0, 0, .32);
  }
  .vm-header {
    min-height: 0;
    padding: var(--sp-10) var(--sp-20) var(--sp-12);
    gap: 0;
    justify-content: space-between;
    border-bottom: 1px solid var(--gold-mobile-rule);
  }

  .vm-brand { gap: var(--sp-10); align-items: center; }
  .vm-brand-icon { width: 24px; height: 24px; border-radius: 7px; }
  .vm-brand-text { padding-top: 0; }
  .vm-brand-name { font-size: 19px; line-height: 1; letter-spacing: .08em; }
  .vm-brand-tagline { display: none; }
  /* mobile : on garde Favoris (compact, icône seule), on masque l'avatar */
  .vm-header-right { display: flex; margin-left: auto; gap: var(--sp-8); }
  .vm-avatar { display: none; }
  .vm-favorites { padding: var(--sp-8); gap: 0; }
  .vm-favorites .vm-fav-label { display: none; }
  .vm-favorites .vm-fav-count {
    position: absolute;
    margin-top: -18px;
    margin-left: 10px;
    min-width: 15px;
    height: 15px;
    line-height: 15px;
    font-size: 10px;
  }
  .vm-favorites { position: relative; }
  .vm-burger { display: flex; margin-left: var(--sp-12); }
  .vm-fav-panel { top: clamp(58px, 12vw, 78px); right: 12px; }
  /* zones tactiles ~44 px sur mobile (l'icône de suppression reste petite) */
  .vm-fav-item { gap: 4px; }
  .vm-fav-word { padding: var(--sp-11) var(--sp-10); min-height: 44px; }
  .vm-fav-del { width: 44px; height: 44px; }
  .vm-fav-del svg { width: 16px; height: 16px; }

  /* Menu déroulant (état ouvert géré par JS) */
  .vm-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--sp-8) var(--sp-20) var(--sp-16);
    background: var(--green-header);
    border-bottom: 1px solid var(--gold-mobile-rule);
    box-shadow: 0 14px 26px rgba(0, 0, 0, .4);
  }
  .vm-nav.is-open { display: flex; }
  .vm-nav-item {
    width: 100%;
    padding: var(--sp-12) var(--sp-10);
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: left;
    font-size: 15px;
  }
  .vm-nav-item::after { left: 10px; right: 10px; bottom: 4px; }
  .vm-nav-item + .vm-nav-item { margin-top: 2px; }

  /* Héros : une seule colonne, décor discret */
  .vm-hero { padding: clamp(24px, 7vw, 40px) 0 clamp(44px, 12vw, 72px); }
  .vm-hero-inner { padding: 0 var(--sp-20); }

  .vm-vignette,
  .vm-temple-veil { display: none; }
  .vm-temple { left: -10px; bottom: 0; width: 300px; opacity: .34; filter: none; }
  .vm-plume { right: -18px; top: -6px; height: 320px; opacity: .28; }

  /* colonne unique centrée, capée : tous les blocs alignés (§1 + §6) */
  .vm-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-14);
    max-width: 620px;
    margin: 0 auto;
  }
  .vm-search-col { display: contents; }

  .vm-ornament { width: 200px; margin: 0 auto; }
  .vm-title { margin: 0; width: 100%; text-align: center; font-size: clamp(27px, 8.4vw, 36px); }
  .vm-subtitle { width: 100%; text-align: center; font-size: 14px; }
  .vm-examples { margin-top: var(--sp-14); justify-content: center; }

  .vm-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-12);
    margin-top: var(--sp-8);
  }
  .vm-input { padding: var(--sp-10) var(--sp-16); box-shadow: none; }
  .vm-input:focus-within { box-shadow: 0 0 0 2px rgba(217, 169, 74, .3); }
  .vm-input-row { gap: var(--sp-12); min-height: 30px; }
  .vm-input-icon { width: 19px; height: 19px; }
  .vm-input-clear { width: 18px; height: 18px; }
  .vm-input input { font-size: 20px; }
  /* tuiles de la ligne 2 : paliers mobiles */
  .vm-input-tiles .vm-tile              { --tile-size: 36px; }
  .vm-input-tiles.vm-tiles--md .vm-tile { --tile-size: 30px; }
  .vm-input-tiles.vm-tiles--sm .vm-tile { --tile-size: 25px; }
  .vm-input-tiles.vm-tiles--xs .vm-tile { --tile-size: 20px; }
  .vm-input-tiles.vm-tiles--xxs .vm-tile { --tile-size: 16.5px; }
  .vm-btn-primary {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    padding: 0;
    font-size: 13px;
    box-shadow: none;
  }

  /* Ordre mobile : champ, bouton, carte résultat, actions, valeur */
  .vm-result { order: 1; }
  .vm-result-inner {
    padding: var(--sp-18);
    margin-top: var(--sp-6);
    background: linear-gradient(160deg, rgba(30, 86, 68, .5), rgba(8, 28, 21, .52));
    border-color: rgba(217, 169, 74, .4);
    box-shadow: none;
  }
  .vm-verdict { gap: var(--sp-10); margin-bottom: var(--sp-10); }
  .vm-verdict-status { font-size: 17px; letter-spacing: .08em; }
  .vm-result-badge { width: 38px; height: 38px; }
  .vm-result-word { font-size: 26px; letter-spacing: .04em; }
  .vm-verdict-label { font-size: 13px; }
  .vm-result-class { font-size: 16px; }
  .vm-result-def { font-size: 15px; line-height: 1.5; }
  .vm-result-hr { margin: var(--sp-14) 0 var(--sp-2); }
  .vm-result-link { padding: var(--sp-8) 0; font-size: 14px; }

  .vm-actions {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-10);
    margin-top: var(--sp-6);
  }
  .vm-actions--1 { grid-template-columns: 1fr; }
  .vm-btn-secondary,
  .vm-actions--1 .vm-btn-secondary,
  .vm-actions--2 .vm-btn-secondary,
  .vm-actions--3 .vm-btn-secondary {
    flex: none;
    gap: var(--sp-9);
    padding: var(--sp-12) var(--sp-10);
    font-size: 14px;
    background: rgba(10, 45, 35, .5);
    box-shadow: none;
  }
  /* icônes conservées en mobile / tablette (§6) */
  .vm-btn-secondary img { display: block; width: 18px; height: 18px; }

  .vm-value { order: 3; margin-top: var(--sp-4); }
  .vm-value-grid { grid-template-columns: 1fr; }

  .vm-ffsc { margin-top: var(--sp-18); font-size: 13px; }

  .vm-content { padding: 40px 20px 52px; }
  .vm-content-inner { font-size: 16px; }
  .vm-content-inner h2 { font-size: 24px; }
}

@media (max-width: 380px) {
  .vm-hero-inner { padding: 0 var(--sp-14); }
  .vm-result-inner { padding: var(--sp-14); }
  .vm-brand-name { font-size: 17px; }
}
