/*
 * CorePilot, maquette v2 : coquille épurée.
 * Jetons repris de MailPilot (webmail/assets/css/style.css). Seuls les jetons changent d'un thème
 * à l'autre. Paliers responsive de la charte : 1150, 900, 760, 560 px.
 * Principe v2 : une seule chose importante par écran, peu de cadres, des libellés en clair.
 */

:root {
    --ink: #0b0b0c;
    --ink-2: #3a3a40;
    --muted: #6b6b72;
    --paper: #f3f2ee;
    --white: #fff;
    --teinte-rgb: 11, 11, 12;

    --line: rgba(11, 11, 12, .11);
    --line-strong: rgba(11, 11, 12, .22);

    --coral: #ff2f63;
    --orange: #f8784d;
    --yellow: #ffc43d;
    --green: #2da56f;
    --danger: #c53b45;

    --accent: var(--orange);
    --accent-rgb: 248, 120, 77;
    --accent-soft: rgba(248, 120, 77, .10);
    --accent-line: rgba(248, 120, 77, .34);
    --accent-text: #a74c1d;
    --sur-accent: #0b0b0c;

    --or-fond: var(--yellow);
    --or-texte: #0b0b0c;
    --or-trait: var(--yellow);

    --avert-texte: #7d6208;
    --succes-texte: #1e6d4a;
    --danger-texte: #8c2b33;
    --bleu-texte: #24539f;
    --avert-pastille: rgba(255, 196, 61, .22);
    --succes-pastille: rgba(45, 165, 111, .14);
    --danger-pastille: rgba(197, 59, 69, .11);

    /* Tuile des logos : claire dans les deux thèmes, les couleurs de marque y restent justes */
    --tuile: #fff;
    --tuile-trait: rgba(11, 11, 12, .10);

    --gradient: linear-gradient(120deg, var(--coral), var(--orange) 55%, var(--yellow));

    --shadow: 0 24px 70px rgba(11, 11, 12, .14);
    --shadow-sm: 0 6px 20px rgba(11, 11, 12, .06);

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --ease: .18s ease;

    --font-display: "New Amsterdam", Haettenschweiler, "Arial Narrow", sans-serif;
    --font-body: "Open Sans", "Segoe UI", sans-serif;

    --largeur-barre: 248px;
    --hauteur-barre-mobile: 62px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f0ebe3;
    --ink-2: #cfc8bd;
    --muted: #a2988f;
    --paper: #15120f;
    --white: #1f1b17;
    --teinte-rgb: 240, 235, 227;

    --line: rgba(240, 235, 227, .12);
    --line-strong: rgba(240, 235, 227, .24);

    --orange: #ff8f66;
    --yellow: #ffd166;
    --green: #4fc48c;
    --danger: #ff7b85;

    --accent-soft: rgba(255, 143, 102, .14);
    --accent-line: rgba(255, 143, 102, .40);
    --accent-text: #ffb694;
    --sur-accent: #1a1714;

    --or-fond: rgba(255, 209, 102, .16);
    --or-texte: #ffd9a0;
    --or-trait: rgba(255, 209, 102, .45);

    --avert-texte: #ffd9a0;
    --succes-texte: #7fe0ae;
    --danger-texte: #ff9aa2;
    --bleu-texte: #a9cbff;
    --avert-pastille: rgba(255, 209, 102, .15);
    --succes-pastille: rgba(79, 196, 140, .15);
    --danger-pastille: rgba(255, 123, 133, .15);

    --tuile: #f6f4ef;
    --tuile-trait: rgba(240, 235, 227, .10);

    --gradient: linear-gradient(120deg, #ff8f66, #ffab6b 50%, #ffd166);

    --shadow: 0 24px 70px rgba(0, 0, 0, .55);
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .35);
}

/* ============================================================ */
/* BASE                                                         */
/* ============================================================ */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    min-width: 320px;
    background: var(--paper);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 15px/1.55 var(--font-body);
}

button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
a { color: var(--accent-text); }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.05;
}

p { margin: 0; line-height: 1.6; }
strong { font-weight: 700; }

:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb), .40);
    outline-offset: 2px;
}

.texte-degrade {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.discret { color: var(--muted); }
.petit { font-size: 13px; }
.lecteur-seul {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ============================================================ */
/* MARQUE                                                       */
/* ============================================================ */

.marque {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    color: var(--ink);
    text-decoration: none;
}
.marque-nom {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: .9;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.marque-par {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 1px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.logo-styleo { display: block; width: 46px; height: auto; }
.logo-styleo .logo-trait { fill: var(--ink); }

/* ============================================================ */
/* COQUILLE : colonne de gauche, en-tête, contenu               */
/* ============================================================ */

.app {
    display: grid;
    grid-template-columns: var(--largeur-barre) minmax(0, 1fr);
    min-height: 100vh;
}

.barre-laterale {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    overflow-y: auto;
    padding: 22px 12px 0;
    border-right: 1px solid var(--line);
    background: var(--paper);
}
.barre-tete { padding: 0 10px; }

.nav-principale { display: flex; flex-direction: column; gap: 2px; }
.nav-lien {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--ease), color var(--ease);
}
.nav-lien:hover { background: rgba(var(--teinte-rgb), .05); color: var(--ink); }
.nav-lien.actif { background: rgba(var(--teinte-rgb), .07); color: var(--ink); }
/* Repère de l'entrée courante : un point d'accent, pas un liseré */
.nav-lien.actif::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--accent);
}

.discussions { display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.nav-titre {
    margin: 0 0 6px;
    padding: 0 12px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.disc-lien {
    display: block;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
}
.disc-lien:hover { background: rgba(var(--teinte-rgb), .05); }
.disc-lien.actif { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.disc-date { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }

.barre-pied {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: auto -12px 0;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--line);
}
.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    font-size: 12px;
    font-weight: 800;
}
.utilisateur { flex: 1 1 auto; min-width: 0; color: var(--ink); text-decoration: none; }
.utilisateur-nom { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.utilisateur-org { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }

.app-principal { display: flex; flex-direction: column; min-width: 0; }

.entete {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 12px 36px;
    background: var(--paper);
}
.entete-titre { flex: 1 1 auto; min-width: 0; }
.entete h1 { font-size: 28px; line-height: 1; }
.entete-sous-titre { margin-top: 3px; color: var(--muted); font-size: 13px; }
.entete-outils { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* Bouton « Discussions » : ouvre la liste sur téléphone seulement */
.bouton-discussions { display: none; }

/* Pastille d'en-tête : actions en attente. Elle ne s'affiche que quand il y en a. */
.pastille {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.pastille::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--yellow);
}
.pastille:hover { border-color: var(--line-strong); }

/* Crédits du mois : un chiffre et un trait, rien de plus */
.credits {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}
.credits strong { color: var(--ink-2); font-weight: 700; }

.mesure {
    display: block;
    width: 64px;
    height: 5px;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(var(--teinte-rgb), .10);
    -webkit-appearance: none;
    appearance: none;
}
.mesure::-webkit-meter-inner-element { display: block; }
.mesure::-webkit-meter-bar { height: 5px; border: 0; border-radius: var(--radius-pill); background: rgba(var(--teinte-rgb), .10); }
.mesure::-webkit-meter-optimum-value { border-radius: var(--radius-pill); background: var(--accent); }
.mesure::-webkit-meter-suboptimum-value { border-radius: var(--radius-pill); background: var(--yellow); }
.mesure::-webkit-meter-even-less-good-value { border-radius: var(--radius-pill); background: var(--danger); }
.mesure::-moz-meter-bar { border-radius: var(--radius-pill); background: var(--accent); }
.mesure-large { width: 100%; height: 8px; }
.mesure-large::-webkit-meter-bar { height: 8px; }

.contenu { flex: 1 1 auto; min-width: 0; padding: 12px 36px 56px; }
.page { width: 100%; max-width: 1120px; margin: 0 auto; }
.page-etroite { max-width: 840px; }

.section-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 16px;
}
.section-tete > div:first-child { flex: 1 1 320px; min-width: 0; }
.section-titre { font-size: 22px; }
.section-intro { margin-top: 4px; color: var(--muted); font-size: 14px; }

.barre-mobile { display: none; }
.voile-menu { display: none; }

/* ============================================================ */
/* BOUTONS                                                      */
/* ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid var(--ink);
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--paper);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover {
    background: var(--or-fond);
    border-color: var(--or-trait);
    color: var(--or-texte);
    transform: translateY(-1px);
}
.btn-secondaire { border-color: var(--line-strong); background: var(--white); color: var(--ink); }
.btn-secondaire:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn-discret { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-discret:hover { background: rgba(var(--teinte-rgb), .06); border-color: transparent; color: var(--ink); }
.btn-danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a8303a; border-color: #a8303a; color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #1a1714; }
.btn-petit { min-height: 34px; padding: 0 14px; font-size: 12px; }
.btn-bloc { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Lien d'action discret : Épingler, Copier, Signaler, Gérer */
.lien-action {
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}
.lien-action:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lien-action[aria-pressed="true"] { color: var(--succes-texte); }

.btn-rond {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.btn-rond:hover { border-color: var(--ink); }

/* ============================================================ */
/* CHAMPS                                                       */
/* ============================================================ */

.champ { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.champ-libelle { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.champ-aide { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.saisie {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.saisie:hover { border-color: var(--ink-2); }
.saisie:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12); }
.saisie::placeholder { color: var(--muted); }
textarea.saisie { min-height: 110px; line-height: 1.55; resize: vertical; }
select.saisie {
    padding-right: 38px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b6b72' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}
.saisie-petite { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.saisie-recherche { padding-left: 14px; }

input[type="range"].curseur-reglage {
    width: 100%;
    height: 24px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.curseur-reglage::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(var(--teinte-rgb), .15); }
.curseur-reglage::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    -webkit-appearance: none;
    appearance: none;
}
.curseur-reglage::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(var(--teinte-rgb), .15); }
.curseur-reglage::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid var(--white); border-radius: 50%; background: var(--ink); }

.case, .radio {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 0;
    border: 1.5px solid var(--line-strong);
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
    transition: background var(--ease), border-color var(--ease);
}
.case { border-radius: 6px; }
.radio { border-radius: 50%; }
.case:hover, .radio:hover { border-color: var(--ink-2); }
.case:checked { border-color: var(--ink); background: var(--ink); }
.case:checked::after {
    content: "";
    width: 5px;
    height: 10px;
    margin-top: -2px;
    border: solid var(--paper);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.case:indeterminate { border-color: var(--ink); background: var(--ink); }
.case:indeterminate::after { content: ""; width: 9px; height: 2px; background: var(--paper); }
.radio:checked { border-color: var(--ink); }
.radio:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.case:disabled, .radio:disabled { opacity: .45; cursor: not-allowed; }

.choix { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.choix .case, .choix .radio { margin-top: 1px; }
.choix small { display: block; color: var(--muted); font-size: 12.5px; }

/* Interrupteur : l'état se voit sans lire de libellé */
.interrupteur-champ { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.interrupteur {
    position: relative;
    width: 36px;
    height: 22px;
    flex: 0 0 auto;
    margin: 0;
    border-radius: var(--radius-pill);
    background: rgba(var(--teinte-rgb), .20);
    -webkit-appearance: none;
    appearance: none;
    transition: background var(--ease);
}
.interrupteur::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform var(--ease);
}
.interrupteur:checked { background: var(--green); }
.interrupteur:checked::after { transform: translateX(14px); }

.segments {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-pill);
    background: rgba(var(--teinte-rgb), .06);
}
.segment {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}
.segment:hover { color: var(--ink); }
.segment[aria-checked="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segment:disabled { opacity: .35; cursor: not-allowed; }
.segment-court { display: none; }

/* ============================================================ */
/* PILULES, ÉTATS, TENDANCES                                    */
/* ============================================================ */

.pilule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.pilule::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}
.pilule:hover { border-color: var(--ink-2); color: var(--ink); }
.pilule[aria-pressed="true"] { border-color: var(--ink-2); color: var(--ink); }
.pilule[aria-pressed="true"]::before { border-color: var(--accent); background: var(--accent); }
.pilule.exclue, .pilule.exclue:hover { border-style: dashed; color: var(--muted); opacity: .75; cursor: not-allowed; }
.pilule.exclue::before { display: none; }
.pilule-note { font-size: 11.5px; font-weight: 500; }

/* État en un mot, précédé d'un point : Prêt, À reconnecter, En marche, En pause */
.etat { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.etat.avert::before { background: var(--yellow); }
.etat.neutre::before { background: var(--line-strong); }
.etat.info::before { background: #2f6fd6; }
.etat.danger::before { background: var(--danger); }

.tendance { font-size: 12.5px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tendance.hausse { color: var(--succes-texte); }
.tendance.baisse { color: var(--danger-texte); }

.puce {
    display: inline-flex;
    align-items: center;
    padding: 1px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.puce.avert { border-color: transparent; background: var(--avert-pastille); color: var(--avert-texte); }
.puce.danger { border-color: transparent; background: var(--danger-pastille); color: var(--danger-texte); }
.puce.succes { border-color: transparent; background: var(--succes-pastille); color: var(--succes-texte); }

/* ============================================================ */
/* SURFACES                                                     */
/* ============================================================ */

.carte {
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
}
.carte-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}
.carte-titre { font-size: 20px; }
.carte-sous-titre { margin-top: 3px; color: var(--muted); font-size: 12.5px; }

.ligne-info { color: var(--muted); font-size: 13px; }
.ligne-info strong { color: var(--ink-2); }

.liste-def {
    display: grid;
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
    gap: 6px 16px;
    margin: 0;
    font-size: 13.5px;
}
.liste-def dt { color: var(--muted); }
.liste-def dd { margin: 0; color: var(--ink); min-width: 0; }

/* Repère d'ouverture d'un <details>, dessiné en bordures : il suit la couleur et pivote */
.repliable > summary { list-style: none; }
.repliable > summary::-webkit-details-marker { display: none; }
.repliable > summary::before {
    content: "";
    display: inline-block;
    margin-right: 8px;
    vertical-align: 1px;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform var(--ease);
}
.repliable[open] > summary::before { transform: rotate(90deg); }

/* ============================================================ */
/* RESPONSIVE DE LA COQUILLE                                    */
/* ============================================================ */

@media (max-width: 1150px) {
    :root { --largeur-barre: 224px; }
    .entete { padding: 12px 24px; }
    .contenu { padding: 10px 24px 48px; }
}

@media (max-width: 900px) {
    .credits-libelle { display: none; }
}

@media (max-width: 760px) {
    .app { grid-template-columns: minmax(0, 1fr); }

    /* La colonne de gauche devient un tiroir : la liste des discussions et le compte */
    .barre-laterale {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(300px, 86vw);
        height: auto;
        z-index: 80;
        padding-top: 20px;
        background: var(--paper);
        box-shadow: var(--shadow);
        transform: translateX(-105%);
        transition: transform .22s ease;
    }
    .barre-laterale .nav-principale { display: none; }
    .menu-ouvert .barre-laterale { transform: none; }
    .menu-ouvert .voile-menu { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(11, 11, 12, .38); }

    .bouton-discussions { display: inline-flex; }
    .entete { gap: 10px; min-height: 58px; padding: 10px 16px; }
    .entete h1 { font-size: 23px; }
    .entete-sous-titre { font-size: 12px; }
    .entete .credits, .entete .bouton-theme { display: none; }

    .contenu { padding: 6px 16px calc(var(--hauteur-barre-mobile) + 32px); }
    .section-titre { font-size: 20px; }
    .carte { padding: 18px 16px; border-radius: var(--radius); }

    .barre-mobile {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        height: var(--hauteur-barre-mobile);
        padding: 0 4px;
        background: var(--paper);
        border-top: 1px solid var(--line);
    }
    .barre-mobile a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: var(--muted);
        font-size: 11.5px;
        font-weight: 700;
        text-decoration: none;
    }
    .barre-mobile a::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: transparent; }
    .barre-mobile a.actif { color: var(--ink); }
    .barre-mobile a.actif::after { background: var(--accent); }

    .segment-long { display: none; }
    .segment-court { display: inline; }
}

@media (max-width: 560px) {
    .liste-def { grid-template-columns: minmax(0, 1fr); gap: 1px 0; }
    .liste-def dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Pied de la colonne : le compte, puis le thème sur sa propre ligne */
.barre-pied { flex-wrap: wrap; row-gap: 4px; }
.barre-pied .bouton-theme { flex-basis: 100%; padding-left: 44px; text-align: left; }
