/* ═══════════════════════════════════════════════════════════
   Handicap et emploi 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).
   ⚠️ Le vert, l'orange et le rouge disent « juste », « à vérifier », « faux » : l'accent de l'appli est un vert-bleu profond, bien distinct du vert
   de la réussite. Un verdict n'est JAMAIS dit par la couleur seule : l'icône et le mot l'accompagnent.
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent: #176b5c; --accent-fort: #104b40; --accent-clair: #dfeae8;
  --danger: #b3261e; --danger-clair: #fbe9e7; --attention: #8a5a00; --attention-clair: #fdf1d6;
}
html[data-theme="sombre"] {
  --accent: #689f95; --accent-fort: #a2c4be; --accent-clair: #162620; --sur-accent: #0c1c18;
  --danger: #f08a80; --danger-clair: #3b1f1c; --attention: #f0c36a; --attention-clair: #3a2e14;
}

#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). */
@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); }
.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; }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace; }

/* ── barres de progression ───────────────────────────────────── */
.prog { display: block; height: 8px; margin: 6px 0 4px; 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); }

/* ── l'accueil : qui êtes-vous, où en êtes-vous ──────────────────── */
.profils { display: flex; flex-wrap: wrap; gap: 8px; }
.profils .puce { min-height: 44px; }
.carte-bilan {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 12px 0 0; padding: 14px 16px; min-height: 76px;
  border-radius: var(--r-lg); background: var(--accent); color: var(--sur-accent); box-shadow: var(--sh-2);
}
.carte-bilan:active { transform: translateY(1px); }
.carte-bilan .gros-ico { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.carte-bilan .txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.carte-bilan b { font-size: 1.05rem; line-height: 1.25; }
.carte-bilan small { font-size: .84rem; opacity: .94; line-height: 1.35; margin-top: 2px; }
.carte-bilan .fin { font-size: 1.4rem; flex: 0 0 auto; }
.carte-bilan .pct { font-family: var(--police-titre); font-size: 1.9rem; font-weight: 700; line-height: 1; flex: 0 0 auto; }
.banniere-situation {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 12px 0 0; padding: 12px 14px; min-height: 60px;
  border-radius: var(--r-lg); border: 2px solid var(--danger); background: var(--danger-clair); color: var(--encre);
}
.banniere-situation .gros-ico { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.banniere-situation b { display: block; line-height: 1.25; color: var(--danger); }
.banniere-situation small { display: block; font-size: .82rem; color: var(--doux); line-height: 1.35; margin-top: 1px; }
.champ-recherche { display: block; width: 100%; margin: 14px 0 0; padding: 12px 14px; min-height: 48px; border-radius: var(--r-md); border: 1.5px solid var(--trait); background: var(--panneau); }
.resultats { margin-top: 10px; }
.resultats .vide { padding: 10px 2px; }
mark.trouve { background: rgba(250, 204, 21, .42); color: inherit; border-radius: 3px; padding: 0 1px; }
html[data-theme="sombre"] mark.trouve { background: rgba(250, 204, 21, .28); }

/* ── les familles de fiches ──────────────────────────────────── */
.famille { margin-bottom: 10px; border: 1.5px solid transparent; border-radius: var(--r-lg); background: var(--panneau); overflow: hidden; box-shadow: var(--sh-1); border-left: 6px solid var(--c-vif, var(--accent)); }
.famille.ouverte { border-color: var(--c-vif, var(--accent)); box-shadow: var(--sh-2); }
.famille-tete { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 66px; padding: 12px 14px; background: transparent; }
.famille.ouverte .famille-tete { background: var(--c-clair, var(--accent-clair)); }
.famille-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 46px; height: 46px; font-size: 24px; border-radius: var(--r-md); background: var(--c, var(--accent)); box-shadow: var(--sh-1); }
.famille-txt { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.famille-txt b { font-family: var(--police-titre); font-size: 1.02rem; line-height: 1.25; }
.famille.ouverte .famille-txt b, .famille.ouverte .famille-fleche { color: var(--c-fort, var(--accent-fort)); }
.famille-txt small { font-size: .78rem; color: var(--doux); line-height: 1.35; margin-top: 2px; }
.famille-fleche { flex: 0 0 auto; color: var(--doux); font-size: 1.1rem; transition: transform .18s ease; }
.famille.ouverte .famille-fleche { transform: rotate(90deg); }
.famille-corps { display: grid; gap: 8px; padding: 6px 10px 12px; }
.famille-corps[hidden] { display: none; }
.ligne-fiche { align-items: flex-start; }
.ligne-fiche .item-txt small { line-height: 1.4; }
.pastille-fait { flex: 0 0 auto; margin-left: 6px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--panneau-2); font-size: .72rem; font-weight: 800; color: var(--doux); white-space: nowrap; }
.pastille-fait.complet { background: color-mix(in srgb, var(--ok) 18%, var(--panneau)); color: var(--ok); }

/* La teinte d'une famille : --c posé par app.js (teinter), les nuances en sont tirées. */
:root { --c-vif: var(--accent); --c-fort: var(--accent-fort); --c-clair: var(--accent-clair); }
[style*="--c:"] {
  --c-vif: var(--c);
  --c-fort: color-mix(in srgb, var(--c) 74%, #000);
  --c-clair: color-mix(in srgb, var(--c) 11%, var(--panneau));
}
html[data-theme="sombre"] [style*="--c:"] {
  --c-vif: color-mix(in srgb, var(--c) 60%, #fff);
  --c-fort: color-mix(in srgb, var(--c) 38%, #fff);
  --c-clair: color-mix(in srgb, var(--c) 26%, var(--panneau));
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  [style*="--c:"] { --c-vif: var(--c); --c-fort: var(--accent-fort); --c-clair: var(--accent-clair); }
}
.famille-ico { color: #fff; }

/* ── une fiche ───────────────────────────────────────────────── */
.fiche-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.etiquette-pastille { padding: 3px 10px; border-radius: var(--r-pill); background: var(--c-clair, var(--accent-clair)); color: var(--c-fort, var(--accent-fort)); font-size: .76rem; font-weight: 800; }
.fiche-court { font-size: 1.02rem; line-height: 1.55; margin-bottom: 4px; }
.coches { display: grid; gap: 8px; margin: 6px 0 4px; list-style: none; }
.coche {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; min-height: 52px; padding: 12px 14px;
  border-radius: var(--r-md); border: 1.5px solid var(--trait); background: var(--panneau); line-height: 1.5; overflow-wrap: anywhere;
}
.coche .case { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 1px; border-radius: var(--r-sm); border: 2px solid var(--doux); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: transparent; }
.coche[aria-checked="true"] { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, var(--panneau)); }
.coche[aria-checked="true"] .case { background: var(--ok); border-color: var(--ok); color: var(--sur-accent); }
.coche[aria-checked="true"] .coche-txt { color: var(--doux); }
.puces-liste { margin: 6px 0 4px 20px; display: grid; gap: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.encart { padding: 12px 14px; border-radius: var(--r-md); background: var(--panneau-2); line-height: 1.55; overflow-wrap: anywhere; font-size: .94rem; }
.encart.vite { border-left: 5px solid var(--danger); background: var(--danger-clair); font-weight: 600; }
.encart.attention { border-left: 5px solid var(--attention); background: var(--attention-clair); }
.pile.serre { 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; }
.tiroir { margin-top: 12px; }

/* ── le bilan ────────────────────────────────────────────────── */
.anneau { --p: 0; position: relative; width: 140px; height: 140px; margin: 8px auto 10px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c-vif, var(--accent)) calc(var(--p) * 1%), var(--trait) 0); }
.anneau::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--panneau); }
.anneau > * { position: relative; }
.anneau .gros { margin: 0; font-family: var(--police-titre); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--c-fort, var(--accent-fort)); }
.resume-bilan { text-align: center; padding: 6px 0 4px; }
.resume-bilan p { line-height: 1.5; }
.question-bilan { font-family: var(--police-titre); font-size: 1.2rem; line-height: 1.4; margin: 14px 0; overflow-wrap: anywhere; }
.choix { display: grid; gap: 10px; margin-top: 12px; }
.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: 700; line-height: 1.35; display: flex; align-items: center; gap: 12px; }
.choix button .ic { flex: 0 0 auto; font-size: 1.3rem; width: 28px; text-align: center; }
.choix button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-clair); }
.priorite { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--panneau-2); border-left: 5px solid var(--c-vif, var(--accent)); line-height: 1.5; overflow-wrap: anywhere; }
.priorite .num { font-weight: 800; color: var(--c-fort, var(--accent-fort)); font-size: .8rem; }

/* ── communs aux écrans de questions ───────────────────────────── */
.progression-partie { font-size: .82rem; color: var(--doux); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.reglage { margin: 12px 0; display: grid; gap: 6px; }
.reglage label { font-weight: 800; font-size: .9rem; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces-col { flex-direction: column; align-items: stretch; }
.puces-col .puce { width: 100%; text-align: left; justify-content: flex-start; }
.question-bilan.petit { font-size: 1.02rem; margin: 6px 0 2px; }
.resultat-parler { margin-top: 6px; }
.moment .num { font-size: 1.4rem; line-height: 1; }
.moment b { color: var(--c-fort, var(--accent-fort)); }

/* ── vrai ou faux ──────────────────────────────────────────────── */
.choix-vf { grid-template-columns: 1fr 1fr; }
.choix-vf button { justify-content: center; text-align: center; display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.choix button.est-bonne { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--panneau)); }
.choix button:disabled { opacity: 1; }
.encart.juste { border-left: 5px solid var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panneau)); font-weight: 700; }
.encart.faux { border-left: 5px solid var(--danger); background: var(--danger-clair); font-weight: 700; }
#verdict-idee { margin-top: 14px; display: grid; gap: 10px; line-height: 1.5; }
#verdict-idee p { margin: 0; }

/* ── 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); }
.note-infos { margin-top: 10px; }
.item-vedette-urgence { border-color: var(--danger); }

/* ── La bibliothèque de liens ─────────────────────────────────────────── */
.carte-biblio {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 12px 0 0; padding: 13px 16px; min-height: 68px;
  border-radius: var(--r-lg); border: 2px solid var(--accent); background: var(--accent-clair); color: var(--encre); box-shadow: var(--sh-1);
}
.carte-biblio:active { transform: translateY(1px); }
.carte-biblio .gros-ico { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.carte-biblio .txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.carte-biblio b { font-size: 1.02rem; line-height: 1.25; color: var(--accent-fort); }
.carte-biblio small { font-size: .84rem; line-height: 1.35; margin-top: 2px; color: var(--doux); }
.carte-biblio .fin { font-size: 1.4rem; flex: 0 0 auto; color: var(--accent-fort); }
/* ── La carte « Trouver une formation » : la recherche de formation passe avant tout le reste ───────────────── */
.carte-formation {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 12px 0 0; padding: 15px 16px; min-height: 74px;
  border-radius: var(--r-lg); border: 2px solid var(--accent); background: var(--accent); color: var(--sur-accent); box-shadow: var(--sh-2);
}
.carte-formation:active { transform: translateY(1px); }
.carte-formation .gros-ico { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.carte-formation .txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.carte-formation b { font-size: 1.08rem; line-height: 1.25; color: var(--sur-accent); }
.carte-formation small { font-size: .85rem; line-height: 1.35; margin-top: 2px; color: var(--sur-accent); opacity: .92; }
.carte-formation .fin { font-size: 1.4rem; flex: 0 0 auto; color: var(--sur-accent); }
.puces-biblio { margin-top: 10px; }
.puces-biblio .puce { min-height: 44px; }
.biblio-liste { margin-top: 6px; }
.biblio-groupe { margin: 18px 0 6px; }
.biblio-groupe h3 { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.3; }
.biblio-groupe .note { margin: 2px 0 0; }
.lien-hote { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--doux); }
.etiquette-pastille.a-verifier { background: var(--attention-clair, #fdf0d5); color: var(--attention, #8a5a07); }



/* ── Passerelles et recherche en direct ── */
.bloc-passerelle { margin-top: 14px; padding: 10px 14px 12px; border: 1.5px dashed var(--trait); border-radius: var(--r-md); }
.bloc-passerelle .sous-titre { margin-top: 2px; }
.bloc-passerelle .note { margin: 4px 0 8px; }
.fiche-tete .btn-2 { min-height: 44px; }
.sous-titre.separe { margin-top: 26px; padding-top: 14px; border-top: 1.5px solid var(--trait); }
