/* ==========================================================================
   cardiologue.css — Cardiologue
   Thème : clinique sobre, blanc immaculé + écarlate ECG, traceur de moniteur,
           grille millimétrée façon ECG papier, polices médicales modernes.
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.65;
    color: #1a2530;
    background: #f7fafc;
    background-image:
        /* grille millimétrée ECG (papier rose pâle) */
        linear-gradient(rgba(220, 38, 38, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, .06) 1px, transparent 1px);
    background-size: 22px 22px;
    background-position: 0 0;
    min-height: 100vh;
    font-size: 17px;
}

.cardio-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 22px 60px;
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dc2626;
    padding-bottom: 1px;
}
.back-link:hover { color: #1a2530; border-color: #1a2530; }

/* HERO ====================================================================== */
.cardio-hero {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #dc2626;
    border-radius: 8px;
    padding: 44px 44px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.cardio-hero .surtitle {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: #dc2626;
    font-size: 0.78em;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.cardio-hero h1 {
    font-size: 3.6em;
    font-weight: 700;
    color: #1a2530;
    line-height: 1;
    letter-spacing: -1.5px;
    margin-bottom: 10px;
}

.cardio-hero h1::before {
    content: '♥ ';
    color: #dc2626;
    animation: heartbeat 1.4s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 50%, 100% { transform: scale(1); }
    20%           { transform: scale(1.18); }
    40%           { transform: scale(0.96); }
}

.cardio-hero .tagline {
    font-size: 1.12em;
    color: #475569;
    max-width: 700px;
    line-height: 1.55;
    margin-bottom: 24px;
}

/* MONITOR / ECG STRIP ======================================================= */
.ecg-monitor {
    background: #0a0e14;
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 10px;
    border: 1px solid #1f2937;
    position: relative;
    overflow: hidden;
}

.ecg-monitor::before {
    /* grille de moniteur intérieur */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 197, 94, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, .08) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

.ecg-monitor .ecg-readout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #22c55e;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.ecg-monitor .bpm {
    color: #fff;
    font-size: 1.6em;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.ecg-monitor .bpm-unit { color: #22c55e; font-size: 0.55em; margin-left: 4px; }

.ecg-svg {
    display: block;
    width: 100%;
    height: 80px;
    position: relative;
    z-index: 2;
}

.ecg-svg .trace {
    fill: none;
    stroke: #22c55e;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, .7));
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: ecg-draw 2.6s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes ecg-draw {
    0%   { stroke-dashoffset: 1200; }
    70%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1200; }
}

/* SECTIONS ================================================================== */
.section {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 28px 36px;
    margin-bottom: 22px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.section h2 {
    font-size: 1.65em;
    font-weight: 700;
    color: #1a2530;
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 4px solid #dc2626;
    letter-spacing: -0.4px;
}

.section h3 {
    font-size: 1.12em;
    color: #dc2626;
    margin: 18px 0 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.section p { margin-bottom: 12px; color: #334155; }
.section ul, .section ol { margin: 10px 0 14px 26px; }
.section li { margin-bottom: 6px; color: #334155; }
.section strong { color: #1a2530; font-weight: 700; }
.section em { color: #dc2626; font-style: italic; }

/* CALLOUT (note clinique) =================================================== */
.note-clinique {
    background: linear-gradient(90deg, #fef2f2, transparent);
    border-left: 4px solid #dc2626;
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
}
.note-clinique strong { color: #dc2626; }
.note-clinique .badge {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* TIMELINE ================================================================== */
.timeline {
    border-left: 2px solid #e2e8f0;
    padding-left: 22px;
    margin: 18px 0;
}
.timeline-event {
    position: relative;
    padding-bottom: 14px;
}
.timeline-event::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 8px;
    width: 12px; height: 12px;
    background: #dc2626;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #dc2626;
}
.timeline-event .date {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    background: #1a2530;
    color: #fff;
    padding: 1px 9px;
    margin-right: 8px;
    font-size: 0.78em;
    letter-spacing: 1px;
    border-radius: 2px;
}

/* TABLES ==================================================================== */
.section table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.93em;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.section th {
    background: #1a2530;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.4px;
    font-size: 0.92em;
}
.section td {
    padding: 9px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.section tr:last-child td { border-bottom: none; }
.section tr:hover td { background: #f8fafc; }

/* SPECIALTY GRID ============================================================ */
.specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 16px 0;
}
.spec {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #dc2626;
    padding: 16px 18px;
    border-radius: 6px;
}
.spec h4 {
    color: #1a2530;
    font-size: 1em;
    margin-bottom: 4px;
}
.spec p { font-size: 0.9em; color: #64748b; margin: 0; }

/* STATS ROW ================================================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px 14px;
    text-align: center;
}
.stat .v {
    font-size: 1.85em;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}
.stat .l {
    color: #64748b;
    font-size: 0.78em;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

/* RESPONSIVE =============================================================== */
@media (max-width: 700px) {
    .cardio-hero h1 { font-size: 2.4em; }
    .cardio-hero { padding: 30px 22px 26px; }
    .section { padding: 22px 22px; }
    .section h2 { font-size: 1.35em; }
}
