/* ==========================================================================
   SIMULATEUR UEFA LIGUE DES CHAMPIONS — MadeInFoot
   Thème : Lumineux, moderne, fidèle à la charte MadeInFoot (Fond blanc / gris perle)
   Optimisé à 100% pour mobile (90% du trafic)
   ========================================================================== */

/* --- Racine & Conteneur Global --- */
.uefa-sim-wrap {
  background-color: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  padding-bottom: 60px;
}

.uefa-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 12px;
}

@media (min-width: 640px) {
  .uefa-container {
    padding: 0 16px;
  }
}

/* --- Hero Section --- */
.uefa-hero {
  text-align: center;
  padding: 24px 8px 20px;
}

.uefa-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.uefa-hero__title {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

@media (min-width: 640px) {
  .uefa-hero__title {
    font-size: 2.4rem;
  }
}

.uefa-hero__title span {
  color: #0284c7;
}

.uefa-hero__subtitle {
  font-size: 0.95rem;
  color: #475569;
  max-width: 640px;
  margin: 0 auto 18px;
  line-height: 1.45;
}

.uefa-hero__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Boutons Génériques --- */
.uefa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  touch-action: manipulation;
}

.uefa-btn--primary {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.uefa-btn--primary:hover {
  background: #0369a1;
  color: #ffffff;
}

.uefa-btn--secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.uefa-btn--secondary:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.uefa-btn--secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.uefa-btn--ghost {
  background: transparent;
  color: #64748b;
}

.uefa-btn--ghost:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.uefa-btn--ai {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #1d4ed8 100%);
  color: #ffffff;
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  letter-spacing: 0.2px;
}

.uefa-btn--ai:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 40%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

.uefa-btn--ai.is-thinking {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  cursor: wait !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4) !important;
  animation: uefaAiThinkingPulse 1.2s infinite alternate ease-in-out;
}

@keyframes uefaAiThinkingPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3); }
  100% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.6); }
}

.uefa-btn--ai-sm {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 600;
}

.uefa-btn--ai-sm:hover {
  background: #e0f2fe;
  color: #0284c7;
}

/* Animation sur les cases de scores quand l'IA les remplit */
@keyframes uefaScorePulse {
  0% { background-color: #bae6fd; transform: scale(1.15); border-color: #0284c7; }
  100% { background-color: #ffffff; transform: scale(1); border-color: #cbd5e1; }
}

.uefa-score-input.uefa-ai-highlight {
  animation: uefaScorePulse 0.8s ease forwards;
}

.uefa-btn--ghost-sm {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.uefa-btn--ghost-sm:hover {
  background: #f8fafc;
  color: #0f172a;
}

.uefa-btn--lg {
  padding: 12px 24px;
  font-size: 15px;
}

.uefa-btn--pulse {
  animation: uefaPulseLight 2s infinite;
}

@keyframes uefaPulseLight {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

/* --- Bannière Reprendre Simulation --- */
.uefa-resume-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.uefa-resume-banner[hidden] {
  display: none !important;
}

.uefa-resume-banner__text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
}

.uefa-resume-banner__actions {
  display: flex;
  gap: 8px;
}

/* --- Barre de progression globale --- */
.uefa-global-progress {
  margin-bottom: 20px;
}

.uefa-global-progress__track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.uefa-global-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.uefa-global-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

/* --- Stepper d'étapes --- */
.uefa-stepper {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 2px 0;
}

.uefa-step-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.uefa-step-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.uefa-step-btn__num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
}

.uefa-step-btn.active .uefa-step-btn__num {
  background: #ffffff;
  color: #0284c7;
}

/* --- Sélecteur Mobile : Matchs VS Classement (Affichage permanent sans bug) --- */
.uefa-mobile-view-switch {
  display: flex;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
}

@media (min-width: 1024px) {
  .uefa-mobile-view-switch {
    display: none; /* Inutile sur desktop car 2 colonnes côte à côte */
  }
}

.uefa-mobile-view-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.uefa-mobile-view-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Barre de synthèse sticky mobile */
.uefa-mobile-summary-bar {
  display: flex;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  justify-content: space-around;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 1024px) {
  .uefa-mobile-summary-bar {
    display: none;
  }
}

.uefa-mobile-sum-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.uefa-mobile-sum-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.uefa-mobile-sum-dot--direct { background: #10b981; }
.uefa-mobile-sum-dot--playoff { background: #0284c7; }
.uefa-mobile-sum-dot--eliminated { background: #cbd5e1; }

/* --- Layout 2 Colonnes (Desktop) --- */
.uefa-league-layout {
  display: block;
}

@media (min-width: 1024px) {
  .uefa-league-layout {
    display: grid;
    grid-template-columns: 1fr 390px;
    gap: 24px;
    align-items: start;
  }
}

/* Mode pleine largeur centré (Bilan, Bracket, Vainqueur) */
.uefa-league-layout.is-full-width {
  display: block !important;
  width: 100%;
}

.uefa-league-layout.is-full-width .uefa-ranking-col {
  display: none !important;
}

.uefa-league-layout.is-full-width .uefa-main-col {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

/* Pour le bracket : pleine largeur d'écran */
.uefa-league-layout.is-full-width[data-step="bracket"] .uefa-main-col {
  max-width: 100%;
}

/* Sur mobile, on affiche soit les matchs, soit le classement selon l'onglet actif */
@media (max-width: 1023px) {
  .uefa-league-layout[data-mobile-view="matches"] .uefa-ranking-col {
    display: none;
  }
  .uefa-league-layout[data-mobile-view="ranking"] .uefa-main-col {
    display: none;
  }
}

/* --- Colonne Droite : Classement Sticky --- */
.uefa-ranking-col {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

@media (max-width: 1023px) {
  .uefa-ranking-col {
    position: static;
    max-height: none;
  }
}

/* Scrollbar discrète */
.uefa-ranking-col::-webkit-scrollbar,
.uefa-rank-table-wrap::-webkit-scrollbar {
  width: 5px;
}
.uefa-ranking-col::-webkit-scrollbar-thumb,
.uefa-rank-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* --- Composant Classement (Box) --- */
.uefa-rank-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.uefa-rank-box__header {
  margin-bottom: 10px;
}

.uefa-rank-box__title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.uefa-rank-box__subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.uefa-rank-legend {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 10px;
}

.uefa-rank-legend__item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-weight: 600;
}

.uefa-rank-legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.uefa-rank-legend__item--direct .uefa-rank-legend__dot { background: #10b981; }
.uefa-rank-legend__item--playoff .uefa-rank-legend__dot { background: #0284c7; }
.uefa-rank-legend__item--eliminated .uefa-rank-legend__dot { background: #94a3b8; }

/* Table du classement */
.uefa-rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.uefa-rank-table th {
  color: #64748b;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  padding: 5px 6px;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.uefa-rank-table th.uefa-rank-col-pos,
.uefa-rank-table th.uefa-rank-col-team {
  text-align: left;
}

.uefa-rank-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.uefa-rank-row:hover {
  background: #f8fafc;
}

.uefa-rank-row td {
  padding: 6px 6px;
  text-align: right;
}

.uefa-rank-col-pos {
  text-align: left;
  width: 26px;
}

.uefa-rank-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* 3 Zones bien distinctes */
.uefa-rank-row--direct {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.03);
}
.uefa-rank-row--direct .uefa-rank-pos-badge {
  background: #d1fae5;
  color: #065f46;
}

.uefa-rank-row--playoff {
  border-left: 3px solid #0284c7;
  background: rgba(2, 132, 199, 0.02);
}
.uefa-rank-row--playoff .uefa-rank-pos-badge {
  background: #e0f2fe;
  color: #0369a1;
}

.uefa-rank-row--eliminated {
  border-left: 3px solid #cbd5e1;
  opacity: 0.8;
}
.uefa-rank-row--eliminated .uefa-rank-pos-badge {
  background: #f1f5f9;
  color: #64748b;
}

/* Séparateurs textuels de zones */
.uefa-rank-zone-sep td {
  padding: 5px 6px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.uefa-rank-zone-sep--playoff td {
  background: #f0f9ff;
  color: #0284c7;
  border-top: 1px solid #bae6fd;
  border-bottom: 1px solid #bae6fd;
}

.uefa-rank-zone-sep--eliminated td {
  background: #f8fafc;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.uefa-rank-col-team {
  text-align: left;
}

.uefa-rank-team-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Helper Logo avec Fallback Anti-Clignotement */
.uefa-logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.uefa-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.uefa-logo-badge {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  font-size: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.uefa-rank-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.uefa-rank-fr-badge {
  font-size: 9px;
  font-weight: 800;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0 3px;
  border-radius: 3px;
  margin-left: 3px;
}

.uefa-rank-col-pts {
  color: #0f172a;
  font-weight: 700;
}

.uefa-diff--pos { color: #16a34a; font-weight: 600; }
.uefa-diff--neg { color: #dc2626; font-weight: 600; }

/* --- Onglets Journées (J1 à J8) --- */
.uefa-days-nav {
  margin-bottom: 16px;
}

.uefa-days-nav__list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.uefa-day-tab {
  flex: 1;
  min-width: 60px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #64748b;
  touch-action: manipulation;
}

.uefa-day-tab.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.uefa-day-tab.is-complete:not(.active) {
  border-color: #86efac;
  background: #f0fdf4;
}

.uefa-day-tab__num {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.uefa-day-tab__status {
  display: block;
  font-size: 10px;
  margin-top: 2px;
}

.uefa-day-tab.active .uefa-day-tab__status {
  color: #e0f2fe;
}

.uefa-day-tab.is-complete:not(.active) .uefa-day-tab__status {
  color: #16a34a;
}

/* --- Barre d'outils de la journée active --- */
.uefa-day-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.uefa-day-toolbar__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #0f172a;
}

.uefa-day-toolbar__sub {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.uefa-filter-pills {
  display: flex;
  gap: 6px;
}

.uefa-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 4px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.uefa-pill.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.uefa-day-toolbar__actions {
  display: flex;
  gap: 6px;
}

/* --- Grille des Matchs (Mobile-First Robuste) --- */
.uefa-matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.uefa-match-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease;
}

.uefa-match-card:hover {
  border-color: #cbd5e1;
}

.uefa-match-card.is-played {
  border-left: 3px solid #10b981;
}

.uefa-match-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.uefa-badge-played {
  background: #d1fae5;
  color: #065f46;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.uefa-badge-live {
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  animation: uefaPulseRed 1.5s infinite;
}

/* Agencement responsive sans débordement sur petit écran */
.uefa-match-card__fixture {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.uefa-team-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0; /* Crucial pour l'ellipsis sur mobile */
}

.uefa-team-slot--home {
  justify-content: flex-end;
  text-align: right;
}

.uefa-team-slot--away {
  justify-content: flex-start;
  text-align: left;
}

.uefa-team-name {
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uefa-team-slot--french .uefa-team-name {
  color: #0284c7;
  font-weight: 700;
}

/* Inputs de score */
.uefa-score-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.uefa-score-input {
  width: 34px;
  height: 32px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  text-align: center !important;
  outline: none;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 32px;
  box-sizing: border-box;
  -moz-appearance: textfield !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: all 0.15s ease;
}

.uefa-score-input::-webkit-outer-spin-button,
.uefa-score-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

.uefa-score-input::placeholder {
  text-align: center !important;
  color: #94a3b8;
  opacity: 1;
}

.uefa-score-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.uefa-score-input:disabled {
  background: transparent;
  border-color: transparent;
  color: #0284c7;
  font-weight: 800;
}

.uefa-score-sep {
  color: #94a3b8;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
}

/* --- Barre Navigation Inférieure --- */
.uefa-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
}

.uefa-bottom-bar__nav {
  display: flex;
  gap: 8px;
}

/* --- Écran Bilan & Qualifiés (Étape intermédiaire avant Bracket) --- */
.uefa-qualified-view {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.uefa-qualified-header {
  text-align: center;
  margin-bottom: 24px;
}

.uefa-qualified-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}

.uefa-qualified-sub {
  color: #64748b;
  font-size: 13px;
  max-width: 600px;
  margin: 0 auto;
}

.uefa-qualified-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .uefa-qualified-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.uefa-q-block {
  border-radius: 10px;
  padding: 14px;
  border: 1px solid transparent;
}

.uefa-q-block--direct {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.uefa-q-block--playoff {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.uefa-q-block--eliminated {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.uefa-q-block__title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.uefa-q-block--direct .uefa-q-block__title { color: #166534; }
.uefa-q-block--playoff .uefa-q-block__title { color: #0369a1; }
.uefa-q-block--eliminated .uefa-q-block__title { color: #475569; }

.uefa-q-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.uefa-q-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.uefa-q-item__seed {
  font-size: 11px;
  color: #64748b;
  width: 22px;
}

/* Bouton Tirage au Sort */
.uefa-draw-cta-box {
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.uefa-draw-cta-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.uefa-draw-cta-box p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px;
}

/* --- Vue Bracket (Phase Finale) --- */
.uefa-bracket-view {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.uefa-bracket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.uefa-bracket-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 6px 0 2px;
}

.uefa-bracket-subtitle {
  color: #64748b;
  font-size: 13px;
  margin: 0;
}

.uefa-bracket-stages-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.uefa-stage-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.uefa-stage-tab.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.uefa-bracket-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.uefa-bracket-col__header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 7px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
}

.uefa-bracket-col__matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-around;
  min-height: 480px;
}

.uefa-bracket-tie {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.uefa-bracket-tie.is-decided {
  border-color: #0284c7;
}

.uefa-bracket-tie__header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 600;
}

.uefa-bracket-tie__teams {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.uefa-bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #1e293b;
}

.uefa-bracket-team:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.uefa-bracket-team.is-winner {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #15803d;
  font-weight: 700;
}

.uefa-bracket-team.is-loser {
  opacity: 0.4;
  background: #f8fafc;
}

.uefa-bracket-team.is-empty {
  opacity: 0.45;
  cursor: default;
}

.uefa-bracket-team__info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.uefa-bracket-team__name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uefa-bracket-team__seed {
  font-size: 10px;
  color: #64748b;
}

.uefa-bracket-winner-icon {
  color: #16a34a;
  font-size: 12px;
}

.uefa-champion-cta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.uefa-champion-cta-bar__info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #166534;
  font-weight: 700;
}

/* --- Vue Vainqueur & Sacre --- */
.uefa-winner-view {
  max-width: 680px;
  margin: 16px auto 0;
  text-align: center;
}

.uefa-winner-hero {
  background: #ffffff;
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 32px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.uefa-winner-trophy {
  font-size: 42px;
  color: #f59e0b;
  margin-bottom: 8px;
}

.uefa-winner-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #d97706;
  margin-bottom: 6px;
}

.uefa-winner-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 16px;
}

.uefa-winner-crest-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #f59e0b;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.2);
}

.uefa-winner-crest-wrap .uefa-logo-box {
  width: 96px;
  height: 96px;
}

.uefa-winner-crest-wrap .uefa-logo-img,
.uefa-winner-crest-wrap img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.uefa-winner-crest-wrap .uefa-logo-badge {
  width: 96px;
  height: 96px;
  font-size: 28px;
  font-weight: 900;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
}

.uefa-winner-summary {
  display: flex;
  justify-content: center;
  gap: 24px;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

.uefa-winner-stat__num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #0284c7;
}

.uefa-winner-stat__label {
  font-size: 11px;
  color: #64748b;
}

/* Partage */
.uefa-share-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

.uefa-share-box__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #0f172a;
}

.uefa-share-box__subtitle {
  color: #64748b;
  font-size: 13px;
  margin: 0 0 16px;
}

.uefa-share-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.uefa-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.15s ease;
}

.uefa-share-btn--twitter { background: #000000; }
.uefa-share-btn--whatsapp { background: #25d366; }
.uefa-share-btn--download { background: #0284c7; }

/* Banderole Promo Le Club */
.uefa-sim-promo-card {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  flex-wrap: wrap;
}

.uefa-sim-promo-card__title {
  font-size: 15px;
  font-weight: 800;
  color: #166534;
  margin: 0 0 4px;
}

.uefa-sim-promo-card__text {
  font-size: 12px;
  color: #15803d;
  margin: 0;
  line-height: 1.4;
}

.uefa-btn--club {
  background: #16a34a;
  color: #ffffff;
  font-weight: 700;
}

.uefa-btn--club:hover {
  background: #15803d;
}

.uefa-winner-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Particules Confetti */
.uefa-confetti-particle {
  position: fixed;
  top: -10px;
  width: 9px;
  height: 12px;
  border-radius: 2px;
  z-index: 999;
  pointer-events: none;
  animation: uefaFall linear forwards;
}

@keyframes uefaFall {
  to {
    transform: translateY(105vh) rotate(720deg);
  }
}

/* ============================================================
   Bandeau Promo Persistant Le Club (sous le simulateur)
   ============================================================ */
.uefa-sim-promo-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.8rem;
  margin: 24px 0 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.uefa-sim-promo-bar__lot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 20px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #92400e;
  white-space: nowrap;
}

.uefa-sim-promo-bar__sep {
  width: 1px;
  height: 16px;
  background: #cbd5e1;
  flex-shrink: 0;
}

.uefa-sim-promo-bar__text {
  flex: 1;
  min-width: 0;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

.uefa-sim-promo-bar__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #10b981);
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 6px rgba(16, 185, 129, 0.25);
}

.uefa-sim-promo-bar__btn:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  color: #ffffff;
}

@media (max-width: 600px) {
  .uefa-sim-promo-bar__text,
  .uefa-sim-promo-bar__sep {
    display: none;
  }
  .uefa-sim-promo-bar {
    justify-content: space-between;
  }
}
