/* ============================================================================
   Pro Re Nata — Styles spécifiques à la consultation Hypothyroïdie
   ----------------------------------------------------------------------------
   Réutilise au max les classes partagées :
     - .voyage-shell + .voyage-step + .voyage-actions (voyage.css)
     - .prn-chip, .prn-mc, .prn-callout-* (voyage.css / components.css)
   Palette : bleu papillon (#0ea5e9) pour la thyroïde, vert pour cible
   atteinte, ambre pour subclinique, rouge pour drapeau bloquant.
   ========================================================================== */

.hy-page { --hy-accent: #0ea5e9; --hy-accent-strong: #0369a1; --hy-accent-soft: #f0f9ff; --hy-accent-line: #bae6fd;
           --hy-good: #16a34a; --hy-warn: #b45309; --hy-info: #2563eb; }

/* accent-strong : le sky-500 (--hy-accent) ne fait que 2.6:1 sur le fond light */
.hy-page .page-header h1 { color: var(--hy-accent-strong); }
.hy-page .progress-bar { background: linear-gradient(90deg, var(--hy-accent), #38bdf8); }
.hy-page .source-note { font-size: 12px; color: var(--prn-muted); margin-top: 6px; font-style: italic; }

/* ── Blocs ────────────────────────────────────────────────────────── */
.hy-block {
    margin: 1rem 0 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--prn-surface);
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
}
.hy-block-emph { background: var(--hy-accent-soft); border-color: var(--hy-accent-line); }
.hy-block h3 {
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    color: var(--hy-accent-strong);
    font-weight: 700;
    font-family: var(--font-sans);
}
.hy-help {
    margin: 0 0 0.7rem;
    font-size: 0.82rem;
    color: var(--prn-muted);
    line-height: 1.45;
}

/* ── Grilles ──────────────────────────────────────────────────────── */
.hy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem 0.7rem;
}
.hy-grid-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.45rem;
}

/* ── Inputs (16px iOS no-zoom + 44pt tap targets) ─────────────────── */
.hy-block .p-field { display: flex; flex-direction: column; gap: 0.25rem; }
.hy-block .p-field > span {
    font-size: 0.78rem;
    color: var(--prn-muted);
    font-weight: 600;
}
.hy-block input[type="number"],
.hy-block input[type="text"],
.hy-block input[type="date"],
.hy-block select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    color: var(--prn-navy);
    background: var(--prn-surface);
    min-height: 44px;
    box-sizing: border-box;
}
.hy-block input:focus,
.hy-block select:focus {
    outline: none;
    border-color: var(--hy-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

/* ── Détails ──────────────────────────────────────────────────────── */
.hy-details {
    margin: 0.7rem 0 0;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--prn-surface) 70%, transparent);
    font-size: 0.85rem;
}
.hy-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--prn-ink);
}
.hy-details[open] { background: var(--prn-surface); }

/* ── Action hint ──────────────────────────────────────────────────── */
/* Neutre par défaut (simple champ manquant) ; .is-blocking = blocage
   clinique (CI / thyrotoxicose) qui mérite le ton d'alerte. */
.hy-action-hint {
    margin: 1.2rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--prn-muted);
    font-weight: 600;
}
.hy-action-hint.is-blocking { color: var(--hy-warn); }
.hy-action-hint:empty { display: none; }

/* ── Bandeau patient persistant ───────────────────────────────────── */
.hy-patient-bar {
    position: sticky;
    top: 0.5rem;
    z-index: 9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    margin: 0.75rem 0 0.25rem;
    padding: 0.5rem 0.85rem;
    background: color-mix(in srgb, var(--prn-surface) 94%, transparent);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--prn-ink);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.hy-patient-bar[hidden] { display: none; }
.hy-pb-item { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
/* Item cliquable (retour à l'étape de saisie pour corriger) */
button.hy-pb-link {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
button.hy-pb-link:hover,
button.hy-pb-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Bouton Recommencer : style partagé .prn-reset-btn (wizard.css) */
.prn-reset-btn[hidden] { display: none; }

/* ── Focus clavier visible sur les cartes à cocher ────────────────── */
.hy-page label.prn-mc:focus-visible,
.hy-page label.prn-chip:focus-visible {
    outline: none;
    border-color: var(--hy-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
}
.hy-pb-name strong { color: var(--prn-navy); }
.hy-pb-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--prn-muted);
    flex-shrink: 0;
}
.hy-pb-tsh[data-tsh-state="in"]   { color: #166534; }
.hy-pb-tsh[data-tsh-state="in"]   .hy-pb-dot { background: var(--hy-good); }
.hy-pb-tsh[data-tsh-state="low"],
.hy-pb-tsh[data-tsh-state="high"] { color: var(--hy-warn); }
.hy-pb-tsh[data-tsh-state="low"]  .hy-pb-dot,
.hy-pb-tsh[data-tsh-state="high"] .hy-pb-dot { background: var(--hy-warn); }
.hy-pb-flag {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-size: 0.72rem;
    font-weight: 700;
}
.hy-pb-target { color: var(--hy-accent-strong); font-weight: 600; }

/* ── Jauge TSH (zone cible + curseur) ─────────────────────────────── */
.hy-tsh-gauge { margin-top: 0.8rem; }
.hy-gauge-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    color: var(--prn-ink);
}
.hy-gauge-title strong { font-size: 0.95rem; color: var(--prn-navy); }
.hy-gauge-badge {
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.hy-tsh-gauge[data-gauge-state="in"]  .hy-gauge-badge { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.hy-tsh-gauge[data-gauge-state="out"] .hy-gauge-badge { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.hy-tsh-gauge[data-gauge-state="far"] .hy-gauge-badge { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.hy-gauge-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: var(--prn-bg-elev, #f1f5f9);
    border: 1px solid var(--prn-line);
    overflow: visible;
}
.hy-gauge-zone {
    position: absolute;
    top: 0; bottom: 0;
    background: color-mix(in srgb, var(--hy-good) 30%, transparent);
    border-radius: 999px;
    min-width: 4px;
}
.hy-gauge-cursor {
    position: absolute;
    top: -4px; bottom: -4px;
    width: 3px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--prn-navy);
    box-shadow: 0 0 0 2px var(--prn-surface);
}
.hy-tsh-gauge[data-gauge-state="out"] .hy-gauge-cursor { background: var(--hy-warn); }
.hy-tsh-gauge[data-gauge-state="far"] .hy-gauge-cursor { background: #b91c1c; }
.hy-gauge-scale {
    position: relative;
    height: 1.1rem;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    color: var(--prn-muted);
}
.hy-gauge-tick {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}
.hy-gauge-tick--max { right: 0; transform: none; }

/* ── Fade on step ─────────────────────────────────────────────────── */
#hyStepWrap > .prn-step { animation: hyFadeIn 0.25s ease; }
@keyframes hyFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Cible TSH info ───────────────────────────────────────────────── */
.hy-target-info {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    background: var(--hy-accent-soft);
    border: 1px solid var(--hy-accent-line);
    border-left: 4px solid var(--hy-accent);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--prn-ink);
}
.hy-target-info strong { color: var(--hy-accent-strong); }
.hy-target-info .muted { font-size: 0.78rem; }

/* ── Bullets ──────────────────────────────────────────────────────── */
.hy-bullets {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    line-height: 1.5;
}
.hy-bullets li { padding: 0.15rem 0; }

/* ── IMC callout ──────────────────────────────────────────────────── */
.hy-bmi-callout {
    margin-top: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    display: inline-block;
}
.hy-bmi-callout.is-normal { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.hy-bmi-callout.is-over   { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.hy-bmi-callout.is-obese  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Interprétation TSH/T4L ───────────────────────────────────────── */
.hy-interp {
    margin-top: 0.7rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--prn-line);
    border-left: 4px solid var(--prn-line);
    border-radius: var(--radius);
    background: var(--prn-surface);
    font-size: 0.9rem;
    font-weight: 600;
}
.hy-interp[data-state="overt"]    { border-left-color: #b91c1c; background: #fef2f2; color: #991b1b; }
.hy-interp[data-state="subTreat"] { border-left-color: #ea580c; background: #fff7ed; color: #c2410c; }
.hy-interp[data-state="subObs"]   { border-left-color: #f59e0b; background: #fffbeb; color: #92400e; }
.hy-interp[data-state="central"]  { border-left-color: #7c3aed; background: #f5f3ff; color: #5b21b6; }
.hy-interp[data-state="thyrotox"] { border-left-color: #b91c1c; background: #fef2f2; color: #991b1b; }
.hy-interp[data-state="euth"]     { border-left-color: var(--hy-good); background: #f0fdf4; color: #166534; }
.hy-interp[data-state="incomp"]   { color: var(--prn-muted); font-weight: 500; }

/* ── Alerte danger ────────────────────────────────────────────────── */
.hy-alert {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.88rem;
    margin: 0.5rem 0;
}
.hy-alert--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #b91c1c;
    color: #991b1b;
}

/* ── Tags contextuels ─────────────────────────────────────────────── */
.hy-cond-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}
.hy-cond-tag {
    display: inline-block;
    font-size: 0.68rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.hy-cond-tag--good { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.hy-cond-tag--bad  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.hy-cond-tag--warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.hy-cond-tag--info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── CI block ─────────────────────────────────────────────────────── */
.hy-ci-block.is-selected {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

/* ── Sections thématiques du contexte clinique ────────────────────── */
.hy-ctx-section { margin: 0.9rem 0 0; }
.hy-ctx-section:first-of-type { margin-top: 0.2rem; }
.hy-ctx-section h4 {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--prn-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.hy-ctx-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--hy-accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}
/* Cartes compactes : le rationnel n'apparaît qu'à la sélection
   (il reste disponible en tooltip via title avant sélection). */
.hy-ctx-compact .prn-mc:not(.is-selected) .prn-mc-sub { display: none; }

/* ── Accordéons (contexte au suivi, conseils, échéancier) ─────────── */
.hy-fold {
    margin: 1rem 0 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--prn-surface);
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
}
.hy-fold > summary {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hy-accent-strong);
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
}
.hy-fold > summary::-webkit-details-marker { display: none; }
.hy-fold > summary::before {
    content: "▸";
    font-size: 0.8rem;
    color: var(--prn-muted);
    transition: transform 0.15s;
}
.hy-fold[open] > summary::before { transform: rotate(90deg); }
.hy-fold[open] > summary { margin-bottom: 0.55rem; }
/* Accordéon imbriqué dans un bloc (autres conduites) : pas de double cadre */
.hy-block .hy-fold { margin: 0.6rem 0 0; }

/* ── Classe réservée repliée (Liothyronine) ───────────────────────── */
.hy-class-fold {
    border: 1px dashed var(--prn-line);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    background: color-mix(in srgb, var(--prn-surface) 70%, transparent);
    align-self: start;
}
.hy-class-fold > summary {
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--prn-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    list-style: none;
}
.hy-class-fold > summary::-webkit-details-marker { display: none; }
.hy-class-fold > summary strong { color: var(--prn-ink); }
.hy-class-fold[open] > summary { margin-bottom: 0.6rem; }

/* Récap final : liste des agents fusionnée (accent hy-rx-summary sur l'ul) */
ul.hy-rx-summary { list-style: none; }

/* ── Habitudes ────────────────────────────────────────────────────── */
.hy-habit .hy-habit-effet {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.18rem 0.55rem;
    background: color-mix(in srgb, var(--hy-good) 12%, transparent);
    color: var(--hy-good);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.hy-habit-counter {
    margin-top: 0.7rem;
    padding: 0.6rem 0.85rem;
    background: var(--hy-accent-soft);
    border: 1px solid var(--hy-accent-line);
    border-radius: var(--radius);
    font-size: 0.86rem;
    text-align: center;
}
.hy-habit-counter strong { color: var(--hy-accent-strong); font-size: 1.05rem; }

/* ── Médication actuelle (suivi) ──────────────────────────────────── */
.hy-curmeds {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.hy-curmed-row {
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
    padding: 0.6rem 0.7rem;
    background: var(--prn-surface);
    transition: border-color 0.15s, background 0.15s;
}
.hy-curmed-row.is-selected {
    border-color: var(--hy-accent);
    background: var(--hy-accent-soft);
}
.hy-curmed-toggle { margin: 0 !important; }
.hy-curmed-detail {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 0.5rem;
}
@media (max-width: 640px) {
    .hy-curmed-detail { grid-template-columns: 1fr 1fr; }
}

/* ── Recommandation callout ───────────────────────────────────────── */
.hy-rec-card {
    margin: 0.5rem 0 1rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, var(--hy-accent-soft), #ecfeff);
    border: 1px solid var(--hy-accent-line);
    border-left: 4px solid var(--hy-accent);
    border-radius: var(--radius);
}
.hy-rec-card.hy-rec-lifestyle {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
    border-left-color: var(--hy-good);
}
.hy-rec-head {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.4rem;
}
.hy-rec-icon { font-size: 1.6rem; line-height: 1.2; }
.hy-rec-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--prn-navy);
    font-family: var(--font-serif);
}
.hy-rec-rat {
    font-size: 0.82rem;
    color: var(--prn-muted);
    margin-top: 2px;
}
.hy-rec-tip {
    margin: 0.4rem 0 0;
    font-size: 0.84rem;
    color: var(--prn-ink);
}
/* Caveat T4L manquante dans l'interprétation */
.hy-interp-caveat {
    display: block;
    margin-top: 0.3rem;
    font-weight: 500;
    font-size: 0.82rem;
    opacity: 0.9;
}
/* Note d'écart dose calculée / palier de comprimé */
.hy-rec-dosenote {
    margin: 0.45rem 0 0;
    padding: 0.5rem 0.7rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed var(--hy-accent-line);
    border-radius: var(--radius);
    font-size: 0.84rem;
    color: var(--prn-ink);
}
/* « Pourquoi ? » — trace de la règle appliquée */
.hy-rec-why {
    margin-top: 0.55rem;
    font-size: 0.82rem;
}
.hy-rec-why summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--hy-accent-strong);
    font-size: 0.8rem;
}
.hy-rec-why ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    line-height: 1.55;
    color: var(--prn-ink);
}
.hy-rec-why li strong { color: var(--hy-accent-strong); }
/* Bouton fiche patient */
.hy-patient-sheet-btn { margin-top: 0.7rem; }

/* Action concrète follow-up (titrer / switch) — miroir de .hta-rec-action */
.hy-rec-action {
    margin-top: 0.6rem;
    padding: 0.55rem 0.7rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--hy-accent-line);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--prn-ink);
    line-height: 1.55;
}
.hy-rec-arrow {
    display: inline-block;
    margin: 0 0.25rem;
    color: var(--hy-accent);
    font-weight: 700;
}

/* ── Classes (étape 5) ────────────────────────────────────────────── */
.hy-classes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.85rem;
}
.hy-class-card {
    --cls-color: var(--hy-accent);
    border: 1px solid var(--prn-line);
    border-left: 4px solid var(--cls-color);
    border-radius: var(--radius);
    padding: 0.85rem 0.95rem;
    background: var(--prn-surface);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.hy-class-card.is-fav {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cls-color) 25%, transparent) inset;
}
.hy-class-card.is-reserved {
    opacity: 0.7;
    background: #fafafa;
}
.hy-class-head {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}
.hy-class-emoji { font-size: 1.7rem; line-height: 1; }
.hy-class-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hy-class-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--prn-navy);
    font-family: var(--font-serif);
}
.hy-class-short {
    font-size: 0.78rem;
    color: var(--prn-muted);
}
.hy-class-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.25rem;
}
.hy-class-pos {
    font-size: 0.74rem;
    color: var(--prn-muted);
    font-style: italic;
    margin-top: 0.2rem;
}
.hy-class-foot { font-size: 0.74rem; margin-top: 0.25rem; }
.hy-int {
    display: inline-block;
    background: color-mix(in srgb, var(--hy-info) 8%, transparent);
    color: var(--hy-info);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin: 1px;
}

/* ── Agents ───────────────────────────────────────────────────────── */
.hy-class-agents {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.hy-agent {
    display: flex;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--prn-line);
    border-radius: 8px;
    background: var(--prn-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    align-items: flex-start;
}
.hy-agent:hover { border-color: var(--hy-accent-line); }
.hy-agent input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--hy-accent);
    width: 18px; height: 18px;
}
.hy-agent.is-selected {
    background: color-mix(in srgb, var(--hy-accent) 6%, transparent);
    border-color: var(--hy-accent);
    box-shadow: 0 0 0 1px var(--hy-accent) inset;
}
.hy-agent.is-blocked {
    opacity: 0.55;
    cursor: not-allowed;
    background: #fef9f9;
}
.hy-agent-body { flex: 1; }
.hy-agent-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--prn-ink);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.hy-agent-doses {
    font-size: 0.76rem;
    color: var(--prn-muted);
    margin-top: 0.15rem;
}
.hy-dose {
    display: inline-block;
    padding: 1px 6px;
    background: var(--prn-bg-elev, #f9fafb);
    border-radius: 4px;
    font-size: 0.74rem;
    margin: 0 1px;
}
.hy-agent-dose-select {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--prn-muted);
}
.hy-agent-dose-select select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--hy-accent-line);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--prn-surface);
    color: var(--prn-ink);
    min-height: 36px;
    flex: 1;
    max-width: 220px;
}

/* ── Rx summary ───────────────────────────────────────────────────── */
.hy-rx-summary {
    margin: 0.8rem 0;
    padding: 0.7rem 0.9rem;
    background: var(--hy-accent-soft);
    border: 1px solid var(--hy-accent-line);
    border-left: 4px solid var(--hy-accent);
    border-radius: var(--radius);
}
.hy-rx-summary.is-empty {
    background: var(--prn-surface);
    border-style: dashed;
}
.hy-rx-summary strong { color: var(--hy-accent-strong); font-size: 0.88rem; }
.hy-rx-summary ul {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    font-size: 0.88rem;
}
.hy-rx-summary ul li { padding: 0.18rem 0; }

/* ── Conseils / Timeline / Labs ───────────────────────────────────── */
.hy-counsel-class {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--prn-line);
}
.hy-counsel-class strong { color: var(--hy-accent-strong); font-size: 0.84rem; }
.hy-counsel-class ul {
    margin: 0.25rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.84rem;
    line-height: 1.5;
}
.hy-timeline-list {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
}
.hy-timeline-list li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.6rem;
    font-size: 0.86rem;
    border-left: 2px solid var(--hy-accent-line);
    margin-left: 0.5rem;
}
.hy-timeline-list li::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 0.55rem;
    width: 12px; height: 12px;
    background: var(--hy-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--prn-surface);
}
.hy-timeline-list li:last-child { border-left-color: transparent; }

/* ── Drapeaux bloquants ───────────────────────────────────────────── */
.hy-flag-blocking {
    border-left: 3px solid #b91c1c !important;
}
.hy-flag-blocking.is-selected {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

/* ── Pharma block ─────────────────────────────────────────────────── */
.hy-pharma { background: #f8fafa; border-color: var(--prn-line); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .hy-classes { grid-template-columns: 1fr; }
    .hy-patient-bar { font-size: 0.76rem; gap: 0.3rem 0.6rem; }
}

/* Encoche iOS : la barre d'action sticky ne doit pas mordre sur la
   safe-area en bas d'écran. */
.hy-page .voyage-actions {
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
}

/* ── Dark mode tweaks ─────────────────────────────────────────────── */
[data-theme="dark"] .hy-rec-card {
    background: linear-gradient(135deg, #0c1f2a, #082235);
    border-color: #155080;
}
[data-theme="dark"] .hy-rec-card.hy-rec-lifestyle {
    background: linear-gradient(135deg, #0a2e1a, #0d3520);
    border-color: #1a5c34;
}
[data-theme="dark"] .hy-rec-action {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(125, 211, 252, 0.3);
    color: var(--prn-ink);
}
[data-theme="dark"] .hy-rec-dosenote {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(125, 211, 252, 0.3);
}
[data-theme="dark"] .hy-rec-arrow { color: #7dd3fc; }
[data-theme="dark"] .hy-target-info,
[data-theme="dark"] .hy-block-emph {
    background: rgba(14, 165, 233, 0.10);
    border-color: rgba(14, 165, 233, 0.30);
}
[data-theme="dark"] .hy-page {
    --hy-accent-strong: #7dd3fc;
    --hy-warn:          #fbbf24;
    --hy-info:          #93c5fd;
}
[data-theme="dark"] .hy-interp[data-state="overt"],
[data-theme="dark"] .hy-interp[data-state="thyrotox"] {
    background: rgba(220, 38, 38, 0.12); color: #fca5a5;
}
[data-theme="dark"] .hy-interp[data-state="subTreat"] {
    background: rgba(234, 88, 12, 0.12); color: #fdba74;
}
[data-theme="dark"] .hy-interp[data-state="subObs"] {
    background: rgba(245, 158, 11, 0.12); color: #fbbf24;
}
[data-theme="dark"] .hy-interp[data-state="central"] {
    background: rgba(124, 58, 237, 0.12); color: #c4b5fd;
}
[data-theme="dark"] .hy-interp[data-state="euth"] {
    background: rgba(22, 163, 74, 0.10); color: #86efac;
}
[data-theme="dark"] .hy-class-card.is-reserved { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .hy-agent.is-blocked       { background: rgba(220, 38, 38, 0.06); }
[data-theme="dark"] .hy-bmi-callout.is-normal { background: rgba(22, 163, 74, 0.10); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
[data-theme="dark"] .hy-bmi-callout.is-over   { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
[data-theme="dark"] .hy-bmi-callout.is-obese  { background: rgba(220, 38, 38, 0.12); color: #fca5a5; border-color: rgba(220, 38, 38, 0.3); }
[data-theme="dark"] .hy-patient-bar {
    background: color-mix(in srgb, var(--prn-surface) 90%, transparent);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .hy-pb-tsh[data-tsh-state="in"] { color: #86efac; }
[data-theme="dark"] .hy-pb-flag { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
[data-theme="dark"] .hy-gauge-track { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .hy-gauge-zone { background: rgba(34, 197, 94, 0.35); }
[data-theme="dark"] .hy-gauge-cursor { background: #e2e8f0; }
[data-theme="dark"] .hy-tsh-gauge[data-gauge-state="out"] .hy-gauge-cursor { background: #fbbf24; }
[data-theme="dark"] .hy-tsh-gauge[data-gauge-state="far"] .hy-gauge-cursor { background: #f87171; }
[data-theme="dark"] .hy-tsh-gauge[data-gauge-state="in"]  .hy-gauge-badge { background: rgba(22, 163, 74, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
[data-theme="dark"] .hy-tsh-gauge[data-gauge-state="out"] .hy-gauge-badge { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
[data-theme="dark"] .hy-tsh-gauge[data-gauge-state="far"] .hy-gauge-badge { background: rgba(220, 38, 38, 0.14); color: #fca5a5; border-color: rgba(220, 38, 38, 0.35); }
[data-theme="dark"] .hy-ci-block.is-selected,
[data-theme="dark"] .hy-flag-blocking.is-selected {
    background: rgba(220, 38, 38, 0.12) !important;
    border-color: rgba(220, 38, 38, 0.35) !important;
}
[data-theme="dark"] .hy-flag-blocking { border-left-color: #f87171 !important; }
[data-theme="dark"] .hy-rx-summary:not(.is-empty) {
    background: rgba(14, 165, 233, 0.10);
    border-color: rgba(14, 165, 233, 0.30);
}
[data-theme="dark"] .hy-pharma { background: rgba(255, 255, 255, 0.02); }
[data-theme="dark"] .hy-curmed-row.is-selected { background: rgba(14, 165, 233, 0.10); }
[data-theme="dark"] .hy-alert--danger {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.35);
    border-left-color: #f87171;
    color: #fca5a5;
}
[data-theme="dark"] .hy-cond-tag--good { background: rgba(22, 163, 74, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
[data-theme="dark"] .hy-cond-tag--bad  { background: rgba(220, 38, 38, 0.14); color: #fca5a5; border-color: rgba(220, 38, 38, 0.35); }
[data-theme="dark"] .hy-cond-tag--warn { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
[data-theme="dark"] .hy-cond-tag--info { background: rgba(37, 99, 235, 0.18); color: #93c5fd; border-color: rgba(59, 130, 246, 0.35); }
