/* ============================================================================
   Pro Re Nata — Styles du mode Suivi (sélecteur de mode + cartes + badges)
   ============================================================================ */

/* Sélecteur de mode */
.prn-mode-switch {
    display: inline-flex;
    gap: 0.25rem;
    margin: 0 0 1rem;
    padding: 0.25rem;
    border: 1px solid var(--border, #d6d9e0);
    border-radius: 999px;
    background: var(--surface-2, #f3f4f8);
}
.prn-mode-switch button {
    border: 0;
    background: transparent;
    color: var(--text, #1d2330);
    font: inherit;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    cursor: pointer;
}
.prn-mode-switch button.is-active {
    background: var(--brand, #2563eb);
    color: #fff;
}

/* Cartes de recommandation */
.suivi-rec {
    border: 1px solid var(--border, #d6d9e0);
    border-left: 4px solid var(--brand, #2563eb);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin: 0 0 0.75rem;
    background: var(--surface, #fff);
}
.suivi-rec-top {
    border-left-color: #16a34a;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.suivi-rec-refer {
    border-left-color: #d97706;
    background: #fff8ec;
}
.suivi-rec-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}
.suivi-rec-head h3 { margin: 0; font-size: 1.02rem; }
.suivi-rec-lead { color: #16a34a; font-weight: 700; }
.suivi-rec-rationale { margin: 0.4rem 0; }
.suivi-rec-ramq, .suivi-rec-mon, .suivi-rec-eff { margin: 0.25rem 0; font-size: 0.92rem; }
.suivi-rec-src { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--muted, #6b7280); }
/* Avertissement non bloquant (intervalle d'ajustement minimal — PMN) */
.suivi-rec-warn {
    margin: 0.4rem 0;
    padding: 0.5rem 0.75rem;
    border-left: 4px solid #b15a00;
    border-radius: 6px;
    background: #fff8e1;
    font-size: 0.92rem;
}
[data-theme="dark"] .suivi-rec-warn { background: #2a230f; color: #ffe6c4; }

/* Badges de scope */
.suivi-scope {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}
.suivi-scope-pharm { background: #dcfce7; color: #166534; }
.suivi-scope-refer { background: #fee2e2; color: #991b1b; }

/* Bouton « Référer » + cartes étape 3 */
.suivi-refer-cta { margin-top: 0.5rem; }
.suivi-card {
    border: 1px solid var(--border, #d6d9e0);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin: 0 0 0.75rem;
    background: var(--surface, #fff);
}
.suivi-step3-actions { margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Étape 1 — grilles de saisie réutilisables */
.suivi-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.suivi-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.suivi-chip {
    border: 1px solid var(--border, #d6d9e0);
    background: var(--surface, #fff);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    font: inherit;
}
.suivi-chip.is-selected { background: var(--brand, #2563eb); color: #fff; border-color: var(--brand, #2563eb); }

/* Alertes automatiques (bandeau live, étape 1) + avertissement d'intervalle */
.suivi-alerts { display: grid; gap: 0.4rem; }
.suivi-alert {
    border-left: 4px solid #b15a00;
    background: #fff8e1;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: grid;
    gap: 0.15rem;
    font-size: 0.95rem;
}
.suivi-alert--danger { border-left-color: #b00020; background: #fff3f3; }

/* ── Mode sombre ──
   --border/--surface/--brand… suivent désormais le thème (aliases style.css) ;
   restent à adapter les littéraux clairs et le texte blanc sur --brand clair. */
[data-theme="dark"] .prn-mode-switch button.is-active,
[data-theme="dark"] .suivi-chip.is-selected { color: #0d1219; }
[data-theme="dark"] .suivi-rec-lead { color: #6cc8ad; }
[data-theme="dark"] .suivi-rec-refer { background: rgba(252, 211, 77, 0.10); }
[data-theme="dark"] .suivi-scope-pharm { background: #14281e; color: #d1f3df; }
[data-theme="dark"] .suivi-scope-refer { background: #2a1414; color: #ffe7e7; }
[data-theme="dark"] .suivi-alert { background: #2a230f; color: #ffe6c4; }
[data-theme="dark"] .suivi-alert--danger { background: #2a1414; color: #ffe7e7; border-left-color: #fca5a5; }
