/* ======================================================================
   Widget [resultats_competition] — habillage « pages résultats »
   ----------------------------------------------------------------------
   Reproduit l'apparence du widget inline des pages resultats-* (bandeau
   sombre au nom de la compétition, barre bleue de poule avec menu
   déroulant des journées et onglets Journées / Classement, liste de
   matchs sur carte blanche, classement à 6 colonnes), mais servi par le
   plugin : rien n'est stocké dans le contenu WordPress, donc rien ne
   peut être cassé par wp_kses / wptexturize.
   Structure DOM : voir competition-widget.js.
   ====================================================================== */

.comp-wrap {
  --c-dark: #374151;
  --c-darker: #1f2937;
  --c-slate: #475569;
  --c-blue: #004382;
  --c-blue-dark: #003770;
  --c-blue-finished: #1e40af;
  --c-live: #d62243;
  --c-orange: #ea580c;
  --c-red: #dc2626;
  --c-green: #059669;
  --c-pts: #3b82f6;
  --c-text: #111827;
  --c-muted: #6b7280;
  --c-line: #e5e7eb;
  --c-line-light: #f3f4f6;
  --c-row: #f9fafb;
  --c-score-soft: #f1f5f9;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Reset scopé */
.comp-wrap *, .comp-wrap *::before, .comp-wrap *::after { box-sizing: border-box; }

/* Conteneur : même gabarit que .competition-container du widget inline
   (1000px, padding 20px, pas de fond). L'id gagne sur .alignwide du thème. */
.comp-wrap,
#comp-root.comp-wrap {
  box-sizing: border-box;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  background: transparent;
  font-family: var(--font);
  color: var(--c-text);
}

.comp-wrap button,
.comp-wrap select,
.comp-wrap input {
  font-family: inherit;
}

/* ==============================================
   BANDEAU COMPÉTITION
   ============================================== */
.comp-title {
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-darker) 100%);
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 0 0 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(31, 41, 55, 0.3);
}
.comp-title h1 {
  font-family: var(--font);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
  color: #fff;
  margin: 0;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}
.comp-live-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 4px 12px;
  background: var(--c-live);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comp-live-count::before {
  content: '';
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: comp-blink 1.5s infinite;
}
@keyframes comp-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes comp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }

/* ==============================================
   LIBELLÉ DE SECTION (« Phases finales »)
   ============================================== */
.comp-section-label {
  margin: 30px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-dark);
}

/* ==============================================
   SÉLECTEUR DE POULE (compétitions multi-poules)
   ============================================== */
.poule-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px;
  background: #fff;
  border-bottom: 2px solid var(--c-line);
  border-radius: 8px 8px 0 0;
  position: sticky;
  top: var(--comp-sticky-top, 0px);
  z-index: 20;
}
.poule-btn {
  padding: 10px 20px;
  background: #fff;
  border: 2px solid var(--c-line);
  border-radius: 5px;
  color: var(--c-dark);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.poule-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.poule-btn.active {
  background: var(--c-slate);
  color: #fff;
  border-color: var(--c-slate);
  box-shadow: 0 2px 8px rgba(71, 85, 105, 0.2);
}
.poule-btn .poule-live { color: var(--c-live); }
.poule-btn.active .poule-live { color: #fff; }

/* ==============================================
   PHASE (poule ou tour de phase finale)
   ============================================== */
.phase-container { margin-bottom: 40px; }
.phase-container.group { display: none; }
.phase-container.group.active { display: block; }

/* Barre de titre de la phase */
.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 5px 5px 0 0;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-darker) 100%);
}
.phase-container.group .phase-header {
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-dark) 100%);
}
.phase-container.knockout .phase-header {
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-red) 100%);
}
.phase-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.phase-title {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
}
.phase-badge.live::before {
  content: '';
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: comp-blink 1.5s infinite;
}

/* Menu déroulant des journées */
.journee-selector-header {
  padding: 6px 12px;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  outline: none;
}
.journee-selector-header:focus { border-color: rgba(255, 255, 255, 0.7); }
.journee-selector-header option {
  color: var(--c-text);
  background: #fff;
  font-weight: 400;
}

/* Onglets Journées / Classement */
.view-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.view-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.view-tab:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}
.view-tab.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.view-tab.active:hover { background: rgba(255, 255, 255, 0.25); }

.view-panel { display: none; }
.view-panel.active { display: block; }
.phase-journee-panel { display: none; }
.phase-journee-panel.active { display: block; }

/* Carte blanche des matchs, collée sous la barre */
.phase-content {
  background: #fff;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sous-titre de date à l'intérieur d'une journée étalée sur plusieurs jours */
.day-header {
  padding: 8px 15px;
  background: var(--c-line-light);
  border-bottom: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.day-header.is-today { color: var(--c-live); }
.day-header::first-letter { text-transform: uppercase; }

/* ==============================================
   RANGÉE DE MATCH (desktop)
   ============================================== */
.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 15px;
  align-items: center;
  padding: 15px;
  background: var(--c-row);
  border: 2px solid transparent;
  border-bottom: 1px solid var(--c-line);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}
.phase-journee-panel > .match-row:last-child,
.day-group:last-child > .match-row:last-child { border-bottom-color: transparent; }
.match-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--c-slate);
  text-decoration: none;
  color: inherit;
}
.match-row:focus-visible { outline: 2px solid var(--c-slate); outline-offset: -2px; }

.team-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.team-info.away {
  flex-direction: row-reverse;
  text-align: right;
}
.team-logo {
  width: 40px; height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.team-name {
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-center {
  text-align: center;
  min-width: 120px;
}
.score-box {
  display: inline-block;
  padding: 8px 16px;
  background: var(--c-dark);
  color: #fff;
  border-radius: 5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.score-box .score-dash { margin: 0 4px; }
.score-box.live {
  background: var(--c-live);
  animation: comp-pulse 2s infinite;
}
.match-datetime {
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-muted);
}
.match-date { display: block; }
.match-date-short { display: none; }
.match-time {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  color: var(--c-dark);
}

/* ==============================================
   CLASSEMENT
   ============================================== */
.standings-wrap {
  margin-top: 20px;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
}
.comp-standings {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.comp-standings thead tr {
  background: var(--c-line-light);
  border-bottom: 2px solid var(--c-line);
}
.comp-standings th {
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--c-dark);
  border: 0;
  width: 50px;
}
.comp-standings th.col-team { text-align: left; width: auto; }
.comp-standings th[title="Différence de points"],
.comp-standings th[title="Points"] { width: 60px; }
.comp-standings tbody tr {
  border-bottom: 1px solid var(--c-line);
  transition: background-color 0.2s ease;
}
.comp-standings tbody tr:nth-child(odd) { background: var(--c-row); }
.comp-standings tbody tr.is-match { background: #fef3c7; }
.comp-standings td {
  padding: 12px;
  text-align: center;
  border: 0;
  font-variant-numeric: tabular-nums;
}
.comp-standings td.col-team { text-align: left; }
.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.team-cell .rank {
  min-width: 20px;
  color: var(--c-muted);
  font-weight: 500;
}
.team-cell img {
  width: 24px; height: 24px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.team-cell-name {
  font-weight: 500;
  color: var(--c-text);
}
.comp-standings td.col-played { color: var(--c-muted); }
.comp-standings td.col-won { color: var(--c-green); font-weight: 500; }
.comp-standings td.col-lost { color: var(--c-red); font-weight: 500; }
.comp-standings td.col-diff.pos { color: var(--c-green); font-weight: 500; }
.comp-standings td.col-diff.neg { color: var(--c-red); font-weight: 500; }
.comp-standings td.pts strong {
  display: inline-block;
  padding: 4px 8px;
  background: var(--c-pts);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

/* ==============================================
   RECHERCHE D'ÉQUIPE (multi-poules)
   ============================================== */
.team-search {
  position: relative;
  margin-bottom: 14px;
}
.team-search input {
  width: 100%;
  padding: 10px 38px 10px 40px;
  background: #fff;
  border: 2px solid var(--c-line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--c-text);
  outline: none;
  transition: border-color 0.2s ease;
}
.team-search input::placeholder { color: #9ca3af; }
.team-search input:focus { border-color: var(--c-slate); }
.team-search .ts-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--c-muted);
  pointer-events: none;
}
.team-search .ts-clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--c-line);
  color: var(--c-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.team-search .ts-clear:hover { background: var(--c-slate); color: #fff; }
.team-search.has-value .ts-clear { display: inline-flex; }
.ts-hint {
  display: none;
  margin-top: 6px;
  padding: 0 4px;
  font-size: 12px;
  color: var(--c-muted);
}
.team-search.has-value + .ts-hint { display: block; }
.match-row.is-dim { opacity: 0.4; }
.match-row.is-match { border-color: #f59e0b; }
.poule-btn.is-match { border-color: #f59e0b; color: #b45309; }
.poule-btn.is-match.active { background: #f59e0b; border-color: #f59e0b; color: #fff; }

/* ==============================================
   PHASES FINALES — onglets aller/retour, rangées compactes
   ============================================== */
.knockouts-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.knockouts-grid .phase-container { margin-bottom: 0; }
.knockouts-grid .phase-content { padding: 15px; }

.ko-leg-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  background: var(--c-line-light);
  border-radius: 6px;
}
.ko-leg-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--c-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ko-leg-tab:hover { color: var(--c-dark); }
.ko-leg-tab.active {
  background: #fff;
  color: var(--c-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.ko-leg-tab .ko-leg-count {
  display: inline-block;
  padding: 1px 7px;
  background: var(--c-line);
  color: var(--c-dark);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.ko-leg-tab.active .ko-leg-count { background: var(--c-slate); color: #fff; }
.ko-leg-tab .ko-leg-live {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--c-live);
  border-radius: 50%;
  animation: comp-blink 1.5s infinite;
}
.ko-leg-panel { display: none; }
.ko-leg-panel.active { display: block; }

.match-compact {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto minmax(0, 1fr) 24px;
  column-gap: 10px;
  align-items: center;
  position: relative;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--c-row);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  transition: all 0.2s ease;
}
.match-compact:last-child { margin-bottom: 0; }
.match-compact:hover {
  border-color: var(--c-slate);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--c-text);
}
.match-compact.live { border-color: var(--c-live); animation: comp-pulse 2s infinite; }
.match-compact .team-logo-mini { width: 24px; height: 24px; flex-shrink: 0; }
.match-compact .team-logo-mini img { width: 100%; height: 100%; object-fit: contain; display: block; }
.match-compact .team-name-mini {
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-compact .team-name-mini.visitor { text-align: right; }
.match-compact.finished.local-loser .team-name-mini.local,
.match-compact.finished.visitor-loser .team-name-mini.visitor { color: var(--c-muted); font-weight: 400; }
.match-compact.finished.local-winner .team-name-mini.local,
.match-compact.finished.visitor-winner .team-name-mini.visitor { font-weight: 600; }
.match-compact .match-mid { display: flex; align-items: center; justify-content: center; min-width: 90px; }
.match-compact .score-pill {
  display: inline-block;
  padding: 5px 12px;
  background: var(--c-dark);
  color: #fff;
  border-radius: 5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.match-compact .score-pill .score-dash { margin: 0 4px; }
.match-compact .score-pill.live { background: var(--c-live); }
.match-compact .live-mini {
  margin-left: 6px;
  padding: 2px 6px;
  background: var(--c-live);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  animation: comp-blink 1.5s infinite;
}
.match-compact .match-time-compact {
  font-size: 13px;
  color: var(--c-muted);
  white-space: nowrap;
}
.match-compact .match-time-compact strong { color: var(--c-dark); font-weight: 700; }
.match-compact .cumul-badge {
  position: absolute;
  top: -8px; right: 10px;
  padding: 2px 7px;
  background: #f59e0b;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.match-compact .cumul-badge .cumul-dash { margin: 0 2px; }
.match-compact .cumul-badge.draw { background: var(--c-muted); }

/* ==============================================
   ÉTATS VIDES / CHARGEMENT / ERREUR
   ============================================== */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-muted);
  font-size: 15px;
  background: #fff;
}
.comp-loading { padding: 8px 0; }
.skel {
  background: linear-gradient(90deg, #eef1f5 0%, #f7f9fb 50%, #eef1f5 100%);
  background-size: 200% 100%;
  animation: comp-shimmer 1.4s infinite;
  border-radius: 8px;
}
.skel-title { height: 58px; margin-bottom: 20px; }
.skel-row { height: 76px; margin-bottom: 8px; }
@keyframes comp-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.comp-error {
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
}

/* ==============================================
   MOBILE (≤ 768px)
   ============================================== */
@media (max-width: 768px) {
  .comp-wrap,
  #comp-root.comp-wrap { padding: 10px; }
  .comp-title { padding: 15px; }
  .comp-title h1 { font-size: 20px; }

  /* Barre de phase : titre + menu sur une ligne, onglets sur la suivante */
  .phase-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    font-size: 15px;
  }
  .phase-header-left {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 10px;
  }
  .journee-selector-header {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px; /* évite le zoom automatique d'iOS au focus */
  }
  .view-tabs {
    flex: 1 1 100%;
    gap: 8px;
  }
  .view-tab {
    flex: 1 1 0;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
  }

  /* Carte de match : logos au-dessus des noms, score ou date au centre */
  .match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    position: relative;
    background: #fff;
    border: 2px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    border-radius: 0;
  }
  .match-row:hover { transform: none; box-shadow: none; border-color: var(--c-line); }
  .match-row::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: transparent;
  }
  .match-row.finished::after { background: var(--c-blue-finished); }
  .match-row.live::after { background: var(--c-live); animation: comp-pulse 2s infinite; }
  .match-row.finished::before {
    content: '\2713';
    position: absolute;
    top: 8px; right: 8px;
    color: var(--c-blue-finished);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
  }
  .match-row.live::before {
    content: '\25CF LIVE';
    position: absolute;
    top: 8px; right: 8px;
    color: var(--c-live);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    animation: comp-pulse 2s infinite;
  }
  .team-info,
  .team-info.away {
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
  .team-logo {
    width: 44px; height: 44px;
    border-radius: 4px;
  }
  .team-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--c-dark);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
  }
  .match-center { min-width: 78px; flex-shrink: 0; }
  .score-box {
    padding: 10px 15px;
    min-width: 70px;
    background: var(--c-score-soft);
    color: var(--c-slate);
    border-radius: 8px;
    font-size: 20px;
  }
  .score-box.live { background: var(--c-live); color: #fff; }
  .match-datetime { padding: 5px 0; font-size: 13px; line-height: 1.3; }
  .match-date-long { display: none; }
  .match-date-short {
    display: block;
    font-weight: 600;
    color: var(--c-slate);
    margin-bottom: 2px;
  }
  .match-time {
    margin-top: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-muted);
  }
  .day-header { padding: 6px 12px; font-size: 11px; }

  /* Classement compact : tout tient dans l'écran, défilement en dernier recours */
  .standings-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comp-standings {
    min-width: 100%;
    table-layout: auto;
  }
  .comp-standings th,
  .comp-standings td {
    padding: 8px 3px;
    font-size: 13px;
  }
  .comp-standings th.col-team,
  .comp-standings td.col-team {
    width: 40%;
    max-width: 0;
    padding-left: 8px;
    text-align: left;
    overflow: hidden;
  }
  .comp-standings th:not(.col-team),
  .comp-standings td:not(.col-team) {
    width: 30px;
    text-align: center;
    white-space: nowrap;
  }
  .team-cell { gap: 6px; }
  .team-cell .rank { min-width: 0; }
  .team-cell img { width: 20px; height: 20px; }
  .team-cell-name {
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    min-width: 0;
  }
  .comp-standings td.pts strong { padding: 3px 6px; font-size: 12px; }

  .poule-selector { padding: 8px; gap: 8px; }
  .poule-btn { flex: 1 1 auto; padding: 10px 12px; font-size: 13px; }

  .knockouts-grid .phase-content { padding: 10px; }
  .match-compact { grid-template-columns: 20px minmax(0, 1fr) auto minmax(0, 1fr) 20px; column-gap: 6px; padding: 8px; font-size: 12.5px; }
  .match-compact .team-logo-mini { width: 20px; height: 20px; }
  .match-compact .match-mid { min-width: 64px; }
  .match-compact .score-pill { padding: 4px 8px; font-size: 13px; }
}

/* Le thème enfant pose, sous 640px, un « th, td { display:none } » global
   qui ne ré-affiche que les colonnes 1-5 et 10 : sur un classement à
   6 colonnes, la colonne des points disparaissait. Neutralisé ici. */
@media (max-width: 640px) {
  .comp-wrap .comp-standings th,
  .comp-wrap .comp-standings td { display: table-cell !important; }
}

@media (max-width: 400px) {
  .comp-wrap,
  #comp-root.comp-wrap { padding: 8px; }
  .match-row { padding: 12px 8px; gap: 8px; }
  .team-name { font-size: 12px; }
  .comp-standings th,
  .comp-standings td { font-size: 12px; }
}

/* Animations désactivées si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
  .comp-wrap *,
  .comp-wrap *::before,
  .comp-wrap *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
