/* ============================================================
   style.css — SportEvent
   Design : fond blanc · accents orange · typographie Raleway + DM Sans
   Mobile-first, Modern, Clean
   ============================================================ */

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

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --orange:       #FF6B00;
  --orange-light: #FF8C38;
  --orange-pale:  #FFF3E8;
  --orange-dark:  #D95A00;

  --black:  #111111;
  --gray-1: #1E1E1E;
  --gray-2: #444444;
  --gray-3: #777777;
  --gray-4: #AAAAAA;
  --gray-5: #E5E5E5;
  --gray-6: #F5F5F5;
  --white:  #FFFFFF;

  --success: #22C55E;
  --warning: #EAB308;
  --danger:  #EF4444;
  --info:    #3B82F6;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow:    0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-orange: 0 6px 24px rgba(255,107,0,0.28);

  --font-display: 'Raleway', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

  --header-h: 60px;
  --max-w:    1100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}
ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--black);
}
h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 4vw, 36px); }
h3 { font-size: clamp(18px, 3vw, 24px); }
h4 { font-size: 18px; }
h5 { font-size: 15px; }

p { color: var(--gray-2); }

.text-orange  { color: var(--orange); }
.text-muted   { color: var(--gray-3); }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 11px; letter-spacing: 0.06em; }
.text-center  { text-align: center; }
.font-bold    { font-weight: 700; }
.font-display { font-family: var(--font-display); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 600px) { .container { padding-inline: 24px; } }
@media (min-width: 900px) { .container { padding-inline: 40px; } }

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Navigation Bar ─────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-5);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-logo {
  width: 34px;
  height: 34px;
  background: var(--orange);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-logo svg { color: white; }
.topbar-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--black);
}
.topbar-title span { color: var(--orange); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  box-shadow: 0 8px 28px rgba(255,107,0,0.38);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gray-6);
  color: var(--black);
}
.btn-secondary:hover { background: var(--gray-5); }

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-2);
  padding: 8px 14px;
}
.btn-ghost:hover { background: var(--gray-6); color: var(--black); }

.btn-danger {
  background: #FEE2E2;
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-sm  { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg  { padding: 15px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

/* ── FAB (Floating Action Button) ───────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--orange);
  color: white;
  border-radius: 50px;
  padding: 14px;
  box-shadow: var(--shadow-orange);
  transition: var(--transition-bounce);
  cursor: pointer;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  border: none;
  width: 56px;
  height: 56px;
  justify-content: center;
}
.fab .fab-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}
.fab .fab-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
  margin-left: 0;
}
.fab:hover,
.fab.fab-expanded {
  width: auto;
  padding: 14px 22px;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(255,107,0,0.40);
}
.fab:hover .fab-label,
.fab.fab-expanded .fab-label {
  max-width: 200px;
  opacity: 1;
  margin-left: 8px;
}
.fab:hover .fab-icon,
.fab.fab-expanded .fab-icon {
  transform: rotate(45deg);
}
/* FAB centré (aucun événement) */
.fab-centered {
  position: relative;
  bottom: auto;
  right: auto;
  width: auto;
  height: auto;
  padding: 18px 36px;
  font-size: 17px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-orange);
}
.fab-centered .fab-label {
  max-width: 300px;
  opacity: 1;
  margin-left: 10px;
}
.fab-centered .fab-icon { transform: none !important; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-5);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: transparent;
  transform: translateY(-2px);
}
.card-accent {
  border-top: 3px solid var(--orange);
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--black);
  line-height: 1.3;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-3);
}
.card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Badge / Tag ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-orange  { background: var(--orange-pale); color: var(--orange-dark); }
.badge-green   { background: #DCFCE7; color: #166534; }
.badge-yellow  { background: #FEF9C3; color: #854D0E; }
.badge-red     { background: #FEE2E2; color: #991B1B; }
.badge-gray    { background: var(--gray-6); color: var(--gray-2); }
.badge-blue    { background: #DBEAFE; color: #1E40AF; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-2);
  letter-spacing: 0.03em;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--gray-6);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--black);
  transition: var(--transition);
}
.form-input:focus {
  background: var(--white);
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,107,0,0.10);
}
.form-input::placeholder { color: var(--gray-4); }
.form-input.input-error { border-color: var(--danger); }

.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--gray-6);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--black);
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
}
.form-select:focus {
  background-color: var(--white);
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,107,0,0.10);
  outline: none;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 540px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px 32px;
  transform: translateY(40px);
  transition: transform var(--transition-bounce);
  position: relative;
}
@media (min-width: 600px) {
  .modal {
    border-radius: var(--radius-xl);
    transform: scale(0.95) translateY(10px);
  }
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-5);
  border-radius: 2px;
  margin: 0 auto 20px;
}
@media (min-width: 600px) { .modal-handle { display: none; } }
.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 20px;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.modal-close:hover { background: var(--gray-5); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-6);
  padding: 4px;
  border-radius: var(--radius);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--gray-3);
  transition: var(--transition);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--white);
  color: var(--black);
  box-shadow: var(--shadow-sm);
}
.tab-btn:hover:not(.active) { color: var(--black); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Toast / Notifications ──────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
@media (min-width: 600px) { #toast-container { bottom: 24px; right: 24px; } }
.toast {
  background: var(--black);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: toastIn 0.35s var(--transition-bounce) both;
}
.toast.toast-success { background: #166534; }
.toast.toast-error   { background: #991B1B; }
.toast.toast-warning { background: #854D0E; }
.toast.toast-out { animation: toastOut 0.25s ease both; }
@keyframes toastIn  { from { opacity:0; transform: translateX(20px) scale(0.96); } to { opacity:1; transform: none; } }
@keyframes toastOut { to { opacity:0; transform: translateX(20px); } }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  gap: 16px;
}
.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--orange-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.empty-state-icon svg { color: var(--orange); }
.empty-state h3 { font-size: 20px; }
.empty-state p  { color: var(--gray-3); max-width: 280px; font-size: 14px; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gray-5);
  margin-block: 20px;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-4);
  font-size: 13px;
  margin-block: 20px;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-5);
}

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spinner-orange {
  border-color: var(--orange-pale);
  border-top-color: var(--orange);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton Loader ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-6) 25%, var(--gray-5) 50%, var(--gray-6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Auth Page Layout ───────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  pointer-events: none;
}
.auth-bg-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--orange);
  top: -150px;
  right: -100px;
}
.auth-bg-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--orange-light);
  bottom: -80px;
  left: -80px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--gray-5);
  border-radius: var(--radius-xl);
  padding: 36px 28px 40px;
  box-shadow: var(--shadow-lg);
  animation: authCardIn 0.5s var(--transition-bounce) both;
  position: relative;
  z-index: 1;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.auth-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-orange);
}
.auth-logo svg { color: white; width: 28px; height: 28px; }
.auth-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  color: var(--black);
  margin-bottom: 4px;
}
.auth-title span { color: var(--orange); }
.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--gray-3);
  margin-bottom: 28px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-footer-text {
  text-align: center;
  font-size: 12px;
  color: var(--gray-4);
  margin-top: 24px;
  line-height: 1.6;
}
.auth-footer-text a { color: var(--orange); font-weight: 600; }

/* Password input wrapper */
.input-pw-wrap {
  position: relative;
}
.input-pw-wrap .form-input {
  padding-right: 46px;
}
.input-pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-4);
  display: flex;
  padding: 4px;
  transition: color var(--transition);
}
.input-pw-toggle:hover { color: var(--gray-2); }

/* ── Error Banner ───────────────────────────────────────────── */
.error-banner {
  background: #FEE2E2;
  color: #991B1B;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.error-banner svg { flex-shrink: 0; margin-top: 1px; }
.error-banner.hidden { display: none; }

/* ── Progress Steps ─────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}
.step-circle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-5);
  color: var(--gray-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  transition: var(--transition);
}
.step-circle.active {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--orange-pale);
}
.step-circle.done {
  background: var(--success);
  color: var(--white);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-5);
  margin-inline: -1px;
  transition: background var(--transition);
}
.step-line.done { background: var(--success); }

/* ── Responsive Grid ────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2  { grid-template-columns: repeat(2, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 540px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--gray-6);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--orange);
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--gray-5);
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  background: var(--gray-6);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-3);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  font-size: 14px;
  border-top: 1px solid var(--gray-6);
  color: var(--gray-1);
}
tbody tr:hover td { background: var(--gray-6); }
.rank-1 td:first-child { color: #F59E0B; font-weight: 800; }
.rank-2 td:first-child { color: var(--gray-3); font-weight: 700; }
.rank-3 td:first-child { color: #CD7F32; font-weight: 700; }

/* ── Offline Banner ─────────────────────────────────────────── */
#offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--warning);
  color: var(--black);
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: none;
}
body.offline #offline-banner { display: block; }
body.offline .topbar { top: 38px; }

/* ── Utilities ──────────────────────────────────────────────── */
.hidden  { display: none !important; }
.visible { display: block !important; }
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-4   { gap: 4px; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-20  { gap: 20px; }
.mt-4    { margin-top: 4px; }
.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-8    { margin-bottom: 8px; }
.mb-12   { margin-bottom: 12px; }
.mb-16   { margin-bottom: 16px; }
.mb-20   { margin-bottom: 20px; }
.p-0     { padding: 0; }
.w-full  { width: 100%; }
.rounded-full { border-radius: 50%; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-4); }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .topbar, .fab, #toast-container, #offline-banner { display: none !important; }
  body { background: white; }
}

/* ══════════════════════════════════════════════════════════════
   MATCHES — Phase 5
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   MATCHES TOOLBAR — UI/UX redesign
   Navigation principale (phases) + filtres secondaires (statuts)
   ══════════════════════════════════════════════════════════════ */

/* ── Wrapper global ─────────────────────────────────────────── */
.matches-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* ── Ligne 1 : navigation principale (Segmented control) ────── */
.matches-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Le segmented control des phases */
.matches-phase-segmented {
  display: flex;
  background: var(--gray-6);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 2px;
  flex-wrap: wrap;
}

.phase-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: calc(var(--radius-lg) - 4px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--gray-3);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}
.phase-seg-btn svg {
  flex-shrink: 0;
  transition: color var(--transition);
}
.phase-seg-btn:hover:not(.active) {
  color: var(--black);
  background: rgba(255,255,255,0.6);
}
.phase-seg-btn.active {
  background: var(--white);
  color: var(--black);
  box-shadow: 0 1px 6px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.04);
}
.phase-seg-btn.active svg {
  color: var(--orange);
}
/* Badge compteur dans les onglets de phase */
.phase-seg-badge {
  background: var(--orange-pale);
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--font-display);
  line-height: 1.5;
  transition: var(--transition);
}
.phase-seg-btn.active .phase-seg-badge {
  background: var(--orange);
  color: white;
}

/* ── Bouton action distinct (Matchs de classement) ──────────── */
.btn-placement {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-5);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--gray-2);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-placement svg { flex-shrink: 0; color: var(--orange); }
.btn-placement:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-pale);
  box-shadow: var(--shadow-sm);
}

/* ── Ligne 2 : filtres secondaires (chips) ──────────────────── */
.matches-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Label discret devant les chips */
.filter-row-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-4);
  flex-shrink: 0;
  margin-right: 2px;
}

/* Chip statut */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--gray-5);
  background: var(--white);
  color: var(--gray-3);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.status-chip svg { flex-shrink: 0; }
.status-chip:hover:not(.active) {
  border-color: var(--orange-light);
  color: var(--gray-1);
  background: var(--orange-pale);
}
.status-chip.active {
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
/* Couleurs par statut */
.status-chip[data-filter="all"].active      { background: var(--black); }
.status-chip[data-filter="upcoming"].active { background: var(--info); }
.status-chip[data-filter="ongoing"].active  { background: var(--orange); box-shadow: var(--shadow-orange); }
.status-chip[data-filter="finished"].active { background: var(--success); }

/* Pulsation pour le chip "En cours" actif */
.chip-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-chip[data-filter="ongoing"].active .chip-live-dot {
  animation: chip-pulse 1.4s ease infinite;
}
@keyframes chip-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.7); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .phase-seg-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 5px;
  }
  .phase-seg-btn span { display: none; } /* Masquer le texte, garder l'icône */
  .phase-seg-btn .phase-seg-label { display: none; }
  .phase-seg-btn.active span,
  .phase-seg-btn.active .phase-seg-label { display: inline; }
}

/* ── Quick stats ────────────────────────────────────────────── */
.matches-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--gray-6);
  border-radius: var(--radius);
}
.match-stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-2);
  font-weight: 500;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dot-green  { background: var(--success); }
.dot-orange { background: var(--orange); }
.dot-gray   { background: var(--gray-4); }
.match-progress-wrap {
  flex: 1;
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-3);
  font-weight: 600;
  background: var(--gray-5);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  position: relative;
}
.match-progress-wrap span {
  position: absolute;
  right: -32px;
  white-space: nowrap;
  background: none;
}
.match-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* ── Match group header ─────────────────────────────────────── */
.match-group { margin-bottom: 24px; }
.match-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange-pale);
}
.match-group-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.match-cards-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) { .match-cards-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .match-cards-list { grid-template-columns: 1fr 1fr 1fr; } }

/* ── Match card ─────────────────────────────────────────────── */
.match-card {
  background: var(--white);
  border: 1px solid var(--gray-5);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.match-card-ongoing  { border-left: 3px solid var(--orange); }
.match-card-finished { border-left: 3px solid var(--success); }
.match-card-cancelled{ opacity: 0.55; }

.match-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.match-terrain {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-3);
}
.match-time {
  font-size: 12px;
  color: var(--gray-3);
}

.match-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
}
.match-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.match-team-right { justify-content: flex-end; }
.match-team-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray-1);
}
.match-team-winner .match-team-name { color: var(--black); font-weight: 800; }
.win-crown { font-size: 14px; flex-shrink: 0; }

.match-score-display {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.score {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--gray-3);
  min-width: 28px;
  text-align: center;
}
.score-win { color: var(--orange); }
.score-sep { font-size: 16px; color: var(--gray-4); font-weight: 300; }

.match-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.match-card-actions .btn { flex: 1; min-width: 100px; }

/* ── Score modal ────────────────────────────────────────────── */
.score-input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  justify-content: center;
}
.score-team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.score-team-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  color: var(--black);
  word-break: break-word;
}
.score-counter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-minus, .score-plus {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  font-weight: 700;
  border: 2px solid var(--gray-5);
  background: var(--gray-6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
  color: var(--gray-2);
}
.score-minus:hover { background: #FEE2E2; border-color: var(--danger); color: var(--danger); }
.score-plus:hover  { background: var(--orange-pale); border-color: var(--orange); color: var(--orange); }
.score-input-field {
  width: 64px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--black);
  border: 2px solid var(--gray-5);
  border-radius: var(--radius);
  padding: 6px 4px;
  background: var(--gray-6);
  outline: none;
  transition: border-color var(--transition);
}
.score-input-field:focus { border-color: var(--orange); background: white; }
.score-vs {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  color: var(--gray-4);
  letter-spacing: 0.1em;
}
.score-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--gray-6);
  border-radius: var(--radius);
}
.score-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.score-option-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
  cursor: pointer;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   BRACKET — Arbre de tournoi interactif (redesign complet)
   ══════════════════════════════════════════════════════════════ */

/* ── En-tête de l'arbre ─────────────────────────────────────── */
.bracket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--gray-6);
  border-radius: var(--radius);
}
.bracket-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bracket-phase-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--black);
}
.bracket-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--orange);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.bracket-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
  animation: bld-pulse 1.4s ease infinite;
}
@keyframes bld-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.7); }
}
.bracket-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bracket-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--gray-3);
  flex-wrap: wrap;
}
.bleg {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.bleg-upcoming { background: var(--gray-5); }
.bleg-ongoing  { background: var(--orange); }
.bleg-finished { background: var(--success); }

/* ── Scroll container ───────────────────────────────────────── */
.bracket-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.bracket-scroll {
  display: flex;
  gap: 40px;
  padding: 20px;
  min-height: 600px; /* Ajuste selon tes besoins */
  align-items: stretch;
}

/* ── Round column ───────────────────────────────────────────── */
.bracket-round {
  display: flex;
  flex-direction: column;
  width: 240px;
  flex-shrink: 0;
}

/* Espace entre rounds pour les connecteurs */
.bracket-round + .bracket-round { margin-left: 32px; }

.bracket-round-label {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--gray-3);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  height: 20px;
}

.bracket-round-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--orange);
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Matches list in round ──────────────────────────────────── */
.bracket-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around; /* Répartit les matchs avec un espacement égal */
  flex: 1; /* Prend toute la hauteur de la colonne */
  gap: 20px;
}

/* ── Bracket Match Card (bmc) ───────────────────────────────── */
.bmc {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--gray-5);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s;
}

.bmc:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* États par statut */
.bmc-upcoming { border-color: var(--gray-5); }
.bmc-waiting  { border-color: var(--gray-5); border-style: dashed; background: var(--gray-6); }
.bmc-ongoing  {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.10);
}
.bmc-finished { border-color: var(--gray-5); }
.bmc-pending  {
  opacity: 0.55;
  background: var(--gray-6);
  border-color: var(--gray-5);
  border-style: dashed;
}

/* ── En-tête de la carte (statut + horaire) ─────────────────── */
.bmc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--gray-6);
  border-bottom: 1px solid var(--gray-5);
  min-height: 26px;
  flex-wrap: wrap;
}
.bmc-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.bmc-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--orange);
  color: white;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}
.bmc-pulse {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: white;
  animation: bld-pulse 1.4s ease infinite;
}
.bmc-draw-badge {
  background: #FEF9C3;
  color: #854D0E;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
}
.bmc-disq-badge {
  background: #FEE2E2;
  color: #991B1B;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
}
.bmc-terrain {
  font-size: 10px;
  color: var(--gray-4);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Horaire éditable inline dans le bracket */
input.bracket-time-input {
  border: none;
  background: transparent;
  font-size: 11px;
  color: var(--gray-3);
  cursor: pointer;
  padding: 0 2px;
  font-family: var(--font-body);
  width: 56px;
  transition: color var(--transition);
}
input.bracket-time-input:focus {
  outline: 1px solid var(--orange);
  border-radius: 3px;
  color: var(--black);
}
input.bracket-time-input:disabled {
  cursor: default;
  color: var(--gray-4);
}

/* ── Ligne équipe ───────────────────────────────────────────── */
.bmc-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  gap: 8px;
  transition: background var(--transition);
}
.bmc-team-win {
  background: linear-gradient(90deg, rgba(255,107,0,0.07) 0%, rgba(255,107,0,0.03) 100%);
}
.bmc-team-win .bmc-team-name {
  color: var(--orange-dark);
  font-weight: 800;
}
.bmc-team-tbd { opacity: 0.45; }
.bmc-team-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.bmc-crown {
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}
.bmc-team-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray-1);
  flex: 1;
  min-width: 0;
}
.bmc-score {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  color: var(--gray-4);
  flex-shrink: 0;
  min-width: 22px;
  text-align: right;
  line-height: 1;
}
.bmc-score-win { color: var(--orange); }

/* ── Séparateur central ─────────────────────────────────────── */
.bmc-divider {
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: relative;
  height: 14px;
}
.bmc-divider-line {
  flex: 1;
  height: 1px;
  background: var(--gray-5);
}
.bmc-vs {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  color: var(--gray-4);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0 4px;
  font-family: var(--font-display);
}

/* ── Boutons d'action compacts ──────────────────────────────── */
.bmc-actions {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  background: var(--gray-6);
  border-top: 1px solid var(--gray-5);
}
.bmc-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.bmc-btn svg { flex-shrink: 0; }

/* Démarrer */
.bmc-btn-start {
  background: #DBEAFE;
  color: #1E40AF;
}
.bmc-btn-start:hover {
  background: var(--info);
  color: white;
}

/* Terminer (stop rapide) */
.bmc-btn-finish {
  background: #FEF9C3;
  color: #854D0E;
}
.bmc-btn-finish:hover {
  background: var(--warning);
  color: white;
}

/* Score */
.bmc-btn-score {
  background: var(--orange-pale);
  color: var(--orange-dark);
}
.bmc-btn-score:hover {
  background: var(--orange);
  color: white;
}

/* ── Connecteurs entre rounds (SVG) ─────────────────────────── */
/* Les connecteurs sont des pseudo-éléments CSS sur .bracket-round + .bracket-round
   qui dessinent les lignes horizontales. L'alignement vertical est géré par
   le flex justify-content:space-around des .bracket-matches. */
.bracket-round + .bracket-round {
  position: relative;
}

.bracket-round + .bracket-round::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 0; bottom: 0;
  width: 32px;
  /* SUPPRIME TOUT LE BLOC "background: repeating-linear-gradient(...)" QUI ÉTAIT ICI */
  pointer-events: none;
  z-index: 0;
}

/* ── Grande Finale : mise en valeur ─────────────────────────── */
.bracket-round:last-child .bmc {
  border-width: 2px;
  box-shadow: var(--shadow);
}
.bracket-round:last-child .bmc.bmc-finished {
  border-color: var(--orange);
  box-shadow: var(--shadow-orange);
}
.bracket-round:last-child .bracket-round-label {
  background: linear-gradient(90deg, var(--orange-pale), var(--orange-pale) 70%, transparent);
  color: var(--orange-dark);
  font-size: 12px;
}

/* ── Standings ──────────────────────────────────────────────── */
.standings-pool-block { margin-bottom: 28px; }
.standings-pool-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange-pale);
  color: var(--black);
}

/* ── Pulse animation pour match en cours dans le bracket ───── */
.match-ongoing-pulse {
  animation: ongoing-pulse-border 2s ease infinite;
}
@keyframes ongoing-pulse-border {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,107,0,0.0), var(--shadow); }
  50%      { box-shadow: 0 0 0 5px rgba(255,107,0,0.20), var(--shadow); }
}

/* ── Config section amélioration : deux blocs distincts ─────── */
.config-section + .config-section {
  margin-top: 16px;
}

/* Titres des sous-blocs de durée variable */
.cfg-round-dur-label {
  font-size: 12px;
  color: var(--gray-2);
}

/* Champs de durée variable : fond teinté pour les distinguer */
.cfg-round-dur {
  background: #FFFBF5;
  border-color: #FED7AA;
}
.cfg-round-dur:focus {
  background: white;
  border-color: var(--orange);
}
.cfg-round-dur:not(:placeholder-shown) {
  background: var(--orange-pale);
  border-color: var(--orange-light);
  font-weight: 700;
  color: var(--orange-dark);
}

/* ══════════════════════════════════════════════════════════════
   ÉCRAN DIAPORAMA (Interface 3)
   ══════════════════════════════════════════════════════════════ */
.slideshow-page {
  background: #0A0A0A;
  color: white;
  min-height: 100vh;
  font-family: var(--font-display);
  overflow: hidden;
  position: relative;
}
.slideshow-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(255,107,0,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(255,140,56,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.slide.active {
  opacity: 1;
  pointer-events: all;
  position: relative;
}
.slide-label {
  font-size: clamp(11px,1.5vw,14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.slide-label::before,
.slide-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--orange);
  opacity: 0.4;
}
.slide-title {
  font-size: clamp(28px,5vw,64px);
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 32px;
}
.slide-title span { color: var(--orange); }

/* Slide : match en cours */
.live-match-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,107,0,0.3);
  border-radius: var(--radius-xl);
  padding: clamp(20px,3vw,48px);
  width: 100%;
  max-width: 700px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 0 60px rgba(255,107,0,0.12);
}
.live-team {
  flex: 1;
  text-align: center;
}
.live-team-name {
  font-size: clamp(16px,2.5vw,28px);
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}
.live-score {
  font-size: clamp(40px,7vw,96px);
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
}
.live-vs {
  font-size: clamp(16px,2vw,24px);
  color: rgba(255,255,255,0.3);
  font-weight: 300;
  letter-spacing: 0.1em;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-pulse {
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.4s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.8); }
}

/* Slide : classement diaporama */
.slide-standings-table {
  width: 100%;
  max-width: 700px;
  border-collapse: collapse;
}
.slide-standings-table th {
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.slide-standings-table td {
  padding: 12px 14px;
  font-size: clamp(13px,1.8vw,17px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
}
.slide-standings-table tr:first-child td { color: white; }
.slide-rank-1 td:nth-child(2) { color: #F59E0B; font-weight: 800; }
.slide-rank-2 td:nth-child(2) { color: #9CA3AF; font-weight: 700; }
.slide-rank-3 td:nth-child(2) { color: #CD7F32; font-weight: 700; }
.slide-pts { color: var(--orange) !important; font-weight: 900 !important; font-size: 18px !important; }

/* Prochains matchs */
.next-matches-list { width: 100%; max-width: 700px; display: flex; flex-direction: column; gap: 12px; }
.next-match-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.next-match-time {
  font-size: clamp(12px,1.5vw,16px);
  color: var(--orange);
  font-weight: 800;
  white-space: nowrap;
  min-width: 50px;
}
.next-match-terrain {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  min-width: 70px;
  white-space: nowrap;
}
.next-match-teams {
  flex: 1;
  font-size: clamp(13px,1.8vw,18px);
  font-weight: 700;
  color: white;
  text-align: center;
}

/* Navigation diaporama */
.slideshow-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 8px 16px;
  backdrop-filter: blur(8px);
  z-index: 100;
}
.slideshow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: var(--transition);
  cursor: pointer;
}
.slideshow-dot.active { background: var(--orange); width: 20px; border-radius: 4px; }
.slideshow-ctrl {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
  display: flex;
}
.slideshow-ctrl:hover { color: white; }
.slideshow-auto-badge {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
}
.slideshow-back {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  z-index: 100;
  text-decoration: none;
}
.slideshow-back:hover { background: rgba(255,255,255,0.12); color: white; }
.slideshow-event-name {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
  z-index: 100;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Mobile responsive fixes (event page) ──────────────────── */
@media (max-width: 480px) {

  /* Match card : team names smaller, actions stack */
  .match-team-name { font-size: 12px; }
  .score { font-size: 18px; min-width: 22px; }
  .match-card-meta { font-size: 11px; gap: 6px; }
  .match-card-actions { gap: 6px; }
  .match-card-actions .btn { min-width: 0; font-size: 12px; padding: 6px 8px; }

  /* Check-in : boutons présent/absent plus petits */
  .checkin-toggle button { padding: 5px 8px; font-size: 11px; }
  .checkin-card { padding: 12px; gap: 8px; }
  .checkin-avatar { width: 34px; height: 34px; font-size: 12px; }

  /* Team cards : actions compactes */
  .team-actions .btn { padding: 5px 7px; }
  .team-name { font-size: 13px; }

  /* Config rows : toujours 1 colonne */
  .config-row-2, .config-row-3, .config-row-4 { grid-template-columns: 1fr !important; }

  /* Toolbar équipes : wrap propre */
  .teams-toolbar { gap: 6px; }
  .teams-toolbar-left, .teams-toolbar-right { gap: 6px; }
  .teams-toolbar .btn { font-size: 12px; padding: 6px 10px; }

  /* Score modal : compteur moins large */
  .score-minus, .score-plus { width: 32px; height: 32px; font-size: 18px; }
  .score-input-field { width: 54px; font-size: 24px; }
  .score-team-name { font-size: 12px; }
}

@media (max-width: 360px) {
  /* Très petits écrans : header event encore plus compact */
  .event-title-block h1 { font-size: 14px; }
  .event-meta-item { font-size: 11px; }

  /* Score modal : réduire encore */
  .score-input-row { gap: 10px; }
  .score-minus, .score-plus { width: 28px; height: 28px; font-size: 16px; }
  .score-input-field { width: 48px; font-size: 20px; }
}
