/* ============================================================================
   Pro Re Nata — Styles spécifiques à la consultation périnatale
   À charger après voyage.css : réutilise les primitives prn-chip, prn-mc, etc.
   ============================================================================ */

.perinatal-page .voyage-shell { padding-top: 1.5rem; }

/* ── Bandeau auto-tier (étape 2) ──────────────────────────────────────────── */
.p-risk-banner {
    transition: background 0.25s ease, border-color 0.25s ease;
}

/* ── Groupes de facteurs de risque ────────────────────────────────────────── */
.p-risk-group {
    background: #fbfdfc;
    border-radius: var(--radius);
    padding: 0.75rem 1rem 0.85rem;
    margin-bottom: 0.5rem;
}

/* ── Cellules du plan (préconception / grossesse / postpartum) ────────────── */
.p-plan-cell {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(26, 107, 90, 0.15);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    color: var(--prn-navy);
}

.p-plan-cell-h {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--prn-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* ── Étiquettes (Rx, RAMQ, recommandé…) ───────────────────────────────────── */
.p-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 12px;
    line-height: 1.3;
    white-space: nowrap;
}
.p-tag-rx     { background: #fff1ec; color: #b13a17; border: 1px solid #f4cdbe; }
.p-tag-otc    { background: var(--prn-int-hover-bg); color: var(--prn-int-strong); border: 1px solid #cce4dc; }
.p-tag-ramq   { background: #e8f3ff; color: #1a4f8b; border: 1px solid #b8d4ec; }
.p-tag-rec    { background: #fff7e6; color: #b35a00; border: 1px solid #f0d9a8; }
.p-tag-alt    { background: #f5f5f5; color: #666;    border: 1px solid #ddd; }
.p-tag-safe   { background: #eaf6ee; color: #2e7d3a; border: 1px solid #c8e6cd; }

/* ── Mini-faits dans la carte produit (AF / B12 / Fer / Vit D) ────────────── */
.p-fact {
    display: inline-block;
    margin-right: 0.7rem;
    font-size: 0.78rem;
    color: #34504a;
}
.p-fact strong {
    color: var(--prn-navy);
    margin-right: 0.2rem;
    font-weight: 600;
}

/* ── Bloc patient (initiales, NAM, antécédents…) ──────────────────────────── */
.p-field {
    display: block;
    font-size: 0.8rem;
    color: var(--prn-navy);
}
.p-field span {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--prn-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.p-field input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--prn-line);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--prn-navy);
    background: var(--prn-surface);
}
.p-field input:focus {
    outline: none;
    border-color: var(--prn-teal);
    box-shadow: 0 0 0 3px rgba(26, 107, 90, 0.12);
}

/* Sections PRN_PATIENT_SECTION (Allergies + Conditions) intégrées dans le bloc patiente */
.p-patient-prn {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--prn-line);
}
.p-patient-prn .prn-pat-section { margin: 0.55rem 0; }
.p-patient-prn .prn-pat-section h4 { margin-bottom: 0.3rem; }

/* ── Liste des produits ───────────────────────────────────────────────────── */
.p-products .prn-chip {
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.p-products .prn-chip:hover {
    border-color: var(--prn-teal);
    transform: translateY(-1px);
}

/* ── Standardisation HTA (2026-07) — cons-ui.js ───────────────────────────── */
/* La section .prn-rx-editor est émise avec la classe .cons-card (stylée sous
   .cons-page seulement) : reprendre ici l'habillage des cartes du module. */
.perinatal-page .prn-rx-editor {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    background: var(--prn-surface);
    border: 1px solid var(--prn-line);
    border-left: 4px solid var(--prn-teal);
    border-radius: var(--radius);
}
.perinatal-page .prn-rx-editor h3 {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    color: var(--prn-navy);
}

/* Note justificative — bloc FRÈRE du chip produit sélectionné. */
.perinatal-page .p-note-slot { margin: -0.25rem 0 0 0.75rem; }
.perinatal-page .p-note-slot:empty { display: none; }

/* ── Affichage mobile ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .p-risk-banner {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.4rem !important;
    }
    .p-fact {
        display: block;
        margin: 0.15rem 0;
    }
    .p-plan-cell { font-size: 0.75rem; }
}

/* ============================================================================
   Override DARK MODE — perinatal
   ============================================================================ */
[data-theme="dark"] .p-tag-rx,
:root:not([data-theme="light"]) .p-tag-rx {
    background: rgba(252, 165, 165, 0.10); color: #fca5a5; border-color: rgba(252, 165, 165, 0.30);
}
[data-theme="dark"] .p-tag-otc,
:root:not([data-theme="light"]) .p-tag-otc {
    border-color: rgba(110, 224, 222, 0.30);
}
[data-theme="dark"] .p-tag-ramq,
:root:not([data-theme="light"]) .p-tag-ramq {
    background: rgba(95, 150, 212, 0.10); color: #93b8e0; border-color: rgba(95, 150, 212, 0.30);
}
[data-theme="dark"] .p-tag-rec,
:root:not([data-theme="light"]) .p-tag-rec {
    background: rgba(252, 211, 77, 0.10); color: #fcd34d; border-color: rgba(252, 211, 77, 0.30);
}
[data-theme="dark"] .p-tag-alt,
:root:not([data-theme="light"]) .p-tag-alt {
    background: var(--prn-surface-2); color: var(--prn-ink-soft); border-color: var(--prn-line);
}
[data-theme="dark"] .p-tag-safe,
:root:not([data-theme="light"]) .p-tag-safe {
    background: rgba(108, 200, 173, 0.10); color: #6cc8ad; border-color: rgba(108, 200, 173, 0.30);
}
[data-theme="dark"] .p-risk-group,
:root:not([data-theme="light"]) .p-risk-group {
    background: var(--prn-surface-2);
}
[data-theme="dark"] .p-plan-cell,
:root:not([data-theme="light"]) .p-plan-cell {
    background: rgba(13, 18, 25, 0.45);
    border-color: rgba(110, 224, 222, 0.18);
}
[data-theme="dark"] .p-fact,
:root:not([data-theme="light"]) .p-fact {
    color: var(--prn-ink-soft);
}
[data-theme="dark"] .p-field input:focus,
:root:not([data-theme="light"]) .p-field input:focus {
    box-shadow: 0 0 0 3px rgba(110, 224, 222, 0.18);
}
