/* =========================================================
   Mondial 2026 Pronos — Design v2
   ========================================================= */

:root {
  --wc-bg:       #06111d;
  --wc-card:     #0d1f33;
  --wc-card2:    #112540;
  --wc-border:   #1e3a5a;
  --wc-gold:     #fbbf24;
  --wc-gold2:    #f59e0b;
  --wc-green:    #10b981;
  --wc-blue:     #3b82f6;
  --wc-purple:   #8b5cf6;
  --wc-red:      #ef4444;
  --wc-input:    #0d1f33;
  --wc-text:     #e2f0ff;
  --wc-muted:    #5a84a8;
}

/* ---- Reset base ---- */
*, *::before, *::after { box-sizing: border-box; }

/* ---- FOND : coupe.png avec overlay doré ---- */
body {
  background-color: #000;
  color: var(--wc-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background-image:
    /* Overlay sombre pour lisibilité des cartes */
    linear-gradient(rgba(0,0,0,0.78), rgba(0,0,0,0.78)),
    url('../../coupe.png');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
/* Sur mobile : pas de fixed (bug iOS/Android) */
@media (max-width: 768px) {
  body { background-attachment: scroll; }
}

/* Halo doré animé au centre (lumière de la coupe) */
body::before {
  content: '';
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60vw; height: 60vh;
  background: radial-gradient(ellipse at 50% 80%,
    rgba(251,191,36,0.12) 0%,
    rgba(180,90,0,0.06) 40%,
    transparent 70%);
  pointer-events: none; z-index: 0;
  animation: haloGlow 5s ease-in-out infinite alternate;
}
@keyframes haloGlow {
  0%   { opacity: 0.5; transform: translateX(-50%) scale(1); }
  100% { opacity: 1.0; transform: translateX(-50%) scale(1.15); }
}
body::after { display: none; }

/* Contenus au-dessus du fond */
.wc-nav, .login-card,
nav, footer, .card { position: relative; z-index: 1; }
.container-xl, main { position: relative; }

/* ---- Flag icons ---- */
.wc-flag { border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.wc-flag-sm   { width: 1.2em; height: 0.9em; }
.wc-flag-md   { width: 1.8em; height: 1.35em; }
.wc-flag-lg   { width: 3.2rem; height: 2.4rem; }
.wc-flag-xl   { width: 4rem;   height: 3rem; }
.wc-flag-unknown { font-size: 1.4rem; opacity: .4; }

/* ---- Navbar ---- */
.wc-nav {
  background: linear-gradient(135deg,
    #02150a  0%,
    #061f0c  20%,
    #0a1a2e  50%,
    #1a0a00  80%,
    #150800  100%);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #10b981, #fbbf24, #ef4444, #3b82f6, #10b981) 1;
  box-shadow: 0 3px 30px rgba(0,0,0,0.7), 0 0 40px rgba(251,191,36,0.05);
  padding: 8px 0;
}
.wc-nav .navbar-brand {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--wc-gold) !important;
  text-shadow: 0 0 20px rgba(251,191,36,0.5);
}
.wc-nav .nav-link {
  color: #a8c8e8 !important;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}
.wc-nav .nav-link:hover  { background: rgba(251,191,36,0.12); color: var(--wc-gold) !important; }
.wc-nav .nav-link.active {
  background: rgba(251,191,36,0.18);
  color: var(--wc-gold) !important;
  font-weight: 700;
}
.nav-user-flag { display: flex; align-items: center; gap: 6px; }

/* Logo navbar */
.trophy-nav {
  height: 38px;
  width: auto;
  mix-blend-mode: screen;
  animation: trophyGlow 4s ease-in-out infinite alternate;
  transition: transform 0.2s;
}
.trophy-nav:hover { transform: scale(1.15) rotate(-5deg); }
@keyframes trophyGlow {
  0%   { filter: brightness(0.85); }
  100% { filter: brightness(1.15); }
}

/* ---- Login page ---- */
.login-page { position: relative; }
/* Sur la page login : même fond coupe.png mais overlay plus léger pour laisser briller la coupe */
.login-bg {
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
    url('coupe.png');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
@media (max-width: 768px) {
  .login-bg { background-attachment: scroll; }
}
.login-card {
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(251,191,36,0.2) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(251,191,36,0.05);
}
.login-ball {
  font-size: 4rem;
  display: inline-block;
  animation: spin3d 6s linear infinite;
}
@keyframes spin3d {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.1); }
  100% { transform: rotateY(360deg) scale(1); }
}

/* ---- Glassmorphism cards ---- */
.wc-card {
  background: rgba(5, 12, 22, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251,191,36,0.12) !important;
  border-radius: 14px;
  color: var(--wc-text);
}
.login-card {
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(251,191,36,0.25) !important;
  box-shadow: 0 0 60px rgba(251,191,36,0.08), 0 24px 60px rgba(0,0,0,0.7) !important;
}

/* ---- Inputs ---- */
.wc-input {
  background: rgba(6,17,29,0.8) !important;
  border: 1px solid var(--wc-border) !important;
  color: var(--wc-text) !important;
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wc-input:focus {
  border-color: var(--wc-gold) !important;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.15) !important;
  background: rgba(6,17,29,0.95) !important;
}
.wc-input option { background: #0d1f33; color: var(--wc-text); }
.wc-input::placeholder { color: var(--wc-muted) !important; }

/* ---- Stat cards ---- */
.stat-card {
  background: rgba(4, 10, 18, 0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 14px;
  padding: 18px 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #10b981, #fbbf24, #3b82f6);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 15px rgba(16,185,129,0.1); }
.stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.stat-label { font-size: 0.73rem; color: var(--wc-muted); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- Phase title ---- */
.phase-title {
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.phase-group  { background: rgba(16,185,129,0.12); color: #10b981; border-left: 3px solid #10b981; }
.phase-r32    { background: rgba(59,130,246,0.12);  color: #60a5fa; border-left: 3px solid #3b82f6; }
.phase-r16    { background: rgba(139,92,246,0.12);  color: #a78bfa; border-left: 3px solid #8b5cf6; }
.phase-qf     { background: rgba(239,68,68,0.12);   color: #f87171; border-left: 3px solid #ef4444; }
.phase-sf     { background: rgba(245,158,11,0.12);  color: #fbbf24; border-left: 3px solid #f59e0b; }
.phase-tp     { background: rgba(107,114,128,0.12); color: #9ca3af; border-left: 3px solid #6b7280; }
.phase-final  { background: rgba(251,191,36,0.15);  color: #fde68a; border-left: 3px solid #fbbf24; box-shadow: 0 0 20px rgba(251,191,36,0.1); }

.group-label {
  color: var(--wc-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
  padding-left: 4px;
  border-bottom: 1px solid var(--wc-border);
  padding-bottom: 6px;
}

/* ---- Match card ---- */
.match-card {
  background: rgba(4, 10, 18, 0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--phase-rgb, 16,185,129), 0.25);
  border-radius: 14px;
  padding: 14px;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
/* Bande de couleur en haut */
.match-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    var(--phase-color, #10b981) 0%,
    rgba(var(--phase-rgb, 16,185,129), 0.2) 100%);
}
/* Lueur d'ambiance en fond */
.match-card::after {
  content: '';
  position: absolute;
  top: -40px; left: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(var(--phase-rgb, 16,185,129), 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.match-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(var(--phase-rgb, 16,185,129), 0.12);
  border-color: rgba(var(--phase-rgb, 16,185,129), 0.5);
}
.match-card.match-finished,
.match-card.match-locked {
  border-color: rgba(249,115,22,0.4);
}
.match-card.match-locked {
  opacity: 0.92;
}
.match-card.match-finished::before,
.match-card.match-locked::before {
  background: linear-gradient(90deg, #f97316 0%, rgba(249,115,22,0.2) 100%);
}
.match-card.match-finished::after,
.match-card.match-locked::after {
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
}
.match-pred-count {
  text-align: center;
  margin-top: 8px;
  font-size: 0.65rem;
  color: var(--wc-muted);
  opacity: 0.7;
  letter-spacing: .3px;
}

.match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.match-date {
  font-size: 0.68rem;
  color: var(--wc-muted);
  font-weight: 500;
}
.match-venue {
  font-size: 0.62rem;
  color: var(--wc-muted);
  margin-top: -6px;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* ---- Teams display ---- */
.team-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
}
.team {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.team-flag-wrap {
  width: 52px; height: 39px;
  margin: 0 auto 5px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
}
.team-flag-wrap .fi {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}
.team-name {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  margin: 0 auto;
  color: #c8dff5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
@media (min-width: 768px) {
  .team-name  { font-size: 0.75rem; max-width: 100px; }
  .team-flag-wrap { width: 60px; height: 45px; }
}
.vs-badge {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.05));
  border: 1px solid rgba(251,191,36,0.3);
  color: var(--wc-gold);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

/* ---- Result bar ---- */
.result-bar {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
}
.result-label { color: var(--wc-muted); font-size: 0.7rem; }

/* ---- Predict buttons ---- */
.btn-predict-wrap { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin-top: 10px; }
.btn-predict {
  width: 100%;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 8px 4px;
  transition: all 0.18s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  border: 1px solid transparent;
  min-width: 0;
  overflow: hidden;
}
.btn-predict .btn-flag { pointer-events: none; }
.btn-predict-t1, .btn-predict-t2 {
  background: rgba(255,255,255,0.04);
  border-color: var(--wc-border);
  color: #a8c8e8;
}
.btn-predict-draw {
  background: rgba(255,255,255,0.03);
  border-color: var(--wc-border);
  color: var(--wc-muted);
}
.btn-predict:hover {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.4);
  color: var(--wc-gold);
  transform: translateY(-1px);
}
.btn-predict.active {
  background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(251,191,36,0.1));
  border-color: var(--wc-gold);
  color: var(--wc-gold);
  box-shadow: 0 0 12px rgba(251,191,36,0.2);
}
.btn-predict.active-correct {
  background: linear-gradient(135deg, rgba(16,185,129,0.25), rgba(16,185,129,0.1));
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 12px rgba(16,185,129,0.2);
}
.btn-predict.active-wrong {
  background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(239,68,68,0.08));
  border-color: #ef4444;
  color: #f87171;
}
.btn-predict-label { font-size: 0.58rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }

/* ---- Prono badge ---- */
.prono-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.prono-correct  { background: rgba(16,185,129,0.12); border: 1px solid #10b981; color: #10b981; }
.prono-wrong    { background: rgba(239,68,68,0.12);   border: 1px solid #ef4444; color: #f87171; }
.prono-pending  { background: rgba(251,191,36,0.1);   border: 1px solid var(--wc-gold); color: var(--wc-gold); }

/* ---- Ranking ---- */
.podium { padding: 10px 0 0; }
.my-row td { background: rgba(251,191,36,0.06) !important; }

/* ---- Muted text override (Bootstrap's default #6c757d is invisible on dark bg) ---- */
.text-muted { color: #7ea8cc !important; }

/* ---- Tables ---- */
/* Bootstrap 5 force --bs-table-bg: blanc par défaut — on réinitialise tout */
.wc-table {
  color: var(--wc-text);
  --bs-table-bg: transparent;
  --bs-table-color: var(--wc-text);
  --bs-table-border-color: var(--wc-border);
  --bs-table-hover-bg: rgba(255,255,255,0.03);
  --bs-table-hover-color: var(--wc-text);
  --bs-table-striped-bg: rgba(255,255,255,0.02);
  --bs-table-striped-color: var(--wc-text);
  --bs-table-active-bg: rgba(255,255,255,0.05);
  --bs-table-active-color: var(--wc-text);
}
.wc-table thead th {
  background: rgba(251,191,36,0.07);
  color: var(--wc-gold);
  border-color: var(--wc-border);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.wc-table tbody tr { border-color: var(--wc-border); transition: background 0.15s; }
.wc-table td { border-color: var(--wc-border); vertical-align: middle; }

/* ---- Admin tabs ---- */
.wc-tabs .nav-link {
  color: var(--wc-muted);
  background: rgba(13,31,51,0.8);
  border: 1px solid var(--wc-border);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
}
.wc-tabs .nav-link:hover {
  border-color: var(--wc-gold);
  color: var(--wc-gold);
  background: rgba(251,191,36,0.06);
}
.wc-tabs .nav-link.active {
  background: linear-gradient(135deg, #92400e, #b45309);
  color: #fef3c7;
  border-color: var(--wc-gold);
  box-shadow: 0 4px 12px rgba(251,191,36,0.2);
}

/* ---- Footer ---- */
.wc-footer {
  background: rgba(0,0,0,0.25);
  border-top: 1px solid var(--wc-border);
}

/* ---- Badges ---- */
.badge.bg-success   { background: rgba(16,185,129,0.25) !important; border: 1px solid #10b981; color: #10b981 !important; }
.badge.bg-danger    { background: rgba(239,68,68,0.2) !important;    border: 1px solid #ef4444; color: #f87171 !important; }
.badge.bg-secondary { background: rgba(107,114,128,0.2) !important;  border: 1px solid #6b7280; color: #9ca3af !important; }
.badge.bg-warning   { background: rgba(251,191,36,0.2) !important;   border: 1px solid var(--wc-gold); color: var(--wc-gold) !important; }

/* ---- Alerts ---- */
.alert-success { background: rgba(16,185,129,0.1) !important; border-color: #10b981 !important; color: #a7f3d0 !important; }
.alert-danger  { background: rgba(239,68,68,0.1) !important;  border-color: #ef4444 !important; color: #fca5a5 !important; }
.alert-info    { background: rgba(59,130,246,0.1) !important;  border-color: #3b82f6 !important; color: #93c5fd !important; }
.btn-close { filter: invert(1) brightness(0.6); }

/* ---- Boutons Bootstrap overrides ---- */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  border: none !important;
  color: #1a0a00 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(251,191,36,0.3);
}
.btn-warning:hover { box-shadow: 0 6px 20px rgba(251,191,36,0.45) !important; transform: translateY(-1px); }
.btn-outline-warning { border-color: var(--wc-gold) !important; color: var(--wc-gold) !important; }
.btn-outline-warning:hover { background: rgba(251,191,36,0.15) !important; }
.btn-outline-info    { border-color: var(--wc-blue) !important; color: #60a5fa !important; }
.btn-outline-info:hover { background: rgba(59,130,246,0.12) !important; }
.btn-outline-danger  { border-color: var(--wc-red) !important; color: #f87171 !important; }
.btn-outline-danger:hover { background: rgba(239,68,68,0.12) !important; }
.btn-outline-success { border-color: var(--wc-green) !important; color: #34d399 !important; }
.btn-outline-success:hover { background: rgba(16,185,129,0.12) !important; }
.btn-outline-secondary { border-color: var(--wc-border) !important; color: var(--wc-muted) !important; }
.btn-outline-secondary:hover { background: rgba(255,255,255,0.05) !important; }

/* ---- Progress bar ---- */
.progress { background: rgba(255,255,255,0.06) !important; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--wc-bg); }
::-webkit-scrollbar-thumb { background: var(--wc-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--wc-gold); }

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .match-card { padding: 10px; }
  .stat-value { font-size: 1.7rem; }
  .team-flag-wrap { width: 44px; height: 33px; }
  .btn-predict { padding: 6px 2px; }
}
