/* ═══════════════════════════════════════════════════════════
   Vérif 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).
   ⚠️ L'accent est un OR FONCÉ : le vert dit « confirmé », le rouge « contredit », l'ambre « à vérifier » — l'accent de l'appli ne doit être
   pris pour aucun d'eux. Une priorité ou un verdict n'est JAMAIS dit par la couleur seule : l'icône et le mot l'accompagnent.
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent: #8a5a00; --accent-fort: #613f00; --accent-clair: #f3ead6;
  --p3: #a8442a; --p3-clair: #fbece8; --p2: #8a5a00; --p2-clair: #fdf1d6; --p1: #6b5f56; --p1-clair: #efeae3;
  --ok-clair: #e3f2e9; --faux: #a8442a; --faux-clair: #fbece8;
}
html[data-theme="sombre"] {
  --accent: #d9a441; --accent-fort: #ecc678; --accent-clair: #30220c; --sur-accent: #1a1209;
  --p3: #f08a6f; --p3-clair: #3a1f19; --p2: #f0c36a; --p2-clair: #3a2e14; --p1: #b3a69a; --p1-clair: #2a231e;
  --ok-clair: #16301f; --faux: #f08a6f; --faux-clair: #3a1f19;
}

#ecran { padding-bottom: calc(var(--dock-h) + 96px + var(--bas)); }
#toast { bottom: calc(var(--dock-h) + var(--bas) + 84px); }
/* La pastille « 🐞 Contact » du panneau du site est posée juste sous la barre, à droite (jamais dans l'appli emballée). */
@media (max-width: 480px) { html.avec-panneau-bug #ecran { padding-top: 62px; } html.avec-panneau-bug.clavier #ecran { padding-top: 18px; } }

.liste-titre { margin: 22px 0 10px; font-size: 1.05rem; font-family: var(--police-titre); }
.liste-titre:first-child { margin-top: 4px; }
.sous-titre { margin: 18px 0 8px; font-size: .95rem; font-weight: 800; }
.sous-titre:first-child { margin-top: 2px; }
.accroche { margin: 4px 0 14px; line-height: 1.5; color: var(--doux); }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace; }
.note-infos { margin-top: 10px; }
a.lien-puce { display: inline-flex; align-items: center; text-decoration: none; }
.lien-partage { width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1.5px solid var(--trait); background: var(--panneau); font-size: .88rem; resize: none; }

/* ── l'accueil ───────────────────────────────────────────────── */
.reglage { margin: 12px 0; display: grid; gap: 6px; }
.reglage .etiquette.petit { margin-bottom: 0; }
#q-texte { width: 100%; min-height: 190px; }
.champ-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.champ-ligne .compteur { margin-left: auto; color: var(--doux); font-size: .78rem; }
.exemples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.avertissement-essai { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--p2-clair); color: var(--p2); font-size: .86rem; line-height: 1.45; }
.conseil-prov { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--panneau-2); font-size: .86rem; line-height: 1.5; }
.reprise { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--accent-clair); box-shadow: var(--sh-1); }
.reprise .txt { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.reprise .txt small { display: block; color: var(--doux); }

/* ── le résultat : synthèse, texte repéré ─────────────────────── */
.synthese { display: grid; gap: 10px; margin: 0 0 14px; padding: 14px; border-radius: var(--r-lg); background: var(--panneau); border: 1px solid var(--trait); box-shadow: var(--sh-1); }
.synthese h3 { font-size: 1.02rem; font-family: var(--police-titre); }
.compteurs { display: flex; flex-wrap: wrap; gap: 8px; }
.compteur-p { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 36px; border-radius: var(--r-pill); font-weight: 700; font-size: .86rem; }
.compteur-p.p3 { background: var(--p3-clair); color: var(--p3); }
.compteur-p.p2 { background: var(--p2-clair); color: var(--p2); }
.compteur-p.p1 { background: var(--p1-clair); color: var(--p1); }
.prog { display: block; height: 8px; 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); transition: width .25s; }
.texte-repere { margin: 8px 0 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--panneau-2); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; max-height: 46vh; overflow: auto; }
mark.r { padding: 1px 3px; border-radius: 6px; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
mark.r.p3 { background: var(--p3-clair); text-decoration-color: var(--p3); }
mark.r.p2 { background: var(--p2-clair); text-decoration-color: var(--p2); }
mark.r.p1 { background: var(--p1-clair); text-decoration-color: var(--p1); text-decoration-style: dotted; }
mark.r sup { font-size: .66em; font-weight: 800; margin-left: 2px; }
mark.r:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
mark.r.cible, .carte-el.cible { animation: surligne 1.2s ease-out; }
@keyframes surligne { from { box-shadow: 0 0 0 4px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { mark.r.cible, .carte-el.cible { animation: none; } .prog > i { transition: none; } }

/* ── une carte par élément à vérifier ─────────────────────────── */
.groupe { margin: 20px 0 8px; }
.groupe-titre { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 1.02rem; font-family: var(--police-titre); }
.groupe-titre small { color: var(--doux); font-family: var(--police); font-size: .8rem; font-weight: 400; }
.groupe-note { margin: -2px 0 10px; color: var(--doux); font-size: .84rem; line-height: 1.45; }
.carte-el { margin: 0 0 12px; padding: 12px 14px 10px; border-radius: var(--r-lg); background: var(--panneau); border: 1px solid var(--trait); border-left-width: 6px; box-shadow: var(--sh-1); }
.carte-el.p3 { border-left-color: var(--p3); }
.carte-el.p2 { border-left-color: var(--p2); }
.carte-el.p1 { border-left-color: var(--p1); }
.carte-el.fait { background: var(--panneau-2); }
.carte-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; font-weight: 700; color: var(--doux); }
.carte-tete .num { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-clair); color: var(--accent-fort); font-weight: 800; }
.carte-tete .prio { margin-left: auto; padding: 3px 10px; border-radius: var(--r-pill); font-size: .74rem; }
.carte-tete .prio.p3 { background: var(--p3-clair); color: var(--p3); }
.carte-tete .prio.p2 { background: var(--p2-clair); color: var(--p2); }
.carte-tete .prio.p1 { background: var(--p1-clair); color: var(--p1); }
.carte-extrait { margin: 8px 0 4px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.carte-phrase { margin: 0 0 6px; color: var(--doux); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.carte-phrase b { color: var(--encre); background: var(--accent-clair); border-radius: 4px; padding: 0 2px; }
.carte-pourquoi { margin: 6px 0; font-size: .88rem; line-height: 1.5; }
.carte-perime { margin: 6px 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--p3-clair); color: var(--p3); font-size: .86rem; line-height: 1.5; }
.statuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.statut { min-height: 44px; padding: 8px 12px; border-radius: var(--r-pill); border: 1.5px solid var(--trait); background: var(--panneau); font-weight: 600; font-size: .84rem; display: inline-flex; align-items: center; gap: 6px; }
.statut[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-clair); color: var(--accent-fort); }
.statut.ok[aria-pressed="true"] { border-color: var(--ok); background: var(--ok-clair); color: var(--ok); }
.statut.faux[aria-pressed="true"] { border-color: var(--faux); background: var(--faux-clair); color: var(--faux); }
.statut:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.comment { margin-top: 4px; }
.comment > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; color: var(--accent-fort); }
.comment ol { margin: 4px 0 8px 20px; display: grid; gap: 4px; font-size: .88rem; line-height: 1.5; }
.requete { margin: 8px 0; }
.requete .p { margin: 0 0 4px; font-size: .82rem; color: var(--doux); }
.modele { margin: 4px 0 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--panneau-2); font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace; font-size: .84rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pile.serree { gap: 8px; }
.pile.serree .btn-2, .pile.serree .btn-1 { min-height: 44px; }

/* ── bilan, prompt, export ──────────────────────────────────── */
.bilan { margin: 16px 0; padding: 14px; border-radius: var(--r-lg); background: var(--accent-clair); border: 1px solid var(--trait); line-height: 1.5; }
.bilan ul { margin: 6px 0 0 18px; }
.questions-cinq { margin: 6px 0 0 20px; display: grid; gap: 4px; line-height: 1.45; }
.prompt-zone { width: 100%; min-height: 220px; font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace; font-size: .82rem; line-height: 1.5; }
details.bloc-pliable { margin: 14px 0; padding: 4px 14px 10px; border: 1px solid var(--trait); border-radius: var(--r-lg); background: var(--panneau); box-shadow: var(--sh-1); }
details.bloc-pliable > summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 44px; list-style-position: inside; }
details.bloc-pliable[open] > summary { border-bottom: 1px solid var(--trait); margin-bottom: 8px; }
.case { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 4px; line-height: 1.35; cursor: pointer; }
.case input { width: 22px; height: 22px; accent-color: var(--accent); flex: 0 0 auto; }

/* ── méthode ───────────────────────────────────────────────── */
.type-fiche { margin: 0 0 12px; }
.type-fiche h3 small { font-weight: 400; }
.verdicts { display: grid; gap: 8px; }

/* ── Plus ────────────────────────────────────────────────────── */
.signature { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 12px; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.signature:hover, .signature:focus-visible { background: var(--panneau-2); }
.signature-txt { display: flex; flex-direction: column; line-height: 1.3; }
.signature-txt small { color: var(--doux); }

/* Importer un fichier */
.note-import { margin: 6px 0 0; color: var(--doux); font-size: .8rem; line-height: 1.4; }
.etat-fichier { margin: 8px 0 0; font-size: .86rem; line-height: 1.4; color: var(--doux); }
.etat-fichier:empty { display: none; }
.etat-fichier.erreur { padding: 10px 12px; border-radius: var(--r-md); background: var(--p3-clair); color: var(--p3); }
.reglage.depose { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: var(--r-md); }
