/* © 2026 Clément REBHOLZ — Referee Tracker. Tous droits réservés. Reproduction, copie ou réutilisation interdites sans autorisation écrite de l'auteur.  */
/* =====================================================
   REFEREE TRACKER — Design system
   Identité FFBB : bleu marine profond + rouge signal + or.
   Display condensé sportif (Barlow Condensed), corps Inter,
   data en JetBrains Mono pour l'ancrage "chiffres".
   ===================================================== */

:root {
  --navy-900: #0A1F44;
  --navy-800: #0E2A5C;
  --navy-700: #163B7A;
  --navy-600: #1E4E9C;
  --red: #E4002B;
  --red-soft: #FFE5EA;
  --gold: #F5B400;
  --gold-soft: #FFF3D1;

  --bg: #EEF1F7;
  --bg-top: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F6F8FC;
  --surface-a: rgba(255,255,255,0.94);
  --text: #0C1730;
  --muted: #5B6884;
  --line: #DCE3EF;

  --green: #0E7B47;
  --green-soft: #E4F5EC;
  --orange: #B5590A;
  --orange-soft: #FFF0DE;
  --danger: #B42318;

  --shadow: 0 20px 48px rgba(10, 31, 68, 0.12);
  --shadow-soft: 0 8px 22px rgba(10, 31, 68, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- Thème sombre (19/09/2026) ----------
   Activé via [data-theme="dark"] sur <html> (toggle JS + localStorage).
   Même hiérarchie de tokens que le clair : navy/rouge/or conservés pour
   l'identité FFBB, seuls fond/surfaces/texte basculent en ardoise foncée. */
:root[data-theme="dark"] {
  --navy-900: #0A1F44;
  --navy-800: #0E2A5C;
  --navy-700: #1E4E9C;
  --navy-600: #2E63BE;
  --red: #FF5470;
  --red-soft: rgba(255, 84, 112, 0.16);
  --gold: #F5B400;
  --gold-soft: rgba(245, 180, 0, 0.16);

  --bg: #0B1220;
  --bg-top: #101A2E;
  --surface: #141E33;
  --surface-2: #1B2740;
  --surface-a: rgba(20, 30, 51, 0.92);
  --text: #E8ECF6;
  --muted: #93A0BE;
  --line: #2A3653;

  --green: #3FCE86;
  --green-soft: rgba(63, 206, 134, 0.16);
  --orange: #F6A54A;
  --orange-soft: rgba(246, 165, 74, 0.16);
  --danger: #FF6B62;

  --shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.35);
}

/* Quelques textes foncés codés en dur pour contraster sur un fond clair
   (gold-soft/orange-soft/green-soft) : en sombre ces fonds deviennent
   translucides sur ardoise, donc on éclaircit le texte pour rester lisible. */
:root[data-theme="dark"] .stat-note,
:root[data-theme="dark"] .badge.gold,
:root[data-theme="dark"] .status-bar:not(.ok):not(.error),
:root[data-theme="dark"] .insight.warn { color: #FFD9A8; }
:root[data-theme="dark"] .insight.good { color: #8FF0C2; }
:root[data-theme="dark"] .status-bar.error { background: var(--red-soft); border-color: rgba(255, 107, 98, 0.4); }
@media (prefers-color-scheme: dark) {
  /* Respecté seulement si l'utilisateur n'a rien choisi explicitement (voir
     initTheme() dans app.js, qui pose data-theme="light" ou "dark" dès le
     chargement — ce bloc ne sert donc que pendant le tout premier flash,
     avant l'exécution du JS, sur un système déjà en sombre). */
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --navy-900: #0A1F44; --navy-800: #0E2A5C; --navy-700: #1E4E9C; --navy-600: #2E63BE;
    --red: #FF5470; --red-soft: rgba(255, 84, 112, 0.16); --gold: #F5B400; --gold-soft: rgba(245, 180, 0, 0.16);
    --bg: #0B1220; --bg-top: #101A2E; --surface: #141E33; --surface-2: #1B2740; --surface-a: rgba(20, 30, 51, 0.92);
    --text: #E8ECF6; --muted: #93A0BE; --line: #2A3653;
    --green: #3FCE86; --green-soft: rgba(63, 206, 134, 0.16); --orange: #F6A54A; --orange-soft: rgba(246, 165, 74, 0.16); --danger: #FF6B62;
    --shadow: 0 20px 48px rgba(0, 0, 0, 0.45); --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(228, 0, 43, 0.08), transparent 340px),
    radial-gradient(circle at 98% 4%, rgba(245, 180, 0, 0.10), transparent 300px),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 260px, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button, input, select, textarea { font-family: inherit; }

.page { width: min(1180px, 100%); margin: 0 auto; }

/* ---------- Header ---------- */
.app-header { padding: 18px 18px 0; }

.header-inner {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700) 70%, var(--navy-600));
  min-height: 132px;
  padding: 26px 26px 30px;
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* Court line motif */
.header-inner::after {
  content: "";
  position: absolute;
  right: -60px; top: 50%;
  transform: translateY(-50%);
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.14);
}
.header-inner::before {
  content: "";
  position: absolute;
  right: 48px; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.14);
}

.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; }

.brand-logo {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--navy-900);
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  border-radius: 15px;
  border-bottom: 5px solid var(--red);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  letter-spacing: 0.5px;
}

.brand-text h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 0.92;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.brand-text h1 span { color: var(--gold); margin-left: 6px; }
.brand-text p {
  margin: 7px 0 0;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 500;
}

.refresh-btn {
  position: relative; z-index: 2;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.4s ease, background 0.15s ease;
}
.refresh-btn:hover { background: rgba(255,255,255,0.2); }
.refresh-btn.spin span { display: inline-block; animation: spin 0.6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Content ---------- */
.content { padding: 0 18px 20px; margin-top: -20px; position: relative; z-index: 4; }

.toolbar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: end;
  background: var(--surface-a);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.field label {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Toolbar de recherche (Saison / Recherche / Filtres) — 20/09/2026 ----------
   Niveau, Paiement et Format sont repliés dans un menu déroulant "Filtre"
   pour ne pas surcharger la barre, sur téléphone comme sur PC. */
.toolbar-search {
  grid-template-columns: 200px 1fr auto;
}
@media (max-width: 767px) {
  .toolbar-search { grid-template-columns: 1fr; }
}

.filter-dropdown-wrap { position: relative; }

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.filter-dropdown-btn:hover { background: var(--surface-2); }
.filter-dropdown-btn[aria-expanded="true"] {
  border-color: var(--navy-600);
  background: var(--surface-2);
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}
@media (max-width: 767px) {
  .filter-dropdown-panel { left: 0; right: 0; min-width: 0; }
}

/* Le hidden HTML ne suffit pas ici : notre display:flex ci-dessus a la même
   priorité CSS que la règle [hidden] du navigateur et gagne (dernière
   déclarée) — sans cette ligne le panneau reste affiché en permanence,
   c'était la vraie cause du menu qui "ne se rétracte pas" (20/09/2026). */
.filter-dropdown-panel[hidden] {
  display: none;
}

.filter-reset-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-reset-btn:hover { background: var(--red-soft); color: var(--red); }

select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
select:focus, input:focus, textarea:focus {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(30, 78, 156, 0.12);
}

.status-bar {
  display: none;
  margin: 14px 0 0;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #6B4300;
  background: var(--gold-soft);
  border: 1px solid #F3D98A;
}
.status-bar.show { display: block; }
.status-bar.ok { color: var(--green); background: var(--green-soft); border-color: #B3E1C1; }
.status-bar.error { color: var(--danger); background: #FFEDEB; border-color: #FFB8B2; }

/* ---------- Tabs ---------- */
.tabs {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 16px 0 20px;
  padding: 7px;
  border-radius: 18px;
  background: var(--surface-a);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 13px;
  padding: 11px 6px;
  color: var(--muted);
  background: transparent;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
/* Badge de notification sur un onglet (nb d'alertes actives / paiements
   en retard) — masqué (attribut [hidden]) tant que le compteur est à 0,
   ajouté le 19/09/2026 en même temps que Contacts/Procédures. */
.tab-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--surface-a);
}
/* Icônes SVG (trait fin, currentColor) à la place des emojis natifs :
   les emojis rendent différemment selon l'OS et détonnent avec le
   reste de la charte (couleurs, épaisseurs) — un vrai facteur de
   "pas propre". currentColor fait suivre l'icône à l'état actif/inactif
   du texte automatiquement, sans classe supplémentaire. */
.tab-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tab-icon svg { display: block; }
.tab:hover { background: var(--surface-2); }
.tabs-foot { display: none; }
.tab:active { transform: scale(0.97); }
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
  box-shadow: 0 8px 16px rgba(10, 31, 68, 0.22);
}

.panel { display: none; }
.panel.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section-title {
  margin: 24px 4px 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title .count { color: var(--muted); font-size: 15px; font-weight: 600; font-family: var(--body); }

.empty {
  background: var(--surface);
  border: 1px dashed #C3D0E5;
  border-radius: var(--radius-xl);
  padding: 30px 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 13px; }

.match-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.match-card:hover { transform: translateY(-1px); border-color: #C2D0E8; box-shadow: var(--shadow); }

.card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 17px 18px;
  cursor: pointer;
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.badge {
  display: inline-flex; align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #EAF0FB;
  color: var(--navy-600);
}
.badge.red { color: var(--red); background: var(--red-soft); }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.orange { color: var(--orange); background: var(--orange-soft); }
.badge.gold { color: #8A6400; background: var(--gold-soft); }
.badge.gray { color: #445069; background: #EAEEF5; }

.card-title {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: 0.01em;
  font-weight: 700;
  text-transform: uppercase;
}
.card-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; }

.date-pill { min-width: 92px; text-align: right; }
.date-pill strong { display: block; font-family: var(--mono); font-size: 15px; color: var(--text); font-weight: 700; }
.date-pill span { display: block; margin-top: 3px; color: var(--muted); font-family: var(--mono); font-size: 12px; }

.card-body {
  display: none;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.match-card.open .card-body { display: block; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.detail-section { margin-top: 10px; }
.detail-section h4 {
  margin: 0 0 8px 2px;
  font-family: var(--display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
/* Les champs longs (adresse, noms de clubs) gardent toute la largeur :
   coupés en deux colonnes ils deviennent illisibles. */
.detail--wide { grid-column: 1 / -1; }
.detail {
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid #E7EDF6;
}
.detail label {
  display: block; margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.detail span { display: block; color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 1.2; word-break: break-word; }
.detail.money span { font-family: var(--mono); color: var(--green); }
.detail.cost span { font-family: var(--mono); color: var(--orange); }

/* Money summary strip inside a card */
/* MODIFICATION 19/09/2026 — bandeau classement / enjeu du match */
.enjeu-classement {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2, rgba(127,127,127,.08));
  font-size: 12.5px;
  line-height: 1.4;
}
.enjeu-ligne strong { margin-right: 4px; }

.money-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.money-cell {
  text-align: center;
  padding: 10px 6px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.money-cell label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em; }
.money-cell strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: 16px; font-weight: 700; }
.money-cell.net strong { color: var(--green); }
.money-cell.cost strong { color: var(--orange); }
.money-cell.gross strong { color: var(--text); }

/* Map inside card */
.card-map {
  margin-top: 12px;
  height: 220px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.leaflet-container { font-family: var(--body); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.action-link, .small-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px;
  border: 0; border-radius: 13px;
  padding: 10px 14px;
  background: var(--navy-900);
  color: #fff;
  text-decoration: none;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10,31,68,0.14);
  transition: transform 0.1s ease;
}
.action-link:active, .small-btn:active { transform: scale(0.97); }
.action-link.secondary, .small-btn.secondary { background: #EAF0FB; color: var(--navy-900); box-shadow: none; }
.action-link.gold { background: var(--gold); color: #3A2C00; }
/* MODIFICATION 11 — contact collègue déjà marqué. */
.action-link.contact-toggle { border: 0; cursor: pointer; font-family: inherit; }   /* b55 : plus de « font: inherit » (taille/graisse différentes des autres boutons) */
.action-link.contact-toggle.is-done { color: var(--green); background: var(--green-soft); }
.action-link.contact-toggle:disabled { opacity: 0.55; cursor: default; }

.payment-row {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 180px; gap: 12px; align-items: center;
}
.payment-row strong { color: var(--text); font-size: 14px; }
.payment-row .card-sub { margin-top: 2px; }
.payment-row select { padding: 10px 12px; }

/* MODIFICATION 15/09/2026 — Bloc B : dénomination des paiements (parts
   égales CF Jeunes) + retard échéancier CD67. */
.payment-row-alert { grid-template-columns: 1fr; margin-top: 10px; padding-top: 10px; }
.badge-parts-egales, .badge-retard {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 8px; font-size: 13px; font-weight: 600;
}
.badge-parts-egales { background: var(--orange-soft); color: var(--orange); }
.badge-retard { background: var(--red-soft); color: var(--red); margin-top: 8px; }
.payment-mode-select { margin-top: 8px; width: auto; max-width: 180px; padding: 10px 12px; font-size: 14px; }

/* Suivi des paiements final : statut calculé, ventilation par club et actions
   manuelles. Aucun de ces contrôles n'envoie une relance. */
.payment-panel {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.payment-panel.is-paid { border-left-color: var(--green); }
.payment-panel.is-warning { border-left-color: var(--red); }
.payment-panel.is-volunteer { border-left-color: var(--muted); }
.payment-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.payment-panel-head > div { display: flex; flex-direction: column; gap: 3px; }
.payment-panel-head > div > strong { font-size: 15px; color: var(--text); }
.payment-panel-head > div > span { font-size: 12px; color: var(--muted); }
.payment-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; background: var(--gold-soft); color: #785700; }
.payment-status.is-paid { background: var(--green-soft); color: var(--green); }
.payment-status.is-warning { background: var(--red-soft); color: var(--red); }
.payment-status.is-volunteer { background: var(--surface-2); color: var(--muted); }
.payment-warning, .payment-decision { margin-top: 10px; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
.payment-warning { color: var(--red); background: var(--red-soft); }
.payment-decision { color: var(--orange); background: var(--orange-soft); }
.payment-institution { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.payment-institution > div { padding: 10px; border-radius: 11px; background: var(--surface-2); }
.payment-institution span, .payment-fields label > span, .payment-note > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.payment-institution strong { font-family: var(--mono); font-size: 13px; color: var(--text); }
.payment-party { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.payment-party-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.payment-party-head strong { font-size: 13px; color: var(--text); }
.payment-party-head span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.payment-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.payment-fields input, .payment-fields select, .payment-note input { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.payment-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.payment-shortcuts .small-btn { min-height: 34px; padding: 7px 10px; }
.payment-progress { height: 7px; margin-top: 13px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.payment-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.payment-balance { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.payment-balance strong { color: var(--text); }
.payment-note { display: block; margin-top: 12px; }
.payment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.payment-regime-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.payment-regime-form select { flex: 1 1 220px; min-height: 42px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.frequency-marker { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); color: #fff; background: var(--red); border: 2px solid #fff; box-shadow: 0 4px 10px rgba(10,31,68,.28); font-family: var(--mono); font-size: 12px; font-weight: 800; }
.frequency-marker span { transform: rotate(45deg); }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 15px;
  box-shadow: var(--shadow-soft);
}
.kpi::after {
  content: ""; position: absolute; right: -26px; bottom: -30px;
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(228,0,43,0.05);
}
.kpi.hero { grid-column: span 2; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); border: 0; }
.kpi.hero label, .kpi.hero strong { color: #fff; }
.kpi.hero::after { background: rgba(245,180,0,0.16); }
.kpi label {
  position: relative; z-index: 1; display: block; min-height: 30px;
  color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.kpi strong {
  position: relative; z-index: 1; display: block; margin-top: 7px;
  color: var(--text); font-family: var(--mono); font-size: 23px; font-weight: 700;
  letter-spacing: -0.5px;
}
.kpi .sub { position: relative; z-index: 1; display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.kpi.hero .sub { color: rgba(255,255,255,0.7); }

.stat-note {
  margin: 12px 4px;
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--gold-soft);
  border: 1px solid #F3D98A;
  color: #6B4300;
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Tables ---------- */
.table-card {
  margin-top: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); overflow: hidden;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 520px; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th {
  background: var(--surface-2); color: var(--text);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 11px;
}
td { font-weight: 500; }
td.num, th.num { text-align: right; font-family: var(--mono); }
td.pos { color: var(--green); }
tr:last-child td { border-bottom: 0; }

.export-box {
  width: 100%; min-height: 320px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  padding: 16px; resize: vertical;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  box-shadow: var(--shadow-soft);
}

.app-footer {
  text-align: center; color: var(--muted);
  font-size: 12px; padding: 18px;
}
.app-footer span { font-family: var(--display); font-weight: 700; text-transform: uppercase; color: var(--text); }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi.hero { grid-column: span 2; }
}
@media (min-width: 980px) {
  .detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .app-header { padding: 10px 10px 0; }
  .header-inner { min-height: 116px; padding: 20px 16px 26px; border-radius: 0 0 20px 20px; }
  .brand-logo { width: 48px; height: 48px; font-size: 20px; }
  .content { padding: 0 10px 20px; margin-top: -18px; }
  .toolbar { grid-template-columns: 1fr; border-radius: 20px; }

  /* MODIFICATION 15/09/2026 puis 19/09/2026 : essais grille 3 puis 4
     colonnes, abandonnés (case vide, ou onglets cachés sans indice).
     MODIFICATION 19/09/2026 (v2) — retour au défilement horizontal
     demandé, cette fois avec un indice visuel explicite (dégradé sur le
     bord droit tant qu'il reste des onglets à découvrir + scroll-snap
     pour que chaque tap "accroche" un onglet entier) : on sait qu'il
     faut swiper. Agenda, Alertes et Export sont en plus masqués sur
     téléphone (onglets peu utilisés ici, gardés sur PC). */
  .tabs {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 6px;
    margin: 14px 0 16px;
    background: var(--surface-a);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    grid-template-columns: none;
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 9px 12px;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    border-radius: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .tab-icon svg { width: 19px; height: 19px; }
  .tab-label { display: block; }
  .tab.active { border-color: transparent; }
  .tab[data-tab="agenda"] { display: none; }

  .card-head { padding: 15px; gap: 10px; }
  .card-title { font-size: 17px; }
  .date-pill { min-width: 74px; }
  .date-pill strong { font-size: 13.5px; }

  .money-strip { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .money-cell { padding: 9px 7px; }
  .money-cell label { font-size: 9px; letter-spacing: 0; }
  .money-cell strong { font-size: 14px; }

  .payment-row { grid-template-columns: 1fr; }
  .payment-fields { grid-template-columns: 1fr; }
  .payment-institution { grid-template-columns: 1fr; }
  .payment-panel-head { align-items: center; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi.hero { grid-column: span 2; }

  .detail { padding: 6px 9px; }
  .detail label { font-size: 8.5px; }
  .detail span { font-size: 12px; }

  .section-title { font-size: 19px; }
  .card-map { height: 150px; }
}

/* =====================================================
   Spécificités iOS
   ===================================================== */

/* Safari iOS zoome automatiquement sur un champ dont le texte fait moins
   de 16 px, et ne dézoome jamais ensuite. Recherche, sélecteur de saison,
   statut de paiement, écran de connexion : tous étaient à 14,5-15 px. */
@media (max-width: 767px) {
  select, input, textarea,
  .rt-login-card input, .rt-field input,
  .payment-row select, .chart-filter select { font-size: 16px; }
}

/* viewport-fit=cover fait passer la page sous l'encoche et sous la barre
   d'accueil. On rend ces marges à l'interface. */
@supports (padding: env(safe-area-inset-bottom)) {
  /* MODIFICATION 15/09/2026 — en PWA plein écran (ajouté à l'écran
     d'accueil), rien ne réservait la place de l'encoche/Dynamic Island
     en haut : la barre du haut (profil/refresh/déconnexion) passait
     sous l'heure/le capteur. On lui applique la même logique qu'au bas
     et aux côtés, déjà gérés ici. */
  .app-header { padding-top: calc(18px + env(safe-area-inset-top)); }
  .app-footer { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .content {
    padding-left: calc(18px + env(safe-area-inset-left));
    padding-right: calc(18px + env(safe-area-inset-right));
  }
  @media (max-width: 767px) {
    .app-header { padding-top: calc(10px + env(safe-area-inset-top)); }
    .content {
      padding-left: calc(10px + env(safe-area-inset-left));
      padding-right: calc(10px + env(safe-area-inset-right));
    }
  }
}

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

/* =====================================================
   ONGLET ANALYSE — graphiques, diagrammes, KPI avancés
   ===================================================== */

.analysis-hero {
  margin-top: 4px;
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700) 70%, var(--navy-600));
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.analysis-hero::after {
  content: "";
  position: absolute; right: -50px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(245, 180, 0, 0.12);
}
.analysis-hero .eyebrow {
  position: relative; z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.72);
}
.analysis-hero .big {
  position: relative; z-index: 1;
  font-family: var(--mono);
  font-size: clamp(34px, 7vw, 50px);
  font-weight: 700; letter-spacing: -2px; margin-top: 4px; line-height: 1;
}
.analysis-hero .breakdown {
  position: relative; z-index: 1;
  margin-top: 10px; font-size: 13px; color: rgba(255,255,255,0.82);
  display: flex; flex-wrap: wrap; gap: 6px 16px;
}
.analysis-hero .breakdown b { font-family: var(--mono); color: #fff; }

/* Barre de marge : part conservée vs part carburant */
.margin-bar {
  position: relative; z-index: 1;
  margin-top: 14px; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.18); overflow: hidden; display: flex;
}
.margin-bar .kept { background: var(--gold); }
.margin-bar .burned { background: var(--red); }
.margin-legend {
  position: relative; z-index: 1;
  margin-top: 7px; font-size: 11.5px; color: rgba(255,255,255,0.75);
  display: flex; gap: 14px; flex-wrap: wrap;
}
.margin-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.chart-card {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 12px;
  box-shadow: var(--shadow-soft);
}
.chart-card h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 18px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--text);
}
.chart-card .hint {
  margin: 0 0 12px;
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.small { height: 210px; }

.chart-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* Ligne de lecture : un constat écrit sous un graphique */
.insight {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--navy-600);
  font-size: 13px; line-height: 1.5; color: var(--text);
}
.insight b { color: var(--text); }
.insight.warn { background: var(--orange-soft); border-left-color: var(--orange); color: #6B3A00; }
.insight.good { background: var(--green-soft); border-left-color: var(--green); color: #0B5733; }

/* Tableau de rentabilité par lieu */
.rank-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px; align-items: center;
  padding: 11px 15px;
  border-top: 1px solid #EEF1F7;
}
.rank-row:first-child { border-top: 0; }
.rank-name { min-width: 0; }
.rank-name .label {
  font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-name .meter {
  height: 4px; background: #EEF1F7; border-radius: 2px; margin-top: 5px; overflow: hidden;
}
.rank-name .meter i { display: block; height: 100%; background: var(--navy-600); border-radius: 2px; }
.rank-count { font-size: 12.5px; color: var(--muted); font-weight: 700; min-width: 28px; text-align: right; }
.rank-value {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--green); min-width: 72px; text-align: right;
}
.rank-value.neg { color: var(--danger); }

@media (min-width: 900px) {
  .chart-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Barre d'outils de l'onglet Analyse : sélecteur de saison */
.analysis-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--surface-a);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.chart-filter { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.chart-filter label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}
.chart-filter select {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14.5px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.toolbar-summary {
  font-family: var(--mono);
  font-size: 12.5px; color: var(--muted); font-weight: 500;
  padding-bottom: 10px;
}
@media (max-width: 767px) {
  .analysis-toolbar { flex-direction: column; align-items: stretch; }
  .chart-filter { min-width: 0; }
  .toolbar-summary { padding-bottom: 0; }
}

/* =====================================================
   REFEREE TRACKER — écran de connexion
   Utilise les variables réelles de ton thème (--navy-900, --gold, --red…).
   Aucune variable inventée : plus de texte invisible.
   ===================================================== */

.rt-login {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--navy-900, #0A1F44);
}

.rt-login.is-visible { display: flex; }

.rt-login-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  border-radius: var(--radius-xl, 24px);
  background: var(--navy-800, #0E2A5C);
  border: 1px solid rgba(245, 180, 0, .18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}

.rt-login-card h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--gold, #F5B400);
}

.rt-login-sub {
  margin: 6px 0 28px;
  font-size: 14px;
  color: rgba(255, 255, 255, .62);
}

.rt-login-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .72);
}

.rt-login-card input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--navy-900, #0A1F44);
  background: #FFFFFF;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: border-color .15s, box-shadow .15s;
}

.rt-login-card input:focus {
  outline: none;
  border-color: var(--gold, #F5B400);
  box-shadow: 0 0 0 3px rgba(245, 180, 0, .25);
}

.rt-login-card button {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  color: var(--navy-900, #0A1F44);
  background: var(--gold, #F5B400);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: filter .15s;
}

.rt-login-card button:hover:not(:disabled) { filter: brightness(1.08); }
.rt-login-card button:disabled { opacity: .55; cursor: default; }

.rt-login-msg {
  min-height: 20px;
  margin-top: 15px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .62);
}

.rt-login-msg.is-error { color: #FF8A80; }

.rt-login-note {
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .42);
}

/* Badge utilisateur dans l'en-tête */
.rt-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #5B6884);
  margin-right: 10px;
}

/* ---------------- Panneau profil ---------------- */

.rt-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 31, 68, .55);
  backdrop-filter: blur(3px);
}

.rt-modal.is-visible { display: flex; }

.rt-modal-card {
  width: 100%;
  max-width: 420px;
  padding: 26px 28px 24px;
  border-radius: var(--radius-xl, 24px);
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #DCE3EF);
  box-shadow: var(--shadow, 0 20px 48px rgba(10, 31, 68, .12));
}

.rt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.rt-modal-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--text, #0C1730);
}

.rt-modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--muted, #5B6884);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.rt-modal-close:hover { background: var(--surface-2, #F6F8FC); }

.rt-profile-list { margin: 0 0 22px; }

.rt-profile-row {
  padding: 11px 0;
  border-top: 1px solid var(--line, #DCE3EF);
}

.rt-profile-row:first-child { border-top: 0; padding-top: 0; }

.rt-profile-row dt {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted, #5B6884);
}

.rt-profile-row dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text, #0C1730);
  word-break: break-word;
}

.rt-btn-danger {
  width: 100%;
  padding: 12px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  color: var(--red, #E4002B);
  background: var(--red-soft, #FFE5EA);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: filter .15s;
}

.rt-btn-danger:hover { filter: brightness(.96); }

/* ---------------- Fiche profil : formulaires ---------------- */

.rt-modal-lg { max-width: 560px; max-height: 86vh; display: flex; flex-direction: column; }
.rt-profile-body { overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.rt-loading { color: var(--muted, #5B6884); font-size: 14px; }

.rt-sect { padding: 18px 0; border-top: 1px solid var(--line, #DCE3EF); }
.rt-sect:first-child { border-top: 0; padding-top: 0; }

.rt-sect h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text, #0C1730);
}

.rt-help {
  margin: 6px 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #5B6884);
}

.rt-field { margin-bottom: 14px; }
.rt-row { display: flex; gap: 12px; }
.rt-row .rt-field { flex: 1; min-width: 0; }

.rt-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted, #5B6884);
}

.rt-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text, #0C1730);
  background: var(--surface, #FFF);
  border: 1px solid var(--line, #DCE3EF);
  border-radius: 9px;
}

.rt-field input:focus {
  outline: none;
  border-color: var(--navy-600, #1E4E9C);
  box-shadow: 0 0 0 3px rgba(30, 78, 156, .14);
}

.rt-field input:disabled { background: var(--surface-2, #F6F8FC); color: var(--muted, #5B6884); }

.rt-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--navy-700, #163B7A);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.rt-btn:hover { background: var(--navy-600, #1E4E9C); }
.rt-btn:disabled { opacity: .55; cursor: default; }

.rt-veh-list { list-style: none; margin: 0 0 12px; padding: 0; }

.rt-veh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
  background: var(--surface-2, #F6F8FC);
  border: 1px solid var(--line, #DCE3EF);
  border-radius: 11px;
}

.rt-veh.is-current { border-color: var(--gold, #F5B400); background: var(--gold-soft, #FFF3D1); }
.rt-veh strong { font-size: 14.5px; color: var(--text, #0C1730); }

.rt-veh-meta {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted, #5B6884);
}

.rt-tag {
  display: inline-block;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy-900, #0A1F44);
  background: var(--gold, #F5B400);
  border-radius: 20px;
  vertical-align: 2px;
}

.rt-mini {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  padding: 0;
  font-size: 17px; line-height: 1;
  color: var(--muted, #5B6884);
  background: transparent;
  border: 0; border-radius: 7px;
  cursor: pointer;
}

.rt-mini:hover { color: var(--red, #E4002B); background: var(--red-soft, #FFE5EA); }

.rt-details { margin-bottom: 12px; }

.rt-details summary {
  padding: 9px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #0C1730);
  cursor: pointer;
}

.rt-details[open] summary { margin-bottom: 10px; }

/* Lien discret : il faut annuler explicitement le style « gros bouton »
   qui s'applique à tous les <button> de la carte de connexion. */
.rt-login-card button.rt-link,
.rt-modal-card button.rt-link {
  display: inline-block;
  width: auto;
  margin: 14px 0 0;
  padding: 2px 0;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  color: rgba(255, 255, 255, .55);
  background: transparent;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.rt-login-card button.rt-link:hover {
  color: var(--gold, #F5B400);
  filter: none;
  background: transparent;
}

.rt-modal-card button.rt-link { color: var(--text, #0C1730); }

.rt-toast {
  margin-top: 14px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  font-size: 13.5px;
  border-radius: 9px;
  color: var(--green, #0E7B47);
  background: var(--green-soft, #E4F5EC);
  transition: max-height .18s, padding .18s;
}

.rt-toast.is-visible { padding: 11px 13px; max-height: 90px; }
.rt-toast.is-error { color: var(--danger, #B42318); background: var(--red-soft, #FFE5EA); }

@media (max-width: 520px) {
  .rt-row { flex-direction: column; gap: 0; }
}

/* Boutons de l'en-tête regroupés : profil, rafraîchir, déconnexion */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* Sur iPhone, 3 boutons de 46 px + le bloc marque débordaient du bandeau
   (clippé par overflow:hidden du header) : les trois actions se
   retrouvaient tronquées ou écrasées les unes sur les autres. On réduit
   boutons + logo + typo, et on laisse le bloc marque se comprimer plutôt
   que pousser les actions hors cadre. */
@media (max-width: 767px) {
  .header-inner { gap: 8px; }
  .brand { min-width: 0; gap: 10px; }
  .brand-logo { flex: 0 0 auto; }
  .brand-text { min-width: 0; }
  .brand-text h1 {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: clamp(20px, 6.5vw, 28px);
  }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .refresh-btn { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
  .refresh-btn svg { width: 15px; height: 15px; }
}
@media (max-width: 380px) {
  .brand-logo { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
  .brand-text h1 { font-size: 18px; }
  .header-actions { gap: 4px; }
  .refresh-btn { width: 34px; height: 34px; }
}

/* =====================================================
   Regroupement par week-end
   Un arbitre raisonne par week-end, pas par match isolé :
   chaque groupe est visuellement détaché du suivant.
   ===================================================== */

.we-group { margin-bottom: 26px; }
.we-group:last-child { margin-bottom: 4px; }

.we-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 4px 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.we-label {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text, #0C1730);
}

.we-count {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-left: auto;
}

/* =====================================================
   Niveau de la rencontre — lecture immédiate
   Une pastille pleine + un bandeau latéral de la même
   couleur : le niveau se lit avant même le nom du club.
   Échelle : France (or) > Pré-national > Régional >
   Départemental, et 3x3 en rouge signal.
   ===================================================== */

.match-card--niveau {
  border-left-width: 6px;
  border-left-style: solid;
  border-left-color: var(--niveau, #C8D2E4);
}

.match-card--niveau .card-head {
  background: linear-gradient(90deg, var(--niveau-wash, transparent), transparent 58%);
}

.match-card.niv-france      { --niveau: #F5B400; --niveau-wash: rgba(245, 180, 0, 0.13); }
.match-card.niv-pn          { --niveau: #12386F; --niveau-wash: rgba(18, 56, 111, 0.10); }
.match-card.niv-region      { --niveau: #3B76CE; --niveau-wash: rgba(59, 118, 206, 0.10); }
.match-card.niv-departement { --niveau: #64748B; --niveau-wash: rgba(100, 116, 139, 0.09); }
.match-card.niv-3x3         { --niveau: var(--red); --niveau-wash: rgba(228, 0, 43, 0.09); }
.match-card.niv-autre       { --niveau: #C8D2E4; --niveau-wash: transparent; }

/* Même palette --niveau, hors contexte .match-card : réutilisée par les
   pastilles et mini-cartes de l'onglet Agenda (19/09/2026). */
.niv-france      { --niveau: #F5B400; }
.niv-pn          { --niveau: #12386F; }
.niv-region      { --niveau: #3B76CE; }
.niv-departement { --niveau: #64748B; }
.niv-3x3         { --niveau: var(--red); }
.niv-autre       { --niveau: #C8D2E4; }

/* MODIFICATION 10 — mode de règlement inhabituel.
   Quand c'est le club recevant qui paie, il faut penser à réclamer sur
   place : la carte passe au rouge et porte un panneau d'avertissement.
   La pastille de niveau garde sa couleur — on doit pouvoir lire les deux
   informations d'un seul coup d'œil. */
.match-card--reglement {
  border-left-color: var(--red) !important;
}

.match-card--reglement .card-head {
  background: linear-gradient(90deg, rgba(228, 0, 43, 0.11), rgba(228, 0, 43, 0) 60%);
}

.badge-reglement {
  color: #fff;
  background: var(--red);
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.28);
}
/* b52 — le payeur « club » est une information, pas une alerte : étiquette grise, bordure neutre */
.badge-regime { color: var(--muted); background: var(--bg); border: 1px solid var(--line); font-weight: 700; }
.match-card--reglement { border-left-color: var(--niveau, #C8D2E4) !important; }   /* b52 : la couleur de NIVEAU reste maîtresse */
.match-card--reglement .card-head { background: linear-gradient(90deg, var(--niveau-wash, transparent), transparent 58%); }

/* La pastille de niveau : volontairement plus grosse et plus
   contrastée que les autres badges, c'est elle qu'on cherche. */
.badge-niveau {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 14px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: var(--niveau, #64748B);
  box-shadow: 0 2px 6px rgba(10, 31, 68, 0.18);
}

/* L'or est trop clair pour du texte blanc : contraste inversé. */
.match-card.niv-france .badge-niveau { color: #3E2D00; }
.match-card.niv-autre .badge-niveau  { color: #445069; background: #EAEEF5; box-shadow: none; }

/* Logo de compétition dans la liste des matchs.
   L'image se supprime d'elle-même si le fichier n'existe pas :
   la carte reste alors exactement comme avant. */

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.comp-logo {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 7px;
  background: var(--surface-2, #F6F8FC);
  padding: 2px;
}

.title-row .card-title { min-width: 0; margin: 0; }

@media (max-width: 480px) {
  .comp-logo { width: 38px; height: 38px; }
  .badge-niveau { font-size: 15px; min-height: 25px; padding: 2px 12px; }
}

/* Sous 360 px (iPhone SE, petits Android), deux colonnes de détails
   deviennent trop étroites : on repasse à une seule. */
@media (max-width: 359px) {
  .detail-grid { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================
   Matchs passés repliés
   La page s'ouvre sur ce qui arrive ; l'historique reste
   à un clic, sans encombrer la vue.
   ===================================================== */

.past-block { margin-top: 26px; }
.past-block[open] { margin-bottom: 8px; }

/* Safari refuse de replier un <details> dont le <summary> porte un
   display autre que le sien : la mise en page flex vit donc dans un
   <span> à l'intérieur, jamais sur le <summary> lui-même. */
.past-summary {
  margin: 0 4px;
  padding: 11px 14px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-2, #F6F8FC);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  transition: background 0.14s ease, border-color 0.14s ease;
}

.past-summary::-webkit-details-marker { display: none; }
.past-summary::marker { content: ""; }

.past-summary-inner {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.past-summary:hover { background: #EDF2FA; border-color: #C2D0E8; }
.past-summary:focus-visible { outline: 2px solid var(--gold, #F5B400); outline-offset: 2px; }

.past-chevron {
  flex: 0 0 auto;
  align-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.past-block[open] .past-chevron { transform: rotate(45deg); }

.past-summary .count {
  margin-left: auto;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.past-body { padding-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .past-chevron { transition: none; }
}

/* Rencontre annulée : conservée mais visiblement hors jeu. */
.match-card.is-annule { opacity: .62; }
.match-card.is-annule .card-title { text-decoration: line-through; text-decoration-thickness: 1px; }
.match-card.is-annule:hover { opacity: 1; }


/* =====================================================
   MODIFICATION 19/09/2026 — menu latéral fixe, PC uniquement.
   Le rendu téléphone/tablette (<1024px) n'est pas touché : c'est
   toujours la barre d'onglets en haut, en grille sur mobile.
   ===================================================== */
@media (min-width: 768px) {
  .page { width: min(1180px, calc(100% - 228px)); margin: 0 0 0 228px; }

  .tabs {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 228px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: none;
    gap: 4px;
    margin: 0;
    padding: 108px 14px 18px;
    border-radius: 0;
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 4px 0 16px rgba(10, 31, 68, 0.05);
    backdrop-filter: none;
    overflow-y: auto;
  }
  .tab {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 12px 14px;
    text-align: left;
    font-size: 13.5px;
    border-radius: 12px;
  }
  .tab-icon svg { width: 18px; height: 18px; }
  .tab.active { box-shadow: none; }

  /* Comble le vide en bas de la colonne plutôt que de le laisser nu :
     petite signature discrète collée au bas grâce à margin-top:auto. */
  .tabs-foot {
    margin-top: auto;
    padding: 14px 12px 4px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
  }
  .tabs-foot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }

  /* Le header garde toute la largeur disponible dans la zone de contenu,
     qui commence maintenant après le menu latéral : plus besoin qu'il
     joue les hero banners, l'identité est déjà portée par la colonne. */
  .app-header { padding-left: 0; padding-right: 0; }
  .header-inner { min-height: 92px; padding: 16px 26px; }
  .header-inner::after { width: 150px; height: 150px; }
  .brand-logo { width: 46px; height: 46px; font-size: 19px; border-radius: 12px; }
  .brand-text h1 { font-size: clamp(22px, 2.4vw, 28px); }

  /* Sur grand écran, un champ recherche en 1fr peut dépasser 800px de
     large et vide — plus "trou noir" que champ de saisie. On plafonne. */
  .toolbar-search { grid-template-columns: 190px minmax(280px, 1fr) auto; }
}

/* ---------- QCM : questions, options, corrigé (19/09/2026) ----------
   Avant : radios natifs nus dans .match-card/.card-body (masqué par
   défaut => questions invisibles, et rendu non stylé quand visible).
   Maintenant : .table-card (toujours visible) + options en cartes
   cliquables, cohérentes avec le reste de la DA (mêmes tokens navy/gold). */
.qcm-topbar {
  position: sticky; top: 8px; z-index: 15;
  padding: 12px 16px;
}
.qcm-topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qcm-chrono { font-family: var(--display); font-size: 22px; color: var(--text); letter-spacing: 0.02em; }
.qcm-topbar-count { margin-left: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.qcm-progress { margin-top: 10px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.qcm-progress-bar { height: 100%; background: linear-gradient(90deg, var(--navy-600), var(--gold)); border-radius: 999px; transition: width 0.2s ease; }

/* Deux zones nettement séparées par carte : un bandeau "question"
   (fond teinté + pastille numéro) puis une zone "réponses" blanche.
   La bordure + le changement de fond entre les deux, c'est ce qui
   manquait pour distinguer question et réponses au premier coup d'œil. */
.qcm-card { overflow: hidden; }
.qcm-q-head {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 17px 18px;
  background: linear-gradient(180deg, #EEF3FC, #E4ECFA);
  border-bottom: 2px solid #D4DFF3;
}
.qcm-q-badge {
  flex: 0 0 auto; width: 32px; height: 32px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--navy-900); color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 700;
}
.qcm-q-head-text { min-width: 0; flex: 1; }
.qcm-q-text { margin: 0; font-size: 16px; font-weight: 700; color: var(--navy-900); line-height: 1.35; }
.qcm-q-total { display: inline-block; margin-top: 6px; color: var(--navy-600); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.qcm-opts-wrap { padding: 16px 18px 18px; background: var(--surface); }
.qcm-opts-label { margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.qcm-opts { display: grid; gap: 9px; }
.qcm-opt {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.qcm-opt:hover { border-color: #C2D0E8; background: var(--surface); }
.qcm-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.qcm-opt-mark {
  flex: 0 0 auto; width: 27px; height: 27px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted);
  transition: all 0.15s ease;
}
.qcm-opt-text { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.qcm-opt.is-selected { border-color: var(--navy-600); background: #EAF0FB; box-shadow: 0 0 0 3px rgba(30, 78, 156, 0.12); }
.qcm-opt.is-selected .qcm-opt-mark { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.qcm-opt:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(30, 78, 156, 0.12); }

/* Corrigé : bordure de couleur sur toute la carte = verdict lisible
   même en scrollant vite, sans avoir à relire le texte. */
.qcm-card--ok { border-left: 4px solid var(--green); }
.qcm-card--ko { border-left: 4px solid var(--red); }
.qcm-opts--result .qcm-opt,
.qcm-opts--result > div { cursor: default; }
.qcm-result-tag {
  display: inline-flex; align-items: center; margin-top: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0;
}
.qcm-result-tag.ok { color: var(--green); background: var(--surface-2); }
.qcm-result-tag.ko { color: var(--red); background: var(--surface-2); }
.qcm-opts--result > div {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.qcm-opts--result .qcm-opt--correct { border-color: var(--green); background: var(--green-soft); }
.qcm-opts--result .qcm-opt--correct .qcm-opt-mark { background: var(--green); border-color: var(--green); color: #fff; }
.qcm-opts--result .qcm-opt--wrong { border-color: var(--red); background: var(--red-soft); }
.qcm-opts--result .qcm-opt--wrong .qcm-opt-mark { background: var(--red); border-color: var(--red); color: #fff; }
.qcm-explanation {
  margin: 13px 0 0; padding: 11px 13px; border-radius: 10px;
  background: var(--surface-2); font-size: 13px; color: var(--muted); line-height: 1.45;
}

@media (max-width: 480px) {
  .qcm-q-head { padding: 14px 15px; }
  .qcm-opts-wrap { padding: 14px 15px 15px; }
  .qcm-q-text { font-size: 15px; }
  .qcm-chrono { font-size: 19px; }
}

/* Petit sélecteur de mode (Export : saison/mois vs plage de dates) */
.tabs-mini { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--surface-2); border-radius: 999px; border: 1px solid var(--line); }
.tabs-mini-btn {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tabs-mini-btn.active { background: var(--navy-900); color: #fff; }
.tabs-mini-btn:not(.active):hover { color: var(--text); }

.eval-dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 18px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.eval-dropzone.is-dragover { border-color: var(--navy-700); background: var(--surface); }
.eval-dropzone-icon { display: inline-flex; color: var(--text); margin-bottom: 6px; }
.eval-dropzone-text { margin: 0; font-weight: 600; color: var(--text); }
.eval-dropzone-link { color: var(--text); text-decoration: underline; cursor: pointer; }
.eval-dropzone-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* =====================================================
   Agenda (19/09/2026) — vue calendrier mensuelle, lecture seule.
   Grille 7 colonnes (Lundi -> Dimanche), pastilles colorées par niveau
   (mêmes couleurs --niveau que les cartes match), clic jour -> liste.
   ===================================================== */

.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.agenda-nav { display: flex; align-items: center; gap: 10px; }
.agenda-month-label {
  min-width: 160px;
  text-align: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
}
.agenda-nav .small-btn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-soft);
}
.agenda-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 4px 0 8px;
}
.agenda-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 52px;
  padding: 6px 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--body);
  cursor: default;
}
.agenda-day:disabled { opacity: 0.55; cursor: default; }
.agenda-day.is-outside { opacity: 0.4; }
.agenda-day.has-matches { cursor: pointer; background: var(--surface); border-color: var(--line); }
.agenda-day.has-matches:hover { border-color: var(--navy-600); }
.agenda-day.is-today .agenda-day-num {
  background: var(--navy-900); color: #fff; border-radius: 999px;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
}
.agenda-day.is-selected { border-color: var(--red); box-shadow: 0 0 0 2px rgba(228, 0, 43, 0.18); }
.agenda-day-num { font-size: 13px; font-weight: 600; }
.agenda-day-dots { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; max-width: 44px; }
.agenda-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--niveau, var(--navy-600)); }
.agenda-dot-more { font-size: 9px; font-weight: 700; color: var(--muted); line-height: 7px; }

#agendaDayMatches { margin-top: 16px; }
.agenda-day-title {
  margin: 0 0 10px 4px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.agenda-day-cards { display: grid; gap: 9px; }
.agenda-match-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--niveau, var(--navy-600));
  border-radius: var(--radius-md);
  padding: 11px 13px;
  box-shadow: var(--shadow-soft);
}
.agenda-match-title { margin-top: 6px; font-weight: 700; color: var(--text); font-size: 14.5px; }
.agenda-match-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 520px) {
  .agenda-month-label { min-width: 0; font-size: 15px; }
  .agenda-day { min-height: 44px; }
}

/* =====================================================
   BLOC 2 (25/09/2026) — Trésorerie prévisionnelle + Comparaison N-1
   Réutilise .kpi-grid / .kpi / .section-title / .stat-note existants.
   ===================================================== */

/* KPI en alerte (retard d'encaissement) */
.kpi.kpi-alert { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red-soft); }
.kpi.kpi-alert strong { color: var(--red); }

/* Courbe cumulée d'encaissement (SVG) */
.cf-chart {
  margin: 14px 0 6px;
  padding: 12px 14px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.cf-chart svg { width: 100%; height: 130px; display: block; }
.cf-area { fill: var(--green-soft); }
.cf-line { stroke: var(--green); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.cf-dot { fill: var(--surface); stroke: var(--green); stroke-width: 2; }
.cf-chart-axis {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px;
}

/* Table échéancier */
.cf-table td, .cf-table th { text-align: right; }
.cf-table td:first-child, .cf-table th:first-child,
.cf-table td:nth-child(2), .cf-table th:nth-child(2) { text-align: left; }
.cf-table .cf-cumul { font-family: var(--mono); color: var(--green); font-weight: 600; }

/* Deltas comparaison N-1 */
.sub.delta-up { color: var(--green); font-weight: 600; }
.sub.delta-down { color: var(--red); font-weight: 600; }


/* Bloc 3 (25/09/2026) — Section « À relancer » (>45 j) onglet Paiements */
.relance-box { border: 1px solid var(--red); background: var(--red-soft); border-radius: var(--radius-md); padding: 10px 14px 14px; margin: 4px 0 18px; }
.relance-title { margin-top: 6px; color: var(--red); }
.relance-sub { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }

/* Bloc 3 (25/09/2026) — Alertes regroupées par type d'action */
.section-title.alerte-groupe { margin-top: 18px; }
.alerte-groupe-sub { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }

/* Bloc 4 (25/09/2026) — Durcissement iPhone, identité inchangée.
   Filet de sécurité petit écran ; ne redéfinit PAS les grilles déjà gérées
   plus haut (tabs, kpi-grid desktop), pour ne rien casser. */
@media (max-width: 480px) {
  /* b55 — « clip » et non « hidden » : hidden faisait de <body> un conteneur de défilement →
     en-tête « sticky » qui partait avec la page et barre du bas « fixed » qui flottait au milieu
     de l'écran sur iPhone. clip coupe le débordement horizontal sans créer de conteneur. */
  html, body { max-width: 100%; overflow-x: clip; }
  img, svg, table, pre { max-width: 100%; }
  .cards { grid-template-columns: 1fr; }
  /* Cibles tactiles confortables (>= 44px) sur les contrôles interactifs. */
  .payment-select, .payment-mode-select, select, .small-btn, .action-link, .tab { min-height: 44px; }
  /* Un mot long (nom de club/salle) ne doit pas provoquer de scroll. */
  .agenda-match-title, .card-title, .section-title, .kpi label, .relance-sub, .alerte-groupe-sub { overflow-wrap: anywhere; }
  /* Fix rendu tables mobile (28/09/2026) : les nombres ne se cassent plus caractere par caractere ; textes wrap par mots ; la table scrolle si trop large */
  td { overflow-wrap: break-word; }
  td.num, th.num, td.pos { white-space: nowrap; }
  /* Ajouts Bloc 2/3 lisibles en 375px. */
  .cf-chart { padding: 8px 8px 4px; }
  .cf-chart svg { height: 110px; }
  .cf-chart-axis { font-size: 10px; }
  .relance-box { padding: 8px 10px 12px; }
}

/* Bloc 7 (28/09/2026) — Onglet IA Règlement (chat Q&A) */
.regl-chat { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; max-height: 58vh; overflow-y: auto; padding: 4px; }
.regl-msg { display: flex; }
.regl-msg.regl-user { justify-content: flex-end; }
.regl-bulle { max-width: 88%; padding: 12px 14px; border-radius: var(--radius-md); line-height: 1.5; font-size: 14px; }
.regl-user .regl-bulle { background: var(--navy-600); color: #fff; border-bottom-right-radius: 4px; }
.regl-ia .regl-bulle { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 4px; box-shadow: var(--shadow-soft); }
.regl-ia .regl-bulle strong { color: var(--navy-700); }
.regl-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.regl-form textarea { flex: 1; resize: vertical; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.regl-send { white-space: nowrap; min-height: 44px; }
.regl-status { color: var(--muted); font-size: 13px; margin-top: 6px; min-height: 18px; }
:root[data-theme="dark"] .regl-user .regl-bulle { background: var(--navy-700); }

/* --- Contrôle manuel du statut de paiement (28/09/2026) --- */
.payment-manuel { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.payment-manuel > summary {
  cursor: pointer; list-style: none;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted);
}
.payment-manuel > summary::-webkit-details-marker { display: none; }
.payment-manuel > summary::before { content: "▸ "; color: var(--muted); }
.payment-manuel[open] > summary::before { content: "▾ "; }
.payment-manuel .manual-lock {
  display: inline-flex; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--orange-soft); color: var(--orange);
  font-size: 10px; font-weight: 800; letter-spacing: 0; text-transform: none;
}
.payment-manuel-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.payment-manuel-body select {
  flex: 1 1 200px; min-height: 42px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
}

/* ==================== Onglet Accueil (coup d'œil rapide) ====================
   NB : ne jamais forcer #accueil en display:block — il doit obéir à
   .panel/.panel.active, sinon la navigation casse.
   Home minimale : hero + 3 chiffres + matchs du week-end. Rien d'autre. */
.acc-bloc { margin-top: 22px; }
.acc-bloc .section-title { margin-bottom: 12px; }

/* --- Hero prochain match --- */
.acc-hero {
  position: relative;
  display: flex; flex-direction: column;
  padding: 20px 22px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0A1F44 0%, #16397a 100%);
  box-shadow: 0 10px 30px rgba(10,31,68,.28);
  overflow: hidden;
}
.acc-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.acc-hero--vide { color: var(--muted); background: var(--surface-2); box-shadow: none; padding: 22px; text-align: center; }
.acc-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 1; }
.acc-hero-tag {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .06em;
  font-size: 11px; font-weight: 800; padding: 4px 11px; border-radius: 999px;
  background: var(--gold, #c9a24a); color: #17244a;
}
.acc-hero-date { font-size: 12.5px; opacity: .9; text-transform: capitalize; text-align: right; }
.acc-hero-match { font-family: var(--display); font-size: 24px; font-weight: 800; margin-top: 14px; line-height: 1.12; position: relative; z-index: 1; }
.acc-hero-sub { font-size: 13.5px; opacity: .92; margin-top: 4px; position: relative; z-index: 1; }
.acc-hero-lieu { font-size: 13px; opacity: .78; margin-top: 2px; position: relative; z-index: 1; }
.acc-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.acc-hero-indem {
  position: absolute; right: 22px; bottom: 18px; z-index: 1;
  font-family: var(--mono); font-weight: 800; font-size: 20px;
  padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.14);
}

/* --- 3 chiffres clés --- */
.acc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.acc-kpi {
  display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
  padding: 18px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  text-align: center; min-height: 84px;
}
.acc-kpi--net { background: var(--green-soft); border-color: transparent; }
.acc-kpi--btn { cursor: pointer; font: inherit; transition: border-color .15s; }
.acc-kpi--btn:hover { border-color: var(--gold, #c9a24a); }
.acc-kpi-val { font-family: var(--mono); font-weight: 800; font-size: 22px; color: var(--text); line-height: 1; }
.acc-kpi--net .acc-kpi-val { color: var(--green); }
.acc-kpi-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.acc-cost { color: var(--orange); }

/* --- Matchs du week-end (lignes compactes) --- */
.acc-liste { display: flex; flex-direction: column; gap: 8px; }
.acc-ligne {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit;
  transition: border-color .15s, transform .05s;
}
button.acc-ligne:hover { border-color: var(--gold, #c9a24a); }
button.acc-ligne:active { transform: scale(.995); }
.acc-jour { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: capitalize; min-width: 92px; }
.acc-match { flex: 1 1 auto; font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-lieu-mini { flex: 0 0 auto; font-size: 12px; color: var(--muted); max-width: 26%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-montant { flex: 0 0 auto; font-family: var(--mono); font-weight: 700; font-size: 14px; }

@media (max-width: 640px) {
  .acc-hero { padding: 16px 16px 44px; }
  .acc-hero-match { font-size: 20px; }
  .acc-hero-indem { right: 16px; bottom: 14px; font-size: 17px; }
  .acc-kpi { padding: 14px 8px; min-height: 74px; }
  .acc-kpi-val { font-size: 18px; }
  .acc-kpi-lbl { font-size: 9px; }
  .acc-lieu-mini { display: none; }
  .acc-jour { min-width: 78px; }
}

/* =====================================================
   UX signalés en test — lot du 01/10/2026
   1) barre d'onglets non-sticky sur téléphone
   2) loupe header qui déplie Saison/Recherche/Filtre (téléphone)
   3) tableaux STATS dépliables (<details>)
   4) bouton collègue "Tél NOM Prénom" (icône téléphone)
   ===================================================== */

/* (1) La barre d'onglets ne colle plus au scroll sur téléphone : elle
   défile avec la page (demande test). PC ≥1240px = sidebar fixe, inchangé. */
@media (max-width: 767px) {
  .tabs { position: static; top: auto; }
}

/* (2) Loupe : masquée sur PC (barre toujours visible), visible sur téléphone
   où la barre Saison/Recherche/Filtre est repliée par défaut. */
#searchToggleBtn { display: none; }
@media (max-width: 767px) {
  #searchToggleBtn { display: inline-flex; align-items: center; justify-content: center; }
  #searchToggleBtn.active { border-color: var(--navy-600); background: var(--surface-2); }
  .toolbar-search { display: none; }
  .toolbar-search.search-open { display: grid; }
}

/* (3) Sections STATS dépliables — <summary> reprend la DA de .section-title. */
.stat-fold { margin: 0 0 14px; }
.stat-fold > summary.stat-fold-sum {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  -webkit-tap-highlight-color: transparent;
}
.stat-fold > summary.stat-fold-sum::-webkit-details-marker { display: none; }
.stat-fold-chev { margin-left: auto; color: var(--muted); transition: transform 0.2s ease; flex: 0 0 auto; }
.stat-fold[open] > summary .stat-fold-chev { transform: rotate(180deg); }
.stat-fold-body { margin-top: 12px; }

/* (4) Bouton collègue : icône téléphone + nom collé proprement. */
.acc-tel-col { display: inline-flex; align-items: center; gap: 7px; }
@media (prefers-reduced-motion: reduce) {
  .stat-fold-chev { transition: none; }
}

/* =====================================================
   Accueil — bandeau de bienvenue + accès rapides (01/10/2026)
   ===================================================== */
.acc-welcome { margin: 2px 0 16px; }
.acc-welcome-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.acc-welcome-hi {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.acc-welcome-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: capitalize;
}
.acc-welcome-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

.acc-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 20px;
}
.acc-quick-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-a);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.acc-quick-btn:hover { background: var(--surface-2); border-color: var(--navy-600); }
.acc-quick-btn:active { transform: scale(0.97); }
.acc-quick-btn svg { color: var(--navy-600); }
.acc-quick-lbl { line-height: 1; }
.acc-quick-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
}
.acc-quick-badge.cost { background: #FFEDEB; color: var(--danger); }
.acc-quick-badge.warn { background: var(--gold-soft); color: #6B4300; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .acc-quick-badge.cost { background: rgba(255,80,70,0.16); }
}
:root[data-theme="dark"] .acc-quick-badge.cost { background: rgba(255,80,70,0.16); }

@media (max-width: 767px) {
  .acc-quick { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   Alertes — accent couleur + icône par groupe (01/10/2026)
   ===================================================== */
.alerte-bloc { border-left: 3px solid var(--line); padding-left: 14px; margin: 18px 0 4px; }
.alerte-bloc--corriger, .alerte-bloc--retard { border-left-color: var(--danger); }
.alerte-bloc--trancher { border-left-color: var(--gold); }
.alerte-bloc-head { display: flex; align-items: center; gap: 9px; }
.alerte-bloc-head .section-title.alerte-groupe { margin: 0; }
.alerte-bloc-ic { display: inline-flex; flex: 0 0 auto; }
.alerte-bloc--corriger .alerte-bloc-ic,
.alerte-bloc--retard .alerte-bloc-ic { color: var(--danger); }
.alerte-bloc--trancher .alerte-bloc-ic { color: var(--gold); }

/* =====================================================
   Menu "Plus" — barre d'onglets téléphone (01/10/2026)
   PC/tablette : bouton + panneau masqués (barre complète inchangée).
   ===================================================== */
.tab-more { display: none; }
.tab-more-panel { display: none; }
@media (max-width: 767px) {
  .tab-more { display: flex; }
  .tab-secondary:not(.active) { display: none; }
  .tab-more-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin: -8px 0 20px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-a);
    box-shadow: var(--shadow-soft);
  }
  .tab-more-panel[hidden] { display: none; }
  .tab-more-item {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
  }
  .tab-more-item:hover { background: var(--surface-2); }
  .tab-more-item:active { transform: scale(0.98); }
}

/* Tablette / fenêtre étroite (721–1239px) : barre d'onglets non-sticky
   (le sticky ne gêne plus au scroll ; signalé en test — 01/10/2026). */

/* ---- 03/10/2026 : carte, alertes ---- */
.card-map{position:relative}
.card-map-msg{position:absolute;left:8px;bottom:8px;z-index:500;padding:4px 10px;border-radius:8px;font-size:12px;background:var(--surface,#fff);color:var(--text,#222);border:1px solid var(--line,#ddd);box-shadow:0 1px 4px rgba(0,0,0,.15);pointer-events:none}
.alerte-item{display:flex;flex-direction:column;gap:6px}
.alerte-motif{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 12px;border-radius:var(--radius-md,10px);border:1px solid var(--line,#ddd);background:var(--surface,#fff)}
.alerte-motif-txt{font-size:13px;flex:1 1 200px}


/* ===== 03/10/2026 — Phase 4 : Accueil, menus déroulants Stats, dimensions ===== */
:root { --gap: 12px; --pad-card: 16px; --tap: 44px; }

/* Bandeau d'accueil */
.acc-welcome {
  margin: 2px 0 16px; padding: 18px var(--pad-card);
  border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
  box-shadow: var(--shadow-soft);
}
.acc-welcome-hi { color: #fff; }
.acc-welcome-date { color: rgba(255,255,255,0.75); }
.acc-welcome-sub { color: rgba(255,255,255,0.88); margin-top: 8px; }
.acc-welcome-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acc-chip {
  min-height: 34px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  font: 600 13px var(--body); color: #fff;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28);
}
.acc-chip:hover { background: rgba(255,255,255,0.24); }
.acc-chip.warn { background: var(--gold); color: #3A2600; border-color: var(--gold); }
.acc-chip.cost { background: var(--red); border-color: var(--red); }

/* Menus déroulants Stats (cartes) */
.stat-fold {
  margin: 0 0 var(--gap); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden;
}
.stat-fold > summary.stat-fold-sum {
  margin: 0; padding: 14px var(--pad-card); min-height: var(--tap);
  transition: background .15s ease;
}
.stat-fold > summary.stat-fold-sum:hover { background: var(--surface-2); }
.stat-fold[open] > summary.stat-fold-sum { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.stat-fold-chev {
  width: 30px; height: 30px; padding: 5px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); box-sizing: border-box;
}
.stat-fold-body { margin: 0; padding: var(--pad-card); }
.stat-fold .table-card { box-shadow: none; }

/* Dimensions : une seule échelle (espacements, zones tactiles) */
.cards { gap: var(--gap); }
.kpi-grid { gap: var(--gap); }
@media (max-width: 767px) {
  .tab, .small-btn, .action-link, .acc-quick-btn { min-height: var(--tap); }
  .acc-welcome { padding: 16px 14px; }
  .stat-fold-body { padding: 12px; }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
}


/* ===== 03/10/2026 — mobile : Paiements & Stats plus compacts ===== */
@media (max-width: 767px) {
  #paiements .kpi-grid, #stats .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #paiements .kpi, #stats .kpi { padding: 10px 12px; }
  #paiements .kpi strong, #stats .kpi strong { font-size: 18px; }
  #paiements .kpi label, #stats .kpi label { font-size: 11px; }
  #paiements .section-title, #stats .section-title { margin-top: 16px; }
  #stats .table-wrap table, #stats .table-card table { font-size: 12.5px; }
  #stats th, #stats td { padding: 7px 8px; white-space: nowrap; }
  #stats th:first-child, #stats td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  #paiements .past-summary, #paiements .stat-fold > summary { min-height: var(--tap); }
}

.form-formation { display: grid; grid-template-columns: 1fr 2fr 2fr 1fr; gap: var(--gap, 12px); }
@media (max-width: 767px) { .form-formation { grid-template-columns: 1fr 1fr; } .form-formation .field:nth-child(2), .form-formation .field:nth-child(3) { grid-column: 1 / -1; } }


/* ===== 03/10/2026 — PC : largeur fluide, filtres visibles, Stats compact ===== */
.page { width: min(1680px, 100%); }
.toolbar-search { position: relative; z-index: 50; }
@media (min-width: 768px) {
  .page { width: auto; max-width: 1760px; margin: 0 auto 0 228px; padding: 0 clamp(16px, 2vw, 40px); }
  .toolbar-search { grid-template-columns: 190px minmax(240px, 1fr) auto; }
}
/* Filtres toujours visibles sur PC (plus de menu caché) */
@media (min-width: 1100px) {
  .filter-dropdown-btn { display: none; }
  .filter-dropdown-wrap { display: flex; flex-direction: column; }
  #filterDropdownPanel, #filterDropdownPanel[hidden] {
    display: flex; flex-direction: row; align-items: flex-end; gap: 10px;
    position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none;
  }
  #filterDropdownPanel .field { min-width: 120px; }
  #filterDropdownPanel .filter-reset-btn { white-space: nowrap; }
  .toolbar-search { grid-template-columns: 170px minmax(200px, 1fr) auto; }
}
.stat-fold > summary.stat-fold-sum { padding: 9px 14px; min-height: 40px; font-size: 15px; }
.stat-fold-chev { width: 26px; height: 26px; padding: 4px; }
.stat-fold-body { padding: 12px 14px; }
@media (min-width: 1100px) {
  #statsFinancier { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
  #statsFinancier > :not(.stat-fold) { grid-column: 1 / -1; }
  #statsFinancier > .stat-fold { margin: 0; }
}
.regl-docs { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; }
.regl-docs .sub { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* b2 — Réglages carburant & entretien */
.rt-sub{margin:14px 0 6px;font-size:.95rem}
.rt-plist{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:6px}
.rt-plist li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid var(--line,rgba(128,128,128,.3));border-radius:10px}
.rt-x{background:none;border:0;font-size:1.3rem;line-height:1;cursor:pointer;color:inherit;opacity:.7;padding:2px 8px}
.rt-x:hover{opacity:1}
@media (max-width:640px){.rt-row{flex-wrap:wrap}}

/* b3 — Hôtel */
.badge-hotel{background:#1f4e8c;color:#fff}
.badge-hotel--veille{background:#5b7fb5}
.hotel-panel{margin:10px 0;border:1px solid var(--line,rgba(128,128,128,.3));border-radius:12px;padding:0 12px}
.hotel-panel>summary{cursor:pointer;padding:10px 0;font-weight:600}
.hotel-body{padding:0 0 12px}
.hotel-why{margin:0 0 10px;padding-left:18px}
.hotel-body .money-strip{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
#hotel .form-formation{display:flex;flex-wrap:wrap;gap:10px}
#hotel .form-formation .field{flex:1 1 150px;min-width:0}

/* ===== b4 (04/10/2026) — logos de secours, Accueil, header/filtres PC, listes ===== */
.comp-logo--txt { display: inline-grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--navy-600, #2b4c9b);
  font-weight: 800; font-size: 11px; letter-spacing: .02em; text-align: center; line-height: 1.05; padding: 2px; overflow: hidden; }
@media (max-width: 767px) { .comp-logo--txt { width: 38px; height: 38px; font-size: 10px; } }

.acc-welcome { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 2px 0 14px; }
.acc-welcome-hi { font-family: var(--display); font-size: 26px; font-weight: 800; }
.acc-welcome-date { color: var(--muted); text-transform: capitalize; font-size: 14px; }
.acc-grid { display: grid; gap: 14px; }
.acc-grid .acc-hero { margin: 0; }
.acc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.acc-kpi { min-height: 84px; justify-content: center; }
@media (min-width: 1100px) {
  .acc-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; }
  .acc-kpis { align-content: stretch; }
}
.acc-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 16px; align-items: start; }
.acc-day { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 6px 8px; box-shadow: var(--shadow-soft); }
.acc-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acc-day-head h3 { margin: 0; font-family: var(--display); font-size: 16px; text-transform: capitalize; }
.acc-day-head span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.acc-m { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: inherit; font: inherit; cursor: pointer; transition: background .15s; }
.acc-m:hover { background: var(--surface-2); }
.acc-m-h { font-family: var(--mono); font-weight: 800; font-size: 15px; }
.acc-m-body { display: flex; flex-direction: column; min-width: 0; }
.acc-m-body strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-m-body small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-m-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.acc-m-eur { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.acc-m-etat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.acc-m.is-next { background: rgba(228, 168, 0, .10); border-color: rgba(228, 168, 0, .45); }
.acc-m.is-next .acc-m-etat { color: var(--gold, #e0a800); }
.acc-m.is-fini { opacity: .55; }

/* Listes de matchs : 1 ligne = 1 match, comme sur téléphone */
@media (min-width: 1100px) {
  .cards { grid-template-columns: 1fr; max-width: 1100px; }
}
#alertes .empty { padding: 22px; }
#alertes .past-block { margin-top: 14px; }
.panel > .section-title:first-child { margin-top: 4px; }

/* PC : header allégé (logo dans le menu, boutons à droite de la barre de filtres) */
@media (min-width: 768px) {
  .page { position: relative; }
  .brand { position: fixed; top: 20px; left: 20px; z-index: 60; }
  .tabs { padding-top: 88px; }
  .app-header { position: absolute; top: 16px; right: clamp(16px, 2vw, 40px); left: auto; padding: 0; width: auto; z-index: 60; }
  .header-inner { min-height: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .header-inner::before, .header-inner::after { display: none; }
  .content { margin-top: 0; padding: 14px 0 28px; }
  .panel { max-width: 1480px; }

  .toolbar-search { display: flex; align-items: flex-end; gap: 12px; margin-right: 184px; padding: 10px 14px; border-radius: 14px; box-shadow: none; }
  .toolbar-search .field { flex: 0 0 auto; min-width: 0; }
  .toolbar-search .search-field { flex: 1 1 220px; max-width: 480px; }
  .toolbar-search .field label { margin: 0 0 5px 2px; font-size: 10.5px; }
  .toolbar-search select, .toolbar-search input { height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
  .toolbar-search select { min-width: 132px; }
  .filter-dropdown-wrap { display: contents; }
  .filter-dropdown-wrap > label { display: none; }
  .filter-dropdown-btn { display: none; }
  #filterDropdownPanel, #filterDropdownPanel[hidden] { display: contents; }
  .toolbar-search .filter-reset-btn { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; margin-left: auto; }
}

/* b4 — carte export */
.map-status { margin-top: 8px; font-size: 13px; color: var(--muted); }
.map-status.is-ready { color: var(--green); font-weight: 700; }

/* ===== b5 — QCM : une question à la fois, lisible clair/sombre ===== */
.qz-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.qz-mode { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 18px 20px; }
.qz-mode h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.qz-mode p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.qz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text); font-size: 14px; }
.qz-top-r { display: flex; gap: 8px; flex-wrap: wrap; }
.qz-chrono { margin-left: 12px; font-family: var(--display); font-size: 20px; color: var(--text); }
.qz-bar { height: 5px; border-radius: 999px; background: var(--surface-2); margin: 12px 0 18px; overflow: hidden; }
.qz-bar > div { height: 100%; background: var(--gold); border-radius: 999px; transition: width .2s ease; }
.qz-q { max-width: 860px; }
.qz-qtext { margin: 0 0 14px; font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--text); white-space: pre-line; }
.qz-hint { margin: -6px 0 12px; font-size: 12.5px; color: var(--muted); font-style: italic; }
.qz-opts { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.qz-opt { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; color: var(--text); border-top: 1px solid var(--line); }
.qz-opt:first-child { border-top: 0; }
.qz-opt:hover { background: var(--surface-2); }
.qz-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.qz-mark { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--text); }
.qz-txt { font-size: 15px; line-height: 1.4; color: var(--text); }
.qz-opt.is-selected { background: var(--surface-2); }
.qz-opt.is-selected .qz-mark { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.qz-opt.is-locked { cursor: default; }
.qz-opt.is-correct { background: var(--green-soft); }
.qz-opt.is-correct .qz-mark { background: var(--green); border-color: var(--green); color: #fff; }
.qz-opt.is-wrong { background: var(--red-soft); }
.qz-opt.is-wrong .qz-mark { background: var(--red); border-color: var(--red); color: #fff; }
.qz-fb { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-md); border-left: 4px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 14px; line-height: 1.5; }
.qz-fb.ok { border-left-color: var(--green); }
.qz-fb.ko { border-left-color: var(--red); }
.qz-fb-line { margin-top: 4px; }
.qz-fb-reg { margin-top: 6px; color: var(--muted); }
.qz-fb-reg span, .qz-cl span { display: inline-block; margin-right: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qz-actions { margin-top: 18px; display: flex; align-items: center; gap: 14px; }
.qz-count { color: var(--muted); font-size: 13px; }
.qz-pause { text-align: center; padding: 40px 0; }
.qz-corr { max-width: 900px; }
.qz-crow { padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--line); margin-bottom: 2px; }
.qz-crow.ok { border-left-color: var(--green); }
.qz-crow.ko { border-left-color: var(--red); }
.qz-chead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; }
.qz-cnum { font-weight: 800; color: var(--text); }
.qz-ctag { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.qz-crow.ok .qz-ctag { color: var(--green); }
.qz-crow.ko .qz-ctag { color: var(--red); }
.qz-ctheme { color: var(--muted); }
.qz-crow .qz-qtext { font-size: 15px; margin-bottom: 8px; }
.qz-cl { margin: 3px 0; font-size: 14px; color: var(--text); line-height: 1.45; }
@media (max-width: 767px) { .qz-modes { grid-template-columns: 1fr; } .qz-qtext { font-size: 16px; } }

/* b5 — Règlement : passages sources */
.regl-src { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.regl-src summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--navy-600); }
:root[data-theme="dark"] .regl-src summary { color: var(--gold); }
.regl-src-item { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--gold); background: var(--surface-2); border-radius: 6px; }
.regl-src-doc { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.regl-src-txt { font-size: 12.5px; line-height: 1.45; color: var(--text); white-space: pre-wrap; max-height: 220px; overflow: auto; }

/* b6 — Stats : thèmes */
.stats-themes { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.stats-theme-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.stats-theme-btn:hover { background: var(--surface-2); }
.stats-theme-btn.active { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }

/* ===== b7 — dimensions / aération ===== */
@media (min-width: 768px) {
  .brand { gap: 10px; width: 200px; }
  .brand-logo { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; flex: 0 0 auto; }
  .brand-text h1 { font-size: 15px; letter-spacing: .02em; white-space: nowrap; line-height: 1.1; }
  .brand-text h1 span { display: block; margin-left: 0; }
  .brand-text p { display: none; }
  .content { padding: 16px 0 32px; }
  .toolbar-search { margin-bottom: 20px; }
  .panel > .section-title:first-child, .panel > h2:first-child { margin-top: 0; margin-bottom: 14px; }
}
.panel .empty { padding: 20px 22px; margin: 0 0 16px; }
#alertes .empty { padding: 18px 22px; }
#alertes .past-block { margin-top: 20px; padding: 16px 18px; }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0 0 20px; } .kpi.hero { grid-column: 1 / -1; } }
.kpi-grid { margin-bottom: 18px; }
.section-title { margin: 22px 0 12px; }
@media (max-width: 767px) {
  .brand-text h1 { white-space: normal; overflow: visible; font-size: 17px; line-height: 1.1; letter-spacing: .02em; }
  .brand-text h1 span { display: block; margin-left: 0; }
}

/* ===== b8 — e-Licence / Indispos / Rapports ===== */
.tabs-mini { flex-wrap: wrap; }
.elic-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.elic-actions { max-width: 320px; }
.elic-actions .card-sub { margin-top: 10px; }
.elic-card { width: 340px; max-width: 100%; border-radius: 18px; padding: 16px; color: #fff; background: linear-gradient(135deg, #0b1f4a, #1d4ed8 70%, #2f6fe0); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.elic-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .95; }
.elic-badge { padding: 3px 9px; border-radius: 999px; font-size: 11px; letter-spacing: 0; text-transform: none; background: rgba(255,255,255,.18); }
.elic-badge.is-warn { background: #f5b400; color: #1a1a1a; }
.elic-badge.is-bad { background: #dc2626; }
.elic-badge.is-ok { background: rgba(34,197,94,.35); }
.elic-main { display: flex; gap: 14px; margin: 14px 0; }
.elic-photo { flex: 0 0 88px; height: 112px; border-radius: 10px; background: rgba(255,255,255,.14); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.elic-photo img { width: 100%; height: 100%; object-fit: cover; }
.elic-id { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
.elic-id strong { font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.elic-qr { background: #fff; border-radius: 12px; padding: 8px; width: 150px; height: 150px; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: #111; font-size: 11px; text-align: center; }
.elic-qr svg { width: 100%; height: 100%; }
.elic-overlay { position: fixed; inset: 0; z-index: 9999; background: #0b1220; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.elic-grand { width: min(92vw, 420px); }
.elic-grand .elic-qr { width: min(70vw, 260px); height: min(70vw, 260px); }
.elic-fermer { color: #9fb0cc; margin-top: 14px; font-size: 13px; }
.indis-st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text); }
.indis-st.is-ok { background: var(--green-soft); color: var(--green); }
.indis-st.is-warn { background: rgba(245,180,0,.18); color: var(--gold); }
.indis-st.is-bad { background: rgba(220,38,38,.18); color: #ef4444; }
.acc-alerte-indispo { display: block; width: 100%; text-align: left; margin: 0 0 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(245,180,0,.5); background: rgba(245,180,0,.12); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.rapp-dossier { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.rapp-inline { display: flex; gap: 8px; }
.rapp-inline input { height: 34px; padding: 0 10px; border-radius: 8px; }
.rapp-alerte { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.4); color: var(--text); font-weight: 600; }
.rapp-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rapp-elec { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
.rapp-sign { display: block; width: 100%; max-width: 360px; height: 120px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
@media (max-width: 767px) {
  .rapp-elec { grid-template-columns: 1fr; }
  #contacts form.toolbar { grid-template-columns: 1fr !important; }
  #contacts form.toolbar > .field { grid-column: auto !important; }
}
.status-bar { margin-bottom: 14px; }
.relance-box { padding: 18px 20px; }
.relance-box .cards { margin-top: 12px; }
.rapp-dossier a { color: var(--gold); font-weight: 700; }
.acc-alerte-indispo.is-conflit { border-color: rgba(220,38,38,.55); background: rgba(220,38,38,.12); }
/* b10 — Rapports : modèles vierges */
.rapp-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.rapp-modele { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.rapp-modele .rapp-act { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== b11 — Header global PC, groupes de menu, logo cliquable ===== */
.brand { cursor: pointer; }
.tab-group { display: none; }
@media (min-width: 768px) {
  .app-header { position: fixed; top: 0; left: 0; right: 0; width: auto; height: 64px; padding: 0 24px; z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; }
  .header-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 0; padding: 0; }
  .brand { position: static; width: auto; }
  .tabs { top: 64px; padding-top: 16px; }
  .page { padding-top: 64px; }
  .toolbar-search { margin-right: 0; }
  .tab-group { display: block; margin: 14px 14px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
}

.badge-examinateur { background: var(--gold); color: #1a1a1a; font-weight: 800; border: 0; }
.exam-title { color: var(--text); }

/* b11 — header clair, Règlement lecture fluide */
.brand-text h1 { color: var(--text); }
@media (max-width: 767px) { .brand-text h1 { color: #fff; } }
.regl-chat { max-height: 62vh; overflow: auto; padding: 4px 4px 12px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.regl-msg { display: flex; }
.regl-user { justify-content: flex-end; }
.regl-bulle { max-width: min(820px, 92%); line-height: 1.6; }
.regl-sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.regl-sources-t { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.regl-src-n { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; margin-right: 8px; border-radius: 50%; background: var(--navy-600); color: #fff; font-size: 11px; font-weight: 800; }
.regl-corpus { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.regl-form { margin-top: 18px; }

/* b11 — Modale d'édition, cartes contacts, procédures */
.rtm-ov { position: fixed; inset: 0; z-index: 200; background: rgba(8,16,36,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rtm { width: min(640px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); padding: 20px 22px; }
.rtm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rtm-head h3 { margin: 0; font-size: 18px; }
.rtm-x { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.rtm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.rtm-form .rtm-large, .rtm-act { grid-column: 1 / -1; }
.rtm-form input, .rtm-form select, .rtm-form textarea { width: 100%; }
.rtm-act { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rtm-del { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.rtm-delbtn { border: 0; background: transparent; color: var(--red); font: inherit; font-weight: 700; cursor: pointer; padding: 8px 12px; }
.rtm-delbtn:hover { text-decoration: underline; }
@media (max-width: 560px) { .rtm-form { grid-template-columns: 1fr; } }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ct-group { margin: 22px 0 10px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ct-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.ct-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ct-nom { display: block; font-size: 15px; }
.ct-role { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ct-org { font-size: 13px; }
.ct-liens { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.ct-note { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ct-gear { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.ct-gear:hover { color: var(--text); background: var(--surface-2); }
.pr-liste { display: grid; gap: 8px; }
.pr-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.pr-det { flex: 1 1 auto; min-width: 0; }
.pr-det summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14.5px; min-height: 32px; }
.pr-lien { font-size: 12.5px; font-weight: 600; }
.pr-corps { white-space: pre-wrap; margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.export-check{display:flex;align-items:center;gap:8px;font-size:.9rem;cursor:pointer}.export-check input{width:auto}

/* b11 — messages jaunes réduits : seul le chargement (.status-bar) reste jaune */
.stat-note { background: var(--surface-2); border: 1px solid var(--border, rgba(128,128,128,.25)); color: var(--text); }
.insight.warn { background: var(--surface-2); color: var(--text); border-left-color: var(--orange); }
:root[data-theme="dark"] .insight.warn { color: var(--text); }
.rtm .stat-note { background: transparent; border: 0; padding: 0; margin: 8px 0 0; }
.rtm .stat-note p { margin: 0 0 10px; line-height: 1.5; }
.info-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin-left: 6px; border-radius: 50%; border: 1px solid var(--border, rgba(128,128,128,.4)); background: transparent; color: var(--text-soft, var(--text)); cursor: pointer; vertical-align: middle; }
.info-btn:hover { background: var(--surface-2); }
@media (max-width: 640px) { .toolbar { grid-template-columns: 1fr !important; } .toolbar .field { min-width: 0; } .toolbar select, .toolbar input { max-width: 100%; } }

/* ===== b11 — Refonte DA (moodboard) : navy #0B1F3B / #133863, jaune #FFC400, rouge #FF2D55, clarté #F6F8FB, Montserrat ===== */
:root {
  --navy-900: #0B1F3B; --navy-800: #133863; --navy-700: #1B4A80; --navy-600: #245A9C;
  --red: #FF2D55; --red-soft: #FFE6EB;
  --gold: #FFC400; --gold-soft: #FFF4CC;
  --bg: #F6F8FB; --surface-2: #F1F4F9;
  --text: #0B1F3B; --muted: #5E6C84; --line: #E1E7F0;
  --display: "Montserrat", system-ui, sans-serif;
  --body: "Montserrat", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --navy-900: #0B1F3B; --navy-800: #133863; --navy-700: #245A9C; --navy-600: #3770B8;
  --red: #FF4D6E; --gold: #FFC400;
  --bg: #08162B; --bg-top: #0B1F3B;
}
body { font-weight: 500; }
img.brand-logo {
  width: auto !important; height: 40px !important; display: block;
  background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.28));
}
.brand { gap: 12px; }
.brand-text h1 { font-weight: 800; font-style: italic; letter-spacing: 0; line-height: .95; font-size: clamp(17px, 3.2vw, 21px); }
.brand-text h1 span { display: block; margin-left: 0; }
.section-title, .page h2 { font-weight: 800; letter-spacing: .2px; }
.kpi strong, .date-pill strong { font-family: var(--mono); }
.small-btn:not(.secondary) { background: var(--gold); color: var(--navy-900); font-weight: 700; border-color: var(--gold); }
.tab.active { background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); }
.acc-hero-sub, .acc-hero .sub { color: rgba(255,255,255,.85) !important; opacity: 1; }

/* b12 — bandeau filtre réduit (desktop) : une fine ligne, libellés en ligne */
@media (min-width: 768px) {
  .toolbar-search { padding: 4px 10px !important; margin: 0 0 8px !important; gap: 10px !important; align-items: center !important; border-radius: 10px !important; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; margin-right: 0 !important; }
  .toolbar-search .field { display: flex; align-items: center; gap: 6px; }
  .toolbar-search .field label { margin: 0 !important; font-size: 10px !important; white-space: nowrap; }
  .toolbar-search select, .toolbar-search input { height: 30px !important; font-size: 12.5px !important; padding: 0 8px !important; border-radius: 8px !important; }
  .toolbar-search select { min-width: 0 !important; }
  .toolbar-search .search-field { max-width: 300px !important; }
  .toolbar-search .filter-reset-btn { height: 30px !important; padding: 0 10px !important; font-size: 12px !important; margin-left: auto; }
  #statusBar { margin-top: 6px; padding: 6px 12px; font-size: 12.5px; }
}
@media (max-width: 767px) {
  .toolbar-search { padding: 8px 10px; }
}
@media (min-width:1024px){ .toolbar-search .filter-dropdown-wrap{display:contents !important} }

/* b12 — hiérarchie des titres : 1 grand titre par page */
.panel h2.sub-title { font-size: 17px; margin-top: 22px; margin-bottom: 8px; }
.panel h2.page-title { font-size: clamp(22px, 2.4vw, 28px); margin-top: 4px; }
.pr-cta { display: inline-block; margin: 10px 8px 4px 0; padding: 8px 14px; border-radius: 10px; background: var(--gold); color: var(--navy-900) !important; font-weight: 700; font-size: 13px; text-decoration: none; }
.pr-cta:hover { filter: brightness(1.05); }

/* b12 — Accueil style tableau de bord + cartes en grille */
.acc-season { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 10px 0 14px; }
.acc-s { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 2px; }
.acc-s-val { font-family: var(--mono); font-weight: 700; font-size: clamp(18px, 2.2vw, 26px); color: var(--text); }
.acc-s-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acc-s--ok .acc-s-val { color: var(--green); }
.acc-s--att .acc-s-val { color: var(--orange); }
.acc-cols { display: grid; grid-template-columns: 1fr; gap: 6px 22px; }
@media (min-width: 1100px) { .acc-cols { grid-template-columns: 1.3fr 1fr; align-items: start; } }
@media (max-width: 640px) { .acc-season { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .panel .cards { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); } }
.acc-m-h--date { min-width: 92px; flex: 0 0 92px; font-size: 12.5px; }
.acc-welcome-date { color: rgba(255,255,255,.82) !important; }
.acc-m .acc-m-h.acc-m-h--date { min-width: 104px !important; width: 104px !important; flex: 0 0 104px !important; margin-right: 10px; }
.acc-m.acc-m--date { grid-template-columns: 96px minmax(0, 1fr) auto; }

/* ---- Rapprochement bancaire (b13) ---- */
.rb-aide { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.rb-bar, .rb-cols { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0; }
.rb-fn { font-size: .88rem; color: var(--muted); }
.rb-f { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); }
.rb-f select, .rb-f input { min-width: 130px; }
.rb-sum { margin: 10px 0; font-size: .92rem; }
.rb-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-md); padding: 10px 12px; margin: 8px 0; }
.rb-card.rb-haute { border-left: 4px solid var(--green); }
.rb-card.rb-moyenne, .rb-card.rb-ambigu { border-left: 4px solid var(--gold); }
.rb-card.rb-aucune { border-left: 4px solid var(--red); }
.rb-card.rb-ok { border-left: 4px solid var(--green); opacity: .7; }
.rb-head { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 10px; align-items: center; }
.rb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rb-d { color: var(--muted); font-size: .85rem; }
.rb-b { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.rb-b-haute, .rb-b-ok { background: var(--green-soft); color: var(--green); }
.rb-b-moyenne, .rb-b-ambigu { background: var(--gold-soft); color: #7A5600; }
.rb-b-aucune { background: var(--red-soft); color: var(--red); }
.rb-ms { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.rb-m label { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.rb-m-t { display: flex; flex-direction: column; min-width: 0; }
.rb-m-t small { color: var(--muted); }
.rb-m-v { font-weight: 700; }
.rb-alt { margin-top: 8px; }
.rb-note { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.rb-sans summary { cursor: pointer; margin: 12px 0 4px; font-weight: 600; }
.rb-foot { position: sticky; bottom: 8px; margin-top: 12px; }
.rb-go { width: 100%; }
@media (max-width: 640px) { .rb-head { grid-template-columns: 1fr auto; } .rb-d { grid-column: 1; } .rb-l { grid-column: 1 / -1; grid-row: 2; } }
.rb-file, .rb-go { display: inline-block; padding: 10px 16px; border-radius: 10px; border: 0; background: var(--navy-700); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; text-align: center; }
.rb-go { background: var(--green); }
.rb-go:disabled { opacity: .45; cursor: not-allowed; }
.rb-f select, .rb-f input, .rb-alt { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
:root[data-theme="dark"] .rb-b-moyenne, :root[data-theme="dark"] .rb-b-ambigu { color: #FFD9A8; }
:root[data-theme="dark"] .rb-b-haute, :root[data-theme="dark"] .rb-b-ok { color: #8FF0C2; }
:root[data-theme="dark"] .rb-b-aucune { color: #FF9C95; }
.rb-part { display: block; width: 100%; margin-top: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--gold); background: var(--gold-soft); color: var(--navy-900); font: inherit; font-weight: 600; font-size: .85rem; text-align: left; cursor: pointer; }
.rb-part:disabled { opacity: .5; cursor: default; }
:root[data-theme="dark"] .rb-part { color: #FFD9A8; background: rgba(245,180,0,.12); }
.mp-table td.num, .mp-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.mp-ret { color: var(--red); font-weight: 700; }
.mp-kpis { margin-bottom: 10px; }
.mp-table { margin-bottom: 12px; } .table-card.mp-wrap { margin-bottom: 14px; }
.rb-warn { margin-top: 6px; font-size: .82rem; color: #7A5600; background: var(--gold-soft); border-radius: 8px; padding: 6px 10px; }
:root[data-theme="dark"] .rb-warn { color: #FFD9A8; background: rgba(245,180,0,.12); }
.rb-hist { margin-top: 14px; }
.rb-hist summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.rb-undo { border: 1px solid var(--red); background: transparent; color: var(--red); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .78rem; cursor: pointer; }
.rb-m label:has(.rb-undo) { grid-template-columns: 1fr auto auto; }
.mp-det { margin: 8px 0; }
.mp-det summary { cursor: pointer; font-weight: 600; }
.mp-line{margin:4px 0 10px;font-size:.85rem;opacity:.8}

/* =====================================================================
   b18 (07/10/2026) — POLISH PC + TÉLÉPHONE
   3 tailles, 3 navigations :
   - téléphone (≤ 720 px) : en-tête compact + barre d'onglets EN BAS (5 entrées)
   - tablette / fenêtre étroite (721–1023 px) : une seule ligne d'onglets
   - PC (≥ 1024 px) : menu latéral (avant : 1240 px, d'où la grille de
     3 lignes d'onglets sur un écran de 1100 px)
   ===================================================================== */
:root { --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); }

/* ---------- Téléphone ---------- */
@media (max-width: 767px) {
  body { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 18px); }

  /* En-tête : une bande compacte et collante au lieu d'un bandeau de 116 px */
  .app-header { position: sticky; top: 0; z-index: 70; padding: 0 !important; padding-top: env(safe-area-inset-top, 0px) !important; background: var(--navy-900); }
  .header-inner { min-height: 0 !important; padding: 10px 12px !important; border-radius: 0 !important; box-shadow: 0 6px 18px rgba(10,31,68,.18); }
  .header-inner::before, .header-inner::after { display: none; }
  .brand { gap: 9px; }
  .brand-logo { width: 34px !important; height: 34px !important; border-radius: 10px; }
  .brand-text h1 { font-size: 15px !important; line-height: 1.05 !important; }
  .header-actions { gap: 6px; display: flex; }
  .refresh-btn { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; }
  .content { margin-top: 0 !important; padding-top: 12px !important; }

  /* Message d'état : petit toast au-dessus de la barre du bas, plus de bloc vert dans la page */
  #statusBar.status-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 95; margin: 0 !important; padding: 10px 14px; font-size: 13px; border-radius: 12px; box-shadow: 0 10px 28px rgba(10,31,68,.22); }

  /* Barre d'onglets du bas */
  nav.tabs {
    position: fixed !important; left: 0; right: 0; bottom: 0; top: auto !important; z-index: 85;
    display: grid !important; grid-template-columns: repeat(5, 1fr); gap: 2px;
    margin: 0 !important; padding: 6px 6px calc(6px + var(--safe-b)) !important;
    border-radius: 18px 18px 0 0 !important; border: 1px solid var(--line); border-bottom: 0;
    background: var(--surface-a) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -8px 24px rgba(10,31,68,.10) !important; overflow: visible !important;
    mask-image: none !important; -webkit-mask-image: none !important;
  }
  nav.tabs .tab-secondary, nav.tabs .tab-group, nav.tabs .tabs-foot { display: none !important; }
  nav.tabs .tab {
    flex-direction: column; gap: 3px; padding: 6px 2px 4px !important; min-height: 52px;
    font-size: 10.5px !important; letter-spacing: .01em; color: var(--muted);
    background: transparent !important; box-shadow: none !important; border-radius: 12px;
  }
  nav.tabs .tab .tab-icon { width: 44px; height: 28px; border-radius: 14px; transition: background .15s ease; }
  nav.tabs .tab.active, nav.tabs #tabMoreBtn.is-current { color: var(--text); }
  nav.tabs .tab.active .tab-icon, nav.tabs #tabMoreBtn.is-current .tab-icon { background: var(--navy-800); color: #fff; }
  nav.tabs .tab-badge { top: 2px; right: calc(50% - 26px); }

  /* Panneau « Plus » : feuille qui monte au-dessus de la barre */
  .tab-more-panel {
    position: fixed; left: 10px; right: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 84;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 !important;
    padding: 12px; max-height: 62vh; overflow: auto; border-radius: 18px;
    background: var(--surface); box-shadow: 0 18px 48px rgba(10,31,68,.28);
  }
  .tab-more-panel[hidden] { display: none !important; }
  .tab-more-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 74px; padding: 10px 6px; text-align: center; font-size: 12px; border-radius: 14px; }
  .tab-more-item .tab-icon { color: var(--navy-700); }
  .tab-more-item.active { border-color: var(--navy-700); background: var(--surface-2); }
  .tab-more-item .tab-more-badge { top: 6px; right: 8px; }
  :root[data-theme="dark"] .tab-more-item .tab-icon { color: var(--gold); }

  /* Densité : moins d'air perdu, titres plus nets */
  .panel h2.page-title { font-size: 22px; margin: 2px 0 12px; }
  .kpi-grid { gap: 8px; }
  .kpi { padding: 12px 14px; }
}
@media (max-width: 767px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tab-more-item .tab-icon { color: var(--gold); }
}

/* ---------- Tablette / fenêtre étroite ---------- */

/* ---------- PC ---------- */
@media (min-width: 768px) {
  .tabs { width: 220px; }
  .page { margin-left: 220px !important; width: auto !important; max-width: 1500px; padding: 64px clamp(16px, 2.2vw, 40px) 0; }
  .tab { padding: 10px 14px; font-size: 13px; }
  .tab:hover:not(.active) { background: var(--surface-2); color: var(--text); }
  .panel { max-width: 1320px; }
}

/* ---------- Alertes : actions ---------- */
.alerte-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.small-btn.alerte-danger { border-color: rgba(228,0,43,.45); color: var(--red); background: transparent; }
.small-btn.alerte-danger:hover { background: var(--red-soft); }

/* ---------- Paiements : analyse ---------- */
.pa-wrap { margin: 6px 0 18px; }
.pa-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.pa-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-soft); }
.pa-kpi label { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pa-kpi strong { font-family: var(--mono); font-size: 20px; color: var(--text); }
.pa-kpi span { font-size: 12px; color: var(--muted); }
.pa-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 12px; margin: 0 0 12px; box-shadow: var(--shadow-soft); color: var(--text); }
.pa-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pa-card-head h3 { margin: 0; font-size: 15px; }
.pa-legende { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--muted); }
.pa-leg { display: inline-flex; align-items: center; gap: 5px; }
.pa-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pa-c-ligue { background: var(--navy-700); }
.pa-c-cd { background: var(--gold); }
.pa-c-ffbb { background: var(--red); }
.pa-c-club { background: var(--green); }
.pa-att { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(128,140,170,.35) 4px 7px); border: 1.5px dashed var(--muted); }
.pa-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 200px; align-items: end; padding-top: 18px; }
.pa-col { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.pa-val { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; height: 14px; }
.pa-val em { font-style: normal; opacity: .75; }
.pa-pile { flex: 1; width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-bottom: 1px solid var(--line); }
.pa-seg { display: block; width: 100%; min-height: 2px; }
.pa-pile .pa-seg:first-child { border-radius: 0 0 2px 2px; }
.pa-pile .pa-seg:last-child { border-radius: 5px 5px 0 0; }
.pa-mois { margin-top: 5px; font-size: 11px; color: var(--muted); text-transform: capitalize; }
.pa-col.is-now .pa-mois { color: var(--text); font-weight: 800; }
.pa-col.is-now .pa-pile { border-bottom: 2px solid var(--gold); }
.pa-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.pa-axes { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.pa-axe { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.pa-axe.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(10,31,68,.12); }
.pa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pa-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pa-table td { padding: 8px 8px 2px; vertical-align: middle; }
.pa-table .num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }
.pa-table td.pa-ok { color: var(--green); }
.pa-table td.pa-reste { color: var(--orange); font-weight: 700; }
.pa-taux { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.pa-taux b { font-family: var(--mono); font-size: 12px; min-width: 40px; text-align: right; }
.pa-jauge { flex: 1; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pa-jauge span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.pa-part td { padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.pa-part span { display: block; height: 3px; border-radius: 99px; background: var(--navy-600); opacity: .35; }
@media (max-width: 900px) { .pa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .pa-chart { height: 170px; gap: 3px; }
  .pa-val { font-size: 8.5px; writing-mode: initial; }
  .pa-mois { font-size: 9.5px; }
  .pa-kpi strong { font-size: 17px; }
  .pa-table { font-size: 12px; }
  .pa-table th:nth-child(2), .pa-table td:nth-child(2), .pa-table th:nth-child(3), .pa-table td:nth-child(3), .pa-table th:nth-child(4), .pa-table td:nth-child(4), .pa-table th:nth-child(7), .pa-table td:nth-child(7) { display: none; }
  .pa-table .pa-part td { display: table-cell !important; }
  .pa-axes { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .pa-axe { white-space: nowrap; padding: 6px 9px; font-size: 12px; }
  .pa-card { padding: 12px 12px 10px; }
  .pa-taux { min-width: 92px; }
}

/* ---------- e-Licence : document officiel ---------- */
.elic-doc { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
.elic-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.elic-doc-act { display: flex; gap: 8px; flex-wrap: wrap; }
.elic-doc-mini { display: block; margin-top: 12px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; max-width: 260px; }
.elic-doc-mini img { display: block; width: 100%; height: auto; }
.elic-doc-grand { max-width: min(96vw, 720px); max-height: 82vh; border-radius: 12px; background: #fff; }
.elic-vide { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--text); font-size: 13px; font-weight: 600; }
:root[data-theme="dark"] .elic-vide { color: #FFD9A8; }

/* ---------- Pastille texte des logos absents ---------- */
.comp-logo--txt { font-family: var(--mono); background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
/* b18 — PC : les boutons de l'en-tête (recherche, profil, rafraîchir,
   déconnexion) étaient blancs sur fond blanc, donc invisibles. */
@media (min-width: 768px) {
  .app-header .refresh-btn { color: var(--text); background: var(--surface-2); border-color: var(--line); width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
  .app-header .refresh-btn:hover { background: var(--surface); border-color: var(--navy-600); }
  .header-actions { display: flex; gap: 8px; }
}
/* b18 — barre Saison / Recherche / Filtres : passe à la ligne au lieu de déborder (écrans 1024–1280 px) */
@media (min-width: 768px) {
  .toolbar-search { flex-wrap: wrap !important; row-gap: 6px !important; }
  .toolbar-search .search-field { flex: 1 1 180px !important; min-width: 160px; }
}
@media (min-width: 768px) { .toolbar-search select { max-width: 190px; } #filterNiveauSelect { max-width: 230px; } }

/* b18 — toast lisible en thème sombre (fond opaque sous la teinte) */
@media (max-width: 767px) {
  #statusBar.status-bar { background: linear-gradient(var(--gold-soft), var(--gold-soft)), var(--surface); }
  #statusBar.status-bar.ok { background: linear-gradient(var(--green-soft), var(--green-soft)), var(--surface); }
  #statusBar.status-bar.error { background: linear-gradient(var(--red-soft), var(--red-soft)), var(--surface); }
}

/* =====================================================================
   b19 (08/10/2026) — retours d'audit iPad / iPhone / Mac
   ===================================================================== */

/* ---- Recherche + filtres : derrière la loupe, sur toutes les plateformes ---- */
#searchToggleBtn { display: inline-flex !important; align-items: center; justify-content: center; position: relative; }
.toolbar-search:not(.search-open) { display: none !important; }
.loupe-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--surface); }
.loupe-dot[hidden] { display: none; }
@media (min-width: 768px) {
  .toolbar-search.search-open { display: flex !important; margin: 0 0 16px !important; padding: 10px 14px !important; border: 1px solid var(--line) !important; border-radius: 14px !important; background: var(--surface) !important; }
}

/* ---- iPad / Mac en appli plein écran : l'en-tête ne passe plus sous l'heure et la batterie ---- */
@media (min-width: 768px) {
  .app-header { padding-top: env(safe-area-inset-top, 0px) !important; height: calc(64px + env(safe-area-inset-top, 0px)) !important; }
  .page { padding-top: calc(64px + env(safe-area-inset-top, 0px)) !important; }
  .tabs { top: calc(64px + env(safe-area-inset-top, 0px)) !important; }
}

/* ---- Listes de matchs : 1 ligne = 1 match, dans l'ordre, espacées ---- */
.panel .cards, .cards { display: flex !important; flex-direction: column; gap: 10px !important; max-width: none !important; }
.match-card.mrow-card { border-radius: 14px; overflow: hidden; }
.match-card.mrow-card:hover { transform: none; }
.mrow-card .card-head.mrow {
  display: grid; grid-template-columns: 86px 46px minmax(0, 1fr) auto 18px; align-items: center;
  gap: 14px; padding: 12px 16px; min-height: 64px;
}
.mrow-date strong { display: block; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.mrow-date span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); text-transform: capitalize; font-family: var(--mono); }
.mrow-logo { display: flex; align-items: center; justify-content: center; }
.mrow-logo .comp-logo { width: 42px; height: 42px; }
.mrow-main { min-width: 0; }
.mrow-main .card-title { font-size: 17px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-main .card-sub { margin: 2px 0 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-main .badges { margin: 6px 0 0; gap: 5px; }
.mrow-main .badge-niveau { font-size: 13px; min-height: 21px; padding: 1px 10px; }
.mrow-main .badge { min-height: 19px; padding: 1px 8px; font-size: 10.5px; }
.mrow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mrow-side strong { font-family: var(--mono); font-size: 15px; color: var(--text); white-space: nowrap; }
.mrow-side .badge { font-size: 10.5px; min-height: 19px; padding: 1px 8px; }
.mrow-chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease; justify-self: center; }
.match-card.open .mrow-chev { transform: rotate(-135deg); }
.match-card.is-past .mrow-main .card-title { color: var(--muted); }
/* Examinateur en Championnat de France : surbrillance + étiquette */
.match-card.is-exam { box-shadow: 0 0 0 2px var(--gold), 0 8px 22px rgba(245,180,0,.18); }
.match-card.is-exam .card-head.mrow { background: linear-gradient(90deg, rgba(245,180,0,.20), rgba(245,180,0,.04) 70%); }
@media (max-width: 767px) {
  .mrow-card .card-head.mrow { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; }
  .mrow-logo, .mrow-chev { display: none; }
  .mrow-main .card-title { font-size: 15px; }
  .mrow-side strong { font-size: 13.5px; }
  .mrow-date strong { font-size: 12.5px; }
}

/* ---- Accueil : week-end sur toute la largeur, jours côte à côte ---- */
.acc-we { margin-top: 18px; }
.acc-we .acc-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.acc-we .acc-day { margin: 0; }

/* ---- Espacements généraux ---- */
.panel > .section-title, .panel h2.sub-title { margin-top: 26px; }
.past-block { margin-top: 18px; }
.past-body .cards { padding-top: 6px; }

/* ---- iPhone : Alertes et Export non proposés ---- */
@media (max-width: 767px) { .tab-more-pc { display: none !important; } }
.me-tabs { margin-bottom: 16px; }

/* ---- b19 Paiements ---- */
.mp-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 6px 0 14px; }
.mp-tuile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-soft); color: var(--text); }
.mp-tuile > summary, .mp-tuile--fixe { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.mp-tuile--fixe { cursor: default; }
.mp-tuile > summary::-webkit-details-marker { display: none; }
.mp-tuile label { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); cursor: inherit; }
.mp-tuile strong { font-family: var(--mono); font-size: 24px; }
.mp-tuile .sub { font-size: 12px; color: var(--muted); }
.mp-tuile--mois { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); border-color: transparent; color: #fff; }
.mp-tuile--mois label, .mp-tuile--mois .sub { color: rgba(255,255,255,.8); }
.mp-tuile--retard { border-color: rgba(228,0,43,.5); background: linear-gradient(120deg, var(--red-soft), var(--surface) 70%); }
.mp-tuile--retard strong { color: var(--red); }
.mp-tuile .mp-liste { margin: 0; padding: 0 12px 12px; }
.mp-tuile--mois .rb-m label { background: rgba(255,255,255,.08); color: #fff; }
.mp-tuile--mois .rb-m-t small { color: rgba(255,255,255,.7); }
.pay-bloc .past-summary-inner { width: 100%; }
.pay-bloc-tot { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--text); padding-right: 6px; }
.pa-intro { margin: -4px 0 12px; font-size: 12.5px; color: var(--muted); max-width: 900px; }
.pa-c-cfj { background: #8B5CF6; }
.rb-pc-only { display: none; }
@media (min-width: 768px) { .rb-pc-only { display: block; } }

/* ---- b19 Message d'état : petit toast sur toutes les plateformes ---- */
#statusBar.status-bar { position: fixed; z-index: 95; margin: 0 !important; padding: 10px 14px !important; font-size: 13px !important; border-radius: 12px; box-shadow: 0 10px 28px rgba(10,31,68,.22); }
@media (min-width: 768px) { #statusBar.status-bar { right: 20px; bottom: 20px; left: auto; max-width: 420px; background: linear-gradient(var(--green-soft), var(--green-soft)), var(--surface); } #statusBar.status-bar.error { background: linear-gradient(var(--red-soft), var(--red-soft)), var(--surface); } #statusBar.status-bar:not(.ok):not(.error) { background: linear-gradient(var(--gold-soft), var(--gold-soft)), var(--surface); } }

/* ---- b19 QCM : zone de question agrandie ---- */
.qz-q { max-width: 1100px !important; margin: 0 auto; }
.qz-qtext { font-size: clamp(18px, 2.1vw, 24px) !important; line-height: 1.45 !important; margin-bottom: 18px !important; }
.qz-opt { padding: 18px 20px !important; min-height: 64px; }
.qz-txt { font-size: clamp(16px, 1.7vw, 19px) !important; line-height: 1.45; }
.qz-mark { width: 34px !important; height: 34px !important; font-size: 15px !important; }
.qz-fb { font-size: 15.5px !important; }
#qcm .qz-top { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding: 10px 0; }
.km-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.renta-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }

/* =====================================================================
   b19 (suite) — Mon espace : e-Licence, e-Marque, Rapports, Contacts,
   Procédures + échelle de z-index unique (corrige les « premiers plans »)
   ===================================================================== */
/* Échelle : contenu 0-5 · barre latérale 40 · en-tête 80 · nav mobile 85 ·
   panneau Plus 90 · toast 95 · fenêtres 1000 · plein écran 1100 · login 9999 */
.leaflet-container, .map-wrap, .card-map { position: relative; z-index: 0; isolation: isolate; }
.rtm-ov { z-index: 1000; }
.elic-overlay { z-index: 1100; }
.rt-modal { z-index: 1050; }
@media (max-width: 767px) {
  .tab-more-panel { z-index: 90 !important; }
  .rtm-ov { align-items: flex-end; padding: 0; }
  .rtm-ov .rtm { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* Zone de dépôt (licence, rapports) */
.dropz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; min-height: 150px; padding: 20px 16px; border: 2px dashed var(--line); border-radius: 16px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.dropz:hover, .dropz.is-over { border-color: var(--gold); background: var(--gold-soft); }
.dropz strong { font-size: 15px; }
.dropz-ico { font-size: 26px; line-height: 1; color: var(--gold); }

/* e-Licence officielle */
.elic-zone { margin-top: 14px; display: grid; gap: 10px; }
.elic-officiel { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
.elic-officiel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.elic-officiel-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.elic-doc-view { display: block; width: 100%; max-width: 560px; margin: 12px auto 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; }
.elic-doc-view img { display: block; width: 100%; height: auto; }

/* e-Marque */
.emq { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); }
.emq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.emq-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.emq-val { margin-top: 10px; }
.emq-cle { display: inline-block; font: 600 18px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; padding: 8px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; }
.emq-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.emq-form input { flex: 1 1 180px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-transform: uppercase; letter-spacing: .08em; }
.emq-note { margin: 8px 0 0; font-size: 12px; }

/* Rapports */
.rapp-seg { margin-top: 6px; }
.rapp-form { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); display: grid; gap: 12px; }
.rapp-form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.rapp-f-notes { grid-column: 1 / -1; }
.rapp-src { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.rapp-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); cursor: pointer; }
.rapp-photo:hover { border-color: var(--gold); }
.rapp-apercu { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.rapp-apercu img, .rapp-apercu-pdf { width: 56px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: 0 0 auto; }
.rapp-apercu > span { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.rapp-scan-opt { display: flex; align-items: center; gap: 8px; font-size: 13px; }
@media (max-width: 767px) {
  .rapp-form-grid, .rapp-src { grid-template-columns: 1fr; }
  .dropz { min-height: 110px; }
  .rapp-photo { flex-direction: row; justify-content: flex-start; text-align: left; }
}

/* Contacts & Procédures — design commun */
.cc-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 4px; }
.cc-bar input[type=search] { flex: 1 1 220px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cc-bar select { height: 38px; border-radius: 10px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.cc-card { display: flex; gap: 10px; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); min-width: 0; }
.cc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cc-titre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-titre strong { font-size: 15px; line-height: 1.25; }
.cc-sub { font-size: 13px; color: var(--muted); }
.cc-note { font-size: 12.5px; color: var(--muted); }
.cc-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.cc-btns { display: flex; gap: 6px; }
.cc-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-decoration: none; }
.cc-btn:hover { border-color: var(--gold); color: var(--gold); }
.cc-btn.cc-tel { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.45); color: #15803d; }
:root[data-theme="dark"] .cc-btn.cc-tel { color: #4ade80; }
.pr-card .pr-det { margin-top: 2px; }
.pr-card .pr-det summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--gold); list-style: none; }
.pr-card .pr-det summary::-webkit-details-marker { display: none; }
.pr-card .pr-corps { white-space: pre-wrap; font-size: 13px; line-height: 1.45; margin-top: 6px; }
.imp-chip { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.cc-card.imp-1 { border-left-color: #dc2626; } .imp-chip.imp-1 { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.4); color: #b91c1c; }
.cc-card.imp-2 { border-left-color: #f59e0b; } .imp-chip.imp-2 { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.45); color: #b45309; }
.cc-card.imp-3 { border-left-color: #3b82f6; } .imp-chip.imp-3 { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.4); color: #1d4ed8; }
.cc-card.imp-4 { border-left-color: var(--line); }
:root[data-theme="dark"] .imp-chip.imp-1 { color: #fca5a5; } :root[data-theme="dark"] .imp-chip.imp-2 { color: #fcd34d; } :root[data-theme="dark"] .imp-chip.imp-3 { color: #93c5fd; }
@media (max-width: 767px) {
  .cc-grid { grid-template-columns: 1fr; }
  .cc-bar .small-btn { flex: 0 0 auto; }
}
.rtm-form textarea { width: 100%; font-family: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.emq-form[hidden], .rapp-apercu[hidden] { display: none !important; }
.rapp-seg { display: flex; width: fit-content; max-width: 100%; margin: 10px 0 0; }
.rapp-scan-opt { display: flex !important; justify-content: flex-start; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text); }
.rapp-scan-opt input { width: auto; height: auto; margin: 0; }
.me-tabs { display: flex; width: fit-content; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.me-tabs::-webkit-scrollbar { display: none; }
.me-tabs .tabs-mini-btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 767px) {
  .rapp-photo { flex-direction: column; justify-content: center; text-align: center; }
  .cc-bar select { flex: 1 1 140px; }
}

/* =====================================================================
   b20 — iPad portrait (768–1099 px) : menu latéral en rail d'icônes.
   Le contenu garde ~750 px de large ; en paysage (≥1100) menu complet.
   ===================================================================== */
@media (min-width: 768px) and (max-width: 1099px) {
  .page { width: auto !important; margin-left: 84px !important; padding-left: 18px; padding-right: 18px; }
  .tabs { width: 76px !important; padding: 14px 8px !important; align-items: center; }
  .tab { width: 60px; height: 52px; justify-content: center; padding: 0; gap: 0; position: relative; }
  .tab .tab-label, .tab > span:not(.tab-icon):not(.tab-badge):not(.badge-dot) { display: none; }
  .tab-icon svg { width: 21px; height: 21px; }
  .tabs .tab-group, .tabs .tab-group-label, .tabs-foot { display: none !important; }
  .tab .tab-badge, .tab .badge-dot { position: absolute; top: 4px; right: 4px; margin: 0; }
  .app-header .header-inner { padding: 12px 18px; min-height: 72px; }
}

/* ---------- b20 : Accueil — week-end en timeline ---------- */
.we-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.we-day { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); padding: 14px; box-shadow: var(--shadow-soft); }
.we-day.is-today { border-color: var(--gold); }
.we-day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.we-day-cal { width: 54px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; line-height: 1.05; }
.we-day-cal b { display: block; background: var(--navy-900, #0a1f44); color: #fff; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 0; }
.we-day-cal strong { font-family: var(--display); font-size: 22px; padding: 4px 0 0; }
.we-day-cal i { font-style: normal; font-size: 10.5px; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.we-day-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.we-day-t strong { font-size: 16px; text-transform: capitalize; }
.we-day-t small { color: var(--muted); font-size: 12.5px; }
.we-list { display: grid; gap: 10px; }
.we-m { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 62px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); background: var(--bg); color: var(--text); transition: transform .12s, box-shadow .12s; }
.we-m:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10,31,68,.10); }
.we-m.niv-france { border-left-color: #e3a500; } .we-m.niv-region { border-left-color: #2f6fe0; } .we-m.niv-dep { border-left-color: #64748b; }
.we-m.is-next { box-shadow: 0 0 0 2px var(--gold); }
.we-m.is-exam { background: linear-gradient(90deg, rgba(245,180,0,.16), transparent 70%), var(--bg); }
.we-m.is-fini { opacity: .6; }
.we-h { display: flex; flex-direction: column; align-items: flex-start; }
.we-h strong { font-family: var(--display); font-size: 19px; }
.we-h small { font-size: 11px; color: var(--muted); }
.we-logo { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.we-logo .comp-logo { max-width: 40px; max-height: 40px; }
.we-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.we-eq { font-weight: 800; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.we-eq--vis { font-weight: 600; color: var(--muted); font-size: 13px; }
.we-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.we-meta .badge-niveau { font-size: 10.5px; padding: 2px 8px; }
.we-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.we-eur { font-family: var(--display); font-weight: 700; font-size: 16px; }
.we-km { font-size: 11.5px; color: var(--muted); }
.we-etat { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
@media (max-width: 520px) {
  .we-days { grid-template-columns: 1fr; }
  .we-m { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .we-logo { display: none; }
}

/* ---------- b20 : Paiements — retard dans le mois courant ---------- */
.pa-ret { background: repeating-linear-gradient(135deg, rgba(220,38,38,.18) 0 4px, rgba(220,38,38,.45) 4px 7px); border: 1.5px dashed #dc2626; }
.pa-val em { font-style: normal; color: var(--muted); font-weight: 600; }
.cf-intro { margin: -4px 0 12px; }

/* ---------- b20 : Contacts / Procédures — loupe ---------- */
.cc-bar { justify-content: flex-end; }
.cc-loupe { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.cc-loupe.is-on { border-color: var(--gold); color: var(--gold); }
.cc-filtres { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.cc-filtres[hidden] { display: none !important; }
.cc-filtres input[type=search] { flex: 1 1 220px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cc-filtres select { height: 40px; border-radius: 10px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }

/* ---------- b20 : rentabilité — vide tant qu'aucun filtre ---------- */
.renta-vide { margin: 10px 0 0; text-align: center; }

/* ---------- b20 : espacements oubliés ---------- */
.pay-bloc + .pay-bloc, details.pay-bloc { margin-bottom: 10px; }
.rb-pc-only, #rapprochement, .rb-card { margin-top: 18px; }
.rapp-form + .table-card, .rapp-form + .empty, .rapp-form + .empty-state, .rapp-form ~ .empty { margin-top: 16px; }
.section-title { margin-top: 26px; }
.page > section > .section-title:first-child, .monespace .section-title:first-child { margin-top: 4px; }

/* ---------- b20 : QCM — barre du haut propre sur toutes tailles ---------- */
#qcm .qz-top { position: sticky; top: calc(var(--header-h, 72px) + 8px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; box-shadow: var(--shadow-soft); }
@media (max-width: 767px) { #qcm .qz-top { top: 8px; } }
@media (min-width: 768px) { :root { --header-h: 64px; } }
#qcm .qz-q, #qcm .qcm-q-text { font-size: clamp(17px, 2.1vw, 22px); line-height: 1.4; }
#qcm .qz-opt, #qcm .qcm-opt { min-height: 56px; font-size: clamp(15px, 1.8vw, 18px); }

/* ---------- b20 : e-Licence — carte numérique ---------- */
.lic-zone { display: grid; gap: 12px; justify-items: start; }
.lic-card { position: relative; overflow: hidden; width: min(560px, 100%); aspect-ratio: 1.586; border-radius: 22px; padding: 4.2% 4.8%; color: #08221f; background: radial-gradient(120% 90% at 85% 10%, #7fdccf 0%, transparent 55%), linear-gradient(135deg, #3fbdab 0%, #1fa391 55%, #138a7b 100%); box-shadow: 0 18px 40px rgba(8,60,54,.35), inset 0 1px 0 rgba(255,255,255,.35); display: flex; flex-direction: column; font-size: clamp(10px, 2.3vw, 14px); container-type: inline-size; }
.lic-shine { position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%); animation: licShine 6s ease-in-out infinite; pointer-events: none; }
@keyframes licShine { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@media (prefers-reduced-motion: reduce) { .lic-shine { animation: none; display: none; } }
.lic-top { display: flex; align-items: flex-start; gap: 4%; position: relative; }
.lic-fed { flex: 0 0 auto; background: #fff; color: #1d2b6b; font-weight: 900; letter-spacing: .02em; border-radius: 10px; padding: .5em .7em; font-size: 1.15em; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.lic-club { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.lic-club small { font-size: .78em; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.lic-club strong { font-size: 1.2em; font-weight: 900; text-transform: uppercase; overflow-wrap: anywhere; }
.lic-saison { display: flex; flex-direction: column; align-items: flex-end; line-height: .9; }
.lic-saison b { font-family: var(--display); font-weight: 900; color: #fff; font-size: 2em; text-shadow: 0 2px 6px rgba(0,0,0,.18); }
.lic-main { flex: 1; display: flex; gap: 5%; margin-top: 4%; position: relative; min-height: 0; }
.lic-photo { flex: 0 0 26%; aspect-ratio: 3 / 4; align-self: flex-start; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.35); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.lic-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lic-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35em; }
.lic-nom { font-size: 1.15em; text-transform: uppercase; line-height: 1.1; }
.lic-nom strong { font-size: 1.45em; font-weight: 900; }
.lic-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 1.3em; letter-spacing: .06em; }
.lic-fs { display: grid; grid-template-columns: 1fr 1fr; gap: .25em .8em; }
.lic-f { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.lic-f span { font-size: .72em; font-weight: 700; text-transform: uppercase; opacity: .72; }
.lic-f strong { font-size: .98em; overflow-wrap: anywhere; }
.lic-fonction { margin-top: auto; align-self: flex-start; background: rgba(255,255,255,.55); border-radius: 999px; padding: .25em .8em; font-weight: 800; font-size: .92em; }
.lic-long { position: relative; font-family: ui-monospace, Menlo, monospace; font-size: .85em; letter-spacing: .12em; opacity: .75; text-align: right; margin-top: 2%; }
.lic-card--grand { width: min(94vw, 900px, calc(86vh * 1.586)); font-size: clamp(12px, 2.2vw, 22px); }
.lic-act { flex-wrap: wrap; }
@media (orientation: portrait) and (max-width: 767px) { .elic-overlay .lic-card--grand { width: 94vw; } }

/* ---------- b20 : Règlement — réponses lisibles + précisions ---------- */
.regl-decision { border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; color: var(--text); }
.regl-decision > span { display: block; font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin-bottom: 2px; }
.regl-decision p { margin: 0; font-weight: 700; font-size: 15.5px; line-height: 1.4; }
.regl-expl p { margin: 0 0 6px; line-height: 1.5; }
.regl-expl ul, .regl-bulle ul { margin: 4px 0 8px; padding-left: 20px; }
.regl-expl li { margin: 2px 0; line-height: 1.45; }
.regl-arts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.regl-art { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
details.regl-sources { margin-top: 10px; }
details.regl-sources summary { cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; color: var(--gold); }
details.regl-sources summary::-webkit-details-marker { display: none; }
.regl-prec { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.regl-err { color: var(--red); font-weight: 600; }
.regl-typing { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.regl-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: reglDot 1s infinite ease-in-out; }
.regl-typing i:nth-child(2) { animation-delay: .15s; } .regl-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes reglDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.regl-q-form { display: grid; gap: 14px; margin-top: 10px; }
.regl-q-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; }
.regl-q-item legend { font-weight: 800; padding: 0 6px; }
.regl-q-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.regl-q-opt { cursor: pointer; }
.regl-q-opt input { position: absolute; opacity: 0; pointer-events: none; }
.regl-q-opt span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 13.5px; }
.regl-q-opt input:checked + span { border-color: var(--gold); background: var(--gold-soft); font-weight: 700; }
.regl-q-libre { margin-top: 8px; width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.regl-q-libre[hidden] { display: none; }
.regl-q .rtm-act { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- b20 : tableaux larges — défilement horizontal propre ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mp-table th:first-child, .mp-table td:first-child, .cf-table td:first-child { white-space: nowrap; }
.mp-table th, .cf-table th { white-space: nowrap; }
@media (max-width: 1099px) { .mp-table { min-width: 720px; } }

/* ---------- b21 : très petits écrans (≤ 360 px, iPhone SE) ---------- */
@media (max-width: 360px) {
  .pa-axes { flex-wrap: wrap; overflow: visible; }
  .pa-axe { padding: 5px 7px; font-size: 11.5px; }
  .chart-card, .chart-box { min-width: 0; max-width: 100%; }
  .charts-2, .charts-grid { grid-template-columns: 1fr !important; }
}
.chart-card, .chart-box, .pa-card, .table-card, .kpi { min-width: 0; }

/* ---------- b22 : Progression — évaluations ---------- */
.eval-progress { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.eval-progress[hidden] { display: none !important; }
.eval-prog-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.eval-prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-600), var(--gold)); transition: width .3s; }
.eval-charts { margin-top: 12px; }
.eval-recur { margin-top: 12px; padding: 14px 16px; }
.eval-recur ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.eval-recur li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.eval-list { display: grid; gap: 12px; margin-top: 12px; }
.eval-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); display: grid; gap: 10px; }
.eval-head { display: flex; gap: 14px; align-items: flex-start; }
.eval-note { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; background: var(--navy-900, #0a1f44); color: #fff; display: flex; align-items: baseline; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 24px; padding-top: 16px; }
.eval-note small { font-size: 11px; opacity: .7; margin-left: 2px; }
.eval-note.is-vide { background: var(--surface-2); color: var(--muted); }
.eval-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.eval-main strong { font-size: 15px; overflow-wrap: anywhere; }
.eval-titre { display: flex; gap: 6px; flex-wrap: wrap; }
.eval-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.eval-fam { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.eval-f { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); overflow: hidden; font-size: 11px; }
.eval-f i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(245,180,0,.22); }
.eval-f b, .eval-f em { position: relative; }
.eval-f b { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; color: var(--muted); }
.eval-f em { font-style: normal; font-weight: 800; font-size: 14px; }
.eval-axes { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.eval-grille { width: 100%; margin-top: 10px; font-size: 12.5px; border-collapse: collapse; }
.eval-grille td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.eval-grille td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.badge.blue { background: rgba(47,111,224,.14); color: #1d4ed8; border-color: rgba(47,111,224,.4); }
.badge.green { background: rgba(34,197,94,.14); color: #15803d; border-color: rgba(34,197,94,.4); }
@media (max-width: 767px) {
  .eval-fam { grid-template-columns: repeat(3, 1fr); }
  .eval-head { flex-wrap: wrap; }
  .eval-side { flex-direction: row; width: 100%; justify-content: flex-end; }
}
.eval-note { width: auto; min-width: 64px; padding: 0 10px; font-size: 21px; }
.eval-charts.charts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 767px) { .eval-charts.charts-2 { grid-template-columns: 1fr; } }

/* ---------- b24 : Progression — plan de développement, notes brutes ---------- */
.ev-kpis { margin-top: -6px; }
.ev-kpi-note strong { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ev-n small { font-size: 12px; opacity: .7; margin-left: 2px; font-weight: 700; }
.ev-n20 { font-size: 12px; font-weight: 600; opacity: .75; font-family: var(--sans, inherit); }
.kpi.hero .ev-n20 { color: rgba(255,255,255,.8); }
.ev-up { color: var(--green, #0E7B47); } .kpi.hero .ev-up { color: #9be3b8; }
.ev-down { color: var(--red, #E4002B); } .kpi.hero .ev-down { color: #ffb3b3; }
.pd-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 12px; }
.pd-grid .table-card { padding: 14px 16px; }
.pd-grid h3 { margin: 0; font-size: 15px; }
.pd-grid .hint { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.pd-bar { display: grid; grid-template-columns: 118px 1fr 36px; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.pd-bar.is-focus .pd-bar-l { font-weight: 800; }
.pd-bar-l em { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--red, #E4002B); margin-left: 4px; }
.pd-bar-t { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pd-bar-t i { display: block; height: 100%; border-radius: 999px; background: var(--gold, #F5B400); transition: width .4s; }
.pd-bar-t i.is-bad { background: var(--red, #E4002B); } .pd-bar-t i.is-mid { background: #e08a1e; } .pd-bar-t i.is-good { background: var(--green, #0E7B47); }
.pd-bar b { font-family: var(--mono); text-align: right; font-size: 13px; }
.pd-actions ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.4; }
.pd-actions li::marker { font-weight: 800; color: var(--gold, #F5B400); }
.pd-actions .badge { vertical-align: middle; }
.pd-recur { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; }
.pd-chip small { color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pd-toggle { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ev-depot { padding: 16px; margin-top: 12px; }
.ev-liste-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.ev-liste-head .count { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.ev-select { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.eval-note { flex-direction: column; align-items: center; justify-content: center; padding: 8px 10px; height: auto; min-height: 64px; gap: 0; line-height: 1.1; }
.eval-note .ev-n20 { font-size: 10.5px; }
.ev-bloc { margin: 8px 0; font-size: 13.5px; }
.ev-bloc b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.ev-bloc p { margin: 0; line-height: 1.45; }
.ev-bloc ul, .ev-bloc ol { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.ev-grille-det summary { font-size: 12.5px; color: var(--muted); cursor: pointer; margin-top: 6px; }
.ev-actions { margin-top: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media (max-width: 767px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-bar { grid-template-columns: 96px 1fr 32px; }
  .pd-chip small { max-width: 160px; }
}
.ev-kpi-main { border-color: var(--gold, #F5B400); box-shadow: inset 0 0 0 1px var(--gold-soft, rgba(245,180,0,.3)); }
.pd-toggle { white-space: nowrap; }

/* ---------- b35 : accueil, paiements, session ---------- */
.acc-s { position: relative; }
.acc-s-sub { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.3; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.acc-s--ok .acc-s-sub, .acc-s--att .acc-s-sub { opacity: .9; }
.pay-kpis { margin-bottom: 14px; }
.pay-kpi-attente strong { font-size: 30px; }
.tabs-foot { justify-content: center; text-align: center; flex-wrap: wrap; row-gap: 2px; }
.tabs-foot span:last-child { overflow-wrap: anywhere; }
/* b35 — confirmation d'annulation (push → app) */
.rt-confirm { position: fixed; inset: 0; z-index: 9500; background: rgba(5, 15, 35, .62); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.rt-confirm-card { width: min(440px, 100%); background: var(--surface); color: var(--text); border-radius: 20px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); display: grid; gap: 10px; }
.rt-confirm-tag { display: inline-block; align-self: start; justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8A6400; background: var(--gold-soft, rgba(245,180,0,.18)); padding: 4px 9px; border-radius: 999px; }
.rt-confirm-card h2 { margin: 2px 0 0; font-size: 22px; }
.rt-confirm-lib { margin: 0; font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.rt-confirm-aide { margin: 0; font-size: 13px; color: var(--muted); }
.rt-confirm-actions { display: grid; gap: 8px; margin-top: 6px; }
.rt-confirm-actions .rt-btn { width: 100%; padding: 12px; font-size: 15px; }
.pay-kpis { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pay-kpis .kpi.hero { grid-column: auto; }
@media (max-width: 767px) { .pay-kpis { grid-template-columns: 1fr; } }

/* ---------- b36 : recherche par page (loupe flottante) ---------- */
#toolbarSearch, #searchToggleBtn { display: none !important; }
.rt-fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--navy-700, #163B7A), var(--navy-900, #0A1F44)); box-shadow: 0 10px 26px rgba(10,31,68,.35), 0 0 0 4px rgba(255,255,255,.55);
  display: inline-flex; align-items: center; justify-content: center; transition: transform .18s, box-shadow .18s; }
.rt-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10,31,68,.4), 0 0 0 4px rgba(255,255,255,.6); }
.rt-fab[hidden] { display: none !important; }
.rt-fab.is-filtered { background: linear-gradient(135deg, #F5B400, #e08a1e); color: var(--navy-900, #0A1F44); }
.rt-fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red, #E4002B); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.rt-fab-badge[hidden] { display: none; }
@media (max-width: 767px) { .rt-fab { right: 14px; bottom: calc(var(--nav-h, 64px) + var(--safe-b, 0px) + 14px); width: 52px; height: 52px; } }

.rt-search-layer { position: fixed; inset: 0; z-index: 950; pointer-events: none; }
.rt-search-backdrop { position: absolute; inset: 0; background: rgba(5, 15, 35, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.rt-search { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); color: var(--text); box-shadow: -18px 0 50px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 16px; padding: 22px 22px calc(18px + var(--safe-b, 0px)); transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.rt-search-layer.is-open { pointer-events: auto; }
.rt-search-layer.is-open .rt-search-backdrop { opacity: 1; }
.rt-search-layer.is-open .rt-search { transform: none; }
.rt-search-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rt-search-kicker { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rt-search-head h3 { margin: 2px 0 0; font-size: 22px; font-family: var(--display); }
.rt-search-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 15px; cursor: pointer; }
.rt-search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--muted); }
.rt-search-field:focus-within { border-color: var(--navy-700, #163B7A); background: var(--surface); }
.rt-search-field input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; min-width: 0; }
.rt-search-sec { display: grid; gap: 7px; }
.rt-search-sec > label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rt-search-sec select { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px; padding: 0 12px; }
.rt-search-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .15s; }
.rt-chip.is-on { background: var(--navy-900, #0A1F44); border-color: var(--navy-900, #0A1F44); color: #fff; }
.rt-search-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.rt-search-foot > div { display: flex; gap: 8px; }
.rt-search-count { font-size: 13px; color: var(--muted); font-weight: 700; }
.rt-btn-primary { background: var(--gold, #F5B400); color: var(--navy-900, #0A1F44); }
@media (max-width: 767px) {
  .rt-search { top: auto; left: 0; right: 0; width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(100%); padding: 16px 16px calc(16px + var(--safe-b, 0px)); box-shadow: 0 -18px 50px rgba(0,0,0,.3); }
  .rt-search::before { content: ""; width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: -4px auto 2px; }
  .rt-search-grid { grid-template-columns: 1fr; }
}
/* b36 — évaluations repliées (« Mes exams ») */
.eval-card--pliee { padding: 0; overflow: hidden; }
.eval-card--pliee > .eval-head { padding: 14px 16px; cursor: pointer; list-style: none; }
.eval-card--pliee > .eval-head::-webkit-details-marker { display: none; }
.eval-card--pliee > .eval-head:hover { background: var(--surface-2); }
.eval-chevron { display: inline-block; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 8px 6px 0 0; transition: transform .2s; }
.eval-card--pliee[open] > .eval-head .eval-chevron { transform: rotate(-135deg); margin-top: 14px; }
.eval-corps { padding: 0 16px 16px; display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; }
.ev-actions-haut { display: flex; gap: 8px; flex-wrap: wrap; }
.eval-exams .pay-bloc-tot { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: auto; }
/* b36 — bandeaux déroulants : plus doux, titre en casse normale, pastille compteur */
.past-summary { text-transform: none; letter-spacing: 0; font-size: 16.5px; padding: 13px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); }
.past-summary:hover { background: var(--surface-2); border-color: var(--line); }
.past-summary-inner { align-items: center; }
.past-chevron { width: 9px; height: 9px; border-color: var(--navy-700, #163B7A); margin-right: 2px; }
.past-summary .count { margin-left: auto; font-size: 12.5px; font-weight: 800; color: var(--navy-700, #163B7A); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; min-width: 28px; text-align: center; }
.past-summary .pay-bloc-tot { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.past-block[open] > .past-summary { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.rt-search-field input, .rt-search-field input:focus { border: 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important; padding: 0 !important; height: auto !important; }
.eval-exams .pay-bloc-tot { font-family: var(--body); }

/* =====================================================================
   b37 — Règlement : chat plein écran (PC et téléphone)
   ===================================================================== */
#reglement.active { display: flex; flex-direction: column; min-height: calc(100dvh - 120px); }
.regl-wrap { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-width: 980px; width: 100%; margin: 0 auto; }
.regl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.regl-head .section-title { margin: 0; }
.regl-head-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.regl-head-act { display: flex; gap: 8px; flex: 0 0 auto; }
#reglement .regl-chat { flex: 1 1 auto; max-height: none; overflow: visible; margin: 0; padding: 10px 2px 8px; gap: 16px; }
#reglement .regl-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#reglement .regl-msg.regl-user { align-items: flex-end; }
#reglement .regl-msg.regl-ia { flex-direction: row; align-items: flex-start; gap: 10px; }
.regl-avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; letter-spacing: .04em; background: var(--navy-800, #0a1f44); color: var(--gold, #d4a017); margin-top: 2px; }
.regl-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: min(820px, calc(100% - 40px)); }
#reglement .regl-bulle { max-width: 100%; font-size: 15px; line-height: 1.55; padding: 12px 15px; border-radius: 18px; }
#reglement .regl-user .regl-bulle { max-width: min(680px, 88%); border-bottom-right-radius: 6px; white-space: pre-wrap; }
#reglement .regl-ia .regl-bulle { border-bottom-left-radius: 6px; }
.regl-meta { font-size: 11.5px; color: var(--muted); padding: 0 6px; }
.regl-meta-u { text-align: right; }
.regl-empty { margin: auto 0; padding: 28px 12px 12px; text-align: center; color: var(--text); }
.regl-empty-ico { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--navy-800, #0a1f44); color: var(--gold, #d4a017); }
.regl-empty h3 { margin: 0 0 6px; font-size: 20px; }
.regl-empty p { margin: 0 auto 16px; max-width: 560px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.regl-ex { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.regl-ex-btn { font: inherit; font-size: 13px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.regl-ex-btn:hover { background: var(--surface-2); border-color: var(--navy-600, #1f4e9a); }
#reglement .regl-form { position: sticky; bottom: 12px; z-index: 20; margin: 8px 0 0; padding: 8px 8px 8px 14px; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 30px rgba(10,31,68,.14); }
#reglement .regl-form textarea { border: 0; background: transparent; padding: 10px 0; min-height: 40px; max-height: 160px; resize: none; font-size: 15px; line-height: 1.4; outline: none; box-shadow: none; }
#reglement .regl-form textarea:focus { outline: none; box-shadow: none; border: 0; }
#reglement .regl-send { flex: 0 0 auto; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; background: var(--navy-800, #0a1f44); color: #fff; cursor: pointer; transition: transform .12s, opacity .12s; }
#reglement .regl-send:hover { transform: translateY(-1px); }
#reglement .regl-send:disabled { opacity: .45; cursor: default; transform: none; }
#reglement .regl-status { margin: 0; padding: 2px 6px; display: flex; align-items: center; gap: 8px; }
.regl-typing { display: inline-flex; gap: 3px; }
.regl-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: reglTyping 1s infinite ease-in-out; }
.regl-typing i:nth-child(2) { animation-delay: .15s; } .regl-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes reglTyping { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
:root[data-theme="dark"] #reglement .regl-form { box-shadow: 0 10px 30px rgba(0,0,0,.45); }
:root[data-theme="dark"] #reglement .regl-send { background: var(--gold, #d4a017); color: #0a1f44; }
/* Fenêtre « Documents » */
.regl-docs-m { width: min(720px, 100%); }
.regl-doc-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.regl-doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.regl-doc--off { opacity: .6; }
.regl-doc-i { min-width: 0; }
.regl-doc-n { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regl-doc-n a { color: inherit; text-decoration: none; } .regl-doc-n a:hover { text-decoration: underline; }
.regl-doc-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.regl-doc-del { flex: 0 0 auto; }
.regl-doc-cache { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.regl-doc-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.regl-doc-up { cursor: pointer; }
.regl-doc-help { margin-top: 10px; font-size: 12.5px; }
.regl-status.is-err { color: var(--red); font-weight: 700; }
/* Téléphone : composeur au-dessus de la barre du bas, fil sur toute la hauteur */
@media (max-width: 767px) {
  #reglement.active { min-height: calc(100dvh - 84px - var(--nav-h) - var(--safe-b)); }
  .regl-head { padding-bottom: 8px; }
  .regl-head .section-title { font-size: 18px; }
  .regl-head-act .small-btn { padding: 6px 10px; font-size: 12.5px; }
  #reglement .regl-form { bottom: calc(var(--nav-h) + var(--safe-b) + 10px); border-radius: 22px; padding-left: 12px; }
  #reglement .regl-user .regl-bulle { max-width: 92%; }
  .regl-col { max-width: calc(100% - 40px); }
  #reglement .regl-bulle { font-size: 14.5px; padding: 11px 13px; }
  .regl-empty { padding-top: 16px; }
  .regl-empty h3 { font-size: 18px; }
  .regl-ex-btn { font-size: 12.5px; padding: 7px 11px; }
  .regl-doc-del { padding: 6px 10px; font-size: 12.5px; }
}

/* =====================================================================
   b38 — écrans : téléphone (tableaux empilés, onglets défilants, 16 px),
   grand écran (largeur fluide ≤ 1600 px, grilles 3-4 colonnes), iPad.
   ===================================================================== */
/* --- Téléphone --- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .panel p, .card-sub, .stat-note, .empty { font-size: 14.5px; }
  input, select, textarea, button { font-size: 16px; }   /* évite le zoom iOS au focus */
  .small-btn { font-size: 14px; }
  th, td { font-size: 14px; }
  /* Onglets mini : une ligne qui défile, plus de troncature */
  .tabs-mini { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%; border-radius: 14px; }
  .tabs-mini::-webkit-scrollbar { display: none; }
  .tabs-mini-btn { flex: 0 0 auto; white-space: nowrap; font-size: 13.5px; padding: 9px 13px; }
  /* Tableaux ≥ 4 colonnes : une carte par ligne */
  .table-wrap table.rt-stack { min-width: 0; width: 100%; }
  .table-wrap table.rt-stack thead { display: none; }
  .table-wrap table.rt-stack, .table-wrap table.rt-stack tbody { display: block; }
  .table-wrap table.rt-stack tr { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .table-wrap table.rt-stack tr:last-child { border-bottom: 0; }
  .table-wrap table.rt-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border: 0; text-align: right; font-size: 14px; white-space: normal; }
  .table-wrap table.rt-stack td[data-label]::before { content: attr(data-label); flex: 0 0 42%; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .table-wrap table.rt-stack td:not([data-label]) { justify-content: flex-start; text-align: left; font-weight: 700; }
  .table-wrap table.rt-stack td:empty { display: none; }
  .table-wrap table.rt-stack td:first-child { font-weight: 700; }
  .table-wrap table.rt-stack tfoot tr { display: block; background: var(--surface-2); }
  .table-wrap table.rt-stack tfoot td { display: flex; }
  #stats th, #stats td { white-space: normal; }
  /* Petits tableaux (2-3 colonnes) : défilement horizontal, sans largeur minimale forcée */
  .table-wrap table.rt-nostack { min-width: 0; }
  .table-wrap table.rt-nostack th, .table-wrap table.rt-nostack td { padding: 9px 8px; }
}
/* --- iPad / fenêtre moyenne : 2 colonnes --- */
@media (min-width: 768px) and (max-width: 1099px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .acc-days, .mp-tuiles, .km-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .we-days { grid-template-columns: 1fr; }
  .pa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding-left: 16px; padding-right: 16px; }
}
/* --- Grand écran : largeur fluide jusqu'à 1600 px, grilles 3-4 colonnes --- */
@media (min-width: 1400px) {
  .page { max-width: 1840px !important; padding-left: 40px; padding-right: 40px; }
  .panel { max-width: 1600px !important; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .kpi.hero { grid-column: 1 / -1; }
  .acc-days, .we-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-tuiles, .km-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pa-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  th, td { font-size: 13.5px; }
  .regl-wrap { max-width: 1100px; }
}
@media (min-width: 1800px) {
  .page { max-width: 1900px !important; }
  .panel { max-width: 1640px !important; }
}
/* Badge « Payé » / bleu lisibles en sombre (le texte foncé codé en dur disparaissait) */
:root[data-theme="dark"] .badge.green { color: #8FF0C2; background: rgba(63,206,134,.18); border-color: rgba(63,206,134,.45); }
:root[data-theme="dark"] .badge.blue { color: #BFD4FF; background: rgba(47,111,224,.2); border-color: rgba(47,111,224,.5); }
:root[data-theme="dark"] .badge.gray { color: #C9D2E3; background: rgba(255,255,255,.08); }
/* b38 — cartes de match sur téléphone : la date ne chevauche plus le club */
@media (max-width: 767px) {
  .mrow-card .card-head.mrow { grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; }
  .mrow-date { overflow: hidden; }
  .mrow-date strong { font-size: 12px; letter-spacing: -.02em; }
  .mrow-date span { font-size: 11px; }
  .mrow-main .card-title { font-size: 15.5px; }
  .mrow-main .card-sub { font-size: 13px; }
}

/* =====================================================================
   b49 (19/10/2026) — interface : téléphone d'abord, Règlement PC, session,
   menu « Plus », titres sur deux lignes, boutons pleine largeur.
   Ce bloc est en fin de fichier : il prime sur tout ce qui précède.
   ===================================================================== */

/* --- Session (barre latérale PC) : discret, une ligne, e-mail tronqué --- */
.tabs-foot { justify-content: flex-start; text-align: left; flex-wrap: nowrap; gap: 8px; padding: 10px 12px; margin: 8px 6px 4px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.tabs-foot span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; min-width: 0; font-size: 12px; color: var(--muted); font-weight: 600; }

/* --- Règlement PC : vrai écran de chat (fil qui défile, composeur ancré en bas) --- */
@media (min-width: 768px) {
  #reglement.active { height: calc(100dvh - var(--header-h, 64px) - 24px); min-height: 0; overflow: hidden; }
  .regl-wrap { height: 100%; max-width: 900px; }
  #reglement .regl-chat { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 8px 16px; scrollbar-width: thin; }
  #reglement .regl-form { position: static; margin: 10px 0 0; }
  .regl-empty { margin: auto 0; padding: 20px 12px; }
  .regl-ex { max-width: 760px; margin: 0 auto; }
  .regl-ex-btn { font-size: 13.5px; padding: 10px 15px; }
}

/* --- Titres de carte : deux lignes plutôt que « GEISPOLSHEIM C.… » --- */
.card-title, .mrow-main .card-title { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: clip; }

/* --- Téléphone --- */
@media (max-width: 767px) {
  /* Loupe : dans l'en-tête (plus de bouton flottant qui masque le contenu) */
  .rt-fab { display: none !important; }
  #searchToggleBtn { display: inline-flex !important; }
  #searchToggleBtn .loupe-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold, #F5B400); box-shadow: 0 0 0 2px var(--surface); }
  #searchToggleBtn .loupe-dot[hidden] { display: none; }
  #searchToggleBtn.is-filtered { color: var(--gold, #F5B400); border-color: var(--gold, #F5B400); }

  /* Lisibilité : étiquettes moins minuscules, cartes un peu plus aérées */
  .card-title { font-size: 18px; line-height: 1.15; }
  .acc-s-sub, .kpi small, .kpi .kpi-sub { font-size: 11.5px; }
  .detail-grid { gap: 8px; }

  /* Boutons d'action du détail (Waze, SMS, Contact fait, FBI, Annulé…) : grille 2 colonnes, pleine largeur */
  .match-card .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .match-card .actions > * { width: 100%; margin: 0; justify-content: center; text-align: center; min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }
  .match-card .actions > :last-child:nth-child(odd) { grid-column: span 2; }   /* dernier bouton seul : pleine largeur */

  /* Menu « Plus » : feuille collée à la barre, voile derrière, rien ne passe par-dessus */
  .tab-more-panel { left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); border-radius: 20px 20px 0 0; padding: 14px 12px 16px; gap: 10px; box-shadow: 0 -14px 40px rgba(10,31,68,.35); max-height: 70vh; }
  .tab-more-panel::before { content: ""; position: fixed; inset: 0; background: rgba(5, 15, 35, .45); z-index: -1; }
  .tab-more-item { min-height: 78px; border-radius: 14px; }

  /* Règlement : composeur sur deux lignes lisibles, placeholder non coupé */
  #reglement .regl-form textarea { min-height: 48px; line-height: 1.35; }
  #reglement .regl-form textarea::placeholder { font-size: 14px; }
}

/* --- b50 : rapprochement v2 — explications sous chaque virement --- */
.rb-expl { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.rb-expl span { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.rb-synth { margin: 10px 0 12px; }
.rb-synth .rb-synth-warn { color: var(--red, #E4002B); border-color: var(--red, #E4002B); }

/* --- Menus déroulants : texte aligné à gauche partout (jamais centré) --- */
select, .rt-search-sec select, .chart-filter select, .payment-row select { text-align: left; text-align-last: left; }


/* ================= b52 — Accueil : carte « prochain match » v2 ================= */
.acc-hero--v2 { padding: 0; border-top: 0; }
.acc-hero--v2::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--niveau, var(--gold)); z-index: 2; }
.acc-hero--v2 > * { position: relative; z-index: 1; }
.acc-hero--v2 .acc-hero-top { padding: 18px 18px 0; }
.acc-hero-when { font-size: 13px; opacity: .92; text-transform: capitalize; white-space: nowrap; }
.acc-hero-when strong { font-weight: 800; }
.acc-hero-teams { padding: 14px 18px 0; }
.acc-hero-team { font-family: var(--display); font-size: 21px; font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.acc-hero-team--vis { opacity: .92; }
.acc-hero-vs { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
.acc-hero-vs::before, .acc-hero-vs::after { content: ""; height: 1px; background: rgba(255,255,255,.35); flex: 0 0 28px; }
.acc-hero-vs::after { display: none; }
.acc-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.acc-chip { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); color: #fff; line-height: 1.2; }
.acc-chip--niv { background: var(--niveau, var(--gold)); border-color: transparent; color: #0B1F3B; }
.acc-hero--v2.niv-pn .acc-chip--niv, .acc-hero--v2.niv-region .acc-chip--niv, .acc-hero--v2.niv-departement .acc-chip--niv, .acc-hero--v2.niv-3x3 .acc-chip--niv { color: #fff; }
.acc-chip--rdv { background: rgba(245,180,0,.18); border-color: rgba(245,180,0,.45); color: #FFD966; }
.acc-chip--delai { background: rgba(255,255,255,.06); }
.acc-hero--v2 .acc-hero-lieu { display: flex; align-items: center; gap: 6px; padding: 10px 18px 0; margin: 0; font-size: 13px; opacity: .85; }
.acc-hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 12px 18px 16px; background: rgba(0,0,0,.18); border-top: 1px solid rgba(255,255,255,.08); }
.acc-hero--v2 .acc-hero-actions { margin: 0; gap: 8px; flex-wrap: nowrap; }
.acc-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.acc-btn:hover { background: rgba(255,255,255,.18); }
.acc-btn--gold { background: var(--gold); border-color: var(--gold); color: #17244a; }
.acc-btn--gold:hover { background: #ffc524; }
.acc-hero--v2 .acc-hero-indem { position: static; margin-left: auto; font-size: 18px; padding: 7px 12px; background: rgba(255,255,255,.14); }
@media (max-width: 767px) {
  .acc-hero--v2 { padding: 0; }
  .acc-hero-team { font-size: 19px; }
  .acc-hero--v2 .acc-hero-actions { flex-wrap: wrap; }
  .acc-btn { height: 42px; padding: 0 12px; font-size: 13px; }
  .acc-hero-foot { flex-wrap: wrap; }
  .acc-hero--v2 .acc-hero-indem { font-size: 17px; }
}

/* b52 — bandeau notifications obligatoires */
.rt-push-bandeau { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--gold-soft); border: 1px solid rgba(245,180,0,.45); color: var(--text); font-size: 13.5px; font-weight: 600; }
.rt-push-bandeau .rt-btn { margin-left: auto; white-space: nowrap; }


/* ================= b53 — Téléphone ================= */
.tel-chips { display: flex; gap: 6px; margin: -4px 0 12px; }
.tel-chips .rt-chip { padding: 7px 13px; }
.tel-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tel-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 8px; text-align: center; }
.tel-kpi strong { display: block; font-family: var(--mono); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.tel-kpi span { display: block; margin-top: 3px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tel-kpi--ok strong { color: var(--green); } .tel-kpi--att strong { color: var(--gold); } .tel-kpi--ko strong { color: var(--red); }
.tel-kpi--ko { border-color: rgba(228,0,43,.4); }
.pay-bloc.is-retard .past-title { color: var(--red); }
.tel-note { margin-top: 14px; text-align: center; }
.cf-lignes { display: grid; gap: 6px; }
.cf-ligne { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cf-ligne summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; list-style: none; cursor: pointer; }
.cf-ligne summary::-webkit-details-marker { display: none; }
.cf-l-date { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--navy-700); white-space: nowrap; }
.cf-l-pay { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-l-mt { font-family: var(--mono); font-size: 14px; }
.cf-l-det { padding: 0 12px 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.payment-surplace { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 10px; border-radius: 10px; background: var(--green-soft); }
.payment-surplace span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.acc-hero-depart { margin: 10px 18px 0; padding: 9px 12px; border-radius: 10px; background: rgba(245,180,0,.16); border: 1px solid rgba(245,180,0,.4); font-size: 13.5px; font-weight: 700; }
.acc-hero-depart strong { color: #FFD966; }
.rt-offline { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--red-soft, #FDE8EC); color: var(--red); border: 1px solid rgba(228,0,43,.35); font-size: 13px; font-weight: 700; }
.rt-pull { position: fixed; top: calc(var(--safe-t, 0px) + 8px); left: 50%; transform: translate(-50%, 0); z-index: 120; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: 0 6px 18px rgba(10,31,68,.25); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; }
.rt-pull span { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy-600); }
.rt-pull.is-ready span { border-top-color: var(--gold); }
.rt-pull.is-busy span { animation: rtspin .8s linear infinite; }
@keyframes rtspin { to { transform: rotate(360deg); } }
.rt-sheet { position: fixed; inset: 0; z-index: 9400; }
.rt-sheet-back { position: absolute; inset: 0; background: rgba(5,15,35,.55); }
.rt-sheet-card { position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b, 0px)); background: var(--surface); border-radius: 18px; padding: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.35); display: grid; gap: 6px; animation: rtup .18s ease-out; }
@keyframes rtup { from { transform: translateY(24px); opacity: 0; } }
.rt-sheet-title { padding: 8px 10px 4px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rt-sheet-btn { height: 48px; border: 0; border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 15.5px; font-weight: 700; }
.rt-sheet-cancel { background: var(--navy-800); color: #fff; margin-top: 4px; }
@media (max-width: 767px) {
  nav.tabs { grid-template-columns: repeat(4, 1fr); }
  nav.tabs .tab-tel-hide, .tabs-mini .tab-tel-hide { display: none !important; }
  .rb-pc-only { display: none !important; }
  .match-card { -webkit-touch-callout: none; }
}

/* ================= b54 — Page Analyse (PC/tablette), relance club, export annuel ================= */
@media (min-width: 768px) { nav.tabs .tab-pc-hide { display: none !important; } }
.analyse-section { display: block; }
.analyse-section > h2.section-title.sub-title { font-size: clamp(22px, 2.4vw, 28px); margin-top: 4px; }
.pay-vers-analyse { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.payment-relance { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft, rgba(245,180,0,.14)); border: 1px solid rgba(245,180,0,.45); }
.relance-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.relance-head span { color: var(--muted); font-weight: 600; font-size: 12px; }
.relance-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(0,0,0,.06); }
.relance-info { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.relance-info span { color: var(--muted); font-weight: 600; font-size: 12px; }
.relance-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.relance-btns .small-btn { text-decoration: none; }
.export-modes { margin: -4px 0 12px; }
.rt-btn.is-on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }


/* ================= b55 — Téléphone : fiche match lisible, barre d'état, classement ================= */
/* Bande opaque sous l'heure / la batterie (PWA « black-translucent ») : rien ne défile dessous. */
@media (max-width: 767px) {
  body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: env(safe-area-inset-top, 0px); background: var(--navy-900); z-index: 96; pointer-events: none; }
  .app-header { z-index: 90; }

  /* Fiche : infos en liste (libellé à gauche, valeur à droite) au lieu de cases de formulaire */
  .match-card .card-body { padding-bottom: 14px; }
  .match-card .detail-section { margin-top: 16px; }
  .match-card .detail-section h4 { font-family: var(--body); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; margin: 0 0 6px 4px; }
  .match-card .detail-grid { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .match-card .detail { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--line); }
  .match-card .detail:first-child { border-top: 0; }
  .match-card .detail label { flex: 0 0 auto; margin: 0; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
  .match-card .detail span { min-width: 0; text-align: right; font-size: 14.5px; font-weight: 700; line-height: 1.3; }

  /* Actions en haut de la fiche : 1 ligne de gros boutons égaux */
  .match-card .card-body > .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 12px 0 4px; }
  .match-card .card-body > .actions .action-link { justify-content: center; text-align: center; min-height: 46px; padding: 0 10px; font-size: 14px; font-weight: 800; border-radius: 12px; }
  .match-card .card-body > .actions .alerte-danger { grid-column: 1 / -1; min-height: 40px; font-size: 13px; }
  .money-strip { margin-top: 2px; }
}

/* Classement des 2 équipes (fiche match) */
.clt-card { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.clt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.clt-head strong { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.clt-head span { font-size: 12px; color: var(--muted); font-weight: 600; text-align: right; }
.clt-eq { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.clt-eq:first-of-type { border-top: 0; }
.clt-pos { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--navy-700); text-align: center; line-height: 1; }
.clt-pos sup { font-size: 11px; margin-left: 1px; }
.clt-nom { min-width: 0; font-weight: 800; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.clt-nom small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.clt-forme { display: flex; gap: 3px; }
.clt-f { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; }
.clt-f--V { background: var(--green); } .clt-f--D { background: var(--red); }
.clt-enjeu { margin-top: 6px; padding: 7px 10px; border-radius: 10px; background: var(--gold-soft, rgba(245,180,0,.15)); font-size: 13px; font-weight: 800; }
.clt-face { margin-top: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.clt-poule { margin-top: 8px; }
.clt-poule summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--navy-700); padding: 6px 0; }
.clt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.clt-table th, .clt-table td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: left; }
.clt-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 0; }
.clt-table .num { text-align: right; font-family: var(--mono); }
.clt-table tr.is-match td { background: var(--gold-soft, rgba(245,180,0,.15)); font-weight: 800; }
.acc-pos { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.16); font-family: var(--mono); font-size: 13px; font-weight: 800; vertical-align: middle; }
.acc-pos sup { font-size: 9px; }
:root[data-theme="dark"] .clt-pos { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .clt-pos { color: var(--gold); } }
@media (max-width: 767px) {
  .match-card .detail span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  /* Paiement club : montant + mode sur une ligne, date dessous ; raccourcis sur une ligne */
  .payment-panel .payment-fields { grid-template-columns: 1fr 1.3fr !important; gap: 8px; }
  .payment-panel .payment-fields label:last-child { grid-column: 1 / -1; }
  .payment-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .payment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .payment-actions button[type="submit"] { grid-column: 1 / -1; min-height: 48px; }
}
.pay-fold { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pay-fold > summary { display: flex; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; list-style: none; font-weight: 800; font-size: 14px; }
.pay-fold > summary::-webkit-details-marker { display: none; }
.pay-fold > summary span:last-child { color: var(--muted); font-weight: 700; font-size: 13px; }
.pay-fold[open] > summary { border-bottom: 1px solid var(--line); }
.pay-fold .payment-panel { margin: 0; border: 0; box-shadow: none; }
@media (max-width: 767px) { .payment-shortcuts .small-btn { min-height: 38px; padding: 0 12px; } }
/* b55.1 — iPhone : pas de zoom automatique quand on touche un champ (police < 16 px = zoom Safari, qui décale les barres fixes) */
@media (max-width: 767px) {
  input, select, textarea { font-size: 16px !important; }
  nav.tabs { will-change: transform; }
}

/* b58 — consentement CGU / confidentialité */
.rt-consent { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rt-consent-box { background: var(--card, #fff); color: var(--text, #111); max-width: 520px; width: 100%; border-radius: 16px; padding: 22px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); max-height: 90vh; overflow: auto; }
.rt-consent-box h2 { margin: 0 0 8px; font-size: 1.25rem; }
.rt-consent-box a { color: var(--accent, #c62828); }
.rt-consent-chk { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; font-weight: 600; }
.rt-consent-chk input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.rt-consent-msg { color: #c62828; min-height: 1.2em; margin: 4px 0; }
.rt-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* b59 — assistant de 1re connexion */
.rt-onb h2 { margin: 6px 0 6px; }
.rt-onb-prog { display: flex; gap: 6px; margin-bottom: 10px; }
.rt-onb-prog span { flex: 1; height: 4px; border-radius: 2px; background: rgba(127,127,127,.25); }
.rt-onb-prog span.on { background: var(--accent, #c62828); }
.rt-onb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.rt-chip { border: 1px solid var(--accent, #c62828); background: transparent; color: inherit; border-radius: 999px; padding: 8px 12px; font: inherit; min-height: 44px; }
.rt-onb-adr { font-size: 1.1rem; font-weight: 700; word-break: break-all; padding: 10px; border-radius: 10px; background: rgba(127,127,127,.12); }
.rt-onb select { width: 100%; min-height: 44px; font-size: 16px; }
.rt-onb details { margin: 6px 0; }
.rt-btn-ghost { background: transparent; border: 1px solid rgba(127,127,127,.4); color: inherit; border-radius: 10px; padding: 10px 16px; font: inherit; min-height: 44px; }
