/* Mon Onze — design system "cour de récré" : papier crème, encre épaisse,
   vert terrain, orange craie. Mobile-first, un écran = une action. */

:root {
  --paper: #f6f0e2;
  --chalk: #fffdf5;
  --ink: #1b2420;
  --grass: #1c7a43;
  --grass-dark: #14532d;
  --accent: #ff6b35;
  --sun: #ffd23f;
  --muted: #6b7268;
  --danger: #d92626;
  --pos-g: #eab308;
  --pos-def: #3b82f6;
  --pos-mil: #22c55e;
  --pos-att: #ef4444;
  --radius: 14px;
  --shadow: 4px 4px 0 var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  background-image: radial-gradient(rgba(27, 36, 32, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  min-height: 100dvh;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .display {
  font-family: "Archivo Black", "Archivo", sans-serif;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

p { line-height: 1.45; }

.muted { color: var(--muted); font-size: 0.9rem; }

/* ---------- Boot ---------- */
.boot { text-align: center; margin-top: 40vh; }
.boot-ball { font-size: 3rem; animation: bounce 0.9s infinite alternate ease-in; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-18px); } }

/* ---------- Boutons ---------- */
.btn {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--chalk);
  color: var(--ink);
  font-family: "Archivo Black", sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.06s, box-shadow 0.06s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--accent); color: var(--chalk); }
.btn.grass { background: var(--grass); color: var(--chalk); }
.btn.sun { background: var(--sun); }
.btn.ghost { background: transparent; box-shadow: none; border-width: 2px; font-size: 0.9rem; padding: 10px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn + .btn { margin-top: 14px; }
.btn.small { width: auto; display: inline-block; font-size: 0.85rem; padding: 10px 14px; }
/* Le défi du jour : le rendez-vous quotidien, il doit se voir. */
.btn.defi { background: var(--ink); color: var(--sun); }
.btn.defi.done { background: var(--chalk); color: var(--muted); }

/* ---------- Champs ---------- */
.field { margin: 14px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; text-transform: uppercase; }
input[type="text"] {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  font-family: inherit;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--chalk);
}
input[type="text"]:focus { outline: 3px solid var(--sun); }

/* ---------- Cartes / panneaux ---------- */
.panel {
  background: var(--chalk);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin: 14px 0;
}
.panel.grass { background: var(--grass-dark); color: var(--chalk); }

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.top .back {
  border: 2px solid var(--ink);
  background: var(--chalk);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
.badge {
  display: inline-block;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 8px;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- Accueil ---------- */
.hero { text-align: center; margin: 26px 0 20px; }
.hero .logo {
  font-family: "Archivo Black", sans-serif;
  font-size: 2.6rem;
  text-transform: uppercase;
  line-height: 0.95;
}
.hero .logo span { color: var(--grass); }
.hero .tag { margin-top: 10px; font-size: 1rem; color: var(--muted); }

/* Accueil : logo compact + puce coach (le pseudo ne bloque plus l'entrée). */
.home-hero { margin: 22px 0 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.home-hero .logo { font-size: 2.3rem; }
.coach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--chalk); font-size: 0.82rem; font-weight: 700; cursor: pointer;
  font-family: "Archivo", sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.coach-chip b { text-transform: uppercase; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.coach-edit { display: flex; gap: 8px; align-items: center; justify-content: center; }
.coach-edit input { width: auto; flex: 0 1 200px; padding: 8px 12px; font-size: 0.95rem; }

/* Le hero : la seule chose qui compte, une pente descendante vers le jeu. */
.hero-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; width: 100%;
  padding: 22px 20px; border: 3px solid var(--ink); border-radius: 20px; cursor: pointer;
  background: linear-gradient(145deg, var(--grass) 0%, var(--grass-dark) 100%);
  color: var(--chalk); box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.06s, box-shadow 0.06s; font-family: "Archivo", sans-serif;
  -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; top: -40%; right: -10%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,210,63,0.25), transparent 70%); pointer-events: none;
}
.hero-card:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.hero-card .hk { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sun); }
.hero-card .ht { font-family: "Archivo Black", sans-serif; font-size: 1.7rem; line-height: 1.02; text-transform: uppercase; }
.hero-card .hs { font-size: 0.92rem; line-height: 1.35; opacity: 0.92; margin-top: 2px; }
.hero-card .hcta {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 10px;
  padding: 9px 16px; border-radius: 999px; background: var(--sun); color: var(--ink);
  font-family: "Archivo Black", sans-serif; font-size: 0.92rem; text-transform: uppercase;
}
.hero-card + .btn { margin-top: 16px; }

/* Écran de choix Sélection / Club derrière le hero. */
.choice-card {
  display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%;
  padding: 18px; border: 3px solid var(--ink); border-radius: 16px; background: var(--chalk);
  color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font-family: "Archivo", sans-serif;
  transition: transform 0.06s, box-shadow 0.06s; -webkit-tap-highlight-color: transparent;
}
.choice-card + .choice-card { margin-top: 14px; }
.choice-card:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.choice-card.soon { opacity: 0.5; pointer-events: none; }
.choice-card .ci { color: var(--grass); }
.choice-card .ct { font-family: "Archivo Black", sans-serif; font-size: 1.35rem; text-transform: uppercase; }
.choice-card .cs { font-size: 0.92rem; color: var(--muted); line-height: 1.35; }
/* Deux cartes colorées, même énergie que le hero : vert terrain (nations →
   Coupe du Monde), bleu C1 (clubs → Ligue des Champions). */
.choice-card.sel { background: linear-gradient(145deg, var(--grass) 0%, var(--grass-dark) 100%); color: var(--chalk); }
.choice-card.club { background: linear-gradient(145deg, #1e40af 0%, #12224e 100%); color: var(--chalk); }
.choice-card.sel .ci, .choice-card.club .ci { color: var(--sun); }
.choice-card.sel .cs, .choice-card.club .cs { color: rgba(255, 253, 245, 0.88); }

/* Signature de la carte : demandée seulement au moment de partager. */
.sign-row { display: flex; gap: 8px; width: min(92vw, 420px); }
.sign-row input { flex: 1; padding: 12px; font-size: 1rem; }

/* Sélection des 16 : contexte du payoff en haut, action collante en bas. */
.keep-intro {
  display: flex; align-items: center; gap: 8px;
  background: var(--grass-dark); color: var(--chalk);
  padding: 11px 14px; border-radius: 12px; margin-bottom: 10px;
  font-weight: 700; font-size: 0.9rem; line-height: 1.3;
}
.keep-intro .ic { color: var(--sun); flex: 0 0 auto; }
.keep-cta {
  position: sticky; bottom: 0; z-index: 20; margin-top: 10px;
  padding: 10px 0 calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, var(--paper) 34%);
}
.keep-cta .btn { margin: 0; }

/* ---------- Joueurs ---------- */
.pos-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  font-weight: 900;
  font-size: 0.7rem;
  color: var(--chalk);
}
.pos-G { background: var(--pos-g); color: var(--ink); }
.pos-DEF { background: var(--pos-def); }
.pos-MIL { background: var(--pos-mil); color: var(--ink); }
.pos-ATT { background: var(--pos-att); }

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--chalk);
  margin-bottom: 8px;
}
.player-row .info { flex: 1; min-width: 0; }
.player-row .name { font-weight: 700; font-size: 1rem; }
.player-row .club { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-row .rating {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.2rem;
  min-width: 38px;
  text-align: center;
}
.player-row.taken { opacity: 0.35; }
.player-row .pick-btn {
  border: 2px solid var(--ink);
  background: var(--accent);
  color: var(--chalk);
  font-family: "Archivo Black", sans-serif;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.8rem;
}
.tag-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 1px 5px;
  margin-left: 4px;
  background: var(--sun);
  vertical-align: middle;
}

/* ---------- Filtres draft ---------- */
.filters { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.filters .f {
  border: 2px solid var(--ink);
  background: var(--chalk);
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}
.filters .f.on { background: var(--ink); color: var(--chalk); }

.turn-banner {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: "Archivo Black", sans-serif;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  background: var(--chalk);
}
.turn-banner.me { background: var(--sun); animation: pulse 1.2s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.015); } }

.feed { max-height: 130px; overflow-y: auto; font-size: 0.85rem; }
.feed div { padding: 3px 0; border-bottom: 1px dashed rgba(27,36,32,0.2); }

/* ---------- Terrain ---------- */
.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pitch::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 253, 245, 0.5);
  border-radius: 6px;
}
.pitch::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; top: 50%;
  border-top: 2px solid rgba(255, 253, 245, 0.5);
}
.pitch .spot {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 76px;
  z-index: 2;
}
.pitch .spot .dot {
  width: 40px; height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2.5px solid var(--chalk);
  display: flex; align-items: center; justify-content: center;
  font-family: "Archivo Black", sans-serif;
  font-size: 0.85rem;
  color: var(--chalk);
  background: var(--ink);
  cursor: pointer;
}
.pitch .spot.sel .dot { outline: 4px solid var(--sun); }
.pitch .spot .lbl {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--chalk);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Match ---------- */
.scoreline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: "Archivo Black", sans-serif;
  font-size: 1.6rem;
  margin: 8px 0;
}
.scoreline .score {
  background: var(--ink);
  color: var(--chalk);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 2rem;
}
.minute-badge {
  display: inline-block;
  background: var(--ink);
  color: var(--sun);
  font-family: "Archivo Black", sans-serif;
  border-radius: 8px;
  padding: 4px 10px;
  margin-bottom: 8px;
}
.event-text { font-size: 1.05rem; line-height: 1.5; margin: 10px 0 16px; }
.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--chalk);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.choice-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.outcome { border-left: 6px solid var(--grass); padding: 10px 12px; background: var(--chalk); border-radius: 0 10px 10px 0; margin: 12px 0; font-size: 0.98rem; }
.outcome.bad { border-left-color: var(--danger); }

.story { list-style: none; }
.story li {
  display: flex; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(27,36,32,0.2);
  font-size: 0.92rem;
  align-items: baseline;
}
.story .min { font-family: "Archivo Black", sans-serif; min-width: 34px; }
.story li.goal { font-weight: 700; }
.story li.away { color: var(--muted); }

/* ---------- Classement ---------- */
table.rank { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.rank th, table.rank td { padding: 8px 6px; text-align: center; border-bottom: 2px solid rgba(27,36,32,0.12); }
table.rank th { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); }
table.rank td.team { text-align: left; font-weight: 700; }
table.rank tr.me { background: rgba(255, 210, 63, 0.35); }
table.rank td.pts { font-family: "Archivo Black", sans-serif; }

.fixture {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--chalk);
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.fixture .vs { font-weight: 700; flex: 1; }
.fixture .res { font-family: "Archivo Black", sans-serif; }
.fixture .play {
  border: 2px solid var(--ink); background: var(--accent); color: var(--chalk);
  font-family: "Archivo Black", sans-serif; border-radius: 10px; padding: 7px 11px;
  cursor: pointer; font-size: 0.78rem; white-space: nowrap;
}
.fixture .wait { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* ---------- Managers (lobby) ---------- */
.manager-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px;
  background: var(--chalk); margin-bottom: 8px; font-weight: 700;
}
.crest {
  width: 36px; height: 40px; min-width: 36px;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
  border-radius: 4px;
  font-size: 1.05rem;
  color: #fffdf5;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--chalk);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
  border: 2px solid var(--chalk);
}

.center { text-align: center; }
.spacer { flex: 1; }
.mt { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .btn { margin-top: 0; }

.rating.stars { font-size: 0.8rem; letter-spacing: -1px; min-width: 58px; color: var(--accent); }
.halfstar {
  background: linear-gradient(90deg, var(--accent) 50%, rgba(27, 36, 32, 0.2) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bars {
  height: 6px;
  background: rgba(27, 36, 32, 0.12);
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}
.bars .bar { display: block; height: 100%; border-radius: 3px; }
.bars .bar.note { background: var(--grass); }
.bars .bar.nrj { background: var(--sun); }
.bars .bar.nrj.low { background: var(--danger); }

.outcome.goal-flash {
  border-left-color: var(--accent);
  background: var(--sun);
  animation: goalpop 0.5s ease-out;
}
@keyframes goalpop { from { transform: scale(0.92); } to { transform: scale(1); } }

.tabs { display: flex; gap: 6px; margin: 10px 0; }
.tabs .tab {
  flex: 1;
  border: 2px solid var(--ink);
  background: var(--chalk);
  border-radius: 10px;
  padding: 9px 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.82rem;
  text-align: center;
}
.tabs .tab.on { background: var(--ink); color: var(--chalk); }

.crest-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.crest-picker button { display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--chalk);
  font-size: 1.2rem;
  cursor: pointer;
}
.crest-picker button.on { outline: 3px solid var(--sun); }

.code-pill {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.25em;
  background: var(--ink);
  color: var(--sun);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
  user-select: all;
}

/* ===== V3 : éditeur de compo (glisser-déposer) ===== */
.editor-zone { position: relative; }
.bench {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: #efe6cf; border: 3px solid var(--ink); border-radius: 12px;
  padding: 8px; margin-top: 8px; box-shadow: 4px 4px 0 rgba(27, 36, 32, 0.2);
}
.bench-title {
  font-family: "Archivo Black", sans-serif; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 1px; width: 100%; color: var(--muted);
}
.bench-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 5px 10px 5px 5px; font-family: inherit; font-size: 0.8rem; font-weight: 700;
  color: var(--ink); touch-action: none; cursor: grab;
}
.bench-chip.sel { outline: 3px solid var(--accent); }
.bench-chip.locked { opacity: 0.45; }
.bench-chip .pos-dot { width: 22px; height: 22px; font-size: 0.55rem; }
.bench-chip .bn-r { font-weight: 800; font-size: 0.78rem; color: var(--muted); margin-left: 2px; }
.xi-avg { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 2px 0 6px; }
.xi-avg b { font-size: 1rem; color: var(--ink); }
.spot { touch-action: none; cursor: grab; }
.spot.sel .dot { outline: 3px solid var(--accent); outline-offset: 2px; }
.spot.droptarget .dot, .bench-chip.droptarget { outline: 3px dashed var(--sun); outline-offset: 2px; }
.drag-ghost {
  position: fixed; z-index: 200; transform: translate(-50%, -120%);
  background: var(--ink); color: var(--paper); font-weight: 800;
  padding: 6px 12px; border-radius: 999px; pointer-events: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3); font-size: 0.85rem;
}

/* ===== V1.8 : le terrain qui se remplit pendant le draft ===== */
.editor-zone.draft-mini { display: grid; grid-template-columns: 5fr 4fr; gap: 8px; align-items: start; margin-bottom: 10px; }

/* Quotas de postes (écrans « garde tes 16 » et liste de sélection) : une
   pastille par poste, verte quand le minimum est couvert, rouge au-delà du
   maximum. Le regard sait en une seconde ce qui bloque. */
.quota-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.quota {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  border: 2px solid rgba(27, 36, 32, 0.25); border-radius: 999px; padding: 4px 6px;
  font-size: 0.72rem; font-weight: 800; white-space: nowrap; background: var(--chalk);
}
.quota.ok { border-color: var(--grass); color: var(--grass); }
.quota.over { border-color: var(--danger); color: var(--danger); }
.editor-zone.draft-mini .fill-side { display: flex; flex-direction: column; gap: 6px; }
.editor-zone.draft-mini .bench { margin-top: 0; align-content: flex-start; }
/* Les systèmes sous le banc : la place morte de la colonne de droite. */
.editor-zone.draft-mini .forms { display: flex; flex-wrap: wrap; gap: 4px; }
.editor-zone.draft-mini .forms .f {
  border: 2px solid var(--ink); background: var(--chalk); border-radius: 8px;
  font-weight: 700; cursor: pointer;
  padding: 4px 8px; font-size: 0.66rem; margin: 0; flex: 0 0 auto;
}
.editor-zone.draft-mini .forms .f.on { background: var(--ink); color: var(--chalk); }
.editor-zone.draft-mini .spot { width: 52px; }
.editor-zone.draft-mini .spot .dot { width: 26px; height: 26px; font-size: 0.55rem; border-width: 2px; }
.editor-zone.draft-mini .spot .lbl { font-size: 0.52rem; margin-top: 1px; }
.editor-zone.draft-mini .pitch::before { inset: 7px; }
.editor-zone.draft-mini .bench-chip { font-size: 0.7rem; padding: 4px 8px 4px 4px; }
.editor-zone.draft-mini .bench-chip .pos-dot { width: 18px; height: 18px; font-size: 0.48rem; }
.bench-chip.need {
  background: transparent; border-style: dashed; color: var(--muted);
  cursor: default; touch-action: auto; opacity: 0.8; font-weight: 600;
}
.bench-chip.need .pos-dot { opacity: 0.6; }

/* ===== V1.9 : le tournoi de l'été vécu match par match ===== */
/* Verdict d'un match vécu (sélection, finale LDC) : le panneau final. */
.natscore { opacity: 0; animation: filmin 0.5s ease forwards; }
.natscore.g { border-color: var(--grass); }
.natscore.p { border-color: var(--danger); }

/* ===== V3 : film du match + débrief ===== */
.livefilm li.fresh { animation: filmin 0.45s ease; }
@keyframes filmin {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.debrief {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 10px; border-radius: 10px; margin-bottom: 8px;
  border: 2px solid var(--ink); font-size: 0.92rem; line-height: 1.35;
}
.debrief.plus { background: #e4f2e0; }
.debrief.minus { background: #f8e3dc; }
.debrief .sign { font-weight: 900; }
.debrief.plus .sign { color: var(--grass); }
.debrief.minus .sign { color: var(--danger); }
.tag-chip.profil { background: var(--ink); color: var(--sun); }

/* ===== Carrière ===== */
.career-offer .info { flex: 1; min-width: 0; }
.career-offer .name { font-weight: 900; font-size: 1.15rem; font-family: "Archivo Black", sans-serif; }
.career-offer .sub, .career-head .sub { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.career-head .name { font-weight: 700; font-size: 0.95rem; }
.career-choice {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--chalk);
  padding: 10px 12px; margin-bottom: 8px; font: inherit; color: var(--ink);
}
.career-choice .fx { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.career-choice.on { background: var(--ink); color: var(--chalk); }
.career-choice.on .fx { color: var(--sun); }
/* minmax(0,1fr) : sans lui, le texte nowrap des lignes fixe la largeur mini
   des colonnes et la grille déborde de l'écran sur mobile (bug 27/07). */
.career-results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.career-results .cline {
  display: flex; gap: 6px; align-items: center; font-size: 0.82rem;
  border: 2px solid rgba(27, 36, 32, 0.15); border-radius: 8px; padding: 5px 8px;
}
.career-results .cj { color: var(--muted); font-size: 0.72rem; min-width: 24px; }
.career-results .copp { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.career-results .cscore { font-family: "Archivo Black", sans-serif; }
.career-results .cline.g { background: rgba(28, 122, 67, 0.12); }
.career-results .cline.p { background: rgba(217, 38, 38, 0.1); }

/* Timeline de carrière déroulable, saison par saison. */
.tl-details { margin-top: 12px; }
.tl-details summary {
  cursor: pointer; font-weight: 700; font-size: 0.9rem; padding: 10px 0;
  display: flex; align-items: center; gap: 8px; color: var(--ink);
  list-style: none; text-transform: uppercase; letter-spacing: -0.01em;
}
.tl-details summary::-webkit-details-marker { display: none; }
.tl-details summary::after { content: "▾"; margin-left: auto; transition: transform 0.2s; }
.tl-details[open] summary::after { transform: rotate(180deg); }
.tl { position: relative; margin: 4px 0 2px; padding-left: 22px; }
.tl::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: rgba(27, 36, 32, 0.15);
}
.tl-row { position: relative; padding: 9px 0; }
.tl-row + .tl-row { border-top: 1px dashed rgba(27, 36, 32, 0.1); }
.tl-dot {
  position: absolute; left: -20px; top: 13px; width: 13px; height: 13px;
  border-radius: 50%; border: 2px solid var(--ink); background: var(--chalk);
}
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tl-season { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.tl-rec { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.tl-club { font-family: "Archivo Black", sans-serif; font-size: 1rem; margin-top: 2px; }
.tl-pos { color: var(--muted); font-weight: 600; font-size: 0.82rem; font-family: "Archivo", sans-serif; }
.tl-ev { font-size: 0.82rem; margin-top: 4px; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.tl-row.g .tl-ev { color: var(--grass); }
.tl-row.p .tl-ev { color: var(--danger); }
.career-note {
  font-family: "Archivo Black", sans-serif; font-size: 5.2rem; line-height: 1;
  color: var(--accent); margin-top: 10px;
}

/* ===== Compétences spéciales ===== */
.tag-chip.sp {
  background: linear-gradient(135deg, #b8860b, #ffd23f);
  color: var(--ink); border: 1px solid var(--ink); font-weight: 800;
}

/* ---------- Film V4 : lignes aux couleurs des équipes, buts en valeur ---------- */
.story li.teamline {
  border-bottom: none;
  border-left: 4px solid var(--teamc, #4b5563);
  background: color-mix(in srgb, var(--teamc, #4b5563) 9%, transparent);
  border-radius: 0 8px 8px 0;
  padding: 7px 8px;
  margin-bottom: 4px;
}
.story li.teamline.goal {
  background: color-mix(in srgb, var(--teamc, #4b5563) 24%, transparent);
  border-left-width: 6px;
  font-weight: 700;
}
.story li.filminfo {
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  border-bottom: none;
  padding: 10px 4px;
  text-align: center;
}
.filmlegend {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 0.82rem;
  margin: 6px 0 8px;
}
.filmlegend .teamdot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: baseline;
}

/* Les deux organisations dans le débrief */
.duo-pitch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.duo-pitch .pitch .spot .pname { font-size: 0.5rem; }

/* ---------- Mini-victoire : qualification / titre ---------- */
.celeb-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 22, 18, 0.82);
  display: flex; align-items: center; justify-content: center;
  animation: celebfade 0.35s ease;
}
@keyframes celebfade { from { opacity: 0; } }
.celeb-card {
  background: var(--chalk, #f6f2e8);
  border: 3px solid var(--ink, #1b2420);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink, #1b2420);
  padding: 26px 22px;
  text-align: center;
  max-width: 320px;
  margin: 0 16px;
  animation: celebpop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes celebpop { from { transform: scale(0.6); opacity: 0; } }
.celeb-icon { font-size: 3.2rem; animation: celebbounce 1.1s ease infinite; }
@keyframes celebbounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-12px) rotate(-6deg); } }
.celeb-card h2 { font-family: "Archivo Black", sans-serif; letter-spacing: 1px; margin: 8px 0 6px; }
.celeb-card p { margin-bottom: 14px; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; top: -12px;
  width: 9px; height: 14px;
  border-radius: 2px;
  animation: confall 2.6s linear infinite;
}
@keyframes confall {
  to { transform: translateY(110vh) rotate(540deg); }
}

/* ---------- Accueil : modes à venir ---------- */
.mode-soon { opacity: 0.55; border-style: dashed; pointer-events: none; }
.soon-chip {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--sun, #f5c518);
  color: var(--ink, #1b2420);
  border-radius: 20px;
  padding: 2px 8px;
  vertical-align: middle;
}
.soon-list { margin-top: 8px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* ---------- Carrière : la saison déroulée comme un film ---------- */
.film-season { display: flex; flex-direction: column; gap: 7px; margin: 10px 0; }
.film-season .cmatch { animation: filmpop 0.35s ease; }
.film-season .cline {
  display: flex; gap: 8px; align-items: center; font-size: 0.92rem;
  border: 2px solid rgba(27, 36, 32, 0.15); border-radius: 10px; padding: 9px 12px;
}
.film-season .cj { color: var(--muted); font-size: 0.75rem; min-width: 28px; }
.film-season .copp { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.film-season .cscore { font-family: "Archivo Black", sans-serif; font-size: 1.05rem; }
.film-season .cline.g { background: rgba(28, 122, 67, 0.14); }
.film-season .cline.p { background: rgba(217, 38, 38, 0.11); }
.film-season .cbuts { font-size: 0.78rem; color: var(--muted); padding: 3px 12px 0; }
@keyframes filmpop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Icônes Lucide inline ---------- */
.ic { vertical-align: -2px; flex-shrink: 0; }
h2 .ic, h3 .ic { vertical-align: -2.5px; }
.btn .ic { vertical-align: -3px; }
.back .ic { vertical-align: -4px; }
.ic-heart { color: var(--danger); }
.ic-heart-off { color: rgba(27, 36, 32, 0.22); }
.ic-yellow { color: #d9a806; }
.ic-red { color: var(--danger); }
.ic-star { color: #d99a06; }
.ic-tired { color: var(--danger); }
.boot-ball svg { display: inline-block; }
.celeb-icon .ic { vertical-align: middle; }

/* ---------- Carrière V3 : jauges relationnelles + prises de parole ---------- */
.gauges { display: flex; gap: 8px; margin: 10px 0; }
.gauge {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px solid rgba(27, 36, 32, 0.15); border-radius: 10px; padding: 7px 4px;
  background: var(--chalk);
}
.gauge .glabel {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
}
.gauge .gdots { display: flex; gap: 3px; }
.gauge .gdots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(27, 36, 32, 0.14);
}
.gauge .gdots i.on { background: var(--grass); }
.talk-clue {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(245, 197, 24, 0.16); border-left: 4px solid var(--sun);
  font-style: italic; font-size: 0.88rem;
}

/* Objectif direction + zone rouge dans les classements carrière */
.rank tr.objline td { border-bottom: 2px dashed rgba(27, 36, 32, 0.45); }
.rank tr.relzone td { background: rgba(217, 38, 38, 0.07); }
.rank tr.me.relzone td { background: rgba(217, 38, 38, 0.18); }
/* La zone LDC (top 4), aussi visible que la zone rouge : bleu nuit européen. */
.rank tr.euzone td { background: rgba(18, 34, 78, 0.07); }
.rank tr.me.euzone td { background: rgba(255, 210, 63, 0.45); box-shadow: inset 4px 0 0 #12224e; }
.zonetag {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 0.6rem; font-weight: 800; color: #12224e;
  border: 1.5px solid #12224e; border-radius: 999px; padding: 1px 6px;
  vertical-align: middle; margin-left: 4px; white-space: nowrap;
}
.talk-clue.talk-mood { background: rgba(37, 99, 235, 0.1); border-left-color: #2563eb; }
/* La question du journaliste (conférence V2.0) et les échos des réponses. */
.talk-question {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(27, 36, 32, 0.06); border-left: 4px solid var(--ink);
  font-weight: 700; font-size: 0.92rem;
}
.echoes { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.echo {
  font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  white-space: nowrap;
}
.echo.plus { background: rgba(28, 122, 67, 0.15); color: var(--grass); }
.echo.minus { background: rgba(217, 38, 38, 0.12); color: var(--danger); }

/* Soirées européennes dans le film de saison : liseré bleu nuit LDC. */
.cline.eu { box-shadow: inset 4px 0 0 #12224e; }
.cline.eu .cj { color: #12224e; font-weight: 800; }

/* ---------- Salle des trophées ---------- */
.trophy-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: 0; padding: 2px 0; cursor: pointer;
  font-family: "Archivo", sans-serif; color: var(--ink); text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.trophy-row .ti { color: var(--sun-dark, #b8860b); flex: 0 0 auto; }
.trophy-row .tt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.trophy-row .tt b { font-size: 0.98rem; }
.trophy-row .ts { font-size: 0.8rem; color: var(--muted); }
