/* ═══════════════════════════════════════════════════════════
   Créa 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 VERT OLIVE (le vivant, le cadre d'une photo). Un état n'est JAMAIS dit par la couleur seule : l'icône et le mot l'accompagnent.
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent: #4d7c0f; --accent-fort: #365314; --accent-clair: #ecf3dc;
  --ok-clair: #e3f2e9; --faux: #a8442a; --faux-clair: #fbece8; --alerte: #8a5a00; --alerte-clair: #fdf1d6;
}
html[data-theme="sombre"] {
  --accent: #a3d65c; --accent-fort: #c6e89a; --accent-clair: #1f2a10; --sur-accent: #16200a;
  --ok-clair: #16301f; --faux: #f08a6f; --faux-clair: #3a1f19; --alerte: #f0c36a; --alerte-clair: #3a2e14;
}

#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; }
.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; }
.vide { margin: 14px 0; color: var(--doux); }
mark.trouve { background: rgba(250, 204, 21, .42); color: inherit; border-radius: var(--r-xs); padding: 0 1px; }
html[data-theme="sombre"] mark.trouve { background: rgba(250, 204, 21, .28); }
.reglage { margin: 12px 0; display: grid; gap: 6px; }
.reglage .etiquette.petit { margin-bottom: 0; }
.pile.serree { gap: 8px; }
.pile.serree .btn-2, .pile.serree .btn-1 { min-height: 44px; }

/* ── l'accueil ───────────────────────────────────────────────── */
.accueil-intro { margin: 2px 0 14px; }
.accueil-intro h2 { font-family: var(--police-titre); font-size: 1.35rem; line-height: 1.2; margin-bottom: 4px; }
.accueil-intro p { color: var(--doux); line-height: 1.5; }
.carte-photo { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; width: 100%; text-align: left; margin: 0 0 16px; padding: 16px; min-height: 96px; border: 0; border-radius: var(--r-xl); background: var(--accent); color: #fff; box-shadow: var(--sh-2); cursor: pointer; }
html[data-theme="sombre"] .carte-photo { color: var(--sur-accent); }
.carte-photo:focus-visible { outline: 3px solid var(--accent-fort); outline-offset: 3px; }
.carte-photo .cp-ico { grid-row: 1 / span 3; font-size: 2.4rem; line-height: 1; }
.carte-photo b { font-family: var(--police-titre); font-size: 1.18rem; line-height: 1.2; }
.carte-photo span.cp-txt { font-size: .92rem; line-height: 1.4; opacity: .95; }
.carte-photo .cp-go { justify-self: start; margin-top: 4px; padding: 6px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .22); font-weight: 800; font-size: .88rem; }
html[data-theme="sombre"] .carte-photo .cp-go { background: rgba(0, 0, 0, .18); }
.recherche-ligne { position: relative; margin: 0 0 14px; }
.recherche-ligne input { width: 100%; padding-right: 48px; min-height: 48px; }
.recherche-ligne .effacer { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; color: var(--doux); font-size: 1.1rem; cursor: pointer; }
.note-correction { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--accent-clair); font-size: .86rem; }
.passage { display: block; margin-top: 3px; color: var(--doux); font-style: italic; }
.compte { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--accent-clair); color: var(--accent-fort); font-size: .76rem; font-weight: 700; }

/* ── les prompts : une fiche ─────────────────────────────────── */
.bloc-prompt { margin: 0 0 14px; padding: 12px; border: 1px solid var(--trait); border-radius: var(--r-lg); background: var(--panneau); box-shadow: var(--sh-1); }
.bloc-prompt-tete { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.bloc-prompt-tete h3 { flex: 1 1 auto; min-width: 0; font-size: .98rem; line-height: 1.3; }
.btn-etoile { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--doux); }
.btn-etoile[aria-pressed="true"] { color: #d99a00; }
.btn-etoile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modele-zone { width: 100%; min-height: 0; padding: 10px 12px; border-radius: var(--r-md); border: 1.5px solid var(--trait); background: var(--panneau-2); font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace; font-size: .84rem; line-height: 1.5; resize: vertical; }
pre.modele { margin: 4px 0 8px; 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; }
.alerte-crochets { margin: 6px 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--alerte-clair); color: var(--alerte); font-size: .84rem; line-height: 1.4; }
.conseil { margin: 8px 0; line-height: 1.5; font-size: .92rem; overflow-wrap: anywhere; }
.variations { margin: 10px 0; }
.variations ul { margin: 6px 0 0 1.1rem; display: grid; gap: 4px; font-size: .9rem; line-height: 1.4; }
.rangee-outils { margin: 10px 0; padding: 10px 12px; border-radius: var(--r-lg); background: var(--panneau-2); }
.rangee-outils .etiquette { margin-bottom: 0; }
.rangee-outils .puces { margin-top: 8px; }
.rangee-outils .aide-outil { margin: 8px 0 0; font-size: .8rem; color: var(--doux); line-height: 1.4; }
details.bloc-pliable { margin: 12px 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; }

/* ── la photo pro ────────────────────────────────────────────── */
.etapes-num { list-style: none; counter-reset: e; display: grid; gap: 8px; margin: 8px 0 14px; padding: 0; }
.etapes-num li { counter-increment: e; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; line-height: 1.45; font-size: .92rem; }
.etapes-num li::before { content: counter(e); display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 800; font-size: .86rem; }
html[data-theme="sombre"] .etapes-num li::before { color: var(--sur-accent); }
.choix-groupe { margin: 12px 0 4px; }
.choix-groupe .etiquette { margin-bottom: 0; }
.note-tenue { margin: 6px 0 0; font-size: .82rem; color: var(--doux); }
.coche-ligne { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 0; min-height: 44px; border-bottom: 1px solid var(--trait); cursor: pointer; line-height: 1.45; font-size: .92rem; }
.coche-ligne:last-child { border-bottom: 0; }
.coche-ligne input { width: 26px; height: 26px; margin-top: 1px; accent-color: var(--accent); }
.coche-ligne input:checked + span { color: var(--doux); text-decoration: line-through; text-decoration-thickness: 1px; }
.progres { display: block; height: 8px; margin: 6px 0 0; border-radius: var(--r-pill); background: var(--trait); overflow: hidden; }
.progres > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--r-pill); transition: width .25s; }
.piege { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--faux-clair); line-height: 1.45; font-size: .9rem; }
.piege b { display: block; color: var(--faux); margin-bottom: 2px; }

/* ── les astuces ─────────────────────────────────────────────── */
.regle { margin: 0 0 14px; padding: 12px; border: 1px solid var(--trait); border-radius: var(--r-lg); background: var(--panneau); box-shadow: var(--sh-1); }
.regle h3 { font-size: .98rem; margin-bottom: 4px; }
.regle > p { font-size: .9rem; line-height: 1.45; color: var(--doux); margin-bottom: 8px; }
.compare { display: grid; gap: 8px; }
@media (min-width: 560px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare > div { padding: 8px 10px; border-radius: var(--r-md); font-size: .88rem; line-height: 1.4; overflow-wrap: anywhere; }
.compare .mauvais { background: var(--faux-clair); }
.compare .bon { background: var(--ok-clair); }
.compare small { display: block; font-weight: 800; margin-bottom: 2px; }
.chips-vocab { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chips-vocab .puce { min-height: 40px; }
.champ-couche { margin: 10px 0; display: grid; gap: 4px; }
.champ-couche textarea { min-height: 76px; }
.champ-couche small { color: var(--doux); font-size: .78rem; }
.sortie-prompt { margin: 12px 0; }
.carte-limite { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--panneau-2); line-height: 1.45; font-size: .9rem; }
.carte-limite b { display: block; margin-bottom: 2px; }
a.lien-puce { display: inline-flex; align-items: center; text-decoration: none; }
.note-ligne { display: flex; gap: 8px; align-items: stretch; }
.note-ligne .item { flex: 1 1 auto; min-width: 0; }
