/* ============ LEGACY — Design system (style EA FC) ============ */
:root {
  --bg0: #05070f;
  --bg1: #0a0e1a;
  --bg2: #121a2e;
  --panel: rgba(20, 28, 50, 0.85);
  --panel-border: rgba(120, 160, 255, 0.14);
  --green: #00ff87;
  --cyan: #04f5ff;
  --gold: #ffd76a;
  --red: #ff5b5b;
  --text: #eaf0ff;
  --text-dim: #8b97b8;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(0, 255, 135, 0.07), transparent 60%),
    radial-gradient(900px 500px at 85% 110%, rgba(4, 245, 255, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  min-height: 100dvh;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hidden { display: none !important; }

/* ================= ÉCRANS ================= */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  animation: fadeIn 0.4s ease;
  padding-bottom: calc(24px + var(--safe-bottom));
}
.screen.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 18px rgba(0, 255, 135, 0.35); } 50% { box-shadow: 0 0 34px rgba(0, 255, 135, 0.6); } }

/* ================= BOUTONS ================= */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); filter: brightness(1.15); }

.btn-primary {
  background: linear-gradient(135deg, var(--green), #00c96a);
  color: #04140b;
  box-shadow: 0 0 22px rgba(0, 255, 135, 0.3), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.btn-big { padding: 19px; font-size: 19px; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--panel-border);
}

.btn-choice {
  background: linear-gradient(135deg, rgba(28, 40, 72, 0.95), rgba(16, 24, 46, 0.95));
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--cyan);
  text-align: left;
  animation: slideUp 0.35s ease both;
}
.btn-choice:nth-child(2) { animation-delay: 0.07s; border-left-color: var(--green); }
.btn-choice:nth-child(3) { animation-delay: 0.14s; border-left-color: var(--gold); }
.btn-choice:nth-child(4) { animation-delay: 0.21s; border-left-color: var(--red); }
.btn-danger { border-left-color: var(--red) !important; }

.choice-label { display: block; font-size: 16.5px; }
.choice-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  margin-top: 3px;
  text-transform: none;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  font-size: 15px;
  padding: 6px 9px;
  cursor: pointer;
}

/* ================= HUD ================= */
#hud {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.97), rgba(8, 12, 24, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: calc(8px + var(--safe-top)) 14px 8px;
}
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hud-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.hud-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #1d2c4e, #0c1326);
  border: 2px solid var(--green);
  flex-shrink: 0;
}
.hud-avatar svg { display: block; }
.hud-name-block { display: flex; flex-direction: column; min-width: 0; }
.hud-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-club { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
.hud-badge svg { display: block; }
.hud-rating-chip {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, #2a3a66, #16203c);
  border: 1px solid rgba(255, 215, 106, 0.4);
  border-radius: 9px;
  padding: 3px 9px;
  font-family: var(--font-display);
}
.hud-rating-chip span { font-size: 17px; font-weight: 700; color: var(--gold); line-height: 1; }
.hud-rating-chip small { font-size: 9px; color: var(--text-dim); letter-spacing: 0.1em; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.55);
}
.side-menu {
  position: fixed;
  top: 0; bottom: 0;
  /* Aligné sur le bord droit de #app (max-width 560px) : sur grand écran le panneau
     reste collé à la colonne de jeu au lieu de flotter au bord de l'écran. */
  right: max(0px, calc((100vw - 560px) / 2));
  z-index: 60;
  width: min(280px, 82vw);
  padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
  overflow-y: auto;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--panel-border);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.side-menu.open { transform: translateX(0); }
.sm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sm-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: 0.12em; }
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.menu-item:hover, .menu-item:active { background: rgba(255, 255, 255, 0.07); }
.mi-ico { width: 24px; flex-shrink: 0; font-size: 18px; text-align: center; }
.mi-label { font-size: 14px; }
.menu-lang { cursor: default; }
.menu-lang .mi-label { flex: 1; }
.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(255, 215, 106, 0.28);
  border-radius: 10px;
  background: rgba(5, 35, 42, 0.88);
  box-shadow: inset 0 0 14px rgba(4, 245, 255, 0.05);
}
.lang-option {
  min-width: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lang-option[aria-pressed="true"] {
  color: #1b1605;
  background: linear-gradient(135deg, var(--gold), #f0a84a);
  box-shadow: 0 2px 10px rgba(255, 183, 74, 0.25);
}
.lang-option:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.hud-stats { margin-top: 7px; gap: 8px; }
.hud-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.hud-stat label { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.hud-stat span { font-size: 12px; font-weight: 600; white-space: nowrap; }
.bar-stat { flex: 1.3; }
.mini-bar {
  width: 100%; height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.mini-bar div { height: 100%; border-radius: 3px; background: var(--green); transition: width 0.6s ease, background 0.6s; }

/* ================= ÉCRAN TITRE ================= */
#screen-title { justify-content: center; position: relative; overflow: hidden; min-height: 100dvh; }
.title-lang {
  position: absolute;
  z-index: 2;
  top: calc(14px + var(--safe-top));
  right: 16px;
}
.title-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 380px at 50% 20%, rgba(0, 255, 135, 0.13), transparent 65%),
    radial-gradient(500px 300px at 20% 80%, rgba(4, 245, 255, 0.09), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, 0.017) 46px 47px),
    linear-gradient(180deg, rgba(10, 14, 26, 0.4) 0%, rgba(10, 14, 26, 0.18) 32%, rgba(10, 14, 26, 0.55) 72%, rgba(10, 14, 26, 0.88) 100%),
    url('../assets/accueil.webp') center/cover no-repeat;
}
.title-content { position: relative; padding: 30px 26px; display: flex; flex-direction: column; gap: 34px; }
.title-logo { text-align: center; }
.title-kick { font-size: 46px; display: inline-block; animation: pulse 3s infinite; filter: drop-shadow(0 0 16px rgba(0, 255, 135, 0.6)); }
.title-logo h1 {
  font-family: var(--font-display);
  font-size: clamp(64px, 19vw, 96px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 20%, var(--green) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(0, 255, 135, 0.35));
}
.title-sub {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.42em;
  color: var(--cyan);
  margin-top: 8px;
}
.title-buttons { display: flex; flex-direction: column; gap: 12px; }
.btn-link { background:none; border:none; color:var(--text-dim); font-size:12px; text-decoration:underline; cursor:pointer; margin-top:8px; }
.title-credit { text-align: center; font-size: 12.5px; color: var(--text-dim); }

/* ================= CRÉATION ================= */
.create-wrap { padding: calc(18px + var(--safe-top)) 18px 10px; display: flex; flex-direction: column; gap: 18px; }
.screen-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--text);
}
.create-grid { display: flex; flex-direction: column; gap: 18px; }
.create-form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.field input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  padding: 13px 15px;
  outline: none;
}
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 255, 135, 0.12); }

.pick-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pick {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  color: var(--text);
  padding: 9px 11px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 62px;
  flex: 1 0 auto;
  max-width: 46%;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pick:active { transform: scale(0.96); }
.pick b { font-family: var(--font-display); font-size: 14.5px; letter-spacing: 0.04em; }
.pick small { font-size: 10.5px; color: var(--text-dim); text-align: center; line-height: 1.3; }
.pick.sel {
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(0, 255, 135, 0.28);
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.12), rgba(20, 28, 50, 0.9));
}
.pick-row.small .pick { min-width: 42px; padding: 8px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; display: block; border: 2px solid rgba(255, 255, 255, 0.25); }
.look-row { display: flex; flex-direction: column; gap: 10px; }
.look-group > span { font-size: 10.5px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 5px; }

/* ---- Carte FUT ---- */
.create-card-preview { display: flex; justify-content: center; }
.fut-card { width: 210px; }
.fut-card.big { width: 240px; margin: 0 auto; }
.fut-inner {
  position: relative;
  border-radius: 18px;
  padding: 16px 14px 14px;
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
.card-bronze { background: linear-gradient(160deg, #6e4a2f, #3d2818 70%); }
.card-silver { background: linear-gradient(160deg, #9aa5b5, #4d5768 70%); }
.card-gold   { background: linear-gradient(160deg, #e8c465, #8a6a1e 70%); }
.card-legend {
  background: linear-gradient(160deg, #1c1440, #0c0a24 60%);
  border-color: var(--gold);
  animation: glowPulse 2.8s infinite;
}
.card-legend::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(220px 130px at 50% 0%, rgba(255, 215, 106, 0.25), transparent 70%);
}
.fut-top { display: flex; align-items: center; gap: 6px; position: relative; }
.fut-rating { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5); line-height: 1; }
.fut-pos { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.85); }
.fut-flag { font-size: 20px; margin-left: auto; }
.fut-avatar { position: relative; margin: 2px 0 4px; display: flex; justify-content: center; }
.fut-name {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.fut-sub { font-size: 10.5px; letter-spacing: 0.22em; color: rgba(255, 255, 255, 0.75); margin-top: 3px; position: relative; }

/* ================= ÉVÉNEMENT ================= */
.ev-scene {
  width: 100%;
  aspect-ratio: 20/9;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--panel-border);
}
.ev-scene svg { width: 100%; height: 100%; display: block; }
/* Décor réaliste (photo) empilé au-dessus du SVG de repli */
.scene-stack { position: absolute; inset: 0; }
.scene-stack svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.45s ease;
}
.scene-photo.loaded { opacity: 1; }
/* Avatar 2D du joueur incrusté debout dans le décor (bas-centre) */
.scene-avatar {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  height: 70%; z-index: 3; pointer-events: none;
}
.scene-avatar svg {
  height: 100%; width: auto; display: block;
  /* ombre portée au sol + léger halo côté lumière pour détacher du décor */
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)) drop-shadow(-2px -1px 3px rgba(255, 246, 224, 0.18));
}
.ev-scene::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 7, 15, 0.85));
  pointer-events: none;
}
.ev-body { padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 13px; }
.ev-tag {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--cyan);
  text-transform: uppercase;
}
.ev-tag:empty { display: none; }
.ev-title { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: 0.03em; line-height: 1.15; }
.ev-text { font-size: 15.5px; line-height: 1.65; color: #cdd7ef; }
.ev-text b { color: var(--text); }
.ev-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* ---- QG entre les matchs (#screen-hub) ---- */
.hub-body { padding-bottom: 22px; }
.hub-ap {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb0d0;
}
.hub-ap-dots { color: var(--green); font-size: 15px; letter-spacing: 0.12em; }
.hub-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(4, 245, 255, 0.22);
  border-radius: 14px;
  background: rgba(4, 245, 255, 0.05);
  animation: slideUp 0.3s ease;
}
.hub-panel-title {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.hub-go { margin-top: 6px; }
.btn-disabled { opacity: 0.42; pointer-events: none; }

.ev-result {
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.08), rgba(4, 245, 255, 0.05));
  border: 1px solid rgba(0, 255, 135, 0.25);
  border-radius: 14px;
  padding: 15px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #d9e4f8;
  animation: slideUp 0.4s ease;
}
.deltas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.deltas:empty { display: none; }
.delta {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
}
.delta.up { color: var(--green); border-color: rgba(0, 255, 135, 0.4); background: rgba(0, 255, 135, 0.08); }
.delta.down { color: var(--red); border-color: rgba(255, 91, 91, 0.4); background: rgba(255, 91, 91, 0.08); }

/* ================= MATCH ================= */
.scene-wrap { position: relative; }
.match-scene { aspect-ratio: 21/9; }

/* Habillage TV : bug « DIRECT » de la chaîne */
.tv-live {
  position: absolute;
  top: 9px; left: 10px;
  z-index: 4;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  background: rgba(6, 10, 20, 0.82);
  border: 1px solid rgba(120, 160, 255, 0.22);
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.16em; color: #fff;
}
.tv-logo {
  font-weight: 700; letter-spacing: 0.02em;
  color: #04140b;
  background: linear-gradient(135deg, var(--green), #00c96a);
  padding: 1px 5px; border-radius: 4px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.3s infinite; }

/* Bandeau « lower third » qui glisse à chaque but */
.tv-banner {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  z-index: 4;
  display: flex; align-items: stretch;
  margin: 0 10px;
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-display);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transform: translateX(-115%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s;
}
.tv-banner.show { transform: none; opacity: 1; }
.tv-banner .tvb-tag {
  display: flex; align-items: center;
  padding: 6px 10px;
  font-size: 12px; letter-spacing: 0.1em; color: #04140b;
  background: linear-gradient(135deg, var(--green), #00c96a);
}
.tv-banner.bad .tvb-tag { background: linear-gradient(135deg, var(--red), #c62f2f); color: #fff; }
.tv-banner .tvb-txt {
  flex: 1;
  display: flex; align-items: center;
  padding: 6px 11px;
  font-size: 13px; letter-spacing: 0.03em; color: #fff;
  background: rgba(8, 12, 24, 0.94);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-banner .tvb-score {
  display: flex; align-items: center;
  padding: 6px 11px;
  font-size: 15px; font-weight: 700; color: #fff;
  background: rgba(16, 24, 46, 0.98);
  border-left: 1px solid rgba(120, 160, 255, 0.2);
}

/* Panneau de statistiques télé (mi-temps + coup de sifflet final) */
.tv-panel { border-color: rgba(120, 160, 255, 0.3) !important; background: linear-gradient(180deg, rgba(16, 24, 46, 0.96), rgba(10, 14, 26, 0.96)) !important; }
.tvp-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.14em; color: var(--gold);
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--panel-border);
}
.tvp-head .tvp-score { margin-left: auto; color: #fff; font-size: 12px; letter-spacing: 0.02em; }
.tvp-poss { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-family: var(--font-display); font-size: 13px; color: #fff; }
.tvp-bar { flex: 1; height: 7px; border-radius: 4px; overflow: hidden; background: rgba(255, 91, 91, 0.35); }
.tvp-bar > div { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); }
.tvp-row {
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  padding: 4px 0;
  font-family: var(--font-display);
}
.tvp-row b { color: #fff; font-size: 14px; }
.tvp-row b:last-child { text-align: right; }
.tvp-row span { text-align: center; font-family: var(--font-body); font-size: 12px; color: var(--text-dim); letter-spacing: 0.04em; }
.tvp-note { grid-template-columns: 1fr auto; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--panel-border); }
.tvp-note span { text-align: left; color: var(--gold); }
.tvp-note b { color: var(--gold); font-size: 16px; }
.match-board {
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.98), rgba(10, 14, 26, 0.95));
  border-bottom: 1px solid var(--panel-border);
  padding: 10px 16px 13px;
}
.match-comp {
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin-bottom: 8px;
}
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.score-team {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-size: 14px; letter-spacing: 0.05em;
}
.score-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.score-badge svg { display: block; }
.flag-badge { font-size: 30px; line-height: 1; }
.score-center { text-align: center; flex-shrink: 0; }
.score {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 18px rgba(0, 255, 135, 0.35);
  line-height: 1;
}
.minute {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--green);
  animation: pulse 1.6s infinite;
  margin-top: 3px;
}
.m-momentum {
  position: relative;
  width: 70px; height: 3px;
  margin: 6px auto 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
#m-momentum-fill {
  position: absolute; left: 50%; top: 0;
  width: 0; height: 100%;
  background: var(--green);
  transition: left 0.35s ease, width 0.35s ease, background 0.35s ease;
}
.m-tactic {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px 0;
  font-family: var(--font-display);
}
.m-tactic span { margin-right: 4px; font-size: 11px; letter-spacing: 0.12em; color: var(--text-dim); text-transform: uppercase; }
.m-tactic button {
  width: 34px; height: 28px;
  border: 1px solid var(--panel-border); border-radius: 7px;
  color: var(--text); background: var(--panel);
  cursor: pointer;
}
.m-tactic button.active { border-color: var(--green); background: rgba(0, 255, 135, 0.13); box-shadow: 0 0 10px rgba(0, 255, 135, 0.14); }

.match-feed { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.feed-line {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #c3cee8;
  animation: slideUp 0.3s ease;
}
.feed-line b { color: var(--cyan); font-family: var(--font-display); letter-spacing: 0.04em; }
.feed-goal { border-color: rgba(0, 255, 135, 0.5); background: rgba(0, 255, 135, 0.09); color: #dcffe9; }
.feed-goal b { color: var(--green); }
.feed-bad { border-color: rgba(255, 91, 91, 0.4); background: rgba(255, 91, 91, 0.07); }
.feed-bad b { color: var(--red); }
.feed-player { border-color: rgba(4, 245, 255, 0.35); }
.match-continue { margin-bottom: 4px; animation: slideUp 0.4s ease; }

.match-action {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.match-action.show { opacity: 1; }
.match-action > * { max-width: 520px; width: 100%; margin-left: auto; margin-right: auto; }
.action-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 0 20px rgba(255, 215, 106, 0.4);
  animation: pulse 1.2s infinite;
}
.action-text { font-size: 16px; line-height: 1.6; color: #dbe4f8; text-align: center; margin: 14px auto 20px; }

/* Cinématique de but : surimpression plein écran au-dessus de tout */
.m-cine {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 5, 12, 0.85);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.m-cine.show { opacity: 1; }
.m-cine svg {
  width: 100%;
  max-width: 540px;
  border-radius: 18px;
  border: 1px solid rgba(120, 160, 255, 0.25);
  box-shadow: 0 14px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 255, 135, 0.12);
}

/* ================= BILAN DE SAISON ================= */
.season-wrap { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.season-header { text-align: center; }
.season-year {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.season-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.season-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 13px;
  padding: 13px 6px;
  text-align: center;
}
.stat-num { font-family: var(--font-display); font-size: 25px; font-weight: 700; color: #fff; }
.stat-card.up .stat-num { color: var(--green); }
.stat-card.down .stat-num { color: var(--red); }
.stat-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-top: 3px; }

.season-awards { display: flex; flex-direction: column; gap: 9px; }
.award {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(135deg, rgba(255, 215, 106, 0.1), rgba(20, 28, 50, 0.9));
  border: 1px solid rgba(255, 215, 106, 0.35);
  border-radius: 13px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.5;
  animation: slideUp 0.4s ease;
}
.award.ballon { border-color: var(--gold); box-shadow: 0 0 24px rgba(255, 215, 106, 0.25); }
.award.empty { border-color: var(--panel-border); background: var(--panel); color: var(--text-dim); }
.award-icon { font-size: 26px; flex-shrink: 0; }

/* ================= FIN DE CARRIÈRE ================= */
.end-wrap { padding: calc(26px + var(--safe-top)) 20px 30px; display: flex; flex-direction: column; gap: 20px; position: relative; }
.end-glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 480px; height: 300px;
  background: radial-gradient(closest-side, rgba(255, 215, 106, 0.18), transparent);
  pointer-events: none;
}
.end-title {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff 30%, var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.end-kicker {
  display: block;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
  margin-bottom: 8px;
}
.end-story { font-size: 15.5px; line-height: 1.7; color: #cdd7ef; text-align: center; }
.end-palmares h3 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin: 20px 0 9px;
}
.palmares-list { display: flex; flex-direction: column; gap: 6px; }
.palmares-item {
  background: var(--panel);
  border: 1px solid rgba(255, 215, 106, 0.25);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 14px;
}
.palmares-item.empty { border-color: var(--panel-border); color: var(--text-dim); }
.end-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.end-table td, .end-table th {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}
.end-table td:last-child, .end-table th:last-child { text-align: right; }
.end-table th { color: var(--text-dim); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.end-table.seasons td:nth-child(3), .end-table.seasons th:nth-child(3) { text-align: center; }

/* ================= PANTHÉON ================= */
.hof-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 6, 12, 0.9);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
}
.hof-box {
  background: var(--bg2);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 22px;
  width: 100%; max-width: 440px;
  max-height: 80dvh;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 11px;
}
.hof-box h3 { font-family: var(--font-display); letter-spacing: 0.15em; font-size: 19px; text-align: center; }
.tut-overlay {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.tut-card {
  width: 100%; max-width: 480px;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}
.tut-card h3 { margin-bottom: 7px; font-family: var(--font-display); letter-spacing: 0.12em; font-size: 15px; }
.tut-card p { margin-bottom: 12px; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.tut-card .btn { width: 100%; }
.help-box section { padding: 8px 0; border-bottom: 1px solid var(--panel-border); }
.help-box section b { color: var(--green); font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; }
.help-box section p { margin: 4px 0 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.45; }
.help-box section ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 12.5px; line-height: 1.45; }
.help-box section li { margin-top: 3px; }
.hof-row {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  padding: 10px 13px;
  display: flex; flex-direction: column; gap: 2px;
}
.hof-row span { color: var(--gold); font-size: 12.5px; font-family: var(--font-display); letter-spacing: 0.08em; }
.hof-row small { color: var(--text-dim); font-size: 11.5px; }

/* ================= AJOUTS V2 ================= */
.hud-calendar {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--cyan);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}
.hud-ctx { color: var(--text-dim); font-family: var(--font-body); letter-spacing: 0.02em; }

.game-select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 15px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2300ff87' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.game-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 255, 135, 0.12); }

.season-chapter {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin-bottom: 3px;
}

.factors {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 13px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}
.factors-title { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.22em; color: var(--text-dim); margin-bottom: 2px; }
.factor { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #c3cee8; }
.factor b { font-family: var(--font-display); font-size: 14px; }
.factor.up b { color: var(--green); }
.factor.down b { color: var(--red); }

.profile-sub { text-align: center; font-size: 12px; color: var(--text-dim); margin: -4px 0 4px; }
.profile-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
}
.profile-row span { flex: 0 0 128px; color: #c3cee8; }
.profile-row b { flex: 0 0 26px; text-align: right; font-family: var(--font-display); }
.mini-bar.big { height: 8px; flex: 1; }
.mini-bar.big div { transition: width 0.4s; }

.btn-save { border-left-color: var(--cyan) !important; opacity: 0.9; }

/* ================= DESKTOP ================= */
@media (min-width: 700px) {
  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(800px 500px at 15% 20%, rgba(0, 255, 135, 0.05), transparent 60%),
      radial-gradient(700px 500px at 85% 80%, rgba(4, 245, 255, 0.05), transparent 60%);
    pointer-events: none;
  }
  #app {
    border-left: 1px solid var(--panel-border);
    border-right: 1px solid var(--panel-border);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
    background: rgba(8, 11, 21, 0.5);
  }
}

/* ================= CRÉATION SUR GRAND ÉCRAN =================
   L'app garde sa colonne de 560px partout, sauf l'écran de création
   qui s'élargit (formulaire 2 colonnes + carte épinglée à droite). */
@media (min-width: 1000px) {
  #app.wide { max-width: 1100px; }
  #app.wide .create-wrap { padding-left: 32px; padding-right: 32px; }
  #app.wide .create-grid { flex-direction: row; align-items: flex-start; gap: 44px; }
  #app.wide .create-form {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
  }
  #app.wide .field-full { grid-column: 1 / -1; }
  #app.wide .create-card-preview {
    position: sticky; top: 20px;
    flex: 0 0 450px;
    align-items: flex-start;
  }
  #app.wide .look-row { flex-direction: row; flex-wrap: wrap; gap: 10px 26px; }
}

/* ================= BADGE BLESSURE (HUD) ================= */
.hud-injury {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--red);
  background: rgba(255, 91, 91, 0.12);
  border: 1px solid rgba(255, 91, 91, 0.35);
  border-radius: 20px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* ================= VARIABLES DE DÉPART (création) ================= */
.create-vars {
  margin-top: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px 12px;
}
.cv-title {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.cv-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  padding: 2.5px 0;
  color: #c3cee8;
}
.cv-row b { font-family: var(--font-display); font-size: 13px; color: var(--text); }
.cv-row.boosted span { color: var(--text); }
.cv-row i { font-style: normal; font-size: 11px; }
.cv-row i.up { color: var(--green); }
.cv-row i.down { color: var(--red); }

/* ================= ATTRIBUTS DE SIMULATION ================= */
.fut-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 10px;
  padding: 4px 14px 2px;
}
.fut-stat {
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.fut-stat b { font-family: var(--font-display); font-size: 15px; }
.fut-stat span { font-size: 9px; letter-spacing: 0.08em; opacity: 0.75; }

.profile-attrs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin: 4px 0 8px;
}
.profile-attrs .pa {
  background: rgba(120, 160, 255, 0.08);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  text-align: center;
  padding: 5px 0 4px;
}
.profile-attrs .pa b { display: block; font-family: var(--font-display); font-size: 15px; }
.profile-attrs .pa span { font-size: 9px; letter-spacing: 0.08em; color: var(--text-dim); }

.end-reconv {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}

/* ================= CARTE FUT ANIMÉE ================= */
.fut-card, .fut-card.big { perspective: 700px; }
.fut-inner {
  transition: transform 0.18s ease-out;
  will-change: transform;
  transform-style: preserve-3d;
}
/* Reflet holographique qui balaye la carte */
.fut-inner::after {
  content: '';
  position: absolute;
  top: -40%; left: -80%;
  width: 55%; height: 190%;
  background: linear-gradient(115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 35%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.05) 65%,
    transparent 100%);
  transform: rotate(14deg);
  animation: holo-sweep 5.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes holo-sweep {
  0%, 52%  { left: -90%; }
  78%, 100% { left: 160%; }
}
.card-gold { animation: gold-pulse 3.2s ease-in-out infinite; }
@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 14px rgba(255, 215, 106, 0.2); }
  50%      { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 28px rgba(255, 215, 106, 0.45); }
}
.card-legend { animation: legend-pulse 2.6s ease-in-out infinite; }
@keyframes legend-pulse {
  0%, 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 16px rgba(255, 215, 106, 0.35), 0 0 44px rgba(160, 110, 255, 0.15); }
  50%      { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 32px rgba(255, 215, 106, 0.65), 0 0 66px rgba(160, 110, 255, 0.35); }
}

/* ================= JOUEUR EN PIED ================= */
.profile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.profile-figure { flex: 0 0 auto; margin-top: -4px; }
.season-head-flex { display: flex; justify-content: center; align-items: center; gap: 18px; }
.season-figure { flex: 0 0 auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); }

/* ================= ALBUM PANINI (graphisme 7) ================= */
.pn-box { max-width: 480px; }
.pn-count { text-align: center; font-family: var(--font-display); letter-spacing: 0.1em; color: var(--cyan); font-size: 13px; margin-top: -4px; }
.pn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.pn-sticker {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 12px 7px 10px;
  text-align: center;
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(30, 40, 68, 0.9), rgba(14, 20, 38, 0.95));
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 118px;
}
.pn-icon { font-size: 32px; line-height: 1.1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); }
.pn-name { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.03em; color: #fff; line-height: 1.15; }
.pn-desc { font-size: 10px; line-height: 1.3; color: var(--text-dim); }
.pn-locked { filter: grayscale(1); opacity: 0.5; }
.pn-locked .pn-icon { opacity: 0.6; }

/* Reflet holographique qui traverse les vignettes débloquées */
.pn-shine { position: absolute; inset: 0; pointer-events: none; }
.pn-sticker:not(.pn-locked) .pn-shine::before {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  animation: pn-sweep 4.5s ease-in-out infinite;
}
@keyframes pn-sweep { 0%, 60% { left: -60%; } 88%, 100% { left: 130%; } }

.pn-bronze { border-color: rgba(205, 140, 90, 0.55); box-shadow: inset 0 0 16px rgba(205, 140, 90, 0.12); }
.pn-silver { border-color: rgba(200, 214, 235, 0.55); box-shadow: inset 0 0 16px rgba(200, 214, 235, 0.14); }
.pn-gold   { border-color: rgba(255, 215, 106, 0.6); box-shadow: inset 0 0 18px rgba(255, 215, 106, 0.18); }
.pn-legend {
  border-color: rgba(255, 215, 106, 0.7);
  background: linear-gradient(160deg, rgba(58, 40, 80, 0.92), rgba(20, 16, 40, 0.96));
  box-shadow: inset 0 0 22px rgba(180, 130, 255, 0.22), 0 0 14px rgba(255, 215, 106, 0.15);
}
.pn-legend .pn-name { color: var(--gold); }

/* Toast de déblocage */
.pn-toast {
  position: fixed;
  top: calc(14px + var(--safe-top));
  left: 50%;
  z-index: 300;
  transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 28, 50, 0.98), rgba(10, 14, 26, 0.98));
  border: 1px solid var(--gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 215, 106, 0.25);
  transition: transform 0.4s cubic-bezier(0.2, 1.1, 0.35, 1);
  max-width: min(420px, 92vw);
}
.pn-toast.show { transform: translate(-50%, 0); }
.pn-toast-icon { font-size: 30px; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); }
.pn-toast-body { display: flex; flex-direction: column; gap: 1px; }
.pn-toast-tag { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.18em; color: var(--gold); }
.pn-toast-body b { font-size: 15px; color: #fff; font-family: var(--font-display); letter-spacing: 0.03em; }
.pn-toast.pn-legend { border-color: rgba(180, 130, 255, 0.9); }

/* Toast générique : récap des points après match (D1) + progression (D2) */
.pn-generic { border-color: rgba(120, 160, 255, 0.5); }
.pn-generic.up { border-color: rgba(0, 255, 135, 0.6); }
.pn-generic.down { border-color: rgba(255, 91, 91, 0.6); }
.pn-generic-body { font-size: 13px; color: #eaf0ff; }
.tr-title { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.16em; color: var(--gold); display: block; margin-bottom: 5px; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tr-chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; border: 1px solid; }
.tr-chip.up { color: var(--green); border-color: rgba(0, 255, 135, 0.4); background: rgba(0, 255, 135, 0.08); }
.tr-chip.down { color: var(--red); border-color: rgba(255, 91, 91, 0.4); background: rgba(255, 91, 91, 0.08); }

/* Bouton de vitesse des commentaires en match (D3) */
.m-speed-btn {
  position: absolute;
  top: 9px; right: 10px;
  z-index: 5;
  padding: 4px 10px;
  background: rgba(6, 10, 20, 0.82);
  border: 1px solid rgba(120, 160, 255, 0.3);
  border-radius: 7px;
  color: #cfe0ff;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.06em;
  cursor: pointer;
}
.m-speed-btn:active { filter: brightness(0.9); }

/* Numéro de maillot sur la carte FUT (F2) */
.fut-number {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--gold);
  padding: 0 5px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
/* Valeur chiffrée forme/moral dans le HUD (D2) */
.bar-val { color: #cfe0ff; font-size: 11px; font-weight: 700; }
/* B1 — flèche de tendance ↗︎/↘︎ des variables du HUD (érosion / remontée) */
.trend { font-size: 10px; margin-left: 2px; font-weight: 800; }
.trend.up { color: var(--green); }
.trend.down { color: #ff5b5b; }

/* C3 — Écran Entourage : PNJ, jauges de relation, souvenirs, arcs */
.ent-row { margin: 8px 0 10px; }
.ent-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ent-icon { font-size: 18px; }
.ent-id { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.ent-id b { font-size: 13px; }
.ent-id small { color: #8fa3c8; font-size: 10px; }
.ent-val { font-size: 13px; color: #cfe0ff; }
.ent-mem { font-size: 10px; color: #8fa3c8; font-style: italic; margin-top: 3px; }
.ent-arcs { display: flex; flex-direction: column; gap: 4px; }
.ent-arc { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #cfe0ff; background: rgba(255,255,255,0.04); border-radius: 6px; padding: 4px 8px; }
.ent-arc b { letter-spacing: 2px; color: var(--gold); font-size: 10px; }
.ent-arc.done { opacity: 0.75; }
.ent-arc.done b { color: var(--green); }

@media (max-width: 380px) {
  .pn-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= MODE TACTILE (visée tactile) ================= */
.m-skill {
  position: fixed;
  inset: 0;
  z-index: 115; /* au-dessus de l'action texte, sous la cinématique de but */
  background:
    radial-gradient(circle at 50% 32%, rgba(17, 79, 78, 0.28), transparent 42%),
    rgba(2, 6, 14, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.m-skill.show { opacity: 1; }
.sk-head { width: 100%; max-width: 540px; margin: 0 auto; text-align: center; }
.sk-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #ffc15c;
  text-shadow: 0 0 20px rgba(255, 178, 74, 0.38), 0 2px 8px rgba(0, 0, 0, 0.8);
}
.sk-opp { font-size: 12px; color: #79d9d0; opacity: 0.9; margin-top: 3px; letter-spacing: 0.05em; }
.sk-hint { font-size: 13px; line-height: 1.5; color: #d9eceb; margin-top: 8px; }
.sk-stage {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  touch-action: none;           /* pas de scroll pendant la visée (Pointer Events) */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: crosshair;
}
.sk-stage svg {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(101, 218, 205, 0.3);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.75), 0 0 36px rgba(38, 160, 146, 0.13), inset 0 0 0 1px rgba(255, 193, 92, 0.06);
  pointer-events: none;         /* les gestes se lisent sur .sk-stage, pas sur le SVG */
}
.sk-signal, .sk-cadence {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  z-index: 4; min-width: 140px; padding: 16px 22px; border-radius: 16px;
  text-align: center; font-family: var(--font-display); font-size: 24px; letter-spacing: 0.08em;
  color: #ffc15c; background: linear-gradient(145deg, rgba(5, 18, 27, 0.96), rgba(8, 43, 45, 0.94));
  border: 1px solid rgba(255, 193, 92, 0.58);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.58), 0 0 22px rgba(255, 178, 74, 0.12);
}
.sk-signal.go { color: #061b1a; background: linear-gradient(135deg, #83ead8, #3db9a9); border-color: #dffff7; }
.sk-signal.ko { color: #fff; background: linear-gradient(135deg, #b52d3f, #e05a45); border-color: #ffb18e; font-size: 18px; }
.sk-cadence { display: flex; flex-direction: column; gap: 7px; }
.sk-cadence span { font-size: 18px; color: #79d9d0; text-shadow: 0 0 12px rgba(121, 217, 208, 0.5); }
.sk-cadence.pulse span { transform: scale(1.65); color: #ffc15c; }
.sk-hold-zone { fill: rgba(255,178,74,0.12); stroke: #ffb24a; stroke-width: 4; }
.sk-seq-target circle { fill: rgba(46,181,168,0.2); stroke: #79d9d0; stroke-width: 3; }
.sk-seq-target text { fill: #fff; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.sk-seq-target.done { opacity: 0.25; }
.sk-seq-target.wrong circle { fill: rgba(224,70,78,0.78); stroke: #ffd1bd; }
/* Sas « Prêt ? » — le geste ne se lance qu'au clic : on laisse lire la consigne, aucun chrono avant */
.sk-go-btn {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #081b1b;
  background: linear-gradient(135deg, #ffd17a, #f19a3e);
  border: 1px solid #ffe5b0;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(241, 154, 62, 0.38), 0 0 18px rgba(255, 193, 92, 0.2);
  cursor: pointer;
  z-index: 5;
  animation: skGoPulse 1.1s ease-in-out infinite;
}
@keyframes skGoPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
.sk-go-btn:active { filter: brightness(0.9); }
/* Jauge de puissance du glissé (se remplit pendant la visée) */
.sk-meter {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  height: 10px;
  border-radius: 7px;
  background: rgba(3, 16, 23, 0.84);
  border: 1px solid rgba(105, 211, 199, 0.3);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 0 12px rgba(60, 190, 174, 0.08);
  overflow: hidden;
  pointer-events: none;
}
.sk-meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, #39bba9, #ffc15c, #e05a45); box-shadow: 0 0 10px rgba(255, 193, 92, 0.36); transition: width 0.05s linear; }
/* Verdict du geste (parfait / moyen / raté) */
.sk-verdict {
  position: absolute;
  top: 40%; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.9), 0 0 18px currentColor;
  pointer-events: none;
  animation: pulse 0.6s ease;
}
.sk-verdict.ok { color: #79e3ce; }
.sk-verdict.mid { color: #ffc15c; }
.sk-verdict.ko { color: #ff6b62; }
/* Jauge de timing (le curseur balaie, taper dans le vert) */
.sk-bar {
  position: absolute;
  left: 8%; right: 8%; bottom: 18px;
  height: 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(5, 20, 28, 0.96), rgba(7, 35, 38, 0.94));
  border: 1px solid rgba(105, 211, 199, 0.38);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.58), 0 8px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  pointer-events: none;
}
.sk-bar-green {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(54, 185, 167, 0.38), rgba(121, 227, 206, 0.68), rgba(54, 185, 167, 0.38));
  border-left: 2px solid #79e3ce;
  border-right: 2px solid #79e3ce;
  box-shadow: 0 0 14px rgba(121, 227, 206, 0.28);
}
.sk-bar-cursor {
  position: absolute; top: -2px; bottom: -2px;
  width: 4px; margin-left: -2px;
  background: #ffc15c;
  box-shadow: 0 0 12px #ffb24a, 0 0 3px #fff;
}
/* Interrupteur HUD : grisé quand le mode est désactivé */
#btn-skillmode.off { opacity: 0.4; filter: grayscale(1); }

/* ---------- F4 · Classement du championnat ---------- */
.st-box { max-width: 560px; width: 92%; }
.st-scroll { max-height: 56vh; overflow-y: auto; margin: 8px 0; border-radius: 10px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table thead th { position: sticky; top: 0; background: #12172a; color: #8ea0c8; font-weight: 600; padding: 7px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.st-table td { padding: 6px 4px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.05); color: #dfe6f5; }
.st-table .st-rank { color: #7f8db0; width: 22px; }
.st-table .st-club { text-align: left; white-space: nowrap; font-weight: 600; }
.st-table .st-club b { color: #ffd76a; font-weight: 700; font-size: 11px; }
.st-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.st-table .st-pts { font-weight: 800; color: #fff; }
.st-table .st-gd { color: #9fb0d0; }
.st-table tr.st-me td { background: rgba(255,215,106,.12); }
.st-table tr.st-me .st-rank { color: #ffd76a; font-weight: 800; }
.st-table tr.st-ucl .st-rank { box-shadow: inset 3px 0 0 #3ad07a; }
.st-table tr.st-uel .st-rank { box-shadow: inset 3px 0 0 #4d9bff; }
.st-table tr.st-rel .st-rank { box-shadow: inset 3px 0 0 #e5544b; }
.st-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 11px; color: #9fb0d0; margin: 6px 0 12px; align-items: center; }
.st-k { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 3px; vertical-align: middle; }
.st-k.st-ucl { background: #3ad07a; } .st-k.st-uel { background: #4d9bff; } .st-k.st-rel { background: #e5544b; }

/* ---------- F4 · Onglets + arbre Ligue des Champions ---------- */
.st-tabs { display: flex; gap: 6px; margin: 6px 0 4px; }
.st-tab { flex: 1; padding: 8px 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: #12172a; color: #8ea0c8; font: 600 12px/1 'Inter',sans-serif; cursor: pointer; }
.st-tab.active { background: linear-gradient(135deg,#1d6b3f,#2e9d5b); color: #fff; border-color: transparent; }
/* Phase 2b — sous-onglets D1/D2 (division du pays du joueur) */
.st-subtabs { margin: 2px 0 6px; }
.st-subtabs .st-dtab { padding: 6px 6px; font-size: 11px; }
.st-subtabs .st-dtab.active { background: linear-gradient(135deg,#2a4d86,#3a6fc4); }
.br-wrap { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.br-round { }
.br-title { color: #8ea0c8; font: 700 11px/1 'Inter',sans-serif; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.br-tie { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; border-left: 2px solid rgba(255,255,255,.08); padding-left: 8px; }
.br-team { display: flex; align-items: center; gap: 6px; font: 600 13px/1.6 'Inter',sans-serif; color: #7f8db0; }
.br-team.br-win { color: #eaf1ff; }
.br-team.br-win .st-dot { box-shadow: 0 0 0 1px #3ad07a, 0 0 6px #3ad07a; }
.br-team:not(.br-win) { opacity: .5; }
.br-you { color: #ffd76a !important; font-weight: 800; }
.br-champ { text-align: center; font: 800 15px/1 'Oswald',sans-serif; color: #ffd76a; padding: 10px; background: rgba(255,215,106,.1); border-radius: 10px; margin-top: 2px; }

/* ---- Monde vivant (écran 🌍) ---- */
/* Tableaux du Monde : mise en page figée → la dernière colonne (Niv./Buts) tient toujours.
   En table-layout:fixed, les largeurs de colonne sont prises sur la 1re ligne (les <th>). */
.wr-table { table-layout: fixed; width: 100%; }
.wr-table th, .wr-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-table th:first-child { width: 26px; }
.wr-table th:last-child { width: 44px; }
.wr-table .st-pts { text-align: right; }
.wr-table-sc th:nth-child(3) { width: 62px; }
.wr-table-sc td:nth-child(3) { color: #9fb0d0; font-size: 11px; }
.wr-pos { color: #7d8dad; font-size: 10px; font-weight: 700; margin-left: 5px; }
.wr-podium { display: inline-block; line-height: 1.7; margin: 3px 0; }
.wr-sc { color: #9fb0d0; font-size: 12px; }
.wr-rival { padding: 4px 2px; }
.wr-rival-head { font: 800 18px/1.2 'Oswald',sans-serif; color: #ff8a5b; }
.wr-rival-sub { color: #9fb0d0; font-size: 12px; margin: 2px 0 12px; }
.wr-tag { font-size: 11px; color: #9fb0d0; font-weight: 600; }
.wr-h2h td, .wr-h2h th { text-align: center; }
.wr-h2h td:first-child, .wr-h2h th:first-child { text-align: left; color: #9fb0d0; }
.wr-h2h .wr-win { color: #ffd76a; font-weight: 800; }
.wr-news { display: flex; flex-direction: column; gap: 7px; }
.wr-news-line { font-size: 13px; color: #dce6f5; background: rgba(255,255,255,.03); border-radius: 8px; padding: 8px 10px; }
.wr-yr { color: #7d8dad; font-size: 11px; float: right; }
