/* site/sante/calculateur.css — LES CALCULATEURS DE SANTÉ (espérance de vie…), 29/10/2026.
   Complète /assets/style.css (variables --p, --bord, --doux… ; classes .carte .btn .etiquette…).
   Toutes les classes propres commencent par « calc- ». Mobile d'abord : tout tient en 375 px,
   cibles tactiles ≥ 44 px, focus clavier bien visible, couleurs douces (sujet sensible). */

/* ── Accueil ─────────────────────────────────────────────────────────────────────────────── */
.calc-infos { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 0; }
.calc-infos li { background: var(--p-pale); border: 1px solid var(--p-bord); color: var(--p-fonce); border-radius: 99px; padding: 4px 11px; font-size: .84rem; font-weight: 600; }
.calc-prudence { font-size: .88rem; color: #475569; background: #f8fafc; border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; margin: 4px 0 8px; }

/* ── Formulaire : une page courte, grands boutons ───────────────────────────────────────── */
.calc-form { padding: 20px 18px; }
.calc-q { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.calc-label { display: block; font-weight: 750; font-size: 1.04rem; line-height: 1.35; margin-bottom: 8px; padding: 0; color: var(--texte); }
.calc-label small, .calc-pays small { font-weight: 500; color: var(--doux); }
.calc-aide-q { font-size: .86rem; color: var(--doux); margin: -2px 0 10px; }
.calc-champ { width: 100%; max-width: 220px; height: 52px; padding: 0 14px; border: 2px solid #cbd5e1; border-radius: 12px; font: inherit; font-size: 1.1rem; background: #fff; color: var(--texte); }
.calc-champ:focus { outline: 3px solid rgba(15, 118, 110, .25); border-color: var(--p); }
.calc-duo { display: flex; flex-wrap: wrap; gap: 12px; }
.calc-petit-champ { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; flex: 1 1 140px; max-width: 220px; }
.calc-imc { font-weight: 700; color: var(--p-fonce); min-height: 1.4em; margin-top: 8px; }
.calc-pays { margin: 0; }
.calc-sous-q { margin-top: -10px; padding: 12px 14px; background: var(--p-pale); border: 1px solid var(--p-bord); border-radius: 12px; }

.calc-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.calc-opt { position: relative; display: block; cursor: pointer; }
.calc-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.calc-opt span { display: flex; align-items: center; min-height: 52px; padding: 10px 14px; border: 2px solid var(--bord); border-radius: 12px; background: #fff; font-weight: 650; font-size: .98rem; line-height: 1.3; transition: border-color .12s, background .12s, color .12s; touch-action: manipulation; }
@media (hover: hover) { .calc-opt:hover span { border-color: var(--p-clair); background: var(--p-pale); } }
.calc-opt input:focus-visible + span { outline: 3px solid var(--or); outline-offset: 2px; }
.calc-opt input:checked + span { border-color: var(--p); background: var(--p); color: #fff; }
.calc-err { color: #b91c1c; font-weight: 650; font-size: .9rem; margin-top: 8px; }
.calc-rien { font-size: .82rem; color: var(--doux); margin-top: 12px; text-align: center; }

/* ── Résultat ────────────────────────────────────────────────────────────────────────────── */
#calc-resultat.ecran { max-width: 720px; margin: 0 auto; padding: 22px 0 60px; }
.calc-carte h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: 8px; }
.calc-principal { text-align: center; border-top: 5px solid var(--p); }
.calc-petit { font-weight: 700; color: var(--doux); text-transform: uppercase; letter-spacing: .3px; font-size: .8rem; }
.calc-grand { font-size: 1.3rem; font-weight: 700; color: var(--p-fonce); outline: none; margin: 2px 0 6px; }
.calc-grand b { font-size: clamp(3rem, 14vw, 4.2rem); line-height: 1; color: var(--p); letter-spacing: -1px; }
.calc-sous { font-size: 1rem; color: #334155; }
.calc-fourchette { display: inline-block; margin: 10px 0 4px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 99px; padding: 5px 14px; font-weight: 650; font-size: .92rem; }
.calc-moyenne { margin-top: 10px; color: #334155; font-size: .95rem; }
.calc-note { font-size: .86rem; color: var(--doux); margin-top: 8px; }
.calc-liste { margin: 10px 0 0; padding-left: 20px; }
.calc-liste li { margin-bottom: 8px; }
.calc-liste small, .calc-causes small { color: var(--doux); }
.calc-non-comptes { margin: 12px 0 0; padding: 10px 14px 10px 30px; background: #f8fafc; border: 1px solid var(--bord); border-radius: 10px; font-size: .88rem; color: #475569; }
.calc-non-comptes li { margin-bottom: 4px; }

.calc-graphique { display: block; width: 100%; max-width: 520px; height: auto; margin: 8px auto 4px; }
.calc-g-nom { font: 700 15px "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; fill: #0f172a; }
.calc-g-val { font: 700 15px "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; fill: #334155; }

.calc-causes { margin: 8px 0 0; padding-left: 22px; }
.calc-causes li { margin-bottom: 10px; }
.calc-causes li > span { display: inline; }
.calc-cause-nom { font-weight: 650; }
.calc-cause-part { margin-left: 6px; font-weight: 800; color: var(--p-fonce); white-space: nowrap; }
.calc-causes small { display: block; }

/* ── Encadré d'aide (drogues, beaucoup d'alcool) : discret, mais en haut du résultat ─────────── */
.calc-aide { background: #eff6ff; border: 1px solid #bfdbfe; border-left: 5px solid #3b82f6; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; color: #1e3a8a; }
.calc-aide-titre { font-weight: 700; margin-bottom: 8px; }
.calc-aide-appel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 48px; padding: 8px 12px; margin-bottom: 8px; background: #fff; border: 1px solid #bfdbfe; border-radius: 10px; text-decoration: none; color: #1e3a8a; }
.calc-aide-appel strong, .calc-aide-appel small { display: block; }
.calc-aide-appel small { color: #475569; }
.calc-aide-num { font-weight: 800; font-size: 1.08rem; white-space: nowrap; }
.calc-aide-source { font-size: .8rem; color: #475569; }
.calc-aide-source a { color: #1d4ed8; }

@media (max-width: 420px) {
  .calc-form { padding: 16px 14px; }
  .calc-choix { grid-template-columns: 1fr; }
  .calc-champ { max-width: none; }
  .calc-petit-champ { max-width: none; }
}

@media print {
  #calc-accueil, .share-bar, .fin-boutons, #calc-suite, #calc-aff { display: none !important; }
  #calc-resultat { display: block !important; }
}
