/* ============================================
   RÉGULATO — styles communs (phase 1 : page d'attente)
   Palette reprise du simulateur d'Ausculto (css/regulation.css) : bleu nuit et cyan,
   thème clair automatique selon le système.
   ============================================ */

:root {
    --fond: #0b1220;
    --surface: #111a2e;
    --surface-2: #16213a;
    --bord: rgba(148, 163, 184, 0.18);
    --texte: #e2e8f0;
    --doux: #94a3b8;
    --accent: #22d3ee;
    --accent-fort: #06b6d4;
    --accent-voile: rgba(34, 211, 238, 0.12);
    --smur: #ef4444;
    --ambulance: #f97316;
    --garde: #8b5cf6;
    --conseil: #10b981;
    --ombre: 0 24px 60px rgba(0, 0, 0, 0.4);
    --rayon: 18px;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root {
        --fond: #eef2f7;
        --surface: #ffffff;
        --surface-2: #f4f7fb;
        --bord: #dde3ec;
        --texte: #0f172a;
        --doux: #5b6b80;
        --accent: #0891b2;
        --accent-fort: #0e7490;
        --accent-voile: rgba(8, 145, 178, 0.1);
        --ombre: 0 20px 48px rgba(15, 23, 42, 0.12);
        color-scheme: light;
    }
}

*, *::before, *::after { box-sizing: border-box; }

/* L'attribut hidden l'emporte toujours sur le display d'une classe (cartes en grille, jauges…) */
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(60rem 40rem at 85% -10%, var(--accent-voile), transparent 60%),
        var(--fond);
    color: var(--texte);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ── en-tête ── */
.rt-entete {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rt-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--texte);
    text-decoration: none;
}

.rt-logo img { width: 30px; height: 30px; border-radius: 8px; }

.rt-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.rt-nav a:not(.rt-btn) {
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--texte);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
}

.rt-nav a:not(.rt-btn):hover { background: var(--accent-voile); }

/* ── boutons ── */
.rt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--accent-fort);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease;
}

.rt-btn:hover { filter: brightness(1.08); }
.rt-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rt-btn[disabled] { opacity: 0.55; cursor: not-allowed; filter: none; }

.rt-btn-discret {
    background: var(--surface);
    border-color: var(--bord);
    color: var(--texte);
}

.rt-btn-discret:hover { background: var(--surface-2); filter: none; }

.rt-btn-danger { background: #dc2626; }

/* ── appel à créer son compte (page d'attente) ── */
.rt-appel-compte {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin: -8px 0 28px;
}

.rt-appel-compte span { color: var(--doux); font-size: 0.92rem; max-width: 22rem; }

/* Avis affiché seulement quand l'adresse se termine par son identifiant (#compte-supprime) : pas de script */
.rt-cible { display: none; scroll-margin-top: 140px; }   /* l'en-tête reste visible au-dessus de l'avis */
.rt-cible:target { display: block; }

.rt-alerte {
    padding: 12px 14px;
    border: 1px solid var(--bord);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.95rem;
}

.rt-alerte.ok { border-left-color: var(--conseil); }
.rt-alerte.erreur { border-left-color: var(--smur); }
.rt-alerte.attention { border-left-color: var(--ambulance); }

.rt-entete + .rt-cible { width: calc(100% - 40px); max-width: 1080px; margin: 16px auto 0; }

/* ── page d'attente ── */
.rt-principal {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 20px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
    align-items: center;
}

.rt-pastille {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--bord);
    border-radius: 999px;
    background: var(--surface);
    color: var(--doux);
    font-size: 0.85rem;
    font-weight: 500;
}

.rt-pastille::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-voile);
}

h1 {
    margin: 20px 0 16px;
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

h1 em { font-style: normal; color: var(--accent); }

.rt-intro {
    margin: 0 0 28px;
    max-width: 34rem;
    color: var(--doux);
    font-size: 1.1rem;
}

.rt-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.rt-points li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
}

.rt-points svg {
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 10px;
    background: var(--accent-voile);
    color: var(--accent);
}

.rt-points strong { display: block; font-weight: 600; }
.rt-points span { color: var(--doux); font-size: 0.95rem; }

/* ── carte « appel entrant » ── */
.rt-appel {
    background: var(--surface);
    border: 1px solid var(--bord);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 22px;
}

.rt-appel-tete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bord);
}

.rt-appel-titre { font-weight: 600; }
.rt-appel-sous { color: var(--doux); font-size: 0.85rem; }

.rt-chrono {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--accent);
}

.rt-onde {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 44px;
    margin: 18px 0;
}

.rt-onde i {
    flex: 1;
    height: 30%;
    border-radius: 3px;
    background: var(--accent);
    opacity: 0.75;
    animation: rt-onde 1.2s ease-in-out infinite;
}

.rt-onde i:nth-child(3n) { animation-delay: -0.3s; }
.rt-onde i:nth-child(3n + 1) { animation-delay: -0.6s; }
.rt-onde i:nth-child(4n) { animation-delay: -0.9s; }

@keyframes rt-onde {
    0%, 100% { height: 18%; }
    50% { height: 100%; }
}

.rt-lignes { display: grid; gap: 10px; font-size: 0.93rem; }

.rt-ligne {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-2);
}

.rt-ligne b { font-weight: 600; margin-right: 6px; }
.rt-ligne.moi { background: var(--accent-voile); }

.rt-decisions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.rt-decisions span {
    padding: 8px 4px;
    border-radius: 10px;
    border: 1px solid var(--bord);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.rt-decisions .smur { color: var(--smur); border-color: color-mix(in srgb, var(--smur) 45%, transparent); }
.rt-decisions .ambulance { color: var(--ambulance); }
.rt-decisions .garde { color: var(--garde); }
.rt-decisions .conseil { color: var(--conseil); }

/* ── pied de page ── */
.rt-pied {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px;
    border-top: 1px solid var(--bord);
    color: var(--doux);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

/* ── page introuvable ── */
.rt-seul {
    flex: 1;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 48px 20px;
}

.rt-seul p { color: var(--doux); }

@media (max-width: 860px) {
    .rt-principal { grid-template-columns: 1fr; gap: 40px; padding-top: 36px; }
}

@media (max-width: 420px) {
    .rt-decisions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .rt-onde i { animation: none; height: 55%; }
}
