/* RedKey Control — compléments (consomment les tokens de style.css). */

/* Badges de plan / statut */
.badge-lite     { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }
.badge-basic    { background: var(--info-bg);    color: var(--info);    border-color: #CBD7E6; }
.badge-avance   { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }
.badge-expert   { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }
.badge-actif    { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }
.badge-suspendu { background: var(--danger-bg);  color: var(--danger);  border-color: var(--red-border); }

/* Jauge usage / plafond */
.rk-usage { display: flex; flex-direction: column; gap: 0.4rem; }
.rk-usage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.rk-usage-head .lbl { font-size: 0.8rem; color: var(--text-muted); }
.rk-usage-head .val { font-family: var(--serif); font-weight: 600; font-size: 0.85rem; }
.rk-usage-head .val .faint { color: var(--text-muted); font-weight: 500; }
.rk-usage-track { height: 0.53333rem; border-radius: 66rem; background: var(--paper-deep); box-shadow: var(--nm-inset-sm); overflow: hidden; }
.rk-usage-fill { height: 100%; border-radius: 66rem; transition: width 0.3s var(--ease); }
.rk-usage-fill.ok { background: var(--success); }
.rk-usage-fill.warning { background: var(--warning); }
.rk-usage-fill.danger { background: var(--danger); }

/* Grilles */
.rk-grid { display: grid; gap: 1.2rem; }
.rk-grid-usage { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.rk-grid-plans { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }

/* Repartition par plan : des NOMBRES, pas des champs de saisie. Elle utilisait
   `.rk-grid-usage`, dont le `minmax(14rem)` est taille pour un <input> : sur
   telephone une seule colonne tenait, et quatre chiffres occupaient 530 px de
   haut. Ici 7rem suffisent a un nombre et son libelle — deux par ligne sur
   telephone, tous alignes des que la carte s'elargit. `auto-fit` plutot qu'un
   compte fige : un cinquieme plan se rangerait tout seul. */
.rk-repartition { display: grid; gap: 1rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.rk-repartition .stat-value { font-size: 1.8rem; }

/* Liste de fonctionnalités */
.rk-feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem; }
.rk-feat-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.rk-feat-item.off { color: var(--text-muted); }
.rk-feat-item .lu-check { color: var(--success); }
.rk-feat-item .lu-minus { color: var(--border-strong); }

/* Divers */
.rk-section-title { font-family: var(--serif); font-weight: 700; font-size: 1rem; margin: 0 0 0.9rem; }
.rk-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.rk-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.rk-field > label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; color: var(--text-muted); }
.rk-inline-form { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.rk-muted { color: var(--text-muted); }

/* Un compteur qu'on n'a PAS PU lire. Il se distingue d'un vrai zero : grise,
   en italique, avec son triangle. Sans cette nuance, « 0 bien » se lisait
   comme une agence vide alors que la requete avait echoue — voir
   usage_scalar() dans includes/plans.php. */
.faint { color: var(--text-muted); font-weight: 500; }
.rk-usage.est-inconnu .val { color: var(--warning); font-style: italic; }
.rk-usage.est-inconnu .val i { margin-right: 0.3rem; font-style: normal; }
.acc-metric .v .faint { font-style: italic; font-size: 0.9em; }
.rk-history-row { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.4rem 0; border-bottom: 0.06667rem solid var(--border); }
.rk-history-row:last-child { border-bottom: 0; }
.rk-history-date { font-family: var(--serif); font-variant-numeric: tabular-nums; color: var(--text-muted); min-width: 6rem; font-size: 0.85rem; }
.rk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.rk-temp-pass { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.08em; color: var(--red); }
.rk-back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.rk-back:hover { color: var(--red); }

/* ── Page Comptes : cockpit (stats) + grille de cartes agences ── */
.stat-value-unit { font-size: 1rem; font-weight: 600; }

.acc-create { margin-bottom: 1.2rem; }
.acc-create > summary { display: inline-flex; align-items: center; gap: 0.4rem; width: auto; list-style: none; cursor: pointer; }
.acc-create > summary::-webkit-details-marker { display: none; }
.acc-create > summary::marker { content: ""; }
.acc-create[open] > summary { margin-bottom: 1rem; }
.acc-create-form { margin: 0; }

.acc-toolbar { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.acc-toolbar .rk-field, .acc-toolbar .iselect { min-width: 11rem; }
/* Dans une barre de filtres, le champ ne porte pas la marge basse qu'il a
   dans un formulaire : c'est la barre qui espace. Cette regle remplace le
   `style="margin:0"` que chaque page repetait a la main. */
.acc-toolbar .rk-field { margin-bottom: 0; }
.acc-toolbar-end { margin-left: auto; display: flex; gap: 0.6rem; align-items: center; }

/* Sur telephone, un filtre par ligne, pleine largeur. A deux par ligne les
   champs prenaient des largeurs differentes selon leur contenu et le bouton
   se retrouvait colle au second : c'est ce qui donnait cet aspect ferraille.
   Le bloc de droite (compteur, reinitialisation) passe sur sa propre ligne. */
@media (max-width: 620px) {
    .acc-toolbar { display: grid; grid-template-columns: 1fr; }
    .acc-toolbar .rk-field,
    .acc-toolbar .iselect,
    .acc-toolbar .btn { min-width: 0; width: 100%; }
    .acc-toolbar-end { margin-left: 0; justify-content: space-between; }
}

.acc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.acc-card {
    background: var(--paper); border: 0.1rem solid var(--line-ink); padding: 1.1rem 1.2rem;
    display: flex; flex-direction: column; gap: 0.9rem;
    transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.acc-card:hover { box-shadow: var(--nm-shadow-lg); transform: translateY(-0.1rem); }
.acc-card.is-suspended { opacity: 0.72; }
.acc-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.acc-card-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.acc-card-name:hover { color: var(--red); }
.acc-card-city { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; display: flex; align-items: center; gap: 0.3rem; }
.acc-card-city i { font-size: 0.7rem; }
.acc-card-metrics { display: flex; gap: 1.4rem; align-items: flex-end; }
.acc-metric.grow { flex: 1; }
.acc-metric .k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.acc-metric .v { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--text); line-height: 1.2; }
.acc-metric .v small { color: var(--text-muted); font-weight: 500; font-size: 0.7rem; }
.acc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; border-top: 0.06667rem solid var(--border); padding-top: 0.8rem; }
.acc-mrr { font-family: var(--serif); font-weight: 700; color: var(--red); }
.acc-mrr.faint { color: var(--text-muted); }

/* Raccourci « Effacer » d'une agence suspendue : discret par défaut, il ne
   s'affirme qu'au survol. Une action irréversible ne doit pas attirer l'œil
   dans une liste, mais rester trouvable sans fouiller la fiche. */
.acc-card-purge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.72rem; font-weight: 600; text-decoration: none;
    color: var(--text-muted); border: 0.06667rem solid var(--border);
    border-radius: 0.4rem; padding: 0.2rem 0.5rem;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.acc-card-purge:hover { color: #fff; background: #B91C1C; border-color: #B91C1C; }

/* ── Page Plans : liste des plans + panneau d'édition ── */
.pd { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.pd-list { display: flex; flex-direction: column; gap: 0.5rem; position: sticky; top: 1rem; }
.pd-item {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 0.9rem;
    background: var(--paper); border: 0.1rem solid var(--line-ink); color: var(--text);
    transition: background 0.15s var(--ease);
}
.pd-item:hover { background: var(--red-soft); text-decoration: none; }
.pd-item.is-active { background: var(--red); border-color: var(--red); }
.pd-item.is-active .pd-item-name,
.pd-item.is-active .pd-item-sub,
.pd-item.is-active .pd-item-price { color: #FDF7F6; }
.pd-item-body { min-width: 0; }
.pd-item-name { font-family: var(--serif); font-weight: 700; font-size: 0.95rem; display: block; }
.pd-item-sub { font-size: 0.75rem; color: var(--text-muted); }
.pd-item-price { margin-left: auto; font-family: var(--serif); font-weight: 700; color: var(--red); white-space: nowrap; }

.pd-main { min-width: 0; }
.pd-impact {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; margin-bottom: 1rem;
    background: var(--warning-bg); color: var(--warning); border-radius: var(--radius); font-size: 0.85rem;
}
.pd-impact.is-quiet { background: var(--paper-deep); color: var(--text-muted); }

.pd-field {
    display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 0.8rem; align-items: center;
    padding: 0.55rem 0; border-bottom: 0.06667rem solid var(--border);
}
.pd-field:last-child { border-bottom: 0; }
.pd-field > label {
    font-size: 0.85rem; color: var(--text-muted); text-transform: none; letter-spacing: 0; font-weight: 500;
}
.pd-field > label i { width: 1.2rem; text-align: center; color: var(--red-accent); margin-right: 0.35rem; }
.pd-field input[type="text"],
.pd-field input[type="number"] { max-width: 11rem; }
.pd-field input:disabled { background: var(--paper-deep); color: var(--text-muted); }

.pd-input-unit { display: inline-flex; align-items: center; gap: 0.5rem; }
.pd-unit { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.pd-limit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pd-unl {
    display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem;
    color: var(--text-muted); text-transform: none; letter-spacing: 0; cursor: pointer; font-weight: 500;
}

.pd-feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.5rem; }
.pd-feat-item {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem;
    background: var(--paper-deep); border-radius: var(--radius); font-size: 0.88rem;
    cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 500;
}
.pd-feat-item i { color: var(--red-accent); width: 1.1rem; text-align: center; }
.pd-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* Interrupteur (illimité / fonctionnalité incluse) */
.sw { position: relative; display: inline-block; width: 2.1rem; height: 1.15rem; flex-shrink: 0; }
.sw > input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw > span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 66rem; transition: background 0.2s var(--ease); }
.sw > span::before {
    content: ""; position: absolute; height: 0.85rem; width: 0.85rem; left: 0.15rem; bottom: 0.15rem;
    background: #fff; border-radius: 50%; transition: transform 0.2s var(--ease);
}
.sw > input:checked + span { background: var(--success); }
.sw > input:checked + span::before { transform: translateX(0.95rem); }
.sw > input:focus-visible + span { box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.18); }

@media (max-width: 900px) {
    .pd { grid-template-columns: 1fr; }
    .pd-list { position: static; }
    .pd-field { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ── Fiche compte : 2 colonnes (main + rail synthèse sticky) ── */
.fa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.2rem; align-items: start; }
.fa-main { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.fa-rail { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.fa-rail-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.fa-rail-price { font-family: var(--serif); font-weight: 800; font-size: 2rem; color: var(--red); line-height: 1; margin-bottom: 1rem; }
.fa-rail-price small { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.fa-kv { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 0.06667rem solid var(--border); font-size: 0.88rem; }
.fa-kv:last-child { border-bottom: 0; }
.fa-kv .k { color: var(--text-muted); flex-shrink: 0; }
.fa-kv .v { text-align: right; overflow-wrap: anywhere; }
.fa-rail-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.fa-rail-actions form { display: flex; flex-direction: column; gap: 0.5rem; }
.fa-rail-actions .btn { width: 100%; }
.fa-rail .iselect { width: 100%; }
.uv { display: flex; flex-direction: column; gap: 0.9rem; }
@media (max-width: 900px) { .fa-grid { grid-template-columns: 1fr; } .fa-rail { position: static; } }

/* ── Login : repli code de secours (anti-lockout) ── */
.lg-backup { margin: 0.9rem 0 0.2rem; }
.lg-backup > summary {
    cursor: pointer; font-size: 0.82rem; color: var(--text-muted);
    list-style: none; text-align: center;
}
.lg-backup > summary::-webkit-details-marker { display: none; }
.lg-backup > summary::marker { content: ""; }
.lg-backup > summary:hover { color: var(--red); }
.lg-backup-input {
    width: 100%; margin-top: 0.7rem; text-align: center;
    font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.12em;
    text-transform: uppercase;
}
.lg-backup-hint { font-size: 0.76rem; color: var(--text-muted); margin: 0.45rem 0 0; text-align: center; }

/* ============================================================
   Demandes de démonstration (page /requests)
   Boîte de réception commerciale : une carte par demande,
   les nouvelles se distinguent par un liseré rouge.
   ============================================================ */
.dr-count { font-size: 0.85rem; color: var(--text-muted); }

.dr-empty { text-align: center; padding: 3rem 1.5rem; }
.dr-empty i { font-size: 2rem; color: var(--red-soft-strong); margin-bottom: 0.8rem; }
.dr-empty p { margin: 0.3rem 0; }

.dr-list { display: grid; gap: 1rem; }

.dr-card {
    position: relative;
    display: grid;
    gap: 0.9rem;
    padding: 1.3rem 1.4rem;
    border-radius: var(--nm-radius);
    background: var(--paper);
    box-shadow: var(--nm-shadow);
}
/* Une demande non traitée doit sauter aux yeux dans la pile. */
.dr-card.is-new::before {
    content: "";
    position: absolute;
    left: 0; top: 1.1rem; bottom: 1.1rem;
    width: 0.2rem;
    border-radius: 0 0.2rem 0.2rem 0;
    background: var(--red);
}

.dr-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dr-agence { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 0.35rem; }
.dr-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.8rem; color: var(--text-muted); }
.dr-meta i { margin-right: 0.3rem; }

.dr-contact { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.88rem; }
.dr-contact i { margin-right: 0.4rem; color: var(--text-muted); }
.dr-contact a { color: var(--red); font-weight: 500; }

.dr-message {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: var(--paper-deep);
    box-shadow: var(--nm-inset-sm);
    font-size: 0.9rem;
    line-height: 1.6;
}

.dr-note > summary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    cursor: pointer; list-style: none;
    font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
}
.dr-note > summary::-webkit-details-marker { display: none; }
.dr-note-form { display: flex; gap: 0.6rem; align-items: flex-end; margin-top: 0.6rem; flex-wrap: wrap; }
.dr-note-form textarea {
    flex: 1 1 18rem; min-height: 3.2rem; resize: vertical;
    font-family: var(--sans); font-size: 0.88rem;
}

.dr-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.dr-actions form { margin: 0; }
.dr-actions .dr-create { margin-left: auto; }

@media (max-width: 620px) {
    .dr-actions .dr-create { margin-left: 0; width: 100%; justify-content: center; }
}

/* Pastilles d'étape : mêmes couleurs de statut que le reste de l'app. */
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge i { margin-right: 0.35rem; }
.dr-del { color: var(--danger); }
.dr-del:hover { color: var(--danger); background: var(--danger-bg); }

/* ------------------------------------------------------------------
   Journal d'audit — liste + panneau de détail
   ------------------------------------------------------------------
   Le tableau précédent donnait une colonne « Détail » écrasée sur quatre
   lignes à côté d'une colonne de dates presque vide : le détail va de 5 à
   106 caractères, et 4 lignes sur 10 n'ont pas de cible. Ici la liste ne
   porte que ce qui tient sur une ligne, le reste vit dans le panneau. */

.audit-filtres {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    margin-bottom: var(--pile, 1.2rem);
}
.audit-pastilles { display: flex; flex-wrap: wrap; gap: 0.35rem; }
/* Séparateur discret entre les deux jeux de filtres : ils ne se combinent pas
   dans la tête de l'utilisateur s'ils se touchent. */
.audit-periode { padding-left: 0.9rem; border-left: 0.06667rem solid var(--border); }

.audit-pastille {
    display: inline-block;
    padding: 0.36rem 0.8rem;
    border: 0.06667rem solid var(--border-strong);
    border-radius: 999px;
    background: var(--paper);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.audit-pastille:hover { color: var(--text); border-color: var(--text-muted); text-decoration: none; }
.audit-pastille.is-on {
    background: var(--red);
    border-color: var(--red);
    color: #FDF7F6;
    font-weight: 600;
}
.audit-pastille.is-on:hover { background: var(--red-hover); color: #FDF7F6; }
.audit-pastille-fine { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
.audit-pastille:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.audit-compte { margin: 0 0 0 auto; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

.audit-duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
    gap: var(--pile, 1.2rem);
    align-items: start;
}

/* La liste porte ses propres séparations : pas de rembourrage de carte, sinon
   la première et la dernière ligne flottent. */
.audit-liste { padding: 0; overflow: hidden; }

.audit-rang {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    width: 100%;
    padding: 0.62rem 0.9rem;
    border: 0;
    border-top: 0.06667rem solid var(--border);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.audit-rang:first-child { border-top: 0; }
.audit-rang:hover { background: var(--paper-deep); }
.audit-rang.is-on { background: var(--danger-bg); }
.audit-rang:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

.audit-rang-h {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;   /* les heures s'alignent en colonne */
    white-space: nowrap;
}
/* Une seule ligne, jamais deux : c'est tout l'intérêt d'avoir sorti le détail.
   `min-width: 0` est indispensable — sans lui, une grille refuse de rétrécir
   son enfant et l'ellipse ne se déclenche jamais. */
.audit-rang-t {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.audit-rang-cible {
    font-size: 0.84rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-etiq {
    display: inline-block;
    flex: none;
    padding: 0.16rem 0.5rem;
    border-radius: 0.33333rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.audit-etiq-neutre  { background: var(--paper-deep); color: var(--text-muted); }
.audit-etiq-success { background: var(--success-bg); color: var(--success); }
.audit-etiq-info    { background: var(--info-bg);    color: var(--info); }
.audit-etiq-warning { background: var(--warning-bg); color: var(--warning); }
.audit-etiq-danger  { background: var(--danger-bg);  color: var(--danger); }

.audit-panneau {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: sticky;
    top: 1.2rem;   /* le détail reste visible pendant qu'on parcourt la liste */
}
.audit-pan-etiq { align-self: flex-start; }
.audit-pan-champ { display: flex; flex-direction: column; gap: 0.15rem; }
/* Champ sans valeur : masqué plutôt qu'affiché avec un tiret. */
.audit-pan-champ.est-vide { display: none; }
.audit-pan-l {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.audit-pan-v { font-size: 0.87rem; line-height: 1.5; overflow-wrap: anywhere; }

@media (max-width: 900px) {
    /* Le panneau passe sous la liste et cesse de coller : sur un écran étroit,
       une colonne collante mange la moitié de la hauteur utile. */
    .audit-duo { grid-template-columns: 1fr; }
    .audit-panneau { position: static; }
    .audit-compte { margin-left: 0; width: 100%; }
    .audit-periode { padding-left: 0; border-left: 0; }

    /* Cibles tactiles : 32 px au doigt, c'est trop petit. On remonte à ~44 px
       sans toucher à la taille du texte. */
    .audit-pastille,
    .audit-pastille-fine {
        display: inline-flex;
        align-items: center;
        min-height: 2.66667rem;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* ------------------------------------------------------------------
   Santé de l'application cible (pages/sante.php)
   ------------------------------------------------------------------
   Une pastille dit l'essentiel avant la lecture : joignable ou non. Le reste
   se lit en mesures alignées, pas en paragraphes — on vient ici pour vérifier
   quelque chose, pas pour lire. */
.sante-tete { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.sante-pastille {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.sante-pastille.est-ok { background: var(--success-bg); color: var(--success); }
.sante-pastille.est-ko { background: var(--danger-bg);  color: var(--danger); }
.sante-titre { min-width: 0; }

.sante-grille { display: grid; gap: 1rem 1.4rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.sante-mesure .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); font-weight: 600; }
.sante-mesure .v { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin: 0.15rem 0 0.1rem; }
.sante-mesure .s { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
/* Le trait de gauche, et non un fond teinté : une mesure en alerte reste une
   mesure, pas une action à confirmer. */
.sante-mesure.est-alerte { padding-left: 0.7rem; border-left: 0.2rem solid var(--warning); }
.sante-mesure.est-alerte .v { color: var(--warning); }

.sante-journal { margin-top: 1.1rem; border-top: 0.06667rem solid var(--border); padding-top: 0.8rem; }
.sante-journal > summary {
    list-style: none; cursor: pointer;
    font-size: 0.82rem; font-weight: 600; color: var(--red-ink);
    display: flex; align-items: center; gap: 0.45rem;
}
.sante-journal > summary::-webkit-details-marker { display: none; }
.sante-journal ul { margin: 0.7rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.sante-journal li {
    font-family: ui-monospace, "Cascadia Mono", monospace;
    font-size: 0.74rem; line-height: 1.5; color: var(--text-muted);
    background: var(--paper-deep); padding: 0.5rem 0.65rem; border-radius: var(--radius);
    overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------
   Confirmation d'une action sensible (<dialog>, voir includes/footer.php)
   ------------------------------------------------------------------
   Le bouton porte le NOM du geste — « Effacer définitivement », pas « OK ».
   C'est la seule chose qu'on lit vraiment avant de cliquer. */
.rk-confirm {
    border: 0;
    padding: 1.6rem 1.7rem 1.3rem;
    border-radius: var(--nm-radius);
    background: var(--paper);
    box-shadow: var(--nm-shadow);
    max-width: 28rem;
    color: var(--text);
}
.rk-confirm::backdrop { background: rgba(16, 24, 40, 0.45); }
.rk-confirm p { margin: 0 0 1.3rem; font-size: 0.95rem; line-height: 1.6; }
.rk-confirm-actions { display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 480px) {
    /* Les deux boutons prennent la largeur : viser au pouce sur une action
       irréversible ne doit pas être un exercice d'adresse. */
    .rk-confirm-actions { flex-direction: column-reverse; }
    .rk-confirm-actions .btn { width: 100%; justify-content: center; }
}

/* Trois motifs qui se repetaient en `style=""` d'un ecran a l'autre. Les
   valeurs uniques restent en ligne : une classe a usage unique deplace le
   probleme sans le resoudre. */
.rk-mt { margin-top: 1rem; }
.rk-note { font-size: 0.8rem; margin-top: 0.5rem; }
.rk-depli { cursor: pointer; font-weight: 600; }
