@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;800&family=Barlow:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --bg: #0E1420; --surface: #17202F; --line: #26324A;
  --paper: #F7F3E6; --paper-ink: #22201A; --paper-muted: #7A7466;
  --green: #2FBF71; --red: #E4574C; --amber: #E8A33D; --gold: #D9B44A;
  --text: #E8ECF3; --muted: #8B94A7;
  --board-top: #121A2A;
  --shadow: rgba(0,0,0,0.35);
  --logo-bg: rgba(255,255,255,0.06);
  --scrim: rgba(8,12,20,0.75);
}
* { box-sizing: border-box; margin: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: 'Barlow', sans-serif; padding-bottom: 130px; }
a { color: var(--gold); }

/* — Tableau de bord — */
.board { padding: calc(16px + env(safe-area-inset-top)) 16px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--board-top) 0%, var(--bg) 100%); }
.brandrow { display: flex; justify-content: space-between; align-items: center; }
.brand { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 26px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); text-decoration: none; }
.brand span { color: var(--gold); }
.who { font-size: 13px; color: var(--muted); }
.bank { text-align: center; margin-top: 12px; }
.bank-v { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 30px; letter-spacing: -0.01em; }
.bank-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px; text-align: center; }
.kpi .v { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 15px; }
.kpi .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 3px; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* — Journal — */
.day { padding: 14px 16px 0; }
.dayhead { display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; gap: 12px; }
.dayhead .dayname { flex: none; white-space: nowrap; }
.dayname { font-family: 'Barlow Condensed'; font-weight: 600; font-size: 17px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dayprofit { font-family: 'IBM Plex Mono'; font-size: 13px; font-weight: 600; }

/* — Ticket — */
.ticket { background: var(--paper); color: var(--paper-ink); border-radius: 10px;
  margin-bottom: 12px; overflow: hidden; box-shadow: 0 2px 8px var(--shadow); position: relative; }
.ticket .top { padding: 12px 14px 10px; }
.ticket .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--paper-muted); padding-right: 56px; }
.ticket .event { font-weight: 600; font-size: 16px; margin-top: 5px; line-height: 1.25; }
.ticket .bettype { font-size: 13px; color: var(--paper-muted); margin-top: 2px; }
.perf { border-top: 2px dashed #CFC8B4; position: relative; }
.perf::before, .perf::after { content: ''; position: absolute; top: -8px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg); }
.perf::before { left: -8px; } .perf::after { right: -8px; }
.ticket .bottom { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.nums { display: flex; gap: 18px; font-family: 'IBM Plex Mono'; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.nums .lbl { display: block; font-family: 'Barlow'; font-weight: 500; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--paper-muted); }
/* Deux valeurs seulement : on les répartit sur la largeur plutôt que de les
   laisser tassées à gauche. */
.nums-2 { gap: 0; justify-content: space-between; }
.nums-2 > div { flex: 1 1 0; min-width: 0; }
.nums-2 > div + div { text-align: right; }
.badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: 99px; color: #fff; white-space: nowrap; }
.actions { display: flex; gap: 6px; padding: 0 14px 12px; }
.actions form { flex: 1; display: flex; }
.abtn { flex: 1; padding: 8px 0; border-radius: 7px; border: none; cursor: pointer;
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 14px; text-transform: uppercase;
  letter-spacing: 0.05em; color: #fff; }
.icons { position: absolute; top: 8px; right: 10px; display: flex; gap: 2px; }
.icons button { background: none; border: none; color: #A89F87; font-size: 15px; cursor: pointer;
  line-height: 1; padding: 4px 5px; }
.icons button:hover { color: var(--paper-ink); }

/* — Boutons & navigation — */
.fab { position: fixed; bottom: calc(72px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1A1508; border: none; border-radius: 99px;
  padding: 13px 26px; font-family: 'Barlow Condensed'; font-weight: 800; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
  box-shadow: 0 4px 16px rgba(217,180,74,0.4); z-index: 5; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--surface);
  border-top: 1px solid var(--line); z-index: 6; }
.nav a { flex: 1; text-align: center; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  color: var(--muted); text-decoration: none; font-family: 'Barlow Condensed';
  text-transform: uppercase; font-weight: 600; font-size: 15px; letter-spacing: 0.06em; }
.nav a.on { color: var(--gold); }

/* — Modal / formulaires — */
.overlay { position: fixed; inset: 0; background: var(--scrim); display: none;
  align-items: flex-end; justify-content: center; z-index: 10; }
.overlay.open { display: flex; }
.sheet { background: var(--surface); border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  width: 100%; max-width: 520px; border-top: 1px solid var(--line); max-height: 88vh; overflow-y: auto; }
.sheet h2 { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 22px;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 11px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font-family: 'Barlow'; font-size: 16px; }
.field input:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.submit { width: 100%; margin-top: 6px; padding: 13px; border-radius: 9px; border: none;
  background: var(--gold); color: #1A1508; font-family: 'Barlow Condensed'; font-weight: 800;
  font-size: 18px; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; }
.cancel { width: 100%; margin-top: 8px; padding: 10px; border-radius: 9px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-family: 'Barlow'; font-size: 14px; cursor: pointer; }

/* — Cartes & listes — */
.empty { text-align: center; color: var(--muted); padding: 60px 24px; }
.empty .big { font-family: 'Barlow Condensed'; font-weight: 600; font-size: 20px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); margin-bottom: 6px; }
/* Les cartes du site utilisent .papercard (fond beige, découpe ticket),
   défini plus bas. .statcard a été retiré : plus aucun appelant. */
.srow { display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 10px; }
.srow:last-child { border-bottom: none; }
.srow .mono { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 13px; white-space: nowrap; }
.srow .sub { display: block; font-size: 12px; color: var(--muted); }
.chartbox { position: relative; width: 100%; height: 210px; }
.flash { margin: 12px 16px 0; padding: 11px 14px; border-radius: 9px; font-size: 14px; }
.flash.ok { background: rgba(47,191,113,0.12); border: 1px solid rgba(47,191,113,0.4); color: #7FE0AE; }
.flash.err { background: rgba(228,87,76,0.12); border: 1px solid rgba(228,87,76,0.4); color: #F0968E; }

/* — Caisse — */
.cashgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 16px 4px; }
.cashbtn { padding: 14px; border-radius: 10px; border: none; cursor: pointer;
  font-family: 'Barlow Condensed'; font-weight: 800; font-size: 17px; text-transform: uppercase;
  letter-spacing: 0.05em; color: #fff; }

/* — Auth — */
.authwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.authcard { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 22px; }
.authcard .brand { display: block; text-align: center; font-size: 30px; margin-bottom: 4px; }
.authcard .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.authcard .alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ============================================================
   Ajouts JadalStats — étendent le design existant sans le modifier
   (mêmes variables, mêmes polices, même esprit visuel)
   ============================================================ */

/* — Barre de recherche dans le board — */
.searchform { display: flex; gap: 8px; margin-top: 14px; }
.searchbox { flex: 1; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: 'Barlow'; font-size: 15px; }
.searchbox::placeholder { color: var(--muted); }
.searchbox:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.searchbtn { padding: 0 16px; border-radius: 8px; border: none; background: var(--gold);
  color: #1A1508; font-family: 'Barlow Condensed'; font-weight: 800; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }

/* — Onglets de jour — */
.daytabs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 16px 0; scrollbar-width: none; }
.daytabs::-webkit-scrollbar { display: none; }
.daytab { flex: 0 0 auto; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); text-decoration: none;
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.daytab.on { background: var(--gold); border-color: var(--gold); color: #1A1508; }

/* — Barre de filtres — */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px 0; }
.filterbar select { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: 'Barlow'; font-size: 13px;
  max-width: 47%; }
.clearfilter { font-size: 12px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-family: 'Barlow'; }

.resultcount { padding: 10px 16px 0; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; }

/* — En-tête de championnat dans la liste — */
.leaguehead { display: flex; align-items: baseline; gap: 7px; padding: 12px 16px 6px; }
.leaguehead .flag { font-size: 15px; }
.leaguehead .leaguename { font-family: 'Barlow Condensed'; font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text); }
.leaguehead .leaguecountry { font-size: 11px; color: var(--muted); }

/* — Carte de match (réutilise .ticket) — */
a.matchcard { display: block; text-decoration: none; margin: 0 16px 10px; }
.matchcard .vs { color: var(--paper-muted); font-weight: 500; padding: 0 3px; }
.matchcard .nums { justify-content: space-between; width: 100%; gap: 10px; }

/* — Pagination — */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px;
  padding: 18px 16px 8px; }
.pagination a { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--gold); text-decoration: none;
  font-family: 'Barlow Condensed'; font-weight: 600; text-transform: uppercase; font-size: 13px; }
.pageinfo { font-size: 13px; color: var(--muted); font-family: 'IBM Plex Mono'; }

/* — En-tête de page match — */
.matchhead { padding: 16px 16px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--board-top) 0%, var(--bg) 100%); }
.backlink { display: inline-block; color: var(--muted); text-decoration: none; font-size: 13px;
  margin-bottom: 10px; font-family: 'Barlow'; }
.mh-league { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.mh-league .flag { font-size: 16px; }
.mh-country { color: var(--muted); }
.mh-teams { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 24px;
  margin-top: 4px; line-height: 1.2; }
.mh-teams .vs { color: var(--muted); padding: 0 6px; font-weight: 500; }
.mh-when { font-size: 13px; color: var(--muted); margin-top: 4px; font-family: 'IBM Plex Mono'; }
.mh-badge { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 99px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; }

/* — Barre de forme — */
.formerow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.formelabel { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.formelabel .sub { display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); font-weight: 500; margin-top: 1px; }
.formebar { height: 7px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.formefill { height: 100%; border-radius: 99px; }
.formeval { font-size: 12px; margin-top: 5px; }

.disclaimer { margin: 4px 16px 20px; font-size: 12px; color: var(--muted); line-height: 1.5;
  text-align: center; padding: 0 8px; }

/* — Historique / archive (encadré vert) — */
.archivenotice { margin: 14px 16px 0; padding: 12px 14px; border-radius: 9px;
  background: rgba(47,191,113,0.10); border: 1px solid rgba(47,191,113,0.35);
  color: #9FE6BF; font-size: 12.5px; line-height: 1.5; }

/* .matchcard-past : contour vert retiré — les cartes passées gardent le style standard */

/* .matchhead-past : bordure verte retirée — l'en-tête garde le style standard */
.mh-archivenote { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* .stats-past .statcard : cadre vert retiré — les sections gardent le style standard */

/* — Score réel affiché sur les cartes historique — */
.scorebadge { display: inline-block; margin: 0 6px; padding: 2px 8px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--green); color: var(--green);
  font-size: 13px; font-weight: 700; }
/* Sur la fiche match, le score s'aligne sur la typographie de l'en-tête (noms d'équipes) */
.mh-teams .scorebadge { font-family: 'Barlow Condensed'; font-weight: 800;
  font-size: 22px; padding: 1px 10px; vertical-align: 1px; }

/* — Indicateurs de fiabilité (page dédiée) — */
.reliability-hero { padding: 18px 16px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.reliability-score { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 44px; color: var(--green); line-height: 1; }
.reliability-sub { font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.reliability-threshold { display: inline-block; margin-top: 9px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold); font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.04em; }
.archivenotice .mn, .dayhead .mn { font-size: 11px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }
.dayhead .mn { text-transform: none; letter-spacing: 0; }
.marketrow { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.marketrow .mlabel { flex: 1; font-size: 13px; }
.marketrow .mn { font-size: 11px; color: var(--muted); font-family: 'IBM Plex Mono'; }
.marketbar { width: 70px; height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; flex: 0 0 auto; }
.marketbar > div { height: 100%; border-radius: 99px; }
.marketpct { width: 46px; text-align: right; font-family: 'IBM Plex Mono'; font-size: 13px; font-weight: 600; }
/* Numéro de rang dans les classements de fiabilité */
.mrank { display: inline-block; min-width: 16px; margin-right: 6px; font-family: 'IBM Plex Mono';
  font-size: 11px; font-weight: 700; color: var(--gold); }

/* — Comparatif prédiction/réel sur la fiche match — */
.cmprow { display: flex; align-items: center; gap: 8px; }
.cmpicon { width: 18px; text-align: center; font-size: 13px; flex: 0 0 auto; }

/* — Logos d'équipes (badges API) — */
.teamlogo { vertical-align: -4px; margin-right: 5px; border-radius: 3px;
  object-fit: contain; background: var(--logo-bg); }
.ticket .event .teamlogo { vertical-align: -3px; }
.mh-teams .teamlogo { vertical-align: -2px; margin-right: 7px; }

/* — Confrontations directes (H2H) — */
.h2hbilan { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 0 2px; }
.h2hbilan .h2hteam { flex: 1; min-width: 0; font-family: 'Barlow Condensed'; font-weight: 700;
  font-size: 15px; text-align: right; line-height: 1.15; }
.h2hbilan .h2hteam-a { text-align: left; }
.h2hbilan .h2htally { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 18px;
  color: var(--gold); white-space: nowrap; }
.h2hlegend { text-align: center; font-size: 11px; margin: 2px 0 4px; }
.h2hlist { margin-top: 6px; }
.h2hline { font-family: 'Barlow'; font-size: 12px; color: var(--muted);
  padding: 5px 0; border-bottom: 1px solid var(--line); }
.h2hline:last-child { border-bottom: none; }

/* — Bilan de journée dans l'historique — */
.daysum { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap;
  overflow-x: auto; scrollbar-width: none; }
.daysum::-webkit-scrollbar { display: none; }
.daysum > span { flex: none; }
.daysum strong { color: inherit; font-weight: 700; }
.daysum .daysum-pct { margin-left: auto; font-weight: 700; font-size: 12px;
  font-variant-numeric: tabular-nums; }



/* — Carte papier (fond beige), même matière que les tickets de la liste — */
/* Les variables sont redéfinies DANS la carte : tout ce qu'elle contient — y
   compris le SVG du graphique — s'adapte au fond clair sans code spécifique.
   Les accents reprennent les teintes sombres du thème clair, les couleurs vives
   du thème sombre étant illisibles sur beige. */
.papercard {
  background: var(--paper); color: var(--paper-ink);
  border-radius: 10px; padding: 14px; margin: 0 16px 12px;
  box-shadow: 0 2px 8px var(--shadow);
  position: relative; overflow: visible;
  --text: var(--paper-ink);
  --muted: var(--paper-muted);
  --line: #CFC8B4;
  --surface: var(--paper);
  --gold: #7F620D; --green: #16743F; --red: #C33A2E; --amber: #8E6110;
}
/* Le titre porte la découpe du ticket : ligne perforée + encoches latérales.
   Les pseudo-éléments sont en position absolue, donc hors du flux flex du titre
   (un flex item viendrait sinon s'insérer entre le libellé et le compteur).
   Décalage de -22px = 14px de padding de carte + 8px de demi-encoche. */
.papercard h3 { font-family: 'Barlow Condensed'; font-weight: 600; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--paper-muted);
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  position: relative; padding-bottom: 11px; margin-bottom: 12px;
  border-bottom: 2px dashed #CFC8B4; }
.papercard h3::before, .papercard h3::after { content: ''; position: absolute;
  bottom: -9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); }
.papercard h3::before { left: -22px; }
.papercard h3::after  { right: -22px; }
.papercard h3 .mn { font-family: 'IBM Plex Mono'; font-size: 11px; letter-spacing: 0;
  text-transform: none; font-weight: 500; flex: none; }
.papercard .srow { border-bottom: 1px solid #E3DCC7; }
.papercard .srow:last-child { border-bottom: none; }
.papercard .marketrow:last-child { border-bottom: none; }
.papercard .archivenotice { background: transparent; border: none; padding: 8px 0 0;
  color: var(--paper-muted); }

/* — Coupon — */
/* Accès au coupon : une icône discrète sous la barre de recherche. */
.couponline { display: flex; justify-content: flex-end; margin-top: 8px; }
.couponicon { display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px; line-height: 1;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.couponicon:hover { border-color: var(--gold); }
.couponactions { display: flex; gap: 8px; margin: 0 16px 12px; overflow-x: auto;
  scrollbar-width: none; }
.couponactions::-webkit-scrollbar { display: none; }
.couponactions .daytab { flex: none; }



/* ============================================================
   Ajouts Makanga App — même matière que JadalStats
   (tableau sombre, tickets papier, feuilles modales)
   ============================================================ */

/* — Barre supérieure : actions — */
.topicons { display: flex; gap: 6px; align-items: center; }
.topicons form { display: inline-flex; }
.iconbtn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-size: 15px; line-height: 1; color: var(--text); cursor: pointer; padding: 0; }
.iconbtn:hover, .iconbtn:focus-visible { border-color: var(--gold); outline: none; }
.who { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* — Navigation basse à six rubriques — */
.nav a { font-size: 11px; letter-spacing: 0.03em; padding: 8px 0 calc(9px + env(safe-area-inset-bottom)); }
.nav a .ic { display: block; font-size: 19px; line-height: 1.25; }
.nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }

/* — Chiffres clés — */
.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpis a.kpi { text-decoration: none; color: inherit; }
.kpi .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bank-v.pos { color: var(--green); } .bank-v.neg { color: var(--red); }
.bank .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* — Barres de progression — */
.progress { height: 7px; border-radius: 99px; background: rgba(0,0,0,0.10); overflow: hidden; margin-top: 8px; }
.board .progress, .matchhead .progress { background: var(--surface); }
.progress > div { height: 100%; border-radius: 99px; background: var(--green); }
.progress.warn > div { background: var(--amber); }

/* — Tickets d'opération — */
a.ticketlink { display: block; text-decoration: none; color: inherit; }
.optk { margin: 0 16px 8px; }
.optk .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; }
.optk .event { margin-top: 3px; font-size: 15px; overflow-wrap: anywhere; }
.optk .meta { padding-right: 0; justify-content: flex-start; flex-wrap: wrap; }
.amount { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 15px; white-space: nowrap; }
.amount.in { color: #16743F; } .amount.out { color: #C33A2E; }
.amount .conv { display: block; font-size: 10px; color: var(--paper-muted); text-align: right; font-weight: 500; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.note { font-size: 12px; color: var(--paper-muted); margin-top: 3px; }

/* — Boutons secondaires — */
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-family: 'Barlow Condensed'; font-weight: 600; font-size: 14px; text-transform: uppercase;
  letter-spacing: 0.04em; text-decoration: none; cursor: pointer; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1A1508; }
.btn:focus-visible, .submit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.papercard .btn { background: transparent; border-color: #CFC8B4; color: var(--gold); padding: 6px 12px; font-size: 13px; }
.papercard .btn.gold { background: #7F620D; border-color: #7F620D; color: var(--paper); }
.linkbtn { background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-size: 12px;
  color: var(--muted); text-decoration: underline; }
.linkbtn.danger { color: var(--red); }
.inline { display: inline; }
.actions-r { display: flex; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 6px; }

/* — Formulaires : compléments — */
.field textarea { width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-family: 'Barlow'; font-size: 16px; min-height: 70px; resize: vertical; }
.field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field .aide { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkline { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 4px 0 12px; }
.checkline input { width: 18px; height: 18px; accent-color: var(--gold); }
.row3 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 10px; border-radius: 8px; border: 1px solid var(--line);
  cursor: pointer; font-family: 'Barlow Condensed'; font-weight: 600; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.seg input:checked + label.in { background: rgba(47,191,113,0.15); border-color: var(--green); color: var(--green); }
.seg input:checked + label.out { background: rgba(228,87,76,0.15); border-color: var(--red); color: var(--red); }
.seg input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 1px; }
.sheet .sub { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }

/* — Loyer : grille des douze mois — */
.moisgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mcell { border-radius: 8px; padding: 7px 4px; text-align: center; border: 1px solid #CFC8B4;
  background: transparent; font: inherit; color: var(--paper-muted); cursor: default; }
button.mcell { cursor: pointer; }
.mcell .m { display: block; font-family: 'Barlow Condensed'; font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.03em; }
.mcell .s { display: block; font-size: 10px; margin-top: 1px; }
.mcell.paye { background: rgba(22,116,63,0.12); border-color: #16743F; color: #16743F; }
.mcell.partiel { background: rgba(142,97,16,0.12); border-color: #8E6110; color: #8E6110; }
.mcell.impaye { background: rgba(195,58,46,0.10); border-color: #C33A2E; color: #C33A2E; }
.mcell.attente { border-style: dashed; border-color: #8E6110; color: #8E6110; }
.mcell.hors { opacity: 0.35; }
.legende { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--paper-muted); margin-top: 10px; }
.legende i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }

/* — Graphique six mois — */
.evo { width: 100%; height: auto; display: block; }
.evo text { font-family: 'Barlow'; font-size: 11px; fill: var(--paper-muted); }

/* — Points d'attention — */
.alertes { margin: 14px 16px 0; display: grid; gap: 6px; }
.alerte { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px;
  background: rgba(228,87,76,0.10); border: 1px solid rgba(228,87,76,0.35); color: #F0968E;
  text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.alerte .ic { flex: none; font-size: 16px; }

/* — Sections — */
.sectiontitle { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 18px 16px 8px; }
.sectiontitle h2 { font-family: 'Barlow Condensed'; font-weight: 700; font-size: 17px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.sectiontitle a { font-size: 13px; text-decoration: none; }
.papercard .srow a { color: inherit; text-decoration: none; }
.papercard h3 a { color: inherit; text-decoration: none; }
.tag-retard { color: #C33A2E; font-weight: 600; }
.muted { color: var(--muted); }
.big-empty { padding: 32px 24px; }
.yearnav { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 14px 16px 0; }
.yearnav .pageinfo { font-size: 15px; color: var(--text); }
.yearnav a { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--gold); text-decoration: none; font-family: 'Barlow Condensed'; font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .overlay.open .sheet { animation: monte 0.18s ease-out; }
  @keyframes monte { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
}
@media (min-width: 720px) {
  body { max-width: 720px; margin: 0 auto; }
  .nav { max-width: 720px; margin: 0 auto; }
}
.field label input, .field label select, .field label textarea { text-transform: none; letter-spacing: normal; margin-top: 5px; }
.papercard .field input, .papercard .field select, .papercard .field textarea {
  background: #FFFDF6; color: var(--paper-ink); border-color: #CFC8B4; }
.papercard .marketbar { background: #E3DCC7; }
.brandrow { gap: 10px; min-width: 0; }
.brand { white-space: nowrap; }
@media (max-width: 480px) { .who { display: none; } .brand { font-size: 23px; } }
