/* TournoiConnect — Design System fidèle aux wireframes */

/* ── Fonts ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Caveat:wght@400;700&display=swap');

/* ── Design tokens (fidèles à TC dans shared.jsx) ────────────────────── */
:root {
  --red:        #C8102E;
  --red-deep:   #9A0C24;
  --red-soft:   #FCE8EC;
  --ink:        #0E0E0E;
  --ink2:       #2A2A2A;
  --ink3:       #6B6357;
  --paper:      #FAF6EE;
  --paper2:     #F1EADA;
  --paper-warm: #E9DFC8;
  --line:       rgba(14,14,14,.12);
  --line-strong:rgba(14,14,14,.85);
  --muted:      rgba(14,14,14,.55);
  --gold:       #C99524;
  --green:      #1F7A3A;
  --amber:      #E8A33A;
  --white:      #FFFFFF;

  --font-body:  'Space Grotesk', system-ui, sans-serif;
  --font-title: 'Bebas Neue', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --font-hand:  'Caveat', cursive;

  --radius:    4px;   /* scoreboard rétro → angles carrés */
  --radius-lg: 6px;
  --shadow-sm: 0 1px 2px rgba(14,14,14,.04);
  --shadow:    0 1px 0 rgba(0,0,0,.06);

  --topbar-h:  56px;
  --nav-h:     64px;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper2);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

@keyframes tcPulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }

/* ── Mobile Container ────────────────────────────────────────────────── */
.app-wrap {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
}

.page-content {
  padding-top: var(--topbar-h);
  padding-bottom: var(--nav-h);
  min-height: 100vh;
  background: var(--paper2);
}

/* ── TopBar — fond crème avec bordure subtile ────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: var(--topbar-h);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.topbar__back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(14,14,14,.05);
  border-radius: var(--radius-lg);
  color: var(--ink);
  transition: background .15s;
}
.topbar__back:hover { background: rgba(14,14,14,.1); }

.topbar__logo {
  width: 32px; height: 41px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar__titles { flex: 1; min-width: 0; }

.topbar__kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
}

.topbar__title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__action {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.topbar__action-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,14,14,.05);
  border-radius: var(--radius-lg);
  color: var(--ink);
}

/* ── Home header spécifique (pas de topbar standard) ─────────────────── */
.home-header {
  padding: 12px 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.home-header__meta {
  flex: 1;
}

.home-header__kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
}

.home-header__title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.2px;
}

/* ── Bottom Nav — fond crème, 4 onglets ──────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: var(--nav-h);
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: color .15s;
  padding-bottom: 4px;
}

.nav-tab svg { flex-shrink: 0; }

.nav-tab--active {
  color: var(--red);
}

/* ── Hero (home page) ────────────────────────────────────────────────── */
.hero {
  padding: 20px 18px 18px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.hero__watermark {
  position: absolute;
  right: -24px; top: -10px;
  opacity: .06;
  pointer-events: none;
}

.hero__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--red);
  font-weight: 700;
}

.hero__title {
  font-family: var(--font-title);
  font-size: 42px;
  line-height: .92;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin-top: 6px;
}

.hero__title .dot { color: var(--red); }

.hero__meta {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink2);
}

.hero__meta-sep {
  width: 4px; height: 4px;
  background: var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Live banner (home) ──────────────────────────────────────────────── */
.live-banner {
  width: 100%;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
}

.live-banner__content { flex: 1; min-width: 0; }

.live-banner__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.8px;
  opacity: .6;
  text-transform: uppercase;
}

.live-banner__team {
  font-size: 14px;
  font-weight: 600;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-banner__pts { color: #FF4D2E; font-weight: 700; }

.live-banner__cta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: .85;
  flex-shrink: 0;
}

.live-dot {
  width: 8px; height: 8px;
  background: #FF4D2E;
  border-radius: 50%;
  animation: tcPulse 1.4s infinite;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:active { opacity: .8; }
.btn:hover  { opacity: .88; }

.btn--full { width: 100%; }

.btn--primary {
  background: var(--red);
  color: var(--paper);
  border: none;
  box-shadow: var(--shadow);
}

.btn--dark {
  background: var(--ink);
  color: var(--paper);
  border: none;
  box-shadow: var(--shadow);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn--ghost {
  background: rgba(14,14,14,.05);
  color: var(--ink);
  border: none;
}

.btn--ghost-dark {
  background: rgba(246,241,232,.08);
  color: var(--paper);
  border: none;
}

.btn--danger {
  background: transparent;
  color: var(--red);
  border: none;
  font-size: 12px;
}

.btn--green {
  background: var(--green);
  color: var(--paper);
  border: none;
}

.btn--sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn--lg { height: 52px; padding: 0 22px; font-size: 14px; }

/* ── BigBtn (home CTAs) ──────────────────────────────────────────────── */
.big-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--red);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
  text-decoration: none;
}

.big-btn--dark { background: var(--ink); }

.big-btn__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.big-btn__body { flex: 1; }

.big-btn__kicker {
  font-size: 9px;
  letter-spacing: 1.6px;
  opacity: .75;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.big-btn__label {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.big-btn__sub {
  font-size: 11px;
  opacity: .85;
  margin-top: 3px;
}

/* ── Tiles (grille accueil) ──────────────────────────────────────────── */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tile {
  padding: 14px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: inherit;
  text-align: left;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: opacity .15s;
}

.tile:hover { opacity: .88; }

.tile__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}

.tile__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.tile__hint { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── ExtChip (liens externes home) ──────────────────────────────────── */
.ext-chip {
  padding: 7px 12px;
  border: 1.2px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: opacity .15s;
}

.ext-chip:hover { opacity: .75; }

/* ── Section label style mono ────────────────────────────────────────── */
.mono-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 2px;
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card--dark   { background: var(--ink2); border-color: rgba(246,241,232,.15); color: var(--paper); }
.card--accent { border-left: 3px solid var(--red); }
.card--paper  { background: var(--paper2); }
.card--red    { background: var(--red); color: var(--paper); border-color: transparent; }

.card-body    { padding: 14px; }

.card-header {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.card--dark .card-header {
  border-color: rgba(246,241,232,.12);
  color: rgba(246,241,232,.55);
}

/* ── Pills / Status ──────────────────────────────────────────────────── */
.pill {
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  border-radius: 2px;
  text-transform: uppercase;
}

.pill--live    { background: var(--red);       color: var(--paper); animation: tcPulse 1.4s infinite; }
.pill--open    { background: var(--green);     color: var(--paper); }
.pill--soon    { background: var(--paper-warm);color: var(--muted); }
.pill--closed  { background: var(--paper-warm);color: var(--muted); }
.pill--anim    { background: var(--red-soft);  color: var(--red);   }
.pill--sport   { background: #DBEAFE;          color: #1D4ED8;      }
.pill--green   { background: var(--green);     color: var(--paper); }
.pill--amber   { background: var(--amber);     color: var(--ink);   }
.pill--soft    { background: var(--red-soft);  color: var(--red);   }

/* ── Forms ───────────────────────────────────────────────────────────── */
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-label  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); }
.form-hint   { font-size: 11px; color: var(--muted); margin-top: 4px; }

.form-control {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--red);
}

.form-control::placeholder { color: rgba(14,14,14,.35); }

textarea.form-control {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='rgba(14,14,14,.55)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ── PageSection heading ─────────────────────────────────────────────── */
.page-section { padding: 16px 16px 8px; }

.page-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.page-section__kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.page-section__title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  text-transform: uppercase;
}

.page-section__action { font-size: 12px; font-weight: 600; color: var(--red); }

/* ── Timeline (Programme) ────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }

.tl-item {
  display: flex;
  align-items: stretch;
  gap: 12px;
  position: relative;
}

.tl-time {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 40px;
  padding-top: 14px;
  flex-shrink: 0;
}

.tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 16px;
  flex-shrink: 0;
}

.tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--paper-warm);
  border: 2px solid var(--muted);
  flex-shrink: 0;
  margin-top: 16px;
}

.tl-item--anim .tl-dot { background: var(--red); border-color: var(--red); }

.tl-connector {
  width: 2px;
  flex: 1;
  background: var(--line);
  margin: 2px 0;
}

.tl-content {
  flex: 1;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}

.tl-item:last-child .tl-content { border-bottom: none; }

.tl-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.1px;
}

.tl-item--anim .tl-title { color: var(--red); }

.tl-place {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

/* ── Tabs (programme) ────────────────────────────────────────────────── */
.tab-bar-pg {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  flex: 1;
  height: 36px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--paper-warm);
  color: var(--muted);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.tab-btn.tab--active { background: var(--ink); color: var(--paper); }

.tab-panel { display: none; }
.tab-panel.tab-panel--active { display: block; }

/* ── Leaderboard ─────────────────────────────────────────────────────── */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.lb-row + .lb-row { margin-top: 4px; }

.lb-row--first {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}

.lb-rank {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
  line-height: 1;
}

.lb-row--first .lb-rank { color: var(--gold); }

.lb-team { flex: 1; font-weight: 700; font-size: 14px; }

.lb-pts {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}

.lb-row--first .lb-pts { color: var(--gold); }

.lb-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  background: var(--paper-warm);
  padding: 2px 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

/* ── Menu items (buvette) ────────────────────────────────────────────── */
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.menu-item:last-child { border-bottom: none; }

.menu-item__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  flex-shrink: 0;
}

/* ── Liens ───────────────────────────────────────────────────────────── */
.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
  text-decoration: none;
  color: var(--ink);
}

.link-item__icon {
  width: 40px; height: 40px;
  background: var(--paper-warm);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.link-item__body { flex: 1; min-width: 0; }

.link-item__title {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.link-item__desc  { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Info rows ───────────────────────────────────────────────────────── */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.info-row:last-child { border-bottom: none; }
.info-row__icon { font-size: 16px; width: 20px; flex-shrink: 0; }

/* ── Dashboard participant ───────────────────────────────────────────── */
.identity-card {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
}

.identity-card__kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  color: rgba(246,241,232,.55);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.identity-card__name {
  font-family: var(--font-title);
  font-size: 32px;
  letter-spacing: 0.5px;
  line-height: 1;
}

.identity-card__pts {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 10px;
}

.identity-card__pts span {
  font-size: 13px;
  color: rgba(246,241,232,.6);
  margin-left: 4px;
}

.identity-card__rank {
  font-size: 12px;
  color: rgba(246,241,232,.6);
  margin-top: 4px;
}

/* ── Anim cards ──────────────────────────────────────────────────────── */
.anim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.anim-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.anim-card--live {
  background: var(--red);
  color: var(--paper);
  border-color: transparent;
}

.anim-card__emoji { font-size: 26px; }
.anim-card__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2px; }
.anim-card__desc  { font-size: 11px; color: var(--muted); }
.anim-card--live .anim-card__desc { color: rgba(246,241,232,.7); }

/* ── Prizes (tombola) ────────────────────────────────────────────────── */
.prize-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.prize-row:last-child { border-bottom: none; }

.prize-medal { font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; }
.prize-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.2px; }
.prize-desc  { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Flash messages ──────────────────────────────────────────────────── */
.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  border-left: 3px solid transparent;
}

.flash--success { background: #F0FFF4; color: #166534; border-color: var(--green); }
.flash--error   { background: #FEF2F2; color: #991B1B; border-color: var(--red); }
.flash--info    { background: #EFF6FF; color: #1E40AF; border-color: #3B82F6; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.page-footer {
  padding: 10px 16px;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Login page ──────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper);
}

.login-box {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 16px rgba(14,14,14,.08);
  padding: 28px;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  text-align: center;
}

.login-logo img { width: 48px; object-fit: contain; }

.login-logo__title {
  font-family: var(--font-title);
  font-size: 22px;
  letter-spacing: 0.5px;
  line-height: 1;
}

.login-logo__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Points form (admin) ─────────────────────────────────────────────── */
.pts-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pts-quick {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
}

.pts-quick--pos { background: #F0FFF4; color: var(--green); border-color: var(--green); }
.pts-quick--neg { background: #FEF2F2; color: var(--red);   border-color: var(--red);   }
.pts-quick--pos:hover { background: var(--green); color: var(--paper); }
.pts-quick--neg:hover { background: var(--red);   color: var(--paper); }

/* ── Admin layout ────────────────────────────────────────────────────── */
.admin-wrap    { max-width: 1100px; margin: 0 auto; min-height: 100vh; background: var(--paper); }

.admin-topbar {
  background: var(--ink);
  color: var(--paper);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-topbar__brand { display: flex; align-items: center; gap: 10px; }

.admin-topbar__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.admin-topbar__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-topbar__role {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255,255,255,.1);
  padding: 2px 7px;
  border-radius: 2px;
  color: rgba(246,241,232,.7);
}

.admin-topbar__nav { display: flex; gap: 2px; align-items: center; }

.admin-topbar__nav a {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius);
  color: rgba(246,241,232,.6);
  transition: background .15s, color .15s;
}

.admin-topbar__nav a:hover,
.admin-topbar__nav a.active { background: var(--red); color: var(--paper); }

.admin-content { padding: 24px; }

.admin-page-title {
  font-family: var(--font-title);
  font-size: 28px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.admin-page-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.8px;
  margin-bottom: 20px;
}

.admin-section-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.admin-tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s;
}

.admin-tile:hover { box-shadow: 0 2px 8px rgba(14,14,14,.1); }

.admin-tile--primary { background: var(--red); color: var(--paper); border-color: transparent; }
.admin-tile--dark    { background: var(--ink); color: var(--paper); border-color: transparent; }

.admin-tile__emoji { font-size: 24px; }

.admin-tile__title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-tile__count {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
}

.admin-tile--primary .admin-tile__count { color: rgba(246,241,232,.85); }
.admin-tile--dark    .admin-tile__count { color: var(--gold); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.admin-table th {
  background: var(--ink);
  color: rgba(246,241,232,.85);
  padding: 9px 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--paper); }

/* ── Grand écran 16:9 ────────────────────────────────────────────────── */
.screen-wrap {
  width: 1600px;
  height: 900px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen-header {
  background: var(--red);
  height: 76px;
  display: flex;
  align-items: center;
  padding: 0 36px;
  gap: 20px;
  flex-shrink: 0;
}

.screen-header__logo { width: 48px; object-fit: contain; }

.screen-header__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 2px;
}

.screen-header__title {
  font-family: var(--font-title);
  font-size: 26px;
  letter-spacing: 0.5px;
}

.screen-header__badge {
  margin-left: auto;
  background: rgba(255,255,255,.18);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.screen-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  padding: 28px 32px;
}

.screen-lb-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(246,241,232,.45);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.screen-lb-title span { color: rgba(246,241,232,.3); font-size: 10px; }

.screen-lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 6px;
}

.screen-lb-row--first {
  background: rgba(201,149,36,.12);
  border-color: var(--gold);
}

.screen-lb-rank {
  font-family: var(--font-title);
  font-size: 38px;
  color: rgba(255,255,255,.3);
  min-width: 54px;
  line-height: 1;
}

.screen-lb-row--first .screen-lb-rank { color: var(--gold); }

.screen-lb-team { flex: 1; font-size: 17px; font-weight: 700; }

.screen-lb-pts {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}

.screen-lb-row--first .screen-lb-pts { color: var(--gold); }

.screen-compact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  margin-bottom: 3px;
  font-size: 13px;
}

.screen-compact-rank { font-family: var(--font-mono); font-weight: 700; color: rgba(255,255,255,.3); min-width: 24px; }
.screen-compact-team { flex: 1; }
.screen-compact-pts  { font-family: var(--font-mono); font-weight: 700; color: rgba(200,16,46,.8); }

.screen-rail { display: flex; flex-direction: column; gap: 12px; }

.screen-qr {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.screen-qr__box {
  width: 110px; height: 110px;
  background: var(--paper);
  border-radius: var(--radius);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
}

.screen-qr__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; opacity: .6; }
.screen-qr__url   { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--red); margin-top: 4px; }

.screen-info-card {
  background: var(--red);
  border-radius: var(--radius);
  padding: 14px;
}

.screen-info-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 6px;
}

.screen-info-title {
  font-family: var(--font-title);
  font-size: 22px;
  letter-spacing: 0.3px;
}

.screen-upcoming {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 14px;
  flex: 1;
}

.screen-upcoming-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(246,241,232,.4);
  margin-bottom: 10px;
}

.screen-upcoming-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 13px;
}

.screen-upcoming-item:last-child { border-bottom: none; }

.screen-upcoming-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: rgba(255,255,255,.4);
  min-width: 42px;
  font-size: 11px;
}

.screen-footer {
  background: var(--red);
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

.screen-ticker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
}

@keyframes marquee {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-200%); }
}

/* ── Utilities ───────────────────────────────────────────────────────── */
.stack     { display: flex; flex-direction: column; }
.gap-6     { gap: 6px; }
.gap-8     { gap: 8px; }
.gap-12    { gap: 12px; }
.gap-16    { gap: 16px; }
.pad-16    { padding: 16px; }
.mt-6      { margin-top: 6px; }
.mt-8      { margin-top: 8px; }
.mt-12     { margin-top: 12px; }
.mt-16     { margin-top: 16px; }
.mt-20     { margin-top: 20px; }
.mt-24     { margin-top: 24px; }
.mb-0      { margin-bottom: 0; }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-sm     { font-size: 12px; }
.font-mono   { font-family: var(--font-mono); }
.font-title  { font-family: var(--font-title); }
.w-full      { width: 100%; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
}
.empty-state__icon { font-size: 32px; margin-bottom: 8px; }

.divider { height: 1px; background: var(--line); margin: 16px 0; }
