/* OnePiecedle — feuille de style (d'après maquette/Main.dc.html, Mobile.dc.html, Victoire.dc.html) */

:root {
  --mer: #0E1A24;
  --panneau: #16293A;
  --panneau-bord: #2C4356;
  --parchemin: #EEDFC3;
  --parchemin-fonce: #D9C39C;
  --champ: #FBF4E4;
  --encre: #2A1D12;
  --encre-2: #4A3622;
  --encre-3: #6B5338;
  --bord-parchemin: #7A5A34;
  --or: #D4A64A;
  --or-clair: #F0C873;
  --rouge: #A8321F;
  --clair-2: #C9B48E;
  --desactive: #8796A3;
  --desactive-bord: #4A5B69;
  --correct: #2E7D4E;
  --partiel: #E39A2B;
  --incorrect: #8F2B21;
  --texte-tuile: #FBF4E4;

  --titre: 'Pirata One', 'Alegreya', serif;
  --texte: 'Alegreya', Georgia, serif;
  --interface: 'Alegreya Sans', sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--mer);
  color: var(--parchemin);
  font-family: var(--texte);
  /* chiffres alignés et lisibles (Alegreya dessine par défaut des chiffres « bas de casse ») */
  font-variant-numeric: lining-nums;
}

a { color: var(--or); }
a:hover { color: var(--or-clair); }

button { font: inherit; cursor: pointer; }
input { font-variant-numeric: lining-nums; }
button:disabled { cursor: default; }

:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }

.page {
  min-height: 100vh;
  padding: 40px 24px 56px;
}

.conteneur {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ------------------------------------------------------------------ en-tête */
.entete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.entete h1 {
  margin: 0;
  font-family: var(--titre);
  font-weight: 400;
  font-size: 84px;
  line-height: 0.95;
  letter-spacing: 1px;
  color: var(--parchemin);
}

.devise {
  margin: 0;
  font-size: 20px;
  font-style: italic;
  color: var(--clair-2);
}

/* ------------------------------------------------------------------ modes */
.modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.mode {
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px dashed var(--desactive-bord);
  background: transparent;
  color: var(--desactive);
  font-family: var(--interface);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode.actif {
  border: 2px solid var(--or);
  background: var(--or);
  color: #1A120A;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ------------------------------------------------------------------ outils */
.outils {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.outil {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--panneau);
  border: 1px solid var(--panneau-bord);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--interface);
  font-weight: 700;
  font-size: 15px;
  color: var(--parchemin);
}

.outil svg { flex: none; }

/* ------------------------------------------------------------------ avis de recherche */
.avis {
  position: relative;
  background: var(--parchemin);
  color: var(--encre);
  border-radius: 6px;
  border: 3px double var(--bord-parchemin);
  box-shadow: 0 0 0 6px var(--parchemin), 0 0 0 8px var(--bord-parchemin);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.avis-titre {
  margin: 0;
  font-family: var(--titre);
  font-size: 44px;
  line-height: 1;
  color: var(--rouge);
  letter-spacing: 2px;
}

.avis-intro {
  margin: 0;
  font-size: 19px;
  text-align: center;
  color: var(--encre-2);
}

.formulaire {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.formulaire label {
  font-family: var(--interface);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--encre-3);
}

.saisie {
  position: relative;   /* repère des suggestions, juste sous le champ */
  display: flex;
  gap: 10px;
}

.saisie input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 8px;
  border: 2px solid var(--bord-parchemin);
  background: var(--champ);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 20px;
}

.saisie input::placeholder { color: #9A8466; }
.saisie input:disabled { opacity: 0.7; }

.bouton-principal {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 8px;
  border: 0;
  background: var(--rouge);
  color: var(--champ);
  font-family: var(--interface);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.5px;
}

.bouton-principal:disabled { opacity: 0.6; }

/* textes courts, affichés sur téléphone à la place des textes longs (voir fin du fichier) */
.court { display: none; }

.message-saisie {
  margin: 0;
  font-family: var(--interface);
  font-size: 15px;
  color: var(--rouge);
  min-height: 0;
}

.message-saisie:empty { display: none; }
.message-saisie.succes { color: var(--correct); font-weight: 700; }

/* suggestions */
.suggestions {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--champ);
  border: 2px solid var(--bord-parchemin);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(14, 26, 36, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.suggestions[hidden] { display: none; }

.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  min-height: 44px;
  cursor: pointer;
}

.suggestion.active,
.suggestion:hover { background: #EADBBC; }

.suggestion .textes { display: flex; flex-direction: column; min-width: 0; }

.suggestion .nom {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--encre);
}

.suggestion .sous-titre {
  display: block;
  font-size: 14px;
  font-style: italic;
  color: var(--encre-3);
}

/* vignettes : cadre fixe propre à chaque emplacement (tailles ci-dessous) ; l'image du wiki
   le remplit sans être déformée, centrée en haut (visage et buste), et n'apparaît qu'une fois
   chargée. Les initiales restent dessous : visibles pendant le chargement et si l'image échoue.
   Point de cadrage propre à un personnage : champ « cadrage » de corrections.csv. */
.vignette {
  position: relative;
  flex: none;
  border-radius: 6px;
  background: var(--parchemin-fonce);
  border: 2px dashed var(--bord-parchemin);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--interface);
  font-weight: 800;
  color: var(--encre-2);
  overflow: hidden;
}

.vignette img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

.vignette.chargee { border-style: solid; }
.vignette.chargee img { opacity: 1; }
.vignette.chargee .initiales { visibility: hidden; }

.vignette-suggestion { width: 40px; height: 40px; border-radius: 50%; font-size: 14px; }
.vignette-ligne { width: 64px; height: 76px; font-size: 18px; }

.infos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  font-family: var(--interface);
  font-size: 15px;
  color: var(--encre-3);
}

.infos strong { color: var(--encre); }

/* ------------------------------------------------------------------ tableau des essais */
.essais {
  overflow-x: auto;
  padding-bottom: 6px;
}

.essais-largeur {
  min-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grille {
  display: grid;
  grid-template-columns: 200px repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.entetes {
  font-family: var(--interface);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--clair-2);
  text-align: center;
}

.entetes span:first-child { text-align: left; padding-left: 6px; }

.trait { height: 2px; background: var(--panneau-bord); }

.lignes { display: flex; flex-direction: column; gap: 10px; }

.personnage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  background: var(--panneau);
  border: 1px solid var(--panneau-bord);
}

.personnage .nom {
  font-family: var(--interface);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--parchemin);
}

.tuile {
  position: relative;
  min-height: 92px;
  padding: 10px 8px;
  border-radius: 8px;
  color: var(--texte-tuile);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-family: var(--interface);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.tuile.correct { background: var(--correct); }
.tuile.partiel { background: var(--partiel); color: var(--encre); }
.tuile.incorrect { background: var(--incorrect); }

.tuile .libelle { display: none; }
.tuile .valeur { white-space: pre-line; overflow-wrap: anywhere; }
.tuile .valeur-courte { display: none; }
.tuile .fleche { flex: none; }

.tuile .marque {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sans-symboles .tuile .marque { display: none; }

.vide {
  margin: 0;
  padding: 18px;
  text-align: center;
  font-style: italic;
  color: var(--clair-2);
}

/* ------------------------------------------------------------------ légende, pied de page */
.legende {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
  font-family: var(--interface);
  font-weight: 700;
  font-size: 15px;
  color: var(--parchemin);
}

.legende > span { display: flex; align-items: center; gap: 8px; }

.pastille { width: 22px; height: 22px; border-radius: 5px; }
.pastille.correct { background: var(--correct); }
.pastille.partiel { background: var(--partiel); }
.pastille.incorrect { background: var(--incorrect); }

.hier-bas {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--clair-2);
}

.hier-bas strong { color: var(--parchemin); }

/* boutons Statistiques et Comment jouer de l'en-tête (téléphone seulement) */
.entete-boutons { display: none; }

.bouton-icone {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--panneau-bord);
  background: var(--panneau);
  color: var(--or);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pied {
  text-align: center;
  font-size: 14px;
  color: var(--desactive);
}

.pied p { margin: 0; }
.pied p + p { margin-top: 4px; }

.bandeau-demo {
  margin: 0 auto;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px dashed var(--or);
  font-family: var(--interface);
  font-size: 15px;
  color: var(--or);
  text-align: center;
}

.bandeau-demo[hidden] { display: none; }

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ bouton « Voir le résultat » */
.bouton-secondaire {
  align-self: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  border: 2px solid var(--rouge);
  background: transparent;
  color: var(--rouge);
  font-family: var(--interface);
  font-weight: 800;
  font-size: 16px;
}

.bouton-secondaire:hover { background: rgba(168, 50, 31, 0.08); }
.bouton-secondaire[hidden] { display: none; }

/* ------------------------------------------------------------------ fenêtres (victoire, statistiques, aide) */
.fenetre {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 8px;          /* place pour le double liseré du parchemin */
  border: 0;
  background: transparent;
  color: var(--encre);
  overflow: auto;
}

.fenetre::backdrop { background: rgba(14, 26, 36, 0.92); }

.cadre {
  position: relative;
  background: var(--parchemin);
  color: var(--encre);
  border-radius: 6px;
  border: 3px double var(--bord-parchemin);
  box-shadow: 0 0 0 6px var(--parchemin), 0 0 0 8px var(--bord-parchemin);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-family: var(--texte);
}

.fermer {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--encre-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fermer:hover { background: rgba(122, 90, 52, 0.12); }

.fenetre-titre {
  margin: 0;
  padding: 0 40px;
  font-family: var(--titre);
  font-weight: 400;
  font-size: 52px;
  line-height: 1;
  color: var(--rouge);
  letter-spacing: 1px;
  text-align: center;
}

.trouve { display: flex; align-items: center; gap: 20px; }
.trouve[hidden] { display: none; }

.trouve-vignette .vignette { width: 110px; height: 132px; font-size: 26px; }

.trouve-textes { display: flex; flex-direction: column; gap: 4px; }
.trouve-nom { font-size: 30px; font-weight: 700; line-height: 1.1; }
.trouve-epithete { font-size: 17px; font-style: italic; color: var(--encre-3); }
.trouve-epithete:empty { display: none; }
.trouve-essais { font-family: var(--interface); font-size: 17px; color: var(--encre-2); }

.surtitre {
  font-family: var(--interface);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-3);
}

.partage {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.partage[hidden], .separateur[hidden] { display: none; }

.apercu {
  background: var(--champ);
  border: 1px solid var(--clair-2);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.apercu-titre { font-family: var(--interface); font-weight: 700; font-size: 16px; }
.apercu-adresse { font-family: var(--interface); font-size: 14px; color: var(--encre-3); }
.apercu-ligne { display: flex; gap: 4px; }
.carre { width: 22px; height: 22px; border-radius: 4px; }
.apercu.compact { gap: 4px; }
.apercu.compact .apercu-ligne { gap: 3px; }
.apercu.compact .carre { width: 16px; height: 16px; border-radius: 3px; }
.apercu.tres-compact { gap: 3px; }
.apercu.tres-compact .carre { width: 12px; height: 12px; border-radius: 2px; }
.carre.correct { background: var(--correct); }
.carre.partiel { background: var(--partiel); }
.carre.incorrect { background: var(--incorrect); }

.bouton-copier {
  min-height: 52px;
  padding: 0 28px;
  border-radius: 8px;
  border: 0;
  background: var(--rouge);
  color: var(--champ);
  font-family: var(--interface);
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bouton-copier.copie { background: var(--correct); }

.note {
  font-family: var(--interface);
  font-size: 14px;
  color: var(--encre-3);
  text-align: center;
}

.copie-manuelle {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--bord-parchemin);
  background: var(--champ);
  color: var(--encre);
  font-family: var(--interface);
  font-size: 15px;
  resize: vertical;
}

.copie-manuelle[hidden] { display: none; }

.separateur { width: 100%; height: 2px; background: var(--clair-2); }

.chiffres {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
  font-family: var(--interface);
}

.chiffres > div { display: flex; flex-direction: column; }
.chiffre { font-size: 28px; font-weight: 800; }
.legende-chiffre { font-size: 13px; color: var(--encre-3); }

.histogramme { width: 100%; display: flex; flex-direction: column; gap: 6px; }
#histogramme { display: flex; flex-direction: column; gap: 6px; }

.barre {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--interface);
  font-size: 14px;
}

.barre-libelle { width: 28px; text-align: right; font-weight: 700; }
.barre-fond { flex: 1; height: 20px; background: #E2D1B1; border-radius: 4px; overflow: hidden; }
.barre-plein { height: 20px; background: var(--bord-parchemin); border-radius: 4px; }
.barre.du-jour .barre-plein { background: var(--rouge); }
.barre-nombre { min-width: 20px; font-weight: 700; }

.note-test {
  margin: 0;
  font-family: var(--interface);
  font-size: 14px;
  font-style: italic;
  color: var(--encre-3);
}

.note-test[hidden] { display: none; }

.prochain {
  margin: 0;
  font-family: var(--interface);
  font-size: 16px;
  color: var(--encre-2);
}

/* fenêtre Comment jouer */
.aide { align-items: stretch; gap: 14px; font-size: 17px; line-height: 1.45; }
.aide .fenetre-titre { margin-bottom: 4px; }
.aide p { margin: 0; color: var(--encre-2); }
.aide strong { color: var(--encre); }

.aide h3 {
  margin: 8px 0 0;
  font-family: var(--interface);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-3);
}

.exemples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.exemples .tuile { min-height: 64px; }

.puces { margin: 0; padding-left: 20px; color: var(--encre-2); }
.puces li + li { margin-top: 2px; }
.fleche-aide { vertical-align: -2px; color: var(--encre); }

.colonnes {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  color: var(--encre-2);
}

.colonnes dt {
  font-family: var(--interface);
  font-weight: 800;
  font-size: 16px;
  color: var(--encre);
  padding-top: 1px;
}

.colonnes dd { margin: 0; }
.colonnes em { font-style: normal; font-weight: 700; color: #9A5A0C; }

.case {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--champ);
  border: 1px solid var(--clair-2);
  font-family: var(--interface);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.case input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--rouge); cursor: pointer; }
.precision { display: block; font-weight: 500; font-size: 14px; color: var(--encre-3); }

.fin-aide { align-self: center; margin-top: 6px; padding: 0 28px; }


/* ================================================================== téléphone (d'après maquette/Mobile.dc.html)
   Jusqu'à 640 px de large : en-tête compact, modes qui défilent, un essai = une carte de 8 tuiles
   (4 × 2) avec libellé. Au-delà, le tableau de l'ordinateur défile horizontalement s'il manque de place. */
@media (max-width: 640px) {
  .long { display: none; }
  .court { display: inline; }
  p.court { display: block; }

  .page { padding: 20px 16px 40px; }
  .conteneur { gap: 16px; }

  /* en-tête compact : pavillon et titre à gauche, Statistiques et Comment jouer à droite */
  .entete {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    text-align: left;
  }
  .entete > svg { width: 36px; height: 36px; }
  .entete h1 { font-size: 38px; line-height: 1; letter-spacing: 0; }
  .devise { display: none; }
  .entete-boutons { display: flex; gap: 4px; }
  .outils { display: none; }

  /* modes : une seule ligne qui défile */
  .modes {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -16px;        /* le défilement va jusqu'au bord de l'écran */
    padding: 0 16px 2px;
    scrollbar-width: none;
  }
  .modes::-webkit-scrollbar { display: none; }
  .mode { flex: none; min-height: 44px; padding: 8px 16px; font-size: 15px; white-space: nowrap; }
  .mode.actif { letter-spacing: 0; }
  .mode svg { display: none; }

  /* carte de saisie */
  .avis { padding: 20px 16px; gap: 12px; box-shadow: none; align-items: stretch; }
  .avis-titre { font-size: 32px; letter-spacing: 1px; text-align: center; }
  .avis-intro { font-size: 16px; }
  .formulaire label { font-size: 13px; }
  .saisie { gap: 8px; }
  .saisie input { min-height: 48px; padding: 0 12px; font-size: 18px; }
  .bouton-principal { min-height: 48px; padding: 0 16px; font-size: 16px; }
  .suggestions { top: calc(100% + 8px); }
  .suggestion { gap: 10px; padding: 6px 8px; }
  .suggestion .nom { font-size: 17px; }
  .suggestion .sous-titre { font-size: 13px; }
  .infos { justify-content: space-between; gap: 4px 12px; font-size: 14px; }

  /* essais : une carte par personnage, 8 tuiles en 4 × 2 */
  .essais { overflow: visible; padding-bottom: 0; }
  .essais-largeur { min-width: 0; }
  .entetes, .trait { display: none; }
  .lignes { gap: 16px; }

  .ligne {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    background: var(--panneau);
    border: 1px solid var(--panneau-bord);
  }
  .ligne .personnage {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    padding: 0;
    gap: 10px;
    background: none;
    border: 0;
  }
  .ligne .personnage .nom { font-size: 18px; font-weight: 800; }
  .vignette-ligne { width: 44px; height: 52px; font-size: 15px; }

  .tuile {
    min-height: 74px;
    padding: 6px 4px;
    border-radius: 6px;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.15;
  }
  .tuile .libelle {
    display: block;
    max-width: 100%;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    opacity: 0.85;
    overflow-wrap: anywhere;
  }
  .tuile .valeur { max-width: 100%; hyphens: auto; }
  .tuile .valeur-longue { display: none; }
  .tuile .valeur-courte { display: block; }
  .tuile .fleche { width: 16px; height: 16px; }
  .tuile.mot-long { font-size: 11.5px; }
  /* symbole ✓ ~ ✗ dans le coin bas, à l'écart du libellé ; place réservée sous le texte */
  .tuile { padding-bottom: 14px; }
  .sans-symboles .tuile { padding-bottom: 6px; }
  .tuile .marque { top: auto; bottom: 3px; right: 3px; width: 13px; height: 13px; }
  .tuile .marque svg { width: 11px; height: 11px; }

  .vide { padding: 12px; }

  .legende { gap: 8px 16px; font-size: 14px; }
  .legende svg { width: 18px; height: 18px; }
  .pastille { width: 18px; height: 18px; }
  .pied { font-size: 13px; }
  .bandeau-demo { font-size: 14px; }

  /* fenêtres : presque toute la largeur, défilement dans la fenêtre si besoin */
  .fenetre {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .cadre { padding: 24px 16px 20px; gap: 16px; }
  .fermer { top: 4px; right: 4px; }
  .fenetre-titre { padding: 0 32px; font-size: 36px; }
  .trouve { gap: 14px; align-self: stretch; justify-content: center; }
  .trouve-vignette .vignette { width: 76px; height: 92px; font-size: 20px; }
  .trouve-nom { font-size: 23px; }
  .trouve-epithete, .trouve-essais { font-size: 15px; }
  .apercu { padding: 12px 14px; }
  .bouton-copier { width: 100%; justify-content: center; padding: 0 16px; }
  .chiffres { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 12px; column-gap: 0; }
  .chiffres > div { flex: 0 0 33.33%; }
  .chiffre { font-size: 24px; }
  .aide { font-size: 16px; }
  .colonnes { grid-template-columns: 1fr; gap: 2px; }
  .colonnes dd + dt { margin-top: 8px; }
  .case { font-size: 15px; padding: 10px 12px; }
  .fin-aide { align-self: stretch; }
}

/* très petits téléphones (moins de 375 px) : un cran plus serré */
@media (max-width: 374px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .modes { margin: 0 -12px; padding: 0 12px 2px; }
  .entete > svg { width: 30px; height: 30px; }
  .entete h1 { font-size: 31px; }
  .ligne { padding: 8px; gap: 4px; }
  .tuile { padding: 6px 2px 14px; font-size: 12px; }
  .sans-symboles .tuile { padding-bottom: 6px; }
  .tuile.mot-long { font-size: 11px; }
  .tuile .libelle { font-size: 9px; letter-spacing: 0; }
}
