/* ============================================================
   RH TRANSPORT — Charte graphique
   Couleurs : rouge #c0392b | navy #1a2e4a | vert #2d7d4f
              amber #854F0B | bleu #185FA5 | fond #f4f5f7
============================================================ */

:root {
  --rouge:    #c0392b;
  --navy:     #1a2e4a;
  --green:    #2d7d4f;
  --amber:    #854F0B;
  --red:      #a32d2d;
  --blue:     #185FA5;
  --bg:       #f4f5f7;
  --sidebar-w: 210px;
  --topbar-h:  56px;
}

/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif;
       background: var(--bg); color: #1a1a2e; }

/* ── SIDEBAR ──────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--navy);
  display: flex; flex-direction: column;
  z-index: 1000; overflow: hidden;
}

/* Le logo est un lien (retour au tableau de bord + rechargement) */
.sidebar-brand {
  display: block;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.sidebar-brand:hover { background: rgba(255,255,255,.05); }
.sidebar-brand:active .logo-pill { transform: scale(.97); }
.sidebar-brand .logo-pill { transition: transform .1s; }
/* ── Pastille blanche portant le logo Baloo (SVG intégré) ──── */
.logo-pill {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
}
.baloo-svg { display: block; height: auto; }        /* le SVG scale via la largeur */
/* Bandeau latéral (fond marine) */
.logo-pill-sidebar { padding: 9px 14px; border-radius: 10px; }
.logo-pill-sidebar .baloo-svg { width: 148px; }
/* Page de connexion (fond rouge) */
.logo-pill-login { padding: 16px 24px; margin-bottom: 24px; }
.logo-pill-login .baloo-svg { width: 200px; }

.sidebar-nav {
  list-style: none; margin: 0; padding: 12px 0; flex: 1;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,.75);
  text-decoration: none; font-size: .875rem;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.sidebar-link.active {
  background: rgba(192,57,43,.35);
  color: #fff;
  border-left-color: var(--rouge);
  font-weight: 600;
}
.sidebar-link i { font-size: 1rem; min-width: 18px; }

.sidebar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.15);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--rouge); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: .78rem; font-weight: 600;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: rgba(255,255,255,.55); font-size: .68rem; text-transform: uppercase; }
.user-logout { color: rgba(255,255,255,.5); text-decoration: none; font-size: 1rem;
               transition: color .15s; }
.user-logout:hover { color: var(--rouge); }

/* ── MAIN CONTENT ─────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── TOPBAR ───────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e0e3ea;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 900;
}
.topbar-title {
  font-size: 1rem; font-weight: 600; color: var(--navy);
  display: flex; align-items: center;
}
.topbar-title a { color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.badge-alerte {
  position: absolute; top: -4px; right: -4px;
  background: var(--rouge); color: #fff;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: .6rem; display: flex; align-items: center; justify-content: center;
}

/* ── FLASH ZONE ───────────────────────────────────────── */
.flash-zone { padding: 12px 24px 0; }

/* ── PAGE BODY ─────────────────────────────────────────── */
.page-body { padding: 24px; flex: 1; }

/* ── CARD SECTION ──────────────────────────────────────── */
.card-section {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e3ea;
  overflow: hidden;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f2f5;
}
.section-title { margin: 0; font-size: .85rem; font-weight: 700;
                 text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
.section-badge { font-size: .75rem; font-weight: 700; }

/* ── KPI GRID ──────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.kpi-card {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e3ea;
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
}
.kpi-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.kpi-navy  { background: rgba(26,46,74,.12); color: var(--navy); }
.kpi-blue  { background: rgba(24,95,165,.12); color: var(--blue); }
.kpi-green { background: rgba(45,125,79,.12); color: var(--green); }
.kpi-orange{ background: rgba(133,79,11,.12); color: var(--amber); }
.kpi-red   { background: rgba(163,45,45,.12); color: var(--red); }
.kpi-amber { background: rgba(133,79,11,.12); color: var(--amber); }
.kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--navy); }
.kpi-label { font-size: .75rem; color: #6b7280; margin-top: 2px; }

/* ── TABLES ─────────────────────────────────────────────── */
.data { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data th {
  padding: 10px 16px;
  text-transform: uppercase; font-size: .7rem; letter-spacing: .06em;
  color: #6b7280; font-weight: 700; text-align: left;
  border-bottom: 2px solid #f0f2f5;
  white-space: nowrap;
}
.data td {
  padding: 10px 16px;
  border-bottom: 1px solid #f8f9fb;
  vertical-align: middle;
}
.data tbody tr:hover { background: #fafbfc; }
.data tbody tr:last-child td { border-bottom: none; }
.row-critique { background: rgba(163,45,45,.04) !important; }
.row-haute    { background: rgba(133,79,11,.04) !important; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 4px;
  font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.badge-green  { background: rgba(45,125,79,.15);  color: var(--green); }
.badge-blue   { background: rgba(24,95,165,.15);  color: var(--blue); }
.badge-orange { background: rgba(133,79,11,.15);  color: var(--amber); }
.badge-red    { background: rgba(163,45,45,.15);  color: var(--red); }
.badge-navy   { background: rgba(26,46,74,.15);   color: var(--navy); }
.badge-grey   { background: #edf0f4;              color: #6b7280; }

/* ── PROGRESS BAR ───────────────────────────────────────── */
.progress-bar-wrap {
  height: 6px; background: #e9ecf0; border-radius: 3px;
  overflow: hidden;
}
.progress-bar-wrap.large { height: 12px; border-radius: 6px; }
.progress-bar-fill {
  height: 100%; background: var(--green);
  border-radius: 3px; transition: width .4s ease;
}

/* ── DEADLINE ───────────────────────────────────────────── */
.deadline      { font-size: .78rem; font-weight: 600; }
.deadline-late { color: var(--red); }
.deadline-soon { color: var(--amber); }

/* ── PRODUITS ET EEP ────────────────────────────────────────
   Trois produits, un par prestation de base, plus deux pastilles
   particulières :
     .tag-eep     — l'unité de compte commune (Équivalent Externalisation
                    Paye), en navy pour qu'elle se détache des produits ;
     .tag-inconnu — l'anomalie : prestation de base non renseignée, donc
                    pas de coefficient et pas d'EEP. Elle doit rester
                    visible, jamais comptée zéro en silence.            */
.tag-externalisation, .tag-saisie_evp, .tag-mad,
.tag-inconnu, .tag-eep {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .05rem .4rem; border-radius: 4px;
  font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  white-space: nowrap;
}
.tag-externalisation { background: #eaf5ee; color: #1f5c3a; border: 1px solid #b9dfc8; }
.tag-saisie_evp      { background: #f1f9f4; color: #2f6d4c; border: 1px solid #cbe8d8; }
.tag-mad             { background: #e8f1fb; color: #0f4c86; border: 1px solid #bcd4ea; }
.tag-inconnu         { background: #fdf3f2; color: #a8412f; border: 1px solid #f0cdc7; }
.tag-eep             { background: rgba(26,46,74,.09); color: var(--navy);
                       border: 1px solid rgba(26,46,74,.22); }
.tag-externalisation b, .tag-saisie_evp b, .tag-mad b,
.tag-inconnu b, .tag-eep b { font-weight: 800; }

/* ── AVATARS ────────────────────────────────────────────── */

.avatar-xs {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: .6rem; font-weight: 700;
}
.avatar-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary   { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn-primary:hover { background: #a93226; border-color: #a93226; color: #fff; }
.btn-xs { padding: 2px 7px; font-size: .72rem; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-label  { font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-input  { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db;
               border-radius: 6px; font-size: .875rem;
               transition: border-color .15s, box-shadow .15s; }
.form-input:focus { outline: none; border-color: var(--rouge);
                    box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.form-textarea { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db;
                 border-radius: 6px; font-size: .875rem; resize: vertical; }
.form-textarea:focus { outline: none; border-color: var(--rouge);
                        box-shadow: 0 0 0 3px rgba(192,57,43,.15); }

/* ── ACTIVITY LIST ──────────────────────────────────────── */
.activity-list, .alert-list, .history-list {
  list-style: none; margin: 0; padding: 8px 0;
}
.activity-item, .history-item {
  display: flex; gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #f8f9fb;
}
.activity-item:last-child, .history-item:last-child { border-bottom: none; }
.activity-body  { flex: 1; min-width: 0; }
.activity-text  { font-size: .82rem; line-height: 1.4; }
.activity-time  { font-size: .7rem; }

.alert-item {
  padding: 8px 16px;
  border-bottom: 1px solid #f8f9fb;
  font-size: .82rem;
}
.alert-item.alert-retard { color: var(--red); }
.alert-item.alert-bloque  { color: var(--amber); }

.history-diff { margin-top: 2px; }

/* ── FLUX CLIENT ────────────────────────────────────────── */
.flux-block { border: 1px solid #e0e3ea; border-radius: 8px; overflow: hidden; }
.flux-header {
  width: 100%; background: var(--navy); color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border: none; cursor: pointer; text-align: left;
  transition: background .15s;
}
.flux-header:hover { background: #223a5e; }
.flux-header-left { display: flex; align-items: center; gap: 10px; }
.flux-header-right { display: flex; align-items: center; gap: 6px; }
.flux-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rouge); color: #fff;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.flux-title { font-size: .875rem; font-weight: 600; }
.chevron-icon { transition: transform .2s; }
.flux-header:not(.collapsed) .chevron-icon { transform: rotate(180deg); }

.flux-tasks { padding: 4px 0; }
.task-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid #f8f9fb;
  transition: background .1s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: #fafbfc; }
.task-done  { background: rgba(45,125,79,.03); }
.task-bloque{ background: rgba(163,45,45,.04); }
.task-check { flex-shrink: 0; }
.btn-check-task {
  background: none; border: none; padding: 0;
  color: #9ca3af; font-size: 1.1rem; cursor: pointer;
  transition: color .15s;
}
.btn-check-task:hover { color: var(--green); }
.task-done-icon { color: var(--green); font-size: 1.1rem; }
.task-label  { flex: 1; font-size: .85rem; }
.task-badges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ── CLIENT HEADER ──────────────────────────────────────── */
.client-header {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border-radius: 8px; padding: 20px 24px;
  border: 1px solid #e0e3ea;
}
.client-avatar-lg {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}
.client-header-body { flex: 1; }
.client-header-name { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--navy); }

.client-name-link {
  display: flex; align-items: center; gap: 8px;
  color: var(--navy); text-decoration: none; font-weight: 600;
}
.client-name-link:hover { color: var(--rouge); }
.client-initiales {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--navy); color: #fff;
  font-size: .65rem; font-weight: 700; flex-shrink: 0;
}

/* ── INFO LIST (dl) ─────────────────────────────────────── */
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
             padding: 14px 18px; margin: 0; font-size: .83rem; }
.info-list dt { font-weight: 600; color: #6b7280; white-space: nowrap; }
.info-list dd { margin: 0; color: #374151; }

/* ── TEXT LINK ──────────────────────────────────────────── */
.text-link { color: var(--blue); text-decoration: none; }
.text-link:hover { color: var(--rouge); text-decoration: underline; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: #9ca3af;
}
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.empty-state.small { padding: 20px; }
.empty-state.small i { font-size: 1.5rem; }

/* ════════════════════════════════════════════════════════════
   PAGE LOGIN
════════════════════════════════════════════════════════════ */
.login-body { margin: 0; padding: 0;
              background: var(--navy); min-height: 100vh;
              display: flex; align-items: stretch; }

.login-wrapper {
  display: flex; width: 100%; min-height: 100vh;
}

.login-left {
  width: 420px; flex-shrink: 0;
  background: var(--rouge);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 60px 40px 32px;
}
.login-brand { text-align: center; }
/* (ancienne règle .login-logo remplacée par .logo-pill-login ci-dessus) */
.login-title { color: #fff; font-size: 1.8rem; font-weight: 800; margin: 0 0 10px; }
.login-tagline { color: rgba(255,255,255,.8); font-size: .95rem;
                 line-height: 1.6; margin: 0; }
.login-left-footer { color: rgba(255,255,255,.6); font-size: .78rem; }

.login-right {
  flex: 1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-form-box { width: 100%; max-width: 380px; }
.login-form-title { font-size: 1.5rem; font-weight: 700;
                    color: var(--navy); margin-bottom: 6px; }
.login-form-sub   { color: #6b7280; font-size: .875rem; margin-bottom: 28px; }


/* ════════════════════════════════════════════════════════════
   MENU LATÉRAL REPLIABLE
   ────────────────────────────────────────────────────────────
   Deux largeurs : 210px déplié (--sidebar-w), 62px replié. Tout le
   basculement tient dans une classe posée sur <body>, « sidebar-reduite ».
   C'est ce qui permet au script du haut de page de fixer l'état AVANT le
   premier affichage, sans que l'utilisateur voie le menu bouger.
════════════════════════════════════════════════════════════ */
:root { --sidebar-w-reduit: 62px; }

/* Les animations n'existent qu'après le premier dessin de la page : sans
   cette précaution, le menu glisserait à chaque changement de page. */
body.transitions-menu .sidebar,
body.transitions-menu .main-content {
  transition: width .18s ease, margin-left .18s ease;
}

/* Le logo compact ne sert qu'au menu replié. */
.baloo-svg-mini { display: none; }

/* ── Bouton replier / déplier ─────────────────────────────── */
.sidebar-toggle-row {
  display: flex; justify-content: flex-end;
  padding: 8px 12px 0;
}
.sidebar-toggle {
  width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: none; border-radius: 6px;
  color: rgba(255,255,255,.7); font-size: .8rem; cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.18); color: #fff; }
.sidebar-toggle:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }
.sidebar-toggle i { transition: transform .2s; }

/* ── Pastille numérique (nouveautés en attente, gérant) ───── */
.sidebar-pastille {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rouge); color: #fff;
  border-radius: 9px; font-size: .66rem; font-weight: 700;
}

/* ── Version, tout en bas du menu ─────────────────────────── */
.sidebar-version {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 16px;
  background: rgba(0,0,0,.25);
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.45); font-size: .7rem; text-decoration: none;
  transition: color .15s, background .15s;
}
.sidebar-version:hover { color: #fff; background: rgba(0,0,0,.35); }
.version-num { font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   ÉTAT REPLIÉ
════════════════════════════════════════════════════════════ */
body.sidebar-reduite .sidebar       { width: var(--sidebar-w-reduit); }
body.sidebar-reduite .main-content  { margin-left: var(--sidebar-w-reduit); }

/* Logo : la pastille garde les deux anneaux, le mot disparaît. */
body.sidebar-reduite .sidebar-brand { padding: 14px 6px 12px; text-align: center; }
body.sidebar-reduite .logo-pill-sidebar { padding: 6px 7px; }
body.sidebar-reduite .logo-pill-sidebar .baloo-svg { display: none; }
body.sidebar-reduite .baloo-svg-mini { display: block; width: 34px; height: auto; }

/* Le chevron pointe désormais vers l'ouverture. */
body.sidebar-reduite .sidebar-toggle-row { justify-content: center; padding: 8px 0 0; }
body.sidebar-reduite .sidebar-toggle i   { transform: rotate(180deg); }

/* Liens : icônes seules et centrées. Le libellé reste dans le HTML (il est
   lu par les lecteurs d'écran via aria-label) mais n'est plus dessiné. */
body.sidebar-reduite .sidebar-link {
  justify-content: center; gap: 0; padding: 11px 0; position: relative;
}
body.sidebar-reduite .sidebar-link > span:not(.sidebar-pastille) { display: none; }
body.sidebar-reduite .sidebar-link i { font-size: 1.05rem; min-width: 0; }
body.sidebar-reduite .sidebar-pastille {
  position: absolute; top: 4px; right: 9px; margin-left: 0;
  min-width: 15px; height: 15px; padding: 0 3px; font-size: .58rem;
}

/* Bloc utilisateur : avatar au-dessus, raccourcis sécurité en dessous. */
body.sidebar-reduite .sidebar-user {
  flex-direction: column; gap: 9px; padding: 11px 4px;
}
body.sidebar-reduite .user-info { display: none; }

body.sidebar-reduite .sidebar-version { justify-content: center; padding: 7px 2px; }
body.sidebar-reduite .version-libelle  { display: none; }
body.sidebar-reduite .version-num      { font-size: .62rem; }

/* ════════════════════════════════════════════════════════════
   JOURNAL DES NOUVEAUTÉS
════════════════════════════════════════════════════════════ */
.nouv-version {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 14px;
}
.nouv-version-num {
  font-size: 1.15rem; font-weight: 800; color: var(--navy);
  background: #fff; border: 1px solid #e0e3ea; border-radius: 8px;
  padding: 4px 12px;
}
.nouv-version-date { font-size: .78rem; color: #6b7280; }

.nouv-diffusion-titre {
  font-size: .95rem; font-weight: 700; color: var(--navy); margin: 0 0 2px;
}
.nouv-item { padding: 14px 18px; border-bottom: 1px solid #f0f2f5; }
.nouv-item:last-child { border-bottom: none; }
.nouv-item-entete {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.nouv-item-titre { font-size: .9rem; font-weight: 700; color: var(--navy); }
.nouv-points { margin: 0; padding-left: 20px; font-size: .84rem; line-height: 1.6; color: #374151; }
.nouv-points li { margin-bottom: 2px; }

/* ── Écran de diffusion (gérant) ──────────────────────────── */
.nouv-attente {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-bottom: 1px solid #f0f2f5;
}
.nouv-attente:last-child { border-bottom: none; }
.nouv-attente-corps { flex: 1; min-width: 0; }
.nouv-attente input[type="checkbox"] { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; }
.nouv-edition { margin-top: 10px; }
.nouv-slug { font-size: .68rem; color: #9ca3af; font-family: ui-monospace, Consolas, monospace; }

/* ════════════════════════════════════════════════════════════
   BARRES D'ONGLETS DE SECTION
   ────────────────────────────────────────────────────────────
   Employées par l'Administration et par l'espace Stats. Les règles
   vivaient auparavant dans un <style> à l'intérieur de la macro des
   onglets Administration ; deux sections partageant la même apparence,
   elles ont leur place ici, écrites une seule fois.
════════════════════════════════════════════════════════════ */
.onglets-section {
  display: flex; gap: .3rem; flex-wrap: wrap;
  border-bottom: 1px solid #e0e3ea;
  margin-bottom: 1.25rem; padding: 0 .1rem;
}
.onglet-section {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .95rem;
  font-size: .82rem; font-weight: 600;
  color: #6b7280; text-decoration: none;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 7px 7px 0 0; margin-bottom: -1px;
  transition: .12s;
}
.onglet-section:hover { color: #111827; background: #f7f8fa; }
.onglet-section.actif {
  color: var(--rouge); background: #fff;
  border-color: #e0e3ea; border-bottom: 1px solid #fff;
}
.onglet-section i { font-size: .9rem; }

/* ════════════════════════════════════════════════════════════
   BANDEAU DE SYNTHÈSE
   ────────────────────────────────────────────────────────────
   Le grand bandeau navy en tête des pages statistiques. Il servait
   d'abord à la page Bulletins ; la page Synthèse de l'espace Stats
   l'emploie aussi, ses règles vivent donc ici plutôt que dans le
   <style> d'un seul gabarit.
════════════════════════════════════════════════════════════ */
/* ── Bandeau de synthèse ─────────────────────────────────── */
.bs-hero {
  display:flex; flex-wrap:wrap; align-items:center; gap:2rem;
  background:linear-gradient(135deg, var(--navy,#1a2e4a) 0%, #24405f 60%, #2f5070 100%);
  color:#fff; border-radius:10px; padding:1.4rem 1.8rem; margin-bottom:1.5rem;
  box-shadow:0 4px 18px rgba(26,46,74,.20);
}
.bs-hero-valeur { font-size:3rem; font-weight:800; line-height:1; letter-spacing:-.02em; }
.bs-hero-label  { font-size:.85rem; opacity:.85; margin-top:.25rem; }
.bs-hero-periode {
  display:block; font-size:.72rem; opacity:.7; text-transform:uppercase;
  letter-spacing:.06em; margin-top:.15rem;
}
.bs-hero-chiffres { display:flex; gap:2.2rem; margin-left:auto; flex-wrap:wrap; }
.bs-chiffre { display:flex; flex-direction:column; }
.bs-chiffre-val { font-size:1.5rem; font-weight:700; line-height:1.1; }
.bs-chiffre-lib { font-size:.7rem; opacity:.75; text-transform:uppercase; letter-spacing:.05em; }
/* ── Tuiles du bandeau : l'EEP puis les trois produits ────── */
.bs-hero-paie { display:flex; gap:.6rem; flex-wrap:wrap; margin-left:2rem; }
.bs-paie {
  display:flex; flex-direction:column; align-items:flex-start;
  border-radius:8px; padding:.45rem .8rem; min-width:7rem;
  background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16);
  cursor:help;
}
.bs-paie-code { font-size:.66rem; font-weight:800; letter-spacing:.09em;
                opacity:.9; }
.bs-paie-val  { font-size:1.5rem; font-weight:800; line-height:1.05; }
.bs-paie-lib  { font-size:.66rem; opacity:.75; }
.bs-paie-eep     { border-left:3px solid #fff; background:rgba(255,255,255,.18); }
.bs-paie-eep     .bs-paie-code { color:#fff; }
.bs-paie-externalisation { border-left:3px solid #7ddba2; }
.bs-paie-externalisation .bs-paie-code { color:#7ddba2; }
.bs-paie-saisie_evp { border-left:3px solid #b6e8cb; }
.bs-paie-saisie_evp .bs-paie-code { color:#b6e8cb; }
.bs-paie-mad     { border-left:3px solid #8fc4f5; }
.bs-paie-mad     .bs-paie-code { color:#8fc4f5; }
.bs-paie-inconnu { border-left:3px solid #ffd27a; }
.bs-paie-inconnu .bs-paie-code { color:#ffd27a; }

.bs-chiffre-alerte { cursor:help; }
.bs-chiffre-alerte .bs-chiffre-val,
.bs-chiffre-alerte .bs-chiffre-lib { color:#ffd27a; opacity:1; }

