/* ============================================================
   TOURNOI IBRAHIM COULIBALY — 7ème Édition
   Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ---- Variables ---- */
:root {
  --green:     #1a7a3c;
  --green-light: #2d9e53;
  --green-dark:  #135c2d;
  --red:       #e63946;
  --red-dark:  #c62a35;
  --white:     #ffffff;
  --gray-dark: #2d2d2d;
  --gray:      #4a4a4a;
  --gray-mid:  #888;
  --gray-light: #e8e8e8;
  --gray-bg:   #f4f5f7;
  --gold:      #f4b400;
  --silver:    #aaa;
  --bronze:    #cd7f32;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 2px 12px rgba(0,0,0,.10);
  --shadow-md: 0 4px 20px rgba(0,0,0,.13);
  --transition: .18s ease;
  --nav-h:     64px;
  --header-h:  62px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; font-size: 15px; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--gray-bg);
  color: var(--gray-dark);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .4s ease;
}
#splash-screen.splash-hide {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: splashFadeIn .7s ease both;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  margin-bottom: 20px;
}

.splash-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.2px;
  margin-bottom: 6px;
  padding: 0 24px;
}

.splash-subtitle {
  color: rgba(255,255,255,.78);
  font-size: .8rem;
  font-weight: 500;
}

.splash-spinner-wrap {
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
}

.splash-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: splashSpin .8s linear infinite;
}

@keyframes splashSpin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(0,0,0,.08);
  position: relative;
}

/* ---- Top bar ---- */
.top-bar {
  height: var(--header-h);
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.top-bar > div:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.top-bar-title {
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-edition {
  color: rgba(255,255,255,.75);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.4);
  flex-shrink: 0;
}

/* ---- Raccourcis Live / Galerie / Infos (header) ---- */
.top-nav-extra {
  display: flex;
  gap: 2px;
  margin-left: 6px;
  flex-shrink: 0;
}

.nav-item.top-nav-item {
  flex: 0 0 auto;
  border-top: none;
  padding: 4px 6px;
  border-radius: 10px;
  color: rgba(255,255,255,.85);
  gap: 1px;
}
.nav-item.top-nav-item:active { background: rgba(255,255,255,.12); }
.nav-item.top-nav-item.active {
  color: #fff;
  background: rgba(255,255,255,.18);
}
.nav-item.top-nav-item .nav-icon {
  font-size: 1.05rem;
}
.nav-item.top-nav-item .nav-label {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

/* ---- Page content ---- */
#page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 8px);
}

.page-transition {
  opacity: 0;
  transform: translateY(6px);
}

#page-content { transition: opacity .15s ease, transform .15s ease; }

/* ---- Bottom nav ---- */
.bottom-nav {
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  display: flex;
  align-items: stretch;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }

.nav-item {
  flex: 1 0 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 2px;
  transition: background var(--transition);
  border-top: 2px solid transparent;
  color: var(--gray-mid);
}

.nav-item:active { background: var(--gray-bg); }

.nav-item.active {
  color: var(--green);
  border-top-color: var(--green);
}

.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.nav-label {
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ============================================================
   COMMON COMPONENTS
   ============================================================ */

.section-card {
  margin: 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.section-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--gray-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.green  { background: var(--green); }
.dot.red    { background: var(--red); }
.dot.gold   { background: var(--gold); }
.dot.yellow { background: #f9c900; }

.page-header {
  padding: 20px 16px 8px;
}

.page-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-dark);
}

.page-header p {
  font-size: .8rem;
  color: var(--gray-mid);
  margin-top: 2px;
}

.no-data {
  text-align: center;
  color: var(--gray-mid);
  font-size: .85rem;
  padding: 20px;
}

.loading-pulse {
  height: 80px;
  background: linear-gradient(90deg, var(--gray-light) 25%, #eee 50%, var(--gray-light) 75%);
  background-size: 200%;
  animation: pulse 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.animate-in {
  animation: fadeUp .3s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PAGE 1 — ACCUEIL
   ============================================================ */

.home-page { padding-bottom: 16px; }

/* Hero */
.hero-header {
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 55%, var(--green-light) 100%);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='28' fill='none' stroke='rgba(255,255,255,.06)' stroke-width='2'/%3E%3C/svg%3E") center/60px repeat;
  pointer-events: none;
}

.hero-logo-area {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.6);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.hero-shield {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

.hero-title {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  line-height: 1.2;
}

.hero-edition {
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  font-weight: 500;
  margin-top: 4px;
}

.theme-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

/* Next match */
.next-match-card {
  padding: 4px 0 8px;
}

.match-versus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
}

.team-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.versus-badge {
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: .85rem;
  padding: 5px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.match-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .72rem;
  color: var(--gray-mid);
  justify-content: center;
  margin-bottom: 6px;
}

.group-badge-sm {
  text-align: center;
  font-size: .72rem;
  color: var(--green);
  font-weight: 600;
}

/* Countdown */
.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0 4px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.countdown-unit span {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-unit small {
  font-size: .6rem;
  color: var(--gray-mid);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

.countdown-sep {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-light);
  margin-bottom: 12px;
}

.countdown-live {
  font-weight: 700;
  color: var(--red);
  font-size: 1rem;
  text-align: center;
  padding: 8px;
  animation: blink 1s step-end infinite;
}

/* ============================================================
   ÉTAT 1 — MATCH EN COURS (page Accueil)
   ============================================================ */
.live-match-section {
  background: linear-gradient(135deg, #0d2e1a 0%, #114a26 60%, #1a7a3c 100%);
  border: none;
  animation: liveSectionPulse 2.4s ease-in-out infinite;
}
.live-match-section .section-title {
  color: #fff;
}

@keyframes liveSectionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230,57,70,.0), var(--shadow); }
  50%      { box-shadow: 0 0 0 6px rgba(230,57,70,.18), var(--shadow); }
}

.live-badge-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: blink .9s step-end infinite;
}

.live-match-card { padding: 6px 0 4px; }

.lm-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lm-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  text-align: center;
}
.lm-team-dot {
  width: 38px; height: 38px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.lm-team-name {
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}
.lm-score {
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.lm-info-row {
  text-align: center;
  font-size: .73rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 10px;
}

.lm-periode-badge {
  display: block;
  width: fit-content;
  margin: 0 auto 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: rgba(255,255,255,.18);
  color: #fff;
}
.lm-periode-badge.lm-periode-pause {
  background: var(--gold);
  color: #1a1a2e;
  animation: blink 1.4s step-end infinite;
}

.lm-chrono {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.lm-chrono-live {
  display: inline-block;
  animation: blink .9s step-end infinite;
  color: var(--gold);
}

.btn-watch-live {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--green-dark);
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-watch-live:hover { opacity: .9; }

/* ============================================================
   ÉTAT 3 — TOURNOI TERMINÉ (page Accueil)
   ============================================================ */
.tournament-finished-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 2px solid var(--gold);
}
.tournament-finished-section .section-title { color: #fff; }

.tf-card {
  text-align: center;
  padding: 8px 0 4px;
}
.tf-trophy {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 8px;
}
.tf-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gold);
  margin-bottom: 4px;
}
.tf-champion-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.3px;
  margin-bottom: 16px;
}
.btn-final-standings {
  background: var(--gold);
  color: #1a1a2e;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-final-standings:hover { opacity: .9; }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Last results */
.result-card {
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}

.result-group {
  font-size: .68rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result-team {
  font-size: .82rem;
  font-weight: 600;
  flex: 1;
}

.result-team:last-child { text-align: right; }

.result-score {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-dark);
  background: var(--white);
  padding: 3px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  flex-shrink: 0;
}

.result-date {
  font-size: .68rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

/* Persons */
.persons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 12px 0;
}

.person-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid transparent;
}

.person-card.parrain { border-top-color: var(--gold); }
.person-card.organisateur { border-top-color: var(--green); }

.person-icon { font-size: 1.8rem; margin-bottom: 6px; }

/* ============================================================
   PAGE LIVE
   ============================================================ */

.live-page { display: flex; flex-direction: column; min-height: 100%; }

/* Bannière live sur l'accueil */
.live-home-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(90deg, #c0392b, #e63946);
  color: white;
  padding: 10px 16px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  animation: liveSlideIn .4s ease;
}
@keyframes liveSlideIn { from { opacity:0; transform:translateY(-10px) } to { opacity:1; transform:none } }

.live-home-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: white;
  animation: blink 1s step-end infinite;
  flex-shrink: 0;
}
.live-home-arrow { font-size: .75rem; opacity: .9; }

/* Nav button pulse */
.nav-item.live-active .nav-icon { animation: navLivePulse .8s ease-in-out infinite alternate; }
@keyframes navLivePulse { from { filter: none } to { filter: drop-shadow(0 0 4px #e63946); } }

/* Header */
.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}
.live-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
}
.live-badge-active {
  background: var(--red);
  color: white;
  font-size: .68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .5px;
  animation: blink 1.2s step-end infinite;
}
.live-badge-offline {
  background: #555;
  color: white;
  font-size: .68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .5px;
}

/* Hors ligne */
.live-offline-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.live-offline-icon { font-size: 3.5rem; margin-bottom: 12px; }
.live-offline-msg  { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.live-offline-sub  { font-size: .8rem; color: var(--gray-mid); margin-bottom: 24px; }
.live-next-card {
  background: var(--gray-bg);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  width: 100%;
  max-width: 360px;
}
.live-next-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-mid); margin-bottom: 8px; }
.live-next-teams { font-size: .95rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.live-next-vs    { font-size: .75rem; color: var(--gray-mid); font-weight: 600; }
.live-next-meta  { font-size: .72rem; color: var(--gray-mid); }

/* Aucune connexion internet — fonctionnalité indisponible */
.no-connection-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 24px;
  text-align: center;
}
.no-connection-icon  { font-size: 3rem; margin-bottom: 14px; opacity: .6; }
.no-connection-title { font-size: .92rem; font-weight: 700; color: var(--gray-dark); margin-bottom: 8px; max-width: 320px; }
.no-connection-sub   { font-size: .78rem; color: var(--gray-mid); line-height: 1.5; max-width: 320px; }

/* Platform toggle */
.live-platform-toggle {
  display: flex;
  gap: 8px;
  padding: 0 16px 10px;
}
.plat-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 2px solid var(--gray-light);
  background: white;
  font-family: 'Poppins', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray);
  transition: all .15s;
}
.plat-btn.active {
  border-color: var(--green);
  background: #e8f5e9;
  color: var(--green);
}

/* Lecteur vidéo */
.live-player-wrap { padding: 0 0 12px; }
.live-player-ratio {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
}
.live-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.live-no-stream {
  background: #1a1a2e;
  color: #aaa;
  text-align: center;
  padding: 40px 20px;
  font-size: .85rem;
}

/* Score card */
.live-score-card {
  margin: 0 16px 12px;
  background: #1e293b;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  color: white;
}
.live-score-meta {
  font-size: .68rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px;
}
.live-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.live-team-col {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-team-col.right { justify-content: flex-end; flex-direction: row-reverse; }
.live-team-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.live-team-name  { font-size: .82rem; font-weight: 700; }
.live-score-nums {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.live-score-num {
  font-size: 1.6rem;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
  line-height: 1;
}
.live-score-sep { font-size: 1.2rem; color: #64748b; }
.live-scorers-list { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid #2d4a6b; padding-top: 8px; }
.live-scorer-row {
  font-size: .72rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 5px;
}
.live-scorer-row.right { flex-direction: row-reverse; }
.live-scorer-min { color: #64748b; font-size: .65rem; }

/* Réactions */
.live-reactions-card {
  margin: 0 16px 16px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.live-reactions-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gray-mid);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.live-reactions-total {
  font-size: .68rem;
  background: var(--gray-bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.live-reaction-btns {
  display: flex;
  gap: 8px;
  justify-content: space-around;
}
.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--gray-light);
  background: var(--gray-bg);
  cursor: pointer;
  transition: all .15s;
  flex: 1;
}
.reaction-btn:active, .reaction-btn:hover { border-color: var(--green); background: #e8f5e9; transform: scale(1.05); }
.reaction-emoji { font-size: 1.5rem; line-height: 1; }
.reaction-count { font-size: .7rem; font-weight: 700; color: var(--gray); }

@keyframes reactionPop {
  0%   { transform: scale(1) }
  40%  { transform: scale(1.35) }
  100% { transform: scale(1) }
}
.reaction-btn.reaction-pop { animation: reactionPop .4s ease; }

.person-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 8px;
  border: 3px solid var(--gray-light);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.person-card.parrain .person-photo   { border-color: #f4b400; }
.person-card.organisateur .person-photo { border-color: var(--green); }

.person-role {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-mid);
  margin-bottom: 4px;
}

.person-name {
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-dark);
  line-height: 1.3;
}

.person-title {
  font-size: .68rem;
  color: var(--gray-mid);
  margin-top: 3px;
}

/* Dotations */
.dotations-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.dotation-item {
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}

.dotation-item.gold   { background: #fffbe6; border: 1px solid #ffe066; }
.dotation-item.silver { background: #f5f5f5; border: 1px solid #ccc; }
.dotation-item.bronze { background: #fff4ec; border: 1px solid #e0a060; }

.dotation-rank { font-size: .75rem; font-weight: 700; margin-bottom: 4px; }

.dotation-amount {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-dark);
}

.dotation-amount span { font-size: .65rem; font-weight: 500; color: var(--gray-mid); }

.participation-info { border-top: 1px solid var(--gray-light); padding-top: 10px; }

.part-item {
  font-size: .78rem;
  color: var(--gray);
  padding: 3px 0;
}

/* Footer info */
.footer-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 16px;
  font-size: .75rem;
  color: var(--gray-mid);
}

/* ============================================================
   SERVICE WORKER — Bannière de mise à jour
   ============================================================ */

#sw-update-banner {
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  z-index: 9999;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  animation: swBannerIn .3s cubic-bezier(.34,1.56,.64,1);
  max-width: calc(100vw - 32px);
}

@keyframes swBannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.sw-update-icon { font-size: 1rem; }
.sw-update-text { flex: 1; }

.sw-update-btn {
  padding: 5px 14px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.sw-update-btn:hover { background: var(--green-light); }

.sw-update-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: .85rem;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}
.sw-update-close:hover { color: white; }

/* Toast discret "mise à jour silencieuse" */
#sw-update-toast {
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #0f172a;
  color: #94a3b8;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  z-index: 9998;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  white-space: nowrap;
}
#sw-update-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   BANDEAU HORS LIGNE
   ============================================================ */
#offline-banner {
  order: -1;
  flex-shrink: 0;
  background: #f59e0b;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  padding: 7px 12px;
  letter-spacing: .2px;
  animation: offlineBannerIn .25s ease;
}
@keyframes offlineBannerIn {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 40px; }
}

/* ============================================================
   BANDEAU DEMANDE NOTIFICATIONS
   ============================================================ */
#notif-prompt-banner {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 10px);
  max-width: 456px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  border: 1px solid #e8e8e8;
  padding: 14px 16px;
  z-index: 9985;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
#notif-prompt-banner.show {
  opacity: 1;
  transform: translateY(0);
}
.notif-prompt-text {
  font-size: .82rem;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin-bottom: 12px;
}
.notif-prompt-actions {
  display: flex;
  gap: 8px;
}
.notif-prompt-btn {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  font-family: 'Poppins', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.notif-prompt-accept { background: var(--green); color: #fff; }
.notif-prompt-accept:hover { opacity: .9; }
.notif-prompt-later { background: var(--gray-bg); color: var(--gray-mid); }
.notif-prompt-later:hover { background: var(--gray-light); }

/* ============================================================
   PWA INSTALL BANNER
   ============================================================ */
#pwa-install-banner {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 10px);
  max-width: 456px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  border: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  z-index: 9990;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
#pwa-install-banner.show {
  opacity: 1;
  transform: translateY(0);
}

.pwa-install-icon {
  font-size: 1.7rem;
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: #e8f5e9;
  display: flex; align-items: center; justify-content: center;
}

.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-title {
  font-size: .85rem; font-weight: 700; color: #222;
  margin-bottom: 2px;
}
.pwa-install-sub {
  font-size: .73rem; color: #777; line-height: 1.4;
}
.pwa-install-sub strong { color: var(--green); }

.pwa-install-btn {
  background: var(--green); color: #fff;
  border: none; border-radius: 10px;
  padding: 9px 16px; font-size: .8rem; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
  font-family: inherit;
}
.pwa-install-btn:hover { background: var(--green-dark); }

.pwa-install-close {
  background: none; border: none;
  color: #aaa; font-size: .85rem;
  cursor: pointer; padding: 4px; flex-shrink: 0;
}
.pwa-install-close:hover { color: #555; }

/* ============================================================
   BOUTIQUE
   ============================================================ */

.boutique-page {
  padding-bottom: 32px;
}

/* Header */
.boutique-header {
  background: linear-gradient(135deg, #0f3d1f, #1a7a3c);
  color: white;
  padding: 20px 16px 24px;
}
.boutique-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.boutique-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 4px;
}
.boutique-subtitle {
  font-size: .78rem;
  opacity: .8;
  margin: 0;
}
.boutique-delivery-badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Filtres catégories */
.boutique-cats-wrap {
  overflow-x: auto;
  padding: 12px 14px;
  background: white;
  border-bottom: 1px solid #eee;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.boutique-cats-wrap::-webkit-scrollbar { display: none; }
.boutique-cats {
  display: flex;
  gap: 8px;
  width: max-content;
}
.cat-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid #e0e0e0;
  background: white;
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.cat-btn:hover  { border-color: var(--green); color: var(--green); }
.cat-btn.active { background: var(--green); border-color: var(--green); color: white; }

/* Grille articles */
.boutique-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 14px 12px;
}

/* Carte article */
.article-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.article-card:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.article-card.article-epuise { opacity: .75; }

.article-photo-wrap {
  position: relative;
  padding-top: 100%;
  background: #f4f5f7;
  overflow: hidden;
}
.article-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.article-card:hover .article-photo { transform: scale(1.04); }
.article-photo-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: #f4f5f7;
}
.article-photo-gray  { filter: grayscale(70%); }
.article-epuise-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.38);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.article-cat-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.55);
  color: white;
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.article-body {
  padding: 10px 10px 6px;
  flex: 1;
}
.article-name {
  font-size: .82rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-price {
  font-size: .95rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 6px;
}
.article-price span { font-size: .65rem; font-weight: 600; color: #888; }

.stock-badge {
  display: inline-flex;
  align-items: center;
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.stock-badge.stock-ok { background: #e8f5e9; color: #1a7a3c; }
.stock-badge.stock-ko { background: #fdecea; color: #c0392b; }

.btn-wa-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 9px 6px;
  background: #25d366;
  color: white;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  border-radius: 0 0 14px 14px;
  margin-top: auto;
}
.btn-wa-order:hover { background: #1ebe5c; }

/* Boutique vide */
.boutique-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}
.boutique-empty-icon  { font-size: 3rem; margin-bottom: 12px; }
.boutique-empty-title { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.boutique-empty-sub   { font-size: .8rem; }

/* ── Modal détail article ──────────────────────────────────── */
.boutique-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(3px);
  animation: fadeInOverlay .2s;
}
.boutique-modal-overlay.hidden { display: none !important; }
@keyframes fadeInOverlay { from { opacity:0 } to { opacity:1 } }

.boutique-modal {
  background: white;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  animation: slideUpModal .3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
@keyframes slideUpModal {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.1);
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background .15s;
}
.modal-close-btn:hover { background: rgba(0,0,0,.2); }

.detail-photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 24px 24px 0 0;
  display: block;
}
.detail-photo-ph {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: #f4f5f7;
  border-radius: 24px 24px 0 0;
}
.detail-body { padding: 18px 16px 28px; }
.detail-cat-chip {
  display: inline-block;
  background: #e8f5e9;
  color: var(--green);
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.detail-name  { font-size: 1.15rem; font-weight: 800; color: #1e293b; margin: 0 0 8px; }
.detail-price { font-size: 1.4rem;  font-weight: 900; color: var(--green); margin-bottom: 6px; }
.detail-price span { font-size: .75rem; font-weight: 600; color: #888; }
.detail-desc  { font-size: .84rem; color: #555; line-height: 1.55; margin: 12px 0; }

.detail-tailles  { margin: 12px 0; }
.detail-label    { font-size: .72rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.detail-tailles-row { display: flex; flex-wrap: wrap; gap: 8px; }
.taille-chip {
  padding: 7px 16px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-size: .8rem;
  font-weight: 700;
  color: #333;
  background: white;
}

.btn-wa-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
  transition: all .15s;
}
.btn-wa-full:hover { background: #1ebe5c; transform: translateY(-1px); }

/* ── Bannière boutique sur la page d'accueil ─────────────── */
.boutique-home-banner {
  margin: 0 12px 14px;
  background: linear-gradient(135deg, #0f3d1f, #1a7a3c);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,122,60,.25);
  transition: transform .15s, box-shadow .15s;
}
.boutique-home-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,122,60,.3); }
.boutique-home-icon  { font-size: 1.8rem; flex-shrink: 0; }
.boutique-home-text  { flex: 1; }
.boutique-home-title { font-size: .9rem; font-weight: 800; color: white; margin-bottom: 2px; }
.boutique-home-sub   { font-size: .72rem; color: rgba(255,255,255,.75); }
.boutique-home-arrow { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.85); flex-shrink: 0; white-space: nowrap; }

/* ============================================================
   ACCUEIL — Dernières photos
   ============================================================ */
.home-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.home-gallery-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-bg);
}
.home-gallery-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.home-gallery-cell:hover img { transform: scale(1.06); }

.btn-see-gallery {
  display: block;
  width: 100%;
  background: none;
  border: 1.5px solid var(--green);
  color: var(--green);
  border-radius: 10px;
  padding: 10px 0;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-see-gallery:hover { background: #e8f5e9; }

/* ============================================================
   GALERIE — Page publique
   ============================================================ */
.gallery-page { padding-bottom: 24px; }

.gallery-header {
  padding: 18px 16px 12px;
  text-align: center;
}
.gallery-title    { font-size: 1.15rem; font-weight: 800; color: var(--gray-dark); margin-bottom: 4px; }
.gallery-subtitle { font-size: .78rem; color: var(--gray-mid); }

.gallery-cats-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 12px 12px; scrollbar-width: none; }
.gallery-cats-wrap::-webkit-scrollbar { display: none; }
.gallery-cats { display: flex; gap: 8px; width: max-content; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 12px;
}
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-bg);
}
.gallery-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gallery-cell:hover .gallery-thumb { transform: scale(1.08); }
.gallery-pin { position: absolute; top: 6px; right: 6px; font-size: .85rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-mid);
}
.gallery-empty-icon  { font-size: 3rem; margin-bottom: 10px; }
.gallery-empty-title { font-size: .95rem; font-weight: 700; color: var(--gray-dark); margin-bottom: 6px; }
.gallery-empty-sub   { font-size: .8rem; line-height: 1.5; }

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp .2s ease;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; z-index: 10;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.6rem; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-caption {
  margin-top: 14px;
  text-align: center;
  color: #fff;
  max-width: 90vw;
}
.lightbox-legende { font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.lightbox-meta { display: flex; gap: 10px; justify-content: center; font-size: .72rem; color: rgba(255,255,255,.65); }
.lightbox-cat { background: rgba(255,255,255,.12); padding: 2px 10px; border-radius: 999px; }

.konstruct-signature {
  text-align: center;
  font-size: .65rem;
  font-weight: 600;
  color: var(--gray-mid);
  letter-spacing: .4px;
  padding: 8px 16px 20px;
  opacity: .7;
}

/* ============================================================
   PAGE 2 — ÉQUIPES
   ============================================================ */

.teams-page { padding-bottom: 16px; }

.groups-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.group-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-mid);
  cursor: pointer;
  transition: all var(--transition);
}

.group-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.group-section {
  margin: 0 12px 16px;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 0;
  color: var(--white);
}

.group-header.group-a { background: linear-gradient(90deg, #c62a35, #e63946); }
.group-header.group-b { background: linear-gradient(90deg, var(--green-dark), var(--green)); }
.group-header.group-c { background: linear-gradient(90deg, #1a4e8a, #2d6abf); }
.group-header.group-d { background: linear-gradient(90deg, #6a0dad, #9b36d4); }

.group-letter {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

.group-label {
  font-weight: 700;
  font-size: .9rem;
  flex: 1;
}

.group-count {
  font-size: .72rem;
  opacity: .8;
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--gray-light);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.team-card {
  background: var(--white);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-light);
  border-right: 1px solid var(--gray-light);
}

.team-card:nth-child(even) { border-right: none; }
.team-card:nth-last-child(-n+2) { border-bottom: none; }

.team-color-bar {
  height: 4px;
  width: 100%;
}

.team-card-body {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-badge {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1.5px solid;
  overflow: hidden;
  position: relative;
}

.team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.team-info { min-width: 0; }

.team-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gray-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.team-players {
  font-size: .65rem;
  color: var(--gray-mid);
}

.team-group-tag {
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
}

/* ============================================================
   PAGE 3 — MATCHS
   ============================================================ */

.matches-page { padding-bottom: 16px; }

.filters-row {
  display: flex;
  gap: 6px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-select {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: .75rem;
  color: var(--gray-dark);
  cursor: pointer;
  outline: none;
}

.filter-select:focus { border-color: var(--green); }

.date-group { margin: 0 12px 16px; }

.date-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-mid);
  text-transform: capitalize;
  margin-bottom: 8px;
  padding-left: 2px;
}

.match-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
  border-left: 4px solid var(--gray-light);
  transition: transform var(--transition);
}

.match-card:active { transform: scale(.99); }

.match-card.match-live {
  border-left-color: var(--red);
  box-shadow: 0 2px 16px rgba(230,57,70,.15);
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 4px;
}

.match-group-badge {
  font-size: .65rem;
  font-weight: 700;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.match-status {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-upcoming  { background: #e8f5e9; color: var(--green); }
.status-live      { background: #fdecea; color: var(--red); animation: blink 1s step-end infinite; }
.status-finished  { background: var(--gray-light); color: var(--gray-mid); }

.match-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 6px;
  gap: 8px;
}

.mc-team {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-size: .82rem;
  font-weight: 600;
}

.mc-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.mc-team-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.score-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gray-dark);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.score-display.live { color: var(--red); }

.score-dash { color: var(--gray-mid); font-weight: 400; }

.score-vs {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-mid);
  padding: 4px 10px;
  background: var(--gray-bg);
  border-radius: 6px;
  flex-shrink: 0;
}

.match-card-footer {
  display: flex;
  gap: 10px;
  padding: 4px 14px 10px;
  font-size: .7rem;
  color: var(--gray-mid);
}

.btn-share-result {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  background: none;
  border: 1.5px solid var(--green);
  color: var(--green);
  border-radius: 10px;
  padding: 9px 0;
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn-share-result:hover { background: #e8f5e9; }
.btn-share-result:disabled { opacity: .65; cursor: not-allowed; }

.result-card .btn-share-result {
  width: 100%;
  margin: 8px 0 0;
}

/* ============================================================
   PAGE 4 — CLASSEMENTS
   ============================================================ */

.standings-page { padding-bottom: 16px; }

.standing-groups-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sgroup-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-mid);
  cursor: pointer;
  transition: all var(--transition);
}

.sgroup-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.standing-section {
  margin: 0 12px 16px;
}

.standing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-light);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.standing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  min-width: 340px;
}

.standing-table thead tr {
  background: var(--gray-bg);
}

.standing-table th {
  padding: 8px 6px;
  text-align: center;
  font-weight: 700;
  color: var(--gray-mid);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}

.standing-table .th-team { text-align: left; padding-left: 10px; min-width: 100px; }
.standing-table .th-pts { color: var(--green); }

.standing-table tbody tr {
  border-bottom: 1px solid var(--gray-light);
  transition: background var(--transition);
}

.standing-table tbody tr:last-child { border-bottom: none; }
.standing-table tbody tr:hover { background: var(--gray-bg); }

.standing-table td {
  padding: 9px 6px;
  text-align: center;
  font-weight: 500;
}

.rank-cell { font-weight: 700; font-size: .85rem; }

.team-cell {
  text-align: left;
  padding-left: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.team-color-dot.lg {
  width: 14px;
  height: 14px;
}

.pts-cell {
  font-weight: 800;
  color: var(--green);
  font-size: .9rem;
}

.rank-1 { background: #fffde7 !important; }
.rank-2 { background: #f9f9f9 !important; }

.diff-pos { color: var(--green); font-weight: 700; }
.diff-neg { color: var(--red); font-weight: 700; }

/* Qualified section */
.qualified-section { margin: 0 12px 8px; }

.qualified-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.qualified-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--green);
}

.qual-rank { font-size: .62rem; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.qual-name { font-size: .7rem; font-weight: 700; margin-top: 4px; color: var(--gray-dark); line-height: 1.2; }
.qual-pts  { font-size: .8rem; font-weight: 800; color: var(--green); }
.qual-group { font-size: .62rem; color: var(--gray-mid); }

/* ============================================================
   PAGE 5 — STATS
   ============================================================ */

.stats-page { padding-bottom: 16px; }

.global-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 12px 12px;
}

.stat-globe {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--green);
}

.stat-globe.yellow-globe { border-bottom-color: #f9c900; }
.stat-globe.red-globe    { border-bottom-color: var(--red); }

.stat-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gray-dark);
  line-height: 1;
}

.stat-lbl {
  font-size: .6rem;
  color: var(--gray-mid);
  font-weight: 600;
  margin-top: 3px;
}

/* Scorers */
.scorers-list { display: flex; flex-direction: column; gap: 8px; }

.scorer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
}

.scorer-rank {
  font-size: .75rem;
  font-weight: 800;
  color: var(--gray-mid);
  min-width: 18px;
  text-align: center;
}

.scorer-info { flex: 1; min-width: 0; }
.scorer-name { font-size: .82rem; font-weight: 700; }
.scorer-team { font-size: .7rem; font-weight: 600; }

.scorer-bar-wrap {
  height: 4px;
  background: var(--gray-light);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.scorer-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .5s ease;
}

.scorer-goals {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-dark);
  white-space: nowrap;
}

.scorer-goals small { font-size: .6rem; font-weight: 500; color: var(--gray-mid); }

/* Goalkeeper */
.gk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.gk-icon { font-size: 2rem; }

.gk-team { font-size: .9rem; font-weight: 700; }

.gk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: .72rem;
  color: var(--gray-mid);
}

.gk-avg { font-weight: 700; color: var(--green); }

.gk-ranking { display: flex; flex-direction: column; gap: 6px; }

.gk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  font-size: .78rem;
}

.gk-pos { font-weight: 700; min-width: 16px; color: var(--gray-mid); }
.gk-name { flex: 1; font-weight: 600; }
.gk-val { font-weight: 700; color: var(--gray-mid); }

/* Best attack */
.attack-list { display: flex; flex-direction: column; gap: 8px; }

.attack-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--gray-bg);
}

.attack-row.attack-best { background: #e8f5e9; }

.attack-rank { font-size: .85rem; font-weight: 800; min-width: 24px; text-align: center; }
.attack-info { flex: 1; min-width: 0; }
.attack-name { font-size: .82rem; font-weight: 700; }

.attack-bar-wrap {
  height: 4px;
  background: var(--gray-light);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.attack-bar { height: 100%; border-radius: 2px; transition: width .5s ease; }

.attack-goals {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-dark);
  white-space: nowrap;
}

.attack-goals small { font-size: .6rem; color: var(--gray-mid); }

/* Cards stats */
.cards-list { display: flex; flex-direction: column; gap: 8px; }

.cards-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
}

.cards-team { flex: 1; font-size: .82rem; font-weight: 600; }

.cards-counts { display: flex; gap: 8px; }

.card-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.yellow-card { background: #fffde7; color: #856404; }
.red-card    { background: #fdecea; color: var(--red-dark); }

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.login-icon { font-size: 3rem; margin-bottom: 12px; }

.login-card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.login-card p  { font-size: .82rem; color: var(--gray-mid); margin-bottom: 20px; }

.login-form { display: flex; flex-direction: column; gap: 12px; }

.login-error {
  color: var(--red);
  font-size: .78rem;
  font-weight: 600;
}

.hidden { display: none !important; }

.admin-page { padding-bottom: 16px; }

.admin-page .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-mid);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-tab.active {
  background: var(--gray-dark);
  border-color: var(--gray-dark);
  color: var(--white);
}

#admin-content { padding: 0 12px; }

.admin-section h3 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gray-dark);
}

/* Admin input */
.admin-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  color: var(--gray-dark);
  outline: none;
  transition: border-color var(--transition);
}

.admin-input:focus { border-color: var(--green); }

/* Teams admin */
.admin-teams-list { display: flex; flex-direction: column; gap: 8px; }

.admin-team-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.at-group-badge {
  font-size: .72rem;
  font-weight: 800;
  color: var(--white);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.at-group-badge.group-a { background: var(--red); }
.at-group-badge.group-b { background: var(--green); }
.at-group-badge.group-c { background: #2d6abf; }
.at-group-badge.group-d { background: #9b36d4; }

.at-name    { flex: 1; min-width: 80px; padding: 6px 8px; font-size: .78rem; }
.at-players { width: 52px; padding: 6px 6px; font-size: .78rem; text-align: center; }
.at-color   { width: 32px; height: 32px; padding: 2px; border: 1.5px solid var(--gray-light); border-radius: 6px; cursor: pointer; flex-shrink: 0; }

/* Matches admin */
.admin-matches-list { display: flex; flex-direction: column; gap: 12px; }

.admin-match-card {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 12px;
}

.amc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: .82rem;
}

.amc-group { font-size: .7rem; color: var(--gray-mid); font-weight: 600; }

.amc-body { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

.amc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amc-row label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-mid);
  min-width: 44px;
}

.amc-date, .amc-time, .amc-venue, .amc-status {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  outline: none;
}

.amc-date:focus, .amc-time:focus, .amc-venue:focus, .amc-status:focus {
  border-color: var(--green);
}

.score-row { gap: 8px; }

.score-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amc-home-score, .amc-away-score {
  width: 56px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.amc-home-score:focus, .amc-away-score:focus { border-color: var(--green); }

/* Scorer admin */
.add-scorer-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.scorers-admin-list { display: flex; flex-direction: column; gap: 6px; }

.scorer-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: .8rem;
}

.scorer-admin-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.scorer-admin-info strong { font-size: .82rem; }
.scorer-admin-info span  { font-size: .72rem; font-weight: 600; }
.scorer-admin-info small { font-size: .65rem; color: var(--gray-mid); }

.scorer-ball { font-size: 1rem; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(26,122,60,.3);
}

.btn-primary:active { transform: scale(.98); box-shadow: none; }

.btn-sm {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--green);
  color: var(--white);
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-sm:active { transform: scale(.96); }

.btn-full { width: 100%; }

.btn-remove {
  background: var(--gray-light);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: .75rem;
  cursor: pointer;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-remove:hover { background: var(--red); color: var(--white); }

.btn-logout {
  background: var(--gray-light);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray);
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-dark);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all .25s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.toast.toast-error { background: var(--red); }

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Admin nav btn */
.admin-nav-btn { color: var(--gray-mid); font-size: .6rem; }

/* ============================================================
   RESPONSIVE TABLET
   ============================================================ */

@media (min-width: 480px) {
  .app-shell {
    border-radius: 12px;
    margin: 20px auto;
    height: calc(100dvh - 40px);
  }

  .global-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .qualified-grid    { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   BANNIÈRES ACCUEIL
   ============================================================ */

.home-banner-top,
.home-banner-bottom {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.home-banner-top {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  margin-bottom: 16px;
}

.home-banner-bottom {
  border-radius: var(--radius-lg);
  margin: 0 16px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.home-banner-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.home-banner-top .home-banner-img {
  max-height: 360px;
  object-position: center top;
}

.home-banner-bottom .home-banner-img {
  border-radius: var(--radius-lg);
  max-height: 160px;
  object-position: center center;
}

@media (max-width: 480px) {
  .home-banner-top .home-banner-img { max-height: 200px; }
}

/* Bannière vidéo (YouTube/Facebook) — 16:9 responsive */
.home-banner-video-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 */
}
.home-banner-video-ratio iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ============================================================
   PAGE TABLEAU (BRACKET)
   ============================================================ */

.bracket-page { padding-bottom: 20px; }

.bracket-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 20px;
}

/* Round labels row */
.br-labels {
  position: relative;
  height: 24px;
  margin-bottom: 8px;
  min-width: max-content;
}

.br-label {
  position: absolute;
  text-align: center;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-mid);
}

/* Bracket canvas */
.bracket-canvas {
  position: relative;
  flex-shrink: 0;
}

.bracket-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Match card */
.bm-card {
  background: #1e293b;
  border: 1.5px solid #2d4a6b;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  transition: border-color .2s, box-shadow .2s;
}

.bm-card.finished { border-color: #2d9e53; }
.bm-card.live     { border-color: var(--red); box-shadow: 0 2px 16px rgba(230,57,70,.3); }
.bm-card.penalties{ border-color: #f4b400; }

.bm-card.bm-final {
  border-color: #f4b400;
  box-shadow: 0 4px 20px rgba(244,180,0,.35);
}

.bm-card.bm-third {
  border-color: #cd7f32;
}

.bm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  flex: 1;
  min-height: 0;
  transition: background .15s;
}

.bm-row.bm-win  { background: rgba(45,158,83,.18); }
.bm-row.bm-lose { opacity: .55; }
.bm-row.tbd     { justify-content: center; }

.bm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bm-name {
  flex: 1;
  font-size: .72rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-score {
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  min-width: 16px;
  text-align: right;
}

.bm-crown { font-size: .75rem; flex-shrink: 0; }

.bm-tbd {
  font-size: .65rem;
  color: #64748b;
  font-style: italic;
}

.bm-sep {
  height: 1px;
  background: #2d4a6b;
  margin: 0;
}

.bm-pens {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: .55rem;
  font-weight: 700;
  color: #f4b400;
  letter-spacing: .3px;
}

.bm-live {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: .65rem;
  animation: blink 1s step-end infinite;
}

/* 3rd place section */
.third-wrap {
  margin-top: 20px;
  text-align: center;
}

.third-title {
  font-size: .75rem;
  font-weight: 700;
  color: #cd7f32;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.third-card-wrap {
  display: flex;
  justify-content: center;
}

/* Champion banner */
.champion-banner {
  margin: 20px 16px 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 2px solid #f4b400;
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(244,180,0,.25);
  animation: fadeUp .4s ease;
}

.champ-trophy { font-size: 3rem; line-height: 1; margin-bottom: 8px; }

.champ-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #f4b400;
  margin-bottom: 6px;
}

.champ-name {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -.3px;
}

.champ-confetti { font-size: 1.2rem; margin-top: 8px; }

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   BOUTIQUE — PANIER, COMMANDE, CONFIRMATION
   ============================================================ */

/* top-bar globale : bouton panier flottant */
.global-cart-btn {
  position: relative;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background .18s;
}
.global-cart-btn:hover { background: rgba(255,255,255,.28); }
.global-cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #e63946;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #1a7a3c;
  line-height: 1;
}

/* top-bar interne boutique */
.b-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  background: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  gap: 8px;
}
.b-topbar-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--green);
  flex: 1;
  text-align: center;
}
.b-back-btn {
  background: none; border: none;
  color: var(--green); font-size: .8rem; font-weight: 600;
  cursor: pointer; padding: 4px 0; white-space: nowrap;
}
.b-cart-icon-btn {
  position: relative;
  background: var(--green); border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.b-cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #e63946;
  color: #fff;
  font-size: .6rem; font-weight: 700;
  border-radius: 50%;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #fff;
}

/* Toast "Ajouté au panier" */
.added-toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px); left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1a7a3c; color: #fff;
  padding: 10px 22px; border-radius: 20px;
  font-size: .82rem; font-weight: 600;
  opacity: 0; transition: opacity .25s, transform .25s;
  pointer-events: none; z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.added-toast.error { background: #e63946; }
.added-toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Taille boutons (modal detail) */
.detail-section { margin-bottom: 14px; }
.detail-label   { font-size: .75rem; font-weight: 600; color: #444; margin-bottom: 7px; }
.detail-tailles-row { display: flex; flex-wrap: wrap; gap: 7px; }
.taille-btn {
  padding: 6px 14px;
  border: 2px solid #ddd;
  border-radius: 20px;
  background: #f8f8f8;
  font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  color: #333;
}
.taille-btn.active {
  border-color: var(--green);
  background: #e8f5e9;
  color: var(--green);
}
.taille-btn:hover:not(.active) { border-color: #aaa; }
.taille-error { font-size: .73rem; color: #e63946; margin-top: 5px; }

/* Controle quantite (modal detail) */
.qty-ctrl {
  display: inline-flex; align-items: center; gap: 10px;
  background: #f4f5f7; border-radius: 24px; padding: 4px 8px;
}
.qty-btn {
  width: 30px; height: 30px;
  background: #fff; border: 1.5px solid #ddd;
  border-radius: 50%; font-size: 1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--green);
  transition: background .15s;
}
.qty-btn:hover { background: #e8f5e9; }
.qty-num { font-size: .95rem; font-weight: 700; min-width: 22px; text-align: center; }

.detail-subtotal { font-size: .82rem; color: #555; margin: 10px 0 14px; }
.detail-subtotal strong { color: var(--green); font-size: .95rem; }

.btn-add-cart {
  width: 100%;
  background: var(--green); color: #fff;
  border: none; border-radius: 12px;
  padding: 13px 0; font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: background .18s;
}
.btn-add-cart:hover { background: var(--green-dark); }

/* VUE PANIER */
.cart-page { padding-bottom: 160px; }
.cart-empty {
  text-align: center;
  padding: 60px 24px;
  color: #888;
}
.cart-empty-title { font-size: 1rem; font-weight: 700; color: #444; margin: 12px 0 8px; }
.cart-empty-sub   { font-size: .82rem; line-height: 1.6; margin-bottom: 24px; }
.btn-back-shop {
  background: var(--green); color: #fff;
  border: none; border-radius: 12px;
  padding: 11px 24px; font-size: .85rem; font-weight: 600;
  cursor: pointer;
}

.cart-list { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 10px; }

.cart-item-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.ci-photo {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
}
.ci-photo-ph {
  background: #f0f0f0; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.ci-info { flex: 1; min-width: 0; }
.ci-name  { font-size: .82rem; font-weight: 700; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-meta  { font-size: .72rem; color: #888; }
.ci-price { font-size: .88rem; font-weight: 800; color: var(--green); }
.ci-unit  { font-size: .7rem; color: #aaa; }
.ci-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ci-qty { display: flex; align-items: center; gap: 6px; background: #f4f5f7; border-radius: 16px; padding: 3px 6px; }
.ci-qty-btn {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 1.5px solid #ddd;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.ci-qty-n { font-size: .8rem; font-weight: 700; min-width: 18px; text-align: center; }
.ci-del-btn {
  background: #fff4f4; border: 1.5px solid #ffc5c5;
  border-radius: 8px; padding: 4px 8px;
  font-size: .75rem; cursor: pointer; color: #e63946;
}

.cart-footer {
  position: fixed;
  bottom: var(--nav-h); left: 0; right: 0;
  background: #fff;
  padding: 12px 16px;
  border-top: 1px solid #e8e8e8;
  box-shadow: 0 -4px 16px rgba(0,0,0,.1);
  z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
}
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2px;
}
.cart-total-lbl { font-size: .82rem; font-weight: 600; color: #555; }
.cart-total-val { font-size: 1.1rem; font-weight: 800; color: var(--green); }
.btn-checkout {
  background: var(--green); color: #fff;
  border: none; border-radius: 12px;
  padding: 12px 0; font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: background .18s;
}
.btn-checkout:hover { background: var(--green-dark); }
.btn-clear-cart {
  background: none; border: 1.5px solid #ddd;
  border-radius: 10px; padding: 8px 0;
  font-size: .78rem; color: #888; cursor: pointer;
}

/* VUE COMMANDE */
.order-page { padding: 12px 14px 120px; display: flex; flex-direction: column; gap: 12px; }
.order-section {
  background: #fff; border-radius: 14px;
  padding: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.order-sec-title {
  font-size: .85rem; font-weight: 700; color: var(--green);
  margin-bottom: 10px; border-bottom: 1px solid #e8f5e9; padding-bottom: 6px;
}
.order-item-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: #444; padding: 4px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.order-item-row:last-child { border: none; }
.order-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; font-weight: 700; color: #222;
  margin-top: 8px; padding-top: 8px; border-top: 2px solid #e8e8e8;
}
.order-total-val { font-size: 1rem; font-weight: 900; color: var(--green); }

.order-input {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid #ddd; border-radius: 10px;
  font-family: inherit; font-size: .82rem;
  background: #fafafa; color: #222;
  box-sizing: border-box; margin-bottom: 8px;
  transition: border-color .18s;
}
.order-input:focus { outline: none; border-color: var(--green); background: #fff; }
.order-input-err { font-size: .72rem; color: #e63946; margin-bottom: 4px; }

/* Wave QR */
.wave-section { text-align: center; }
.wave-steps { text-align: left; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.wave-step { font-size: .78rem; color: #444; line-height: 1.5; }
.wave-step strong { color: var(--green); }
.wave-qr-wrap {
  background: #fff; border: 2px solid #e8f5e9;
  border-radius: 14px; padding: 16px;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 2px 12px rgba(26,122,60,.12);
}
.wave-qr-canvas { border-radius: 8px; display: block; max-width: 200px; }
.wave-amount { font-size: 1rem; font-weight: 800; color: var(--green); }
.btn-wave-direct {
  display: inline-block; margin-top: 10px;
  background: #1a7a3c; color: #fff;
  border-radius: 20px; padding: 8px 20px;
  font-size: .78rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
}

.btn-confirm-order {
  width: 100%;
  background: var(--green); color: #fff;
  border: none; border-radius: 12px;
  padding: 14px 0; font-size: .88rem; font-weight: 700;
  cursor: pointer; transition: background .18s, opacity .18s;
  line-height: 1.4;
}
.btn-confirm-order:disabled { opacity: .6; cursor: not-allowed; }
.btn-confirm-order:not(:disabled):hover { background: var(--green-dark); }

/* VUE CONFIRMATION */
.confirm-page {
  padding: 40px 20px 80px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 16px;
}
.confirm-icon { font-size: 4rem; }
.confirm-title { font-size: 1.2rem; font-weight: 800; color: var(--green); }
.confirm-sub { font-size: .82rem; color: #555; line-height: 1.7; }

.order-code-wrap {
  background: #e8f5e9; border: 2px solid var(--green);
  border-radius: 16px; padding: 18px 20px;
  width: 100%; box-sizing: border-box;
}
.order-code-lbl  { font-size: .72rem; font-weight: 600; color: #555; margin-bottom: 8px; }
.order-code-display {
  font-size: 1.6rem; font-weight: 900; color: var(--green);
  letter-spacing: 2px; font-family: 'Courier New', monospace;
  margin-bottom: 10px;
}
.btn-copy-code {
  background: var(--green); color: #fff;
  border: none; border-radius: 20px;
  padding: 8px 20px; font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: background .18s;
}
.btn-copy-code:hover { background: var(--green-dark); }

.confirm-tips { text-align: left; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.confirm-tip { font-size: .78rem; color: #555; background: #f8f8f8; border-radius: 10px; padding: 8px 12px; }

/* Signature KONSTRUCT */
.konstruct-signature {
  text-align: center; font-size: .65rem; color: #bbb;
  padding: 16px 0 4px; letter-spacing: .3px;
}

/* ============================================================
   À PROPOS — Page publique
   ============================================================ */
.about-page { padding: 16px 14px 24px; }

.about-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 70px 24px; text-align: center; color: var(--gray-mid);
}
.about-empty-icon { font-size: 2.6rem; margin-bottom: 10px; opacity: .6; }
.about-empty-text { font-size: .85rem; font-weight: 600; }

/* Hero organisateur */
.about-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 0 22px;
}
.about-hero-photo {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--green);
  box-shadow: 0 4px 16px rgba(26,122,60,.25);
  margin-bottom: 12px;
}
.about-photo-ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-bg); font-size: 2rem;
}
.about-hero-name  { font-size: 1.05rem; font-weight: 800; color: var(--gray-dark); }
.about-hero-title { font-size: .8rem; font-weight: 600; color: var(--green); margin-top: 2px; }
.about-hero-sub   { font-size: .75rem; color: var(--gray-mid); margin-top: 2px; }

/* Histoire */
.about-histoire-texte { font-size: .82rem; color: var(--gray); line-height: 1.6; margin-bottom: 14px; }

.about-timeline { display: flex; flex-direction: column; gap: 0; }
.about-timeline-item {
  display: flex; gap: 12px; padding-bottom: 16px; position: relative;
}
.about-timeline-item:not(:last-child)::before {
  content: ''; position: absolute; left: 11px; top: 26px; bottom: 0;
  width: 2px; background: var(--gray-light);
}
.about-timeline-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--gray-light);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; z-index: 1;
}
.about-timeline-current .about-timeline-dot {
  background: var(--gold); box-shadow: 0 0 0 4px rgba(244,180,0,.2);
}
.about-timeline-year  { font-size: .82rem; font-weight: 800; color: var(--gray-dark); }
.about-timeline-label { font-size: .76rem; color: var(--gray-mid); margin-top: 1px; }
.about-timeline-current .about-timeline-content {
  background: #e8f5e9; border-radius: 10px; padding: 6px 12px; margin-top: -4px;
}
.about-timeline-current .about-timeline-year { color: var(--green); }

/* Thème */
.about-theme-card {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(26,122,60,.25);
}
.about-theme-title { color: #fff; font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.about-theme-texte  { color: rgba(255,255,255,.9); font-size: .82rem; line-height: 1.5; }

/* Chiffres clés */
.about-chiffres-scroll {
  display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
}
.about-chiffres-scroll::-webkit-scrollbar { display: none; }
.about-chiffre-card {
  flex: 0 0 auto; min-width: 92px;
  background: var(--gray-bg); border-radius: 12px;
  padding: 14px 10px; text-align: center;
}
.about-chiffre-emoji  { font-size: 1.5rem; margin-bottom: 4px; }
.about-chiffre-valeur { font-size: 1.2rem; font-weight: 800; color: var(--green); }
.about-chiffre-label  { font-size: .68rem; color: var(--gray-mid); margin-top: 2px; }

/* Parrain */
.about-parrain-row { display: flex; align-items: center; gap: 14px; }
.about-parrain-photo {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 3px solid var(--gold);
}
.about-parrain-nom      { font-size: .9rem; font-weight: 800; color: var(--gray-dark); }
.about-parrain-titre    { font-size: .76rem; color: var(--gray); margin-top: 2px; }
.about-parrain-fonction { font-size: .72rem; color: var(--gray-mid); margin-top: 1px; }

/* Contacts */
.about-contacts-list { display: flex; flex-direction: column; gap: 8px; }
.about-contact-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--gray-bg); border-radius: 12px;
  padding: 12px 14px; text-decoration: none;
  transition: background .15s;
}
.about-contact-card:not(.about-contact-static):hover { background: var(--gray-light); }
.about-contact-icon { font-size: 1.3rem; flex-shrink: 0; }
.about-contact-label { font-size: .68rem; color: var(--gray-mid); }
.about-contact-value { font-size: .82rem; font-weight: 700; color: var(--gray-dark); }

/* Signature KONSTRUCT — version dédiée page À propos */
.konstruct-about-signature {
  text-align: center; padding: 28px 0 8px;
  font-size: .72rem; color: #aaa; line-height: 1.7;
}
.konstruct-about-signature a { color: var(--green); text-decoration: none; font-weight: 600; }
.konstruct-about-ai { font-size: .68rem; color: #ccc; margin-top: 2px; }
