/* ═══════════════════════════════════════════════════════════
   Anonymiseur 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. 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).

   Le parti pris : un outil de PROTECTION n'a pas à être austère. Sarcelle et crème, un grand bloc d'accueil, des cartes à gros
   bords arrondis, un surligneur jaune pour les balises (comme un stabilo sur une feuille). Ce qui est grave (« à retirer en
   entier ») porte du rouge ; ce qui doute porte de l'ambre ; ce qui va bien porte du vert. Jamais la couleur seule : chaque état
   a aussi son libellé et son icône.
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent: #0f766e; --accent-fort: #0b534d; --accent-clair: #ddeceb;
  --ombre-teinte: 11, 63, 58;
  --fond: #f4f8f6; --panneau-2: #e9f1ee; --trait: rgba(11, 63, 58, 0.14);
  --encre: #14201e; --doux: #567068;
  --ok-clair: #e2f3e9;
  --surligneur: #fde68a; --encre-surligneur: #4a3600;
  --niveau3: #b4372a; --niveau3-clair: #fbebe8;
  --doute: #9a5f06; --doute-clair: #fdf1d8;
}
html[data-theme="sombre"] {
  --accent: #63c4b8; --accent-fort: #9fe0d7; --accent-clair: #123430; --sur-accent: #06201d;
  --ombre-teinte: 0, 0, 0;
  --fond: #0e1614; --panneau: #16211f; --panneau-2: #1d2b28; --trait: rgba(220, 240, 236, 0.16);
  --encre: #e8f2ef; --doux: #9db5ad;
  --ok-clair: #14301f;
  --surligneur: #6b5410; --encre-surligneur: #ffeeb0;
  --niveau3: #f19a8d; --niveau3-clair: #3a1c18;
  --doute: #e8b45a; --doute-clair: #352a12;
}

/* 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; } }

/* Un champ de fichier caché : il reste focalisable au clavier, c'est son libellé qui est tapé. */
.depot-champ { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }

mark.balise { background: var(--surligneur); color: var(--encre-surligneur); border-radius: var(--r-xs); padding: 1px 6px; font-weight: 600; font-size: .86em; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; white-space: nowrap; }

/* ── l'accueil ───────────────────────────────────────────── */
.hero { margin: 2px 0 16px; padding: 22px 18px 20px; border-radius: var(--r-2xl); background: linear-gradient(140deg, var(--accent), var(--accent-fort)); color: var(--sur-accent); box-shadow: var(--sh-2); }
.hero h2 { font-family: var(--police-titre); font-size: 1.6rem; line-height: 1.14; margin-bottom: 8px; }
.hero p { font-size: .98rem; line-height: 1.5; opacity: .96; }

.pas-bloc { margin: 0 0 14px; }
.pas { display: flex; gap: 6px; list-style: none; }
.pas li { flex: 1 1 0; min-width: 0; padding: 8px 8px 9px; border-radius: var(--r-md); border: 1.5px solid var(--trait); background: var(--panneau); text-align: center; opacity: .66; line-height: 1.25; }
.pas li.fait { opacity: .9; }
.pas li.fait b::after { content: ' ✓'; color: var(--ok); }
.pas li.actif { opacity: 1; border-color: var(--accent); background: var(--accent-clair); box-shadow: var(--sh-1); }
.pas-ico { display: block; font-size: 20px; line-height: 1.2; }
.pas li b { display: block; font-size: .86rem; }
.pas li small { display: block; font-size: .7rem; color: var(--doux); }
.pas-aide { margin-top: 10px; font-size: .88rem; color: var(--doux); line-height: 1.45; }

.reprise { margin: 0 0 14px; padding: 14px; border-radius: var(--r-lg); background: var(--accent-clair); border: 1.5px solid var(--accent); }
.reprise p { font-weight: 600; overflow-wrap: anywhere; }
.reprise .rangee { margin-top: 10px; }

.depot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px 24px; margin-top: 6px; text-align: center; border: 2.5px dashed var(--accent); border-radius: var(--r-xl); background: var(--accent-clair); cursor: pointer; box-shadow: var(--sh-1); }
.depot:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.depot.survole { background: var(--panneau); border-style: solid; box-shadow: var(--sh-2); }
.depot.occupe { opacity: .65; pointer-events: none; }
.depot-ico { font-size: 44px; line-height: 1.1; }
.depot b { font-family: var(--police-titre); font-size: 1.2rem; color: var(--accent-fort); }
.depot small { color: var(--doux); font-size: .84rem; }

.rangee.alt { margin-top: 12px; }
.rangee.alt .btn-2 { flex: 1 1 150px; }

.garanties { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 4px; }
.garanties li { padding: 7px 13px; border-radius: var(--r-pill); background: var(--panneau); border: 1px solid var(--trait); font-size: .84rem; font-weight: 600; }
.garanties li span { margin-right: 2px; }

.avant-apres { margin-top: 18px; padding: 14px; background: var(--panneau); border: 1px solid var(--trait); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.avant-apres h3, .bloc h3 { font-family: var(--police-titre); }
.aa-grille { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.aa-carte { flex: 1 1 0; min-width: 0; padding: 10px 10px 8px; border-radius: var(--r-md); background: var(--panneau-2); font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.aa-carte p + p { margin-top: 2px; }
.aa-etiquette { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin-bottom: 4px; }
.aa-avant p:nth-of-type(-n+3) { text-decoration: underline wavy var(--niveau3); text-underline-offset: 3px; }
.aa-fleche { font-size: 1.5rem; color: var(--accent); flex: 0 0 auto; }
.aa-carte mark.balise { font-size: .72rem; padding: 0 5px; }
.avant-apres .note { margin-top: 10px; font-size: .84rem; }

.bloc .puces-texte { margin-top: 2px; }
.bilan-doux { text-align: center; color: var(--doux); font-size: .84rem; margin-top: 18px; }

/* ── le repérage ─────────────────────────────────────────── */
.fichier { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px; background: var(--panneau); border: 1px solid var(--trait); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.fichier-ico { font-size: 30px; flex: 0 0 auto; }
.fichier-txt { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.fichier-txt b { overflow-wrap: anywhere; line-height: 1.3; }
.fichier-txt small { color: var(--doux); font-size: .78rem; }
.demo, .cache { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md); font-size: .88rem; line-height: 1.5; }
.demo { background: var(--doute-clair); border-left: 4px solid var(--doute); }
.cache { background: var(--accent-clair); border-left: 4px solid var(--accent); }

.selection { margin: 14px 0 4px; }
.selection-compte { font-weight: 700; font-size: .95rem; }
.selection .rangee { margin-top: 6px; }

.groupe { margin-top: 18px; }
.groupe-tete h3 { font-size: 1rem; font-family: var(--police-titre); }
.groupe-tete p { font-size: .8rem; color: var(--doux); margin: 1px 0 4px; }
.el { margin-top: 8px; background: var(--panneau); border: 1px solid var(--trait); border-left: 5px solid var(--accent); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.el-n3 { border-left-color: var(--niveau3); background: var(--niveau3-clair); }
.el-doute { border-left-color: var(--doute); }
.el-perso { border-left-color: var(--accent-fort); border-left-style: dashed; }
.el:not(.coche) { box-shadow: none; }
.el:not(.coche) .el-valeur { text-decoration: line-through; text-decoration-color: var(--doux); opacity: .75; }
.el-tete { display: flex; align-items: stretch; }
.el-case { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; min-height: 58px; cursor: pointer; }
.el-case input { width: 26px; height: 26px; flex: 0 0 auto; accent-color: var(--accent); }
.el-quoi { min-width: 0; display: flex; flex-direction: column; }
.el-valeur { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.el-type { font-size: .76rem; color: var(--doux); line-height: 1.3; }
.el-plus { flex: 0 0 auto; width: 52px; min-height: 58px; font-size: 1.15rem; color: var(--accent-fort); border-radius: 0 var(--r-md) var(--r-md) 0; }
.el-plus[aria-expanded="true"] { background: var(--accent-clair); }
.el-detail { padding: 2px 14px 14px 14px; border-top: 1px dashed var(--trait); font-size: .86rem; }
.el-etiquette { display: grid; gap: 4px; margin-top: 10px; font-weight: 700; font-size: .8rem; }
.el-balise { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .88rem; min-height: 44px; padding: 8px 10px; }
.el-detail .anpd-aide { font-size: .84rem; margin-top: 8px; color: var(--encre); }
.el-detail .btn-lien { margin-top: 6px; padding-left: 0; }

.ajout { margin-top: 20px; padding: 14px; border-radius: var(--r-lg); background: var(--panneau); border: 1.5px dashed var(--accent); }
.ajout h3 { font-family: var(--police-titre); margin-bottom: 4px; }
.ajout p { font-size: .88rem; color: var(--doux); margin-bottom: 10px; }

.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 8px; }
.image { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); border: 2px solid var(--trait); background: var(--panneau-2); font-size: .76rem; cursor: pointer; }
.image.masque { border-color: var(--accent); background: var(--accent-clair); }
.vignette { display: block; height: 84px; border-radius: var(--r-sm); background: var(--trait) center / cover no-repeat; }
.image input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ── « Choisir dans le texte » ───────────────────────────── */
.choix-info { min-height: 1.4em; margin: 0 0 8px; font-size: .86rem; font-weight: 600; color: var(--accent-fort); overflow-wrap: anywhere; }
.texte-choix { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2.15; font-size: 1rem; padding: 12px 14px; border-radius: var(--r-md); background: var(--panneau-2); user-select: none; -webkit-user-select: none; }
.mot { display: inline; padding: 3px 2px; border-radius: var(--r-sm); cursor: pointer; }
.mot:hover { background: var(--accent-clair); }
.mot.choisi { background: var(--surligneur); color: var(--encre-surligneur); font-weight: 700; box-shadow: 0 0 0 2px var(--surligneur); }
.mot:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.feuille-pied { position: sticky; bottom: -18px; z-index: 2; display: grid; gap: 8px; margin: 14px -16px -18px; padding: 10px 16px 14px; background: var(--panneau); border-top: 1px solid var(--trait); }
.feuille-pied .btn-1 { width: 100%; }
.zone-collee { min-height: 200px; font-size: .95rem; }

/* ── le résultat ─────────────────────────────────────────── */
.verdict { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-xl); border: 2px solid var(--ok); background: var(--ok-clair); box-shadow: var(--sh-2); }
.verdict.est-ko { border-color: var(--doute); background: var(--doute-clair); }
.verdict-ico { font-size: 40px; line-height: 1; flex: 0 0 auto; }
.verdict h2 { font-family: var(--police-titre); font-size: 1.22rem; line-height: 1.2; }
.verdict p { font-size: .88rem; margin-top: 4px; line-height: 1.45; }
.restes { margin: 10px 0 0 22px; font-size: .9rem; color: var(--niveau3); font-weight: 600; overflow-wrap: anywhere; }
.apercu-bloc .apercu { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow: auto; padding: 12px 14px; border-radius: var(--r-md); background: var(--panneau-2); font-size: .92rem; line-height: 1.7; }
.apercu-bloc .btn-lien { margin-top: 6px; padding-left: 0; }
#vue .anpd-bloc { margin-top: 14px; border-radius: var(--r-lg); background: var(--panneau); font-size: .88rem; }
#vue .anpd-bloc h3 { font-family: var(--police-titre); }
#vue .anpd-bloc.est-sens { background: var(--ok-clair); }
.table-carte { margin-top: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--accent-clair); border: 1.5px solid var(--accent); }
.table-carte h3 { font-family: var(--police-titre); margin-bottom: 4px; }
.table-carte p { font-size: .88rem; margin-bottom: 10px; }
.table-carte .btn-1 { width: 100%; }

/* ── restituer, apprendre, plus ──────────────────────────── */
.table-etat { margin: 10px 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--ok-clair); font-size: .88rem; font-weight: 600; line-height: 1.4; }
.table-etat.vide-table { background: var(--doute-clair); }
.charge-table { position: relative; width: 100%; }
.charge-table:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.sortie { margin-top: 14px; }
.sortie textarea { min-height: 150px; margin-top: 8px; }
.sortie .rangee { margin-top: 10px; }
.verdict-mini { padding: 10px 12px; border-radius: var(--r-md); font-size: .88rem; font-weight: 600; line-height: 1.4; background: var(--ok-clair); }
.verdict-mini.est-ko { background: var(--doute-clair); }
.onglet-intro { margin: 2px 2px 8px; font-size: .9rem; color: var(--doux); line-height: 1.45; }
.appr h3 { display: flex; align-items: center; gap: 10px; font-family: var(--police-titre); font-size: 1.02rem; }
.appr-ico { font-size: 24px; }
.appr p { font-size: .9rem; line-height: 1.5; margin-top: 6px; }
.appr-exemple { padding: 8px 10px; border-left: 4px solid var(--accent); background: var(--accent-clair); border-radius: var(--r-sm); font-size: .84rem !important; }

.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) {
  .hero h2 { font-size: 1.4rem; }
  .pas li small { display: none; }
  .aa-grille { flex-direction: column; align-items: stretch; }
  .aa-fleche { text-align: center; transform: rotate(90deg); }
}
