/* ═══════════════════════════════════════════════════════
   CPN ANALYTICS — Design System v2 · Seesaw-inspired
   Minimal, high-contrast, zero shadow, generous whitespace
   ═══════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --navy:   #0D2137;
  --blue:   #1565C0;
  --gold:   #F57F17;
  --bg:     #F7F7F5;        /* warm off-white, seesaw-like */
  --card:   #FFFFFF;
  --txt:    #111111;        /* quasi noir — max contraste */
  --muted:  #6B7280;
  --border: #E8E8E8;
  --r:      8px;
  --sh:     none;           /* ZÉRO shadow dans le contenu */
  --sh-md:  none;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ═══ NAVBAR ═══════════════════════════════════════════════ */
.bar {
  background: var(--navy);
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo #logo-svg-wrap {
  width: 240px;
  display: block;
  line-height: 0;
  overflow: hidden;
}
.logo svg { width: 100%; height: auto; display: block; }

/* Tabs desktop */
.tabs {
  display: flex;
  gap: 2px;
  margin-left: 10px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tb {
  padding: 6px 13px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  transition: background .15s, color .15s;
  white-space: nowrap;
  background: transparent;
  color: rgba(255,255,255,.5);
  letter-spacing: .1px;
  flex-shrink: 0;
}
.tb.on {
  background: var(--blue);
  color: #fff;
}
.tb:hover:not(.on) { background: rgba(255,255,255,.09); color: #fff; }

/* Lien externe vers le module Gestion — séparateur + accent gold */
.tb.tb-ext {
  margin-left: 10px;
  padding-left: 15px;
  border-left: 1px solid rgba(255,255,255,.2);
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.tb.tb-ext:hover { background: #FFA726; color: var(--navy); }

/* Bloc info droite navbar */
#nav-info-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  gap: 2px;
}
#nav-binfo {
  font-size: .67rem;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  line-height: 1.2;
}
.binfo { font-size: .67rem; color: rgba(255,255,255,.3); white-space: nowrap; flex-shrink: 0; }

/* Hamburger mobile */
.ham-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  font-size: 1.4rem;
  padding: 4px 8px;
  flex-shrink: 0;
}

/* Menu mobile */
.mob-menu {
  display: none;
  position: fixed;
  top: 54px;
  left: 0; right: 0;
  background: var(--navy);
  z-index: 299;
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.mob-menu.open { display: block; }
.mob-menu .tb {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: .9rem;
}
.mob-menu .tb.on { background: var(--blue); }

/* ── Statut calcul ─────────────────────────────────────── */
#calc-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.07);
  border-radius: 8px;
  padding: 4px 10px;
  margin-left: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  transition: all .3s;
}
#calc-status.ready { background: rgba(46,125,50,.2); color: #A5D6A7; }
#calc-status.error { background: rgba(198,40,40,.2); color: #EF9A9A; }
#calc-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  overflow: hidden;
  min-width: 50px;
}
#calc-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
  transition: width .4s ease;
}
#calc-bar.done { background: #66BB6A; }
#calc-bar.pulse { animation: bar-pulse 1.2s ease-in-out infinite; }
@keyframes bar-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
#calc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
#calc-ts { font-size: .6rem; color: rgba(255,255,255,.35); white-space: nowrap; display: none; }
#calc-status.ready #calc-ts { display: inline; }
#calc-status.ready #calc-bar-wrap { display: none; }

/* ── Info button + tooltip ─────────────────────────────── */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: .6rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  border: none;
  outline: none;
  margin-left: 7px;
  flex-shrink: 0;
  vertical-align: middle;
  transition: background .15s, transform .15s;
  position: relative;
}
.info-btn:hover { background: #0D47A1; transform: scale(1.1); }
.info-btn.active { background: var(--gold); }

.info-bubble {
  display: none;
  position: fixed;
  z-index: 9999;
  max-width: 500px;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 4px 8px 8px 8px;
  padding: 13px 15px 11px;
  font-size: .77rem;
  color: #37474F;
  line-height: 1.6;
  pointer-events: none;
}
.info-bubble.show { display: block; }
.info-bubble strong { color: #0D2137; font-weight: 800; }
.info-bubble .ib-row { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.info-bubble .ib-item { display: flex; align-items: flex-start; gap: 7px; }
.info-bubble .ib-icon { flex-shrink: 0; font-size: .84rem; margin-top: 1px; }
.info-bubble .ib-text { font-size: .73rem; color: #546E7A; line-height: 1.45; }

/* ═══ PAGES ════════════════════════════════════════════════ */
.pg { display: none; padding: 28px 24px; max-width: 1480px; margin: 0 auto; }
.pg.on { display: block; }

/* ── Section panel (dashboard customizer) ────────────────── */
.sections-panel {
  background: #fff;
  border-radius: var(--r);
  padding: 12px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.sections-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .2px;
}
.sections-panel-header .sp-arrow {
  margin-left: auto;
  font-size: .68rem;
  color: var(--muted);
  transition: transform .2s;
}
.sections-panel-header.open .sp-arrow { transform: rotate(180deg); }
.sections-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 7px;
  margin-top: 11px;
}
.sections-grid.open { display: grid; }
.sec-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  color: var(--txt);
  transition: background .12s, border-color .12s;
  user-select: none;
}
.sec-toggle:hover { background: #EFEFED; border-color: #D0D0D0; }
.sec-toggle input[type=checkbox] {
  width: 15px; height: 15px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}
.sec-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: #F0F0F0;
  color: var(--navy);
  margin-left: auto;
  white-space: nowrap;
}
.sec-badge.req { background: #F0FDF4; color: #15803D; }
/* ═══ CLUB SOUS-ONGLETS ════════════════════════════════════ */
.club-subnav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.club-subnav::-webkit-scrollbar { display: none; }
.club-stb {
  padding: 10px 20px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.club-stb.on {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.club-stb:hover:not(.on) { color: var(--txt); }

.club-section { transition: opacity .2s; }
.club-section.sec-hidden { display: none; }
.sec-drag-hint {
  font-size: .63rem;
  color: var(--muted);
  margin-top: 5px;
  text-align: center;
  opacity: .55;
}

/* ── Collapse ───────────────────────────────────────────── */
.sec-body {
  overflow: hidden;
  transition: max-height .28s cubic-bezier(.4,0,.2,1), opacity .22s;
  max-height: 3200px;
  opacity: 1;
}
.club-section.collapsed .sec-body {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.collapse-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .82rem;
  padding: 2px 5px;
  border-radius: 5px;
  transition: all .12s;
  flex-shrink: 0;
  line-height: 1;
}
.collapse-btn:hover { background: rgba(0,0,0,.06); }
.club-section.collapsed .collapse-btn { transform: rotate(-90deg); }

/* ── Drag & drop sections ───────────────────────────────── */
.club-section[draggable] { cursor: grab; }
.club-section[draggable]:active { cursor: grabbing; }
.club-section.drag-over {
  outline: 2px dashed var(--navy);
  outline-offset: 4px;
  background: rgba(13,33,55,.02);
  border-radius: var(--r);
}
.club-section.dragging { opacity: .3; transform: scale(.99); }
.drag-handle {
  display: inline-flex;
  align-items: center;
  margin-right: 7px;
  cursor: grab;
  color: var(--muted);
  font-size: .88rem;
  opacity: .45;
  transition: opacity .12s;
  user-select: none;
}
.drag-handle:hover { opacity: 1; }
.sh:hover .drag-handle { opacity: .75; }

/* ── club-section card style ─────────────────────────────── */
.club-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0;
  padding: 24px;
}

/* ═══ SECTION HEADER ════════════════════════════════════════ */
.sh {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  background: none;
  border-left: none;
  border-radius: 0;
}

/* ═══ KPI CARDS ════════════════════════════════════════════ */
.kgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}
.kc {
  background: var(--card);
  border-radius: var(--r);
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: none;
}
.kc:hover { transform: none; box-shadow: none; }
.kc .lb {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--muted);
}
.kc .vl {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -.5px;
}
.kc .vl.sm { font-size: .95rem; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.kc .sb { font-size: .71rem; color: var(--muted); }

/* Toutes les variantes couleur neutralisées — même style navy */
.kc.gold, .kc.green, .kc.teal, .kc.purple,
.kc.red,  .kc.cyan,  .kc.orange { border-top-color: var(--navy); }
.kc.gold .vl, .kc.green .vl, .kc.teal .vl, .kc.purple .vl,
.kc.red .vl,  .kc.cyan .vl,  .kc.orange .vl { color: var(--navy); }

/* ═══ COMPÉTITION — LAYOUT SIDEBAR ══════════════════════════ */
.cv-layout {
  display: flex;
  gap: 0;
  height: clamp(420px, 65vh, 720px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

/* ── Sidebar ── */
.cv-sidebar {
  width: 260px;
  min-width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FAFAF8;
}
.cv-sidebar-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.cv-years-bar {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.cv-yr-btn {
  padding: 4px 11px; border: 1px solid var(--border); border-radius: 5px;
  background: #fff; font-family: inherit; font-size: .76rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.cv-yr-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.cv-yr-btn:hover:not(.on) { border-color: #AAAAAA; color: var(--txt); }

.cv-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.cv-comp-row {
  padding: 10px 14px;
  border-bottom: 1px solid #F0F0EE;
  cursor: pointer;
  transition: background .1s;
}
.cv-comp-row:hover { background: #F2F2F0; }
.cv-comp-row.selected {
  background: #EEF2FF;
  border-left: 3px solid var(--navy);
  padding-left: 11px;
}
.cv-comp-nom  { font-size: .8rem; font-weight: 600; color: var(--txt); line-height: 1.3; }
.cv-comp-lieu { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.cv-comp-date { font-size: .7rem; color: #999; margin-top: 1px; }
.cv-comp-nb   { font-size: .68rem; color: var(--muted); margin-top: 3px; }
.cv-loading, .cv-empty-list {
  padding: 20px 14px; color: var(--muted); font-size: .8rem; text-align: center;
}

/* ── Zone principale ── */
.cv-main {
  flex: 1;
  overflow: auto;        /* scroll vertical ET horizontal pour tables larges */
  padding: 20px 24px;
  min-width: 0;
}
.cv-empty-state {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: var(--muted); font-size: .88rem; text-align: center;
}
.cv-table-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

@media(max-width:768px){
  .cv-layout { flex-direction: column; min-height: auto; }
  .cv-sidebar { width: 100%; min-width: 0; border-right: none; border-bottom: 1px solid var(--border); max-height: 240px; }
  .cv-sidebar-list { max-height: 180px; }
}

/* ═══ CHART GRID ════════════════════════════════════════════ */
.cg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.cc {
  background: var(--card);
  border-radius: var(--r);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: none;
}
.cc h3 {
  font-size: .71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 13px;
}
.cc.w { grid-column: 1 / -1; }
.cw { position: relative; }
.cw.h250 { height: 250px; }
.cw.h320 { height: 320px; }
.cw.h380 { height: 380px; }

/* ═══ TABLES ════════════════════════════════════════════════ */
.ts-wide { overflow-x: auto; }
.ts-wide table { min-width: 700px; }
.ts { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .81rem; }

th {
  background: #F5F5F5;
  color: #444444;
  padding: 10px 12px;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
  border-bottom: 2px solid #D8D8D8;
  text-transform: uppercase;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #F0F0F0;
  white-space: nowrap;
  color: var(--txt);
}
tr:nth-child(even) td { background: #FAFAFA; }
tr:hover td { background: #F5F5F5; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Table sortable */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: ' ⇅'; opacity: .3; font-size: .75em; }
th.sort-asc::after { content: ' ▲'; opacity: 1; color: var(--navy); }
th.sort-desc::after { content: ' ▼'; opacity: 1; color: var(--navy); }
th.sortable:hover { background: #EBEBEB; }

/* ═══ BADGES ════════════════════════════════════════════════ */
.bx { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .69rem; font-weight: 700; }

/* Niveau badges */
.dep { background: #F5F5F5; color: #555555; }
.reg { background: #EFF6FF; color: #1D4ED8; }
.zon { background: #F0FDF4; color: #166534; }
.nat { background: #FFF7ED; color: #C2410C; }
.int { background: #FEF2F2; color: #B91C1C; }

/* ── Date tooltip ───────────────────────────────────────── */
.date-star {
  cursor: default;
  font-size: .76rem;
  margin-left: 4px;
  opacity: .45;
  transition: opacity .12s, transform .12s;
  display: inline-block;
  vertical-align: middle;
  user-select: none;
}
.date-star:hover { opacity: 1; transform: scale(1.2); }

#date-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--navy);
  color: #FFF8E1;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 4px 11px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  display: none;
  animation: tooltip-in .1s ease;
}
#date-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gold);
}
@keyframes tooltip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ ATHLETE SELECTOR (sticky) ════════════════════════════ */
.sbar {
  background: var(--card);
  border-radius: 0 0 var(--r) var(--r);
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: 54px;
  z-index: 200;
}
.ath-identity { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ath-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ath-meta-row { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.ath-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill-sexe-h { background: #EFF6FF; color: #1D4ED8; }
.pill-sexe-f { background: #FFF1F2; color: #BE123C; }
.pill-age { background: #F5F3FF; color: #6D28D9; }
.pill-niv { background: #F0FDF4; color: #15803D; }
.pill-annee { background: #FFFBEB; color: #B45309; }
.av {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
  color: transparent;
  user-select: none;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.5);
}
.ath-badges { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.ath-badge { padding: 2px 9px; border-radius: 20px; font-size: .7rem; font-weight: 700; letter-spacing: .2px; }
.aname { font-size: 1.25rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.asub  { font-size: .75rem; color: var(--muted); margin-top: 1px; }

/* Form controls */
.fl { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.fl label {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
}
.fl input, .fl select {
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  background: #fff;
  color: var(--navy);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.fl input { width: 200px; }
.fl select { min-width: 240px; cursor: pointer; }
.fl input:focus, .fl select:focus { border-color: var(--navy); }
.sbar-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-left: auto; }

/* ═══ PALMARÈS ══════════════════════════════════════════════ */
.pg-pal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 11px;
  margin-bottom: 20px;
}
.pc {
  border-radius: var(--r);
  padding: 15px 11px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: none;
  cursor: default;
}
.pc:hover { transform: none; box-shadow: none; }
.pi  { font-size: 1.75rem; margin-bottom: 5px; }
.pn  { font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.pp  { font-size: 1.65rem; font-weight: 800; line-height: 1; margin: 4px 0; }
.pi2 { font-size: .67rem; color: var(--muted); }

/* ═══ EP TABS (event selectors) ════════════════════════════ */
.eptabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.et {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
}
.et.on { border-color: currentColor; }

/* Filter buttons */
.bs-btn {
  padding: 4px 14px;
  border-radius: 14px;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: #555555;
  transition: all .15s;
}
.bs-btn.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.bs-btn:hover:not(.on) { background: var(--bg); border-color: #C0C0C0; color: var(--txt); }

.ffn-epr-btn.on {
  box-shadow: 0 0 0 2px currentColor !important;
  font-weight: 700 !important;
  transform: scale(1.06);
  opacity: 1 !important;
}
.ffn-epr-btn:not(.on) { opacity: .5; }

/* ═══ LOADER ════════════════════════════════════════════════ */
#ldr {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(247,247,245,.88);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(2px);
}
#ldr.show { display: flex; }
.sp {
  width: 38px; height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lds { font-size: .88rem; font-weight: 600; color: var(--muted); }

/* ── Skeleton loading ────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E8E8E8 50%, #F0F0F0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.lg { height: 32px; }
.skeleton-line.sm { height: 10px; width: 60%; }

/* ── Empty states ────────────────────────────────────────── */
.emp { text-align: center; padding: 70px 20px; color: var(--muted); }
.emp .ic { font-size: 3.5rem; margin-bottom: 12px; opacity: .7; }
.emp h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.emp p  { font-size: .82rem; }

/* ═══ RESPONSIVE GRIDS ══════════════════════════════════════ */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }

/* ── Helper classes ─────────────────────────────────────── */
.filter-row  { margin-bottom: 11px; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.filter-row2 { margin-bottom: 13px; display: flex; flex-direction: row; gap: 9px; align-items: flex-end; flex-wrap: wrap; }
.bassin-row  { display: flex; gap: 7px; margin-bottom: 9px; align-items: center; flex-wrap: wrap; }
.sbar-name   { flex: 1; min-width: 140px; }

.sel-std {
  padding: 6px 11px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: .84rem;
  background: #fff;
  color: var(--navy);
  outline: none;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
}
.sel-std:focus { border-color: var(--navy); }
.sel-comp {
  width: 100%;
  max-width: 480px;
  min-width: 0;
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: .84rem;
  background: #fff;
  color: var(--navy);
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: menulist;
  appearance: menulist;
  font-family: inherit;
}
.sel-comp:focus { border-color: var(--navy); }

/* Qualif badges (competition v2) */
.td-qualif { white-space: nowrap; vertical-align: middle; }
.qualif-badge-cv2 {
  display: inline-block;
  border: 1px solid;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: .68rem;
  font-weight: 700;
  margin-right: 3px;
  white-space: nowrap;
}
.qualif-next-cv2 {
  display: inline-block;
  border: 1px dashed;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: .68rem;
  font-weight: 600;
  background: transparent;
  cursor: default;
  white-space: nowrap;
}
.cv2-mobile-qualif { display: none; margin-top: 5px; line-height: 1.5; }
.cv2-mobile-qualif .qualif-badge-cv2,
.cv2-mobile-qualif .qualif-next-cv2 { margin-top: 2px; }

/* ── Records club table ──────────────────────────────────── */
.rc-grid-wrap { overflow-x: auto; margin-bottom: 4px; }
.rc-grid { border-collapse: collapse; font-size: .71rem; min-width: 900px; width: 100%; }
.rc-grid th {
  background: #F5F5F5;
  color: #444444;
  padding: 6px 10px;
  text-align: center;
  font-size: .67rem;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid #D8D8D8;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rc-grid th.rc-ep-col { text-align: left; min-width: 90px; }
.rc-grid td { padding: 5px 8px; border: 1px solid #F0F0F0; vertical-align: top; min-width: 110px; }
.rc-grid tr:nth-child(even) td { background: #FAFAFA; }
.rc-grid tr:hover td { background: #F5F5F5; }
.rc-grid td.rc-ep-name {
  font-weight: 700;
  color: var(--navy);
  background: #F5F5F5 !important;
  white-space: nowrap;
  font-size: .72rem;
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #D8D8D8;
}
.rc-cell-nom   { font-weight: 700; font-size: .71rem; color: var(--navy); }
.rc-cell-temps { font-weight: 800; font-size: .77rem; color: #166534; }
.rc-cell-pts   { font-size: .64rem; color: #6B7280; }
.rc-cell-date  { font-size: .61rem; color: #9CA3AF; }
.rc-empty      { color: #D0D0D0; font-size: .69rem; text-align: center; }

/* ── Competition v2 ─────────────────────────────────────── */
#compet-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 54px);
  overflow: hidden;
}
#compet-sidebar {
  width: 210px;
  min-width: 180px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#compet-sidebar-head {
  padding: 14px 16px 10px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
#compet-sidebar-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-section-title {
  padding: 10px 16px 4px;
  font-size: .63rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.sidebar-item {
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .1s;
  font-size: .77rem;
  line-height: 1.4;
}
.sidebar-item:hover { background: var(--bg); }
.sidebar-item.active { background: #F0F4F8; border-left-color: var(--navy); }
.sidebar-status {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.sidebar-status.passee  { background: #F5F5F5; color: #6B7280; }
.sidebar-status.a_venir { background: #F0FDF4; color: #15803D; }
.sidebar-status.en_cours{ background: #EFF6FF; color: #1565C0; }
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--navy);
  margin-right: 5px;
  animation: livepulse 1.5s infinite;
}
@keyframes livepulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.cs-item {
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .12s;
}
.cs-item:hover { background: var(--bg); border-left-color: #C0C0C0; }
.cs-item.active { background: #F0F4F8; border-left-color: var(--navy); }
.cs-item-lieu  { font-size: .79rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.cs-item-dates { font-size: .67rem; color: var(--muted); margin-top: 2px; }
.cs-badge { display: inline-block; font-size: .57rem; font-weight: 700; padding: 1px 6px; border-radius: 7px; margin-top: 3px; }
.cs-badge.en_cours { background: #F0FDF4; color: #15803D; }
.cs-badge.a_venir  { background: #EFF6FF; color: #1D4ED8; }
.cs-badge.passee   { background: #F5F5F5; color: #6B7280; }
.cs-sep { height: 1px; background: var(--border); margin: 4px 16px; }

#compet-main { flex: 1; overflow-y: auto; padding: 18px 22px; min-width: 0; }

#compet-header-v2 {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 15px 18px;
  margin-bottom: 14px;
}
#compet-header-top { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
#compet-title-block { flex: 1; min-width: 0; }
#compet-nom { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
#compet-meta-line { font-size: .73rem; color: var(--muted); margin-top: 3px; }
#compet-live-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .7rem; }
#compet-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 4px 11px;
  font-weight: 700;
  background: #F5F5F5;
  color: #6B7280;
}
#compet-refresh-info { color: var(--muted); font-size: .68rem; text-align: right; }
#compet-countdown-v2 { color: #C2410C; font-weight: 700; }

#cv2-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 11px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 12;
  background: #fff;
}
.cv2-tab {
  padding: 9px 22px;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  border-radius: 0;
  font-family: inherit;
}
.cv2-tab.on { color: var(--navy); border-bottom-color: var(--navy); }
.cv2-tab:not(.on):hover { color: var(--txt); background: var(--bg); }

#compet-prog-wrap {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-top: 7px;
}
#compet-filters {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 11px 15px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  position: sticky;
  top: 42px;
  z-index: 11;
}
.cf-group { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.cf-label {
  font-size: .67rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .35px;
  margin-right: 3px;
}
.cf-btn {
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font-size: .71rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
}
.cf-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.cf-btn:hover:not(.on) { background: var(--bg); border-color: #C0C0C0; }
#cf-search {
  padding: 5px 11px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: .77rem;
  min-width: 140px;
  outline: none;
  transition: border-color .12s;
  font-family: inherit;
}
#cf-search:focus { border-color: var(--navy); }

/* Competition table */
.compet-table { width: 100%; border-collapse: collapse; font-size: .77rem; }
.compet-table th {
  background: #F5F5F5;
  color: #444444;
  font-size: .67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 12px;
  border-bottom: 2px solid #D8D8D8;
  text-align: left;
  white-space: nowrap;
}
.compet-table th.th-res { background: #F0F0F0; color: var(--navy); }
.compet-table td { padding: 7px 12px; border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
.compet-table tr:hover td { background: #F5F5F5; }
.td-heure    { color: var(--muted); font-size: .71rem; white-space: nowrap; width: 52px; }
.td-epreuve  { font-weight: 700; color: var(--navy); }
.td-cat      { font-size: .67rem; color: var(--muted); white-space: nowrap; }
.td-plot     { font-weight: 800; color: #fff; border-radius: 50%; width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; font-size: .67rem; }
.td-nom      { font-weight: 700; color: var(--navy); }
.td-naiss    { color: var(--muted); font-size: .71rem; }
.td-ref      { font-family: monospace; color: var(--muted); font-size: .77rem; }
.td-result   { font-family: monospace; font-weight: 800; font-size: .81rem; }
.td-result.no-result { color: #D0D0D0; }
.td-pts      { font-weight: 700; color: var(--navy); }
.td-rang     { font-size: .73rem; }
.td-tendance { font-size: .8rem; white-space: nowrap; font-weight: 700; }
.td-tendance .trend-sub { display: block; font-size: .66rem; font-weight: 600; color: #9CA3AF; white-space: normal; margin-top: 2px; }
.td-tendance.mieux      { color: #16A34A; }
.td-tendance.stable     { color: #6B7280; }
.td-tendance.moins_bien { color: #DC2626; }
.td-tendance.forfait    { color: #9CA3AF; }

.rang-badge { display: inline-flex; align-items: center; border-radius: 8px; padding: 2px 7px; font-size: .69rem; font-weight: 700; }
.rang-badge.r1    { background: #FEF3C7; color: #92400E; }
.rang-badge.r2    { background: #F5F5F5; color: #374151; }
.rang-badge.r3    { background: #FFEDD5; color: #9A3412; }
.rang-badge.rtop  { background: #F0FDF4; color: #166534; }
.rang-badge.rother{ background: #F7F7F5; color: #6B7280; }

/* Passage items */
#compet-passage-wrap { background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.psg-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 15px; border-bottom: 1px solid #F0F0F0; transition: background .1s; }
.psg-item:last-child { border-bottom: none; }
.psg-item.nage     { background: #F0FDF4; }
.psg-item.en_cours { background: #FFFBEB; }
.psg-item.a_venir  { background: #fff; }
.psg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.psg-item.nage .psg-dot     { background: #16A34A; }
.psg-item.en_cours .psg-dot { background: #F59E0B; animation: livepulse 1s infinite; }
.psg-item.a_venir .psg-dot  { background: #9CA3AF; }
.psg-left { display: flex; flex-direction: column; align-items: center; min-width: 50px; gap: 2px; }
.psg-heure  { font-size: .73rem; color: #9CA3AF; font-variant-numeric: tabular-nums; text-align: center; }
.psg-plot   { font-size: .67rem; color: #D0D0D0; text-align: center; }
.psg-body   { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.psg-toprow { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.psg-nom    { font-weight: 600; font-size: .86rem; flex: 1; }
.psg-result { font-size: .9rem; font-weight: 800; color: #166534; white-space: nowrap; }
.psg-detail { font-size: .73rem; color: #6B7280; }
.psg-ref    { font-size: .68rem; color: #D0D0D0; }
.psg-meta   { display: flex; gap: 10px; margin-top: 2px; }
.psg-meta-item  { display: flex; flex-direction: column; gap: 1px; }
.psg-meta-lbl   { font-size: .58rem; color: #D0D0D0; font-weight: 600; letter-spacing: .04em; }
.psg-qualif      { display: inline-block; font-size: .67rem; font-weight: 700; border: 1px solid; border-radius: 5px; padding: 2px 6px; margin-top: 3px; margin-right: 3px; }
.psg-qualif-next { border-style: dashed; opacity: .8; }
.psg-reunion { font-size: .69rem; color: #9CA3AF; padding: 6px 15px; background: var(--bg); border-bottom: 1px solid var(--border); font-weight: 600; letter-spacing: .02em; }

/* Competition athlete cards */
#compet-table-wrap { background: #fff; border-radius: var(--r); border: 1px solid var(--border); overflow: hidden; }
.cv2-ath-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r); margin: 12px 0 16px; overflow: hidden; }
.cv2-ath-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.cv2-ath-name { font-size: .97rem; font-weight: 800; color: var(--navy); }
.cv2-ath-sub  { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.cv2-ath-count { font-size: .7rem; font-weight: 700; color: var(--navy); background: #EEEEED; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.cv2-ath-table { width: 100%; border-collapse: collapse; }
.cv2-ath-table th { background: #F5F5F5; color: #444444; border-bottom: 1px solid var(--border); font-size: .67rem; }
.cv2-ath-table td { font-size: .78rem; }
.cv2-ath-table tr:hover td { background: #FAFAFA; }
.cv2-ath-highlight { font-weight: 800; color: var(--navy); }
.cv2-ath-muted { font-size: .67rem; color: var(--muted); }

.cv2-reunion-acc { background: #fff; border-radius: var(--r); border: 1px solid var(--border); overflow: hidden; margin-top: 9px; }
.cv2-reunion-acc + .cv2-reunion-acc { margin-top: 11px; }
.cv2-reunion-acc summary { list-style: none; cursor: pointer; }
.cv2-reunion-acc summary::-webkit-details-marker { display: none; }
.reunion-header {
  background: var(--navy);
  color: #fff;
  padding: 9px 16px;
  font-size: .81rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}
.reunion-header .rh-arrow { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: rgba(255,255,255,.1); font-size: .78rem; transition: transform .12s; }
.cv2-reunion-acc[open] .reunion-header .rh-arrow { transform: rotate(90deg); }
.reunion-header .rh-num    { background: rgba(255,255,255,.13); border-radius: 20px; padding: 2px 9px; font-size: .7rem; }
.reunion-header .rh-moment { background: var(--gold); border-radius: 20px; padding: 2px 9px; font-size: .67rem; font-weight: 700; margin-left: auto; }
.cv2-reunion-body { padding: 9px; background: var(--bg); }
.cv2-type-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: .65rem; font-weight: 700; line-height: 1.2; margin-top: 3px; border: 1px solid var(--border); background: #F5F5F5; color: #444; }
.cv2-type-badge.serie  { background: #F0F4F8; color: #2D4A62; }
.cv2-type-badge.finale { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.cv2-type-badge.demi   { background: #F5F3FF; color: #5B21B6; border-color: #DDD6FE; }

/* Competition empty / spinner */
#compet-empty-v2 { padding: 55px 0; text-align: center; color: var(--muted); }
#compet-empty-v2 .ev-icon { font-size: 2.8rem; margin-bottom: 10px; opacity: .6; }
#compet-empty-v2 h3 { font-size: .92rem; color: var(--navy); margin-bottom: 5px; }
#compet-empty-v2 p  { font-size: .77rem; }
#compet-spinner-v2  { text-align: center; padding: 36px; color: var(--muted); font-size: .84rem; display: none; }

/* ── Planning & Réglement ────────────────────────────────── */
#pr-root  { display: flex; flex-direction: column; gap: 24px; }
#pr-hero  { background: #fff; border-radius: var(--r); border: 1px solid var(--border); padding: 17px 19px; border-left: 4px solid var(--navy); }
#pr-hero-top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
#pr-title { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
#pr-sub   { font-size: .74rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }
#pr-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--navy);
  text-decoration: none;
  font-size: .76rem;
  font-weight: 700;
  transition: background .12s, border-color .12s;
}
#pr-pdf-link:hover { background: #EFEFED; border-color: #C8C8C8; }
#pr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 11px; margin-top: 13px; }
.pr-kpi { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 11px 13px; }
.pr-kpi-lb { font-size: .64rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.pr-kpi-vl { font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1.1; margin-top: 5px; }
.pr-kpi-sb { font-size: .7rem; color: var(--muted); margin-top: 3px; }

#pr-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.pr-tab {
  padding: 7px 13px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
}
.pr-tab.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pr-tab:hover:not(.on) { background: var(--bg); border-color: #C0C0C0; }
.pr-pane    { display: none; }
.pr-pane.on { display: block; }
.pr-month { background: #fff; border-radius: var(--r); border: 1px solid var(--border); padding: 15px 17px; }
.pr-month + .pr-month { margin-top: 13px; }
.pr-month-head { font-size: .83rem; font-weight: 800; color: var(--navy); margin-bottom: 11px; display: flex; align-items: center; gap: 9px; }
.pr-event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 11px; }
.pr-event { border: 1px solid var(--border); border-radius: var(--r); padding: 11px 12px; background: #fff; }
.pr-event:hover { background: var(--bg); }
.pr-event-dates { font-size: .71rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.pr-event-title { font-size: .83rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.pr-event-meta  { font-size: .71rem; color: var(--muted); margin-top: 5px; line-height: 1.35; }
.pr-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.pr-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #F5F5F5;
  color: #555555;
}
.pr-badge.deadline { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.pr-badge.national { background: #FEF2F2; border-color: #FCA5A5; color: #B91C1C; }
.pr-badge.regional { background: #F0FDF4; border-color: #86EFAC; color: #15803D; }
.pr-badge.web      { background: #EFF6FF; border-color: #93C5FD; color: #1D4ED8; }
.pr-badge.team     { background: #F5F3FF; border-color: #C4B5FD; color: #6D28D9; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.pr-card { background: #fff; border-radius: var(--r); border: 1px solid var(--border); padding: 17px; }
.pr-card h3 { font-size: .81rem; font-weight: 800; color: var(--navy); margin-bottom: 9px; }
.pr-card p  { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.pr-list    { display: flex; flex-direction: column; gap: 7px; }
.pr-li      { display: flex; align-items: flex-start; gap: 8px; font-size: .76rem; line-height: 1.5; color: var(--txt); }
.pr-li .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--navy); margin-top: 7px; flex-shrink: 0; }
.pr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pr-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.pr-table th {
  background: #F5F5F5;
  color: #444444;
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 10px;
  border-bottom: 2px solid #D8D8D8;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
}
.pr-table td   { padding: 8px 10px; border-bottom: 1px solid #F0F0F0; vertical-align: top; }
.pr-note       { font-size: .71rem; color: var(--muted); margin-top: 7px; line-height: 1.4; }
#pr-empty      { background: #fff; border-radius: var(--r); border: 1px solid var(--border); padding: 35px 20px; text-align: center; color: var(--muted); }

/* ── Live pulse animation ────────────────────────────────── */
@keyframes live-pulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(220,38,38,.35); }
  50%      { opacity:.85; box-shadow: 0 0 0 5px rgba(220,38,38,0); }
}

/* ═══ RESPONSIVE ════════════════════════════════════════════ */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .logo #logo-svg-wrap { width: 190px; }
  .tb { padding: 6px 10px; font-size: .77rem; }
  #nav-info-block { display: none; }
  .pg { padding: 18px 16px; }
  .cg { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
  .kgrid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .g3 { grid-template-columns: 1fr 1fr; }
  .sel-comp { max-width: 100%; }
  #pr-hero { padding: 15px; }
  .pr-event-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile (≤640px) */
@media (max-width: 640px) {
  .bar { height: auto; min-height: 50px; flex-wrap: wrap; gap: 5px; padding: 8px 12px; }
  .logo #logo-svg-wrap { width: 120px; }
  .tabs { display: none; }
  .ham-btn { display: block; }
  #nav-info-block { display: none; }
  .binfo { display: none; }

  .pg { padding: 10px 8px; }
  .cg, .g2, .g3 { grid-template-columns: 1fr; }
  .kgrid { grid-template-columns: 1fr 1fr; }
  .cw.h380 { height: 210px; }
  .cw.h320 { height: 195px; }
  .cw.h250 { height: 175px; }

  th  { padding: 7px 8px; font-size: .66rem; }
  td  { padding: 6px 8px; font-size: .71rem; }
  .cc { padding: 11px 10px; }
  .sh { font-size: .84rem; margin: 18px 0 10px; padding: 0 0 8px 0; }

  .pg-pal { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .pc { padding: 11px 8px; }
  .pi { font-size: 1.45rem; }
  .pp { font-size: 1.35rem; }

  .aname { font-size: .98rem; }
  .asub  { font-size: .71rem; }
  .av    { width: 34px; height: 34px; font-size: .88rem; }
  .ath-identity { gap: 7px; }
  .ath-meta-pill { font-size: .64rem; padding: 2px 7px; }

  .kc { padding: 12px 10px 10px; }
  .kc .vl { font-size: 1.5rem; }
  .kc .lb { font-size: .62rem; }

  .bs-btn { padding: 4px 10px; font-size: .72rem; }
  .et { padding: 4px 8px; font-size: .69rem; }
  .eptabs { gap: 3px; }

  .sbar { flex-direction: column; align-items: flex-start; gap: 9px; top: auto; }
  .ath-identity { width: 100%; }
  .sbar-controls { margin-left: 0; width: 100%; flex-direction: column; gap: 7px; }
  .fl input, .fl select, .sel-comp, .sel-std {
    min-width: 0 !important; width: 100% !important; max-width: 100% !important;
    box-sizing: border-box;
  }
  .fl { width: 100%; }
  .filter-row { flex-wrap: wrap; gap: 7px; }
  .filter-row2 { flex-direction: column; align-items: stretch; gap: 7px; }

  #compet-layout { display: block; height: auto; min-height: calc(100vh - 52px); overflow: visible; }
  #compet-main { padding: 12px 10px; }
  #compet-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 240;
    width: min(82vw, 310px); height: 100vh;
    border-right: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,.16);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  #compet-sidebar.open { transform: translateX(0); }
  #compet-sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 0 11px;
    padding: 9px 13px;
    border: none;
    border-radius: 9px;
    background: var(--navy);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
  }
  #compet-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(13,33,55,.3);
    z-index: 239;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }
  #compet-sidebar-overlay.open { opacity: 1; pointer-events: auto; }
  .cv2-mobile-qualif { display: block; }

  #pr-kpis { grid-template-columns: 1fr 1fr; }
  .pr-grid  { grid-template-columns: 1fr; }
  .pr-event-grid { grid-template-columns: 1fr; }
}

/* Small mobile (≤400px) */
@media (max-width: 400px) {
  .kgrid { grid-template-columns: 1fr; }
  .tb    { font-size: .67rem; padding: 7px 3px; }
  th     { font-size: .62px; padding: 6px 5px; }
  td     { font-size: .67rem; padding: 5px 5px; }
  .kc .vl { font-size: 1.32rem; }
  #pr-kpis { grid-template-columns: 1fr; }
  .pr-tab  { width: 100%; justify-content: center; text-align: center; }
  #pr-hero-top { flex-direction: column; }
  #pr-pdf-link { width: 100%; justify-content: center; }
}
