/* ═══════════════════════════════════════════════════════════
   Tons de poche — feuille de style PROPRE à l'appli
   Le socle (/shared/appli-socle.css) porte le reste : reset, barre, boutons, dock, feuilles, listes,
   message passager, clavier, visite, micro, onglets. On y redéfinit ici les jetons de couleur (la teinte
   de l'appli) et ce qui ne vaut que pour elle. Rayons et ombres : jamais de littéral
   (--r-*, --sh-* de /shared/jetons.css — controle-jetons.mjs le refuserait).
   ⚠️ La couleur d'un ton (--u) ne porte JAMAIS de texte : filet, pastille. Un jaune ou un cyan n'atteint pas 4,5 : 1
   sous du blanc, et personne ne choisirait de lire sur eux. Le texte reste à l'encre de l'appli.
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent: #b03a6a; --accent-fort: #7b294a; --accent-clair: #f4e3ea;
}
html[data-theme="sombre"] {
  --accent: #cc7f9e; --accent-fort: #dfb0c3; --accent-clair: #381b23;
}

#ecran { padding-bottom: calc(var(--dock-h) + 28px + var(--bas)); }
#toast { bottom: calc(var(--dock-h) + var(--bas) + 16px); }

/* La pastille « 🐞 Contact » du panneau du site est posée juste sous la barre, à droite (jamais dans l'appli emballée) : sur téléphone, on lui laisse sa ligne plutôt que de la poser sur le titre. */
@media (max-width: 480px) { html.avec-panneau-bug #ecran { padding-top: 62px; } html.avec-panneau-bug.clavier #ecran { padding-top: 18px; } }

.liste-titre { margin: 24px 0 10px; font-size: 1.05rem; font-family: var(--police-titre); }
#hero + .liste-titre { margin-top: 20px; }

/* ── l'écran d'accueil ───────────────────────────────────── */
#hero:empty { display: none; }
.hero-seance {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: 72px; padding: 14px 16px; margin-bottom: 4px;
  border-radius: var(--r-lg); background: var(--accent); color: var(--sur-accent); box-shadow: var(--sh-2);
}
.hero-seance:active { transform: translateY(1px); }
.hero-ico { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.hero-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.hero-txt b { font-size: 1.05rem; line-height: 1.25; }
.hero-txt small { font-size: .82rem; opacity: .9; line-height: 1.35; margin-top: 2px; }
.hero-fin { font-size: 1.4rem; flex: 0 0 auto; }
.hero-fait { padding: 16px; border-radius: var(--r-lg); background: var(--accent-clair); border: 1.5px solid var(--accent); text-align: center; }
.hero-titre { font-family: var(--police-titre); font-size: 1.15rem; font-weight: 600; }
.grille { font-size: 1.7rem; letter-spacing: .12em; margin: 6px 0; }
.hero-fait .pile { margin-top: 12px; }
.resume-progres { font-weight: 700; margin-bottom: 6px; }
.resume { font-size: .82rem; color: var(--doux); margin: 8px 0 10px; }

/* ── barres de progression et boîtes de révision ───────────────────── */
.prog { display: block; height: 6px; margin: 4px 0 10px; border-radius: var(--r-pill); background: var(--trait); overflow: hidden; }
.prog > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--r-pill); }
.boites { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.boite { padding: 10px 4px; text-align: center; border-radius: var(--r-md); background: var(--panneau-2); border: 1.5px solid var(--trait); }
.boite b { display: block; font-size: 1.3rem; line-height: 1.1; }
.boite small { display: block; font-size: .68rem; color: var(--doux); font-weight: 700; margin-top: 3px; line-height: 1.2; }
.boite.b1 { border-color: var(--alerte); }
.boite.b3 { border-color: var(--ok); }
.bilan { text-align: center; padding: 8px 0 4px; }
.bilan .gros { font-family: var(--police-titre); font-size: 2.2rem; line-height: 1.1; margin: 6px 0; }

/* Le nombre de favoris, sur l'étoile de la barre du bas. */
.dock .d-ico { position: relative; }
.d-badge {
  position: absolute; top: -6px; left: 60%; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--sur-accent);
  font-size: .66rem; font-weight: 800; line-height: 18px; text-align: center;
}
.item.sans-clic { pointer-events: none; }

/* ── la couleur d'un ton : un point et un filet, jamais le texte ─────────── */
.point { display: inline-block; width: 11px; height: 11px; border-radius: var(--r-pill); background: var(--u, var(--accent)); margin-right: 8px; vertical-align: 0; flex: 0 0 auto; box-shadow: 0 0 0 1.5px var(--panneau); }
.item-ton { border-left: 5px solid var(--u, var(--accent)); }
.item-ton .item-txt b { overflow-wrap: anywhere; }
.item-ton .item-txt small { overflow-wrap: anywhere; }
.vue-ok { color: var(--ok); font-weight: 800; }

/* ── la partie : en-tête, énoncé, propositions ─────────────────── */
.avancee { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--doux); margin: 4px 0 8px; }
.quiz-question { font-weight: 700; margin: 10px 0 6px; }
.texte-jeu {
  position: relative; margin: 8px 0 12px; padding: 14px 14px 14px 18px;
  background: var(--panneau); border: 1.5px solid var(--trait); border-left: 6px solid var(--u, var(--accent)); border-radius: var(--r-md);
  font-family: var(--police-titre); font-size: 1.05rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; box-shadow: var(--sh-1);
}
.rappel { margin: 4px 0 12px; padding: 10px 12px; border-left: 5px solid var(--u, var(--accent)); border-radius: var(--r-md); background: var(--panneau-2); font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.quiz-choix { display: grid; gap: 8px; list-style: none; }
.quiz-choix button { width: 100%; text-align: left; min-height: 56px; padding: 10px 14px; border-radius: var(--r-md); border: 2px solid var(--trait); background: var(--panneau); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: flex; align-items: center; gap: 10px; }
.quiz-choix .lettre { flex: 0 0 auto; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--panneau-2); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; }
.quiz-choix button:active { border-color: var(--accent); }
.quiz-choix button.juste { border-color: var(--ok); background: var(--panneau-2); }
.quiz-choix button.faux { border-color: var(--alerte); background: var(--alerte-clair); }
.quiz-choix button.choisi { border-color: var(--accent); background: var(--accent-clair); }
.quiz-choix button[disabled] { opacity: 1; cursor: default; }
/* Les trois textes : plus longs, en colonne, la pastille du ton arrive après la réponse. */
.quiz-choix.textes button, .quiz-choix.defs-assoc button { align-items: flex-start; flex-wrap: wrap; font-weight: 500; }
.quiz-choix .choix-texte { flex: 1 1 0; min-width: 0; white-space: pre-line; font-size: .95rem; line-height: 1.5; }
.quiz-choix.textes .choix-texte { font-family: var(--police-titre); }
.etiq-ton { flex: 0 0 100%; margin-left: 38px; font-size: .78rem; font-weight: 800; color: var(--accent-fort); }
.quiz-suite { margin-top: 12px; }
.explication { margin-top: 10px; padding: 12px 14px; border-left: 5px solid var(--u, var(--accent)); border-radius: var(--r-md); background: var(--accent-clair); font-size: .95rem; line-height: 1.55; display: grid; gap: 4px; overflow-wrap: anywhere; }
.explication > b { display: flex; align-items: center; font-size: 1.02rem; }
.explication .usages { color: var(--doux); font-size: .84rem; line-height: 1.45; }
.explication.autre { background: var(--panneau-2); border-left-color: var(--trait); font-size: .88rem; }
.a-retenir { padding: 10px 12px; border-left: 5px solid var(--u, var(--accent)); border-radius: var(--r-md); background: var(--panneau-2); display: grid; gap: 3px; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.a-retenir > b { display: flex; align-items: center; }
.actions-carte { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; margin-top: 6px; }
.actions-carte .btn-lien { padding: 0 10px; }

/* ── le pendu ────────────────────────────────────────────── */
.vies { text-align: center; font-size: 1.15rem; letter-spacing: .14em; margin: 2px 0 8px; }
.mot-pendu { text-align: center; font-family: var(--police-titre); font-size: 1.7rem; font-weight: 600; letter-spacing: .12em; margin: 14px 0 8px; overflow-wrap: anywhere; }
.clavier-pendu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 12px 0 6px; }
.lettre-btn { min-height: 46px; border-radius: var(--r-md); border: 1.5px solid var(--trait); background: var(--panneau); font: inherit; font-weight: 800; font-size: 1rem; }
.lettre-btn:active { border-color: var(--accent); }
.lettre-btn.juste { border-color: var(--ok); background: var(--panneau-2); color: var(--ok); }
.lettre-btn.faux { border-color: var(--alerte); background: var(--alerte-clair); color: var(--alerte); }
.lettre-btn[disabled] { opacity: .75; cursor: default; }

/* ── associer ────────────────────────────────────────────── */
.noms-assoc { margin: 6px 0 12px; }
.noms-assoc .puce { display: inline-flex; align-items: center; }
.noms-assoc .puce.juste { border-color: var(--ok); color: var(--ok); }
.noms-assoc .puce.faux { border-color: var(--alerte); background: var(--alerte-clair); }
.defs-assoc button.choisi { border-style: dashed; }

/* ── le dictionnaire ─────────────────────────────────────── */
.recherche-tons { width: 100%; min-height: 52px; font-size: 1rem; -webkit-appearance: none; appearance: none; }
.recherche-tons::-webkit-search-cancel-button { display: none; }
.rubriques {
  display: flex; flex-wrap: nowrap; gap: 8px; margin: 10px -16px 0; padding: 2px 16px 6px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rubriques::-webkit-scrollbar { display: none; }
.rubriques .puce { flex: 0 0 auto; white-space: nowrap; }
.ligne-double { display: flex; gap: 8px; align-items: stretch; }
.ligne-double .item { flex: 1 1 auto; min-width: 0; }
.etoile { width: 52px; height: 52px; min-height: 52px; font-size: 22px; align-self: center; }
.etoile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-clair); }
.retour-tons { margin-bottom: 6px; }
.fiche { padding: 14px 14px 14px 18px; border-left: 6px solid var(--u, var(--accent)); border-radius: var(--r-lg); background: var(--panneau); border-top: 1.5px solid var(--trait); border-right: 1.5px solid var(--trait); border-bottom: 1.5px solid var(--trait); box-shadow: var(--sh-1); }
.fiche-nom { display: flex; align-items: center; font-family: var(--police-titre); font-size: 1.5rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.fiche-nom .point { width: 14px; height: 14px; }
.fiche-def { margin-top: 8px; font-size: 1rem; line-height: 1.6; }
.fiche-usages { margin-top: 8px; font-size: .9rem; color: var(--doux); line-height: 1.5; }
.fiche-usages b { color: var(--encre); }
.fiche-instruction { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); border-left: 4px solid var(--u, var(--accent)); background: var(--panneau-2); }
.fiche-instruction > b { font-size: .88rem; }
.fiche-instruction-txt { margin: 6px 0 10px; font-size: .92rem; line-height: 1.5; user-select: text; }
.note.sujet { margin-top: -4px; margin-bottom: 8px; }
.tiroir:empty { display: none; } .tiroir { margin-top: 8px; }

/* Plus : réglages, partage, signature. */
.reglage { display: grid; gap: 6px; margin-bottom: 14px; }
.reglage label { font-weight: 700; font-size: .9rem; }
.lien-partage { width: 100%; font-size: .78rem; padding: 10px 12px; min-height: 0; height: 72px; resize: none; font-family: ui-monospace, monospace; }
.signature { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin: 0 0 4px; padding: 2px 12px 8px; border-radius: var(--r-md); color: var(--doux); text-decoration: none; }
.signature:hover, .signature:focus-visible { background: var(--panneau-2); }
.signature img { flex: 0 0 auto; }
.note.note-infos { font-size: .92rem; line-height: 1.5; }
.signature-txt { display: flex; flex-direction: column; line-height: 1.3; font-size: .92rem; }
.signature-txt b { color: var(--encre); font-family: var(--police-titre); font-size: 1.05rem; }
.signature-txt small { font-size: .8rem; }
.maj-appli + .signature { margin-top: 2px; }

@media (max-width: 359px) {
  .boites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mot-pendu { font-size: 1.4rem; }
}

/* La croix de fermeture ne rétrécit pas quand le titre est long. */
.feuille-fermer { flex: 0 0 44px; }
.feuille-tete h2 { min-width: 0; overflow-wrap: anywhere; }
