/* ==========================================================================
   Coach de Poche — « nocturne au stade »
   Mise en page pensée pour l'horizontal (rail de navigation latéral, deux
   colonnes, match en panneau latéral), avec repli portrait.
   Accent = couleur du club (définie par app.js).
   ========================================================================== */
:root {
  /* Couleurs : bureau du manager de nuit — bleu nuit, verre fumé, accent violet. */
  --bg: #090b16;
  --bg2: #0e1120;
  --card: rgba(22, 25, 44, .94);
  --card2: #1d2138;
  --card3: #272c4a;
  --line: rgba(170, 180, 255, .09);
  --line2: rgba(170, 180, 255, .17);
  --text: #f1f2fa;
  --muted: #959bb8;
  --good: #3ddc84;
  --ok: #f2b544;
  --bad: #ff5d6c;
  --info: #5ab0ff;
  --accent: #7c5cff;
  --accent2: #a855f7;
  --accent-ink: #ffffff;
  --club: #7c5cff;
  --grad: linear-gradient(100deg, #6a3dff, #8b5cf6 55%, #a855f7);
  /* Typo : condensée « tableau d'affichage » pour les titres et chiffres. */
  --display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --tap: 44px;
  --rail: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; color: var(--text); background: var(--bg); }
body {
  font: 15px/1.4 var(--body);
  overscroll-behavior: none; -webkit-font-smoothing: antialiased; touch-action: manipulation;
  /* Lumière de projecteur aux couleurs du club + bandes de tonte très discrètes. */
  /* Ambiance « bureau avec vue sur le stade » : projecteurs au loin, halo violet, couleur du club. */
  background:
    radial-gradient(900px 420px at 72% -8%, rgba(120, 140, 255, .16), transparent 62%),
    radial-gradient(700px 380px at 8% 0%, color-mix(in srgb, var(--club) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(124, 92, 255, .14), transparent 60%),
    linear-gradient(180deg, #0c0f1e, var(--bg) 60%);
  background-size: 100vw 100vh; background-repeat: no-repeat; background-color: var(--bg);
}
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: .01em; text-wrap: balance; }
h2 { font-size: 24px; line-height: 1.1; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { max-width: 600px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }

/* ---------- Barre supérieure ---------- */
#topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) max(16px, var(--safe-r)) 10px max(16px, var(--safe-l)); min-height: 60px;
  background: linear-gradient(var(--bg) 70%, color-mix(in srgb, var(--bg) 92%, transparent));
}
#topbar .club { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
#topbar .club b { font-family: var(--display); font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topbar .club small { font-size: 12px; letter-spacing: .04em; }
#topbar .budget {
  font-family: var(--display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums;
  padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
}

/* ---------- Écran ---------- */
#screen { flex: 1; padding: 4px max(14px, var(--safe-r)) calc(92px + var(--safe-b)) max(14px, var(--safe-l)); }
#screen.enter { animation: fadeIn .18s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Navigation (barre du bas en portrait, rail en paysage) ---------- */
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--bg2) 92%, transparent); border-top: 1px solid var(--line);
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
}
#tabbar .inner { display: flex; width: 100%; max-width: 600px; }
#tabbar button {
  flex: 1; min-height: 62px; background: none; border: 0; display: flex; flex-direction: column; position: relative;
  align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600;
  letter-spacing: .03em; cursor: pointer; transition: color .15s;
}
#tabbar button svg { width: 24px; height: 24px; transition: transform .2s var(--ease); }
#tabbar button.on { color: var(--text); }
#tabbar button.on svg { color: var(--accent); transform: translateY(-1px) scale(1.06); }
#tabbar button.on::after {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.hidden { display: none !important; }

/* ---------- Cartes & éléments ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0;
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.card h3, .label {
  font-family: var(--display); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.card h3 { margin-bottom: 12px; }
.label { margin: 18px 2px 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.big { font-family: var(--display); font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.num { font-variant-numeric: tabular-nums; }
.pos-txt { color: var(--good); } .neg-txt { color: var(--bad); }

.btn {
  min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s var(--ease), background .15s, box-shadow .2s, opacity .15s; user-select: none; text-align: center;
}
.btn:hover { background: var(--card3); }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: var(--grad);
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 24px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn.danger { background: rgba(255, 93, 93, .12); color: var(--bad); border-color: rgba(255, 93, 93, .3); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 18px; border-radius: 16px; font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns .btn { flex: 1; }

/* Contrôle segmenté */
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 13px; cursor: pointer; transition: background .15s, color .15s;
}
.seg button.on { background: var(--card3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2), 0 2px 8px rgba(0, 0, 0, .25); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 16px -6px var(--accent); }

/* Badges de club et de poste */
.crest {
  width: 36px; height: 36px; border-radius: 10px 10px 16px 16px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 12px; flex: none; letter-spacing: .03em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), inset 0 -10px 16px rgba(0, 0, 0, .18);
}
.crest.lg { width: 72px; height: 76px; font-size: 20px; border-radius: 16px 16px 30px 30px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .2), inset 0 -18px 26px rgba(0, 0, 0, .2), 0 10px 30px -10px rgba(0, 0, 0, .6); }
.crest.sm { width: 24px; height: 24px; font-size: 9px; border-radius: 6px 6px 10px 10px; }
.posb { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; border-radius: 8px; font-family: var(--display); font-size: 13px; font-weight: 700; flex: none; letter-spacing: .03em; }
.pos-G { background: #f2b544; color: #241800; }
.pos-D { background: #2f7cf6; color: #fff; }
.pos-M { background: #22b06b; color: #fff; }
.pos-A { background: #ec4c4c; color: #fff; }
.ovr {
  min-width: 42px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none;
  background: var(--card2); border: 1px solid var(--line2);
}
.ovr.t1 { background: linear-gradient(160deg, #3ddc84, #1d9a57); color: #04130b; border: 0; }
.ovr.t2 { background: linear-gradient(160deg, #f2b544, #c28520); color: #1f1400; border: 0; }
.ovr.t3 { color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.pill { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; font-family: var(--display); font-size: 14px; font-weight: 700; color: #06110c; }
.pill.V { background: var(--good); } .pill.N { background: #9aa8a1; } .pill.D { background: var(--bad); color: #fff; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--card2); border: 1px solid var(--line2); color: var(--muted); }
.tag.bad { color: var(--bad); border-color: rgba(255, 93, 93, .35); } .tag.ok { color: var(--ok); border-color: rgba(242, 181, 68, .35); } .tag.good { color: var(--good); border-color: rgba(61, 220, 132, .35); }

/* Jauges */
.gauge { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.gauge > i { display: block; height: 100%; border-radius: 4px; transition: width .35s var(--ease); box-shadow: 0 0 10px -2px currentColor; }
.mini { width: 36px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; flex: none; }
.mini > i { display: block; height: 100%; }

/* Lignes de joueurs */
.list { display: flex; flex-direction: column; }
.prow {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 7px 6px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .15s; border-radius: 10px;
}
.prow:last-child { border-bottom: 0; }
.prow:hover { background: rgba(255, 255, 255, .03); }
.prow:active { background: var(--card2); }
.prow .pname { flex: 1; min-width: 0; }
.prow .pname b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pname small { font-size: 12px; }
.prow .icons { display: flex; align-items: center; gap: 7px; }
.prow.dim { opacity: .45; }

/* Table de classement */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { color: var(--muted); font-weight: 600; text-align: right; padding: 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.tbl td { padding: 9px 6px; text-align: right; border-top: 1px solid var(--line); }
.tbl td b { font-family: var(--display); font-size: 17px; }
.tbl td.l, .tbl th.l { text-align: left; }
.tbl tr.me td { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 700; }
.tbl td.zone-up { box-shadow: inset 3px 0 0 var(--good); }
.tbl td.zone-down { box-shadow: inset 3px 0 0 var(--bad); }
.tbl td.zone-po { box-shadow: inset 3px 0 0 #e3b341; }
.zone-po { box-shadow: inset 3px 0 0 #e3b341; }
.tbl td.zone-eu { box-shadow: inset 3px 0 0 var(--info); }
.clubcell { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

/* Messages */
.msg { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: var(--tap); border-radius: 10px; }
.msg:last-child { border-bottom: 0; }
.msg:hover { background: rgba(255, 255, 255, .03); }
.msg .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--card2); display: flex; align-items: center; justify-content: center; flex: none; font-size: 17px; }
.msg.p1 .ic { background: color-mix(in srgb, var(--accent) 28%, var(--card2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }

/* Carte prochain match */
.nextmatch {
  position: relative; overflow: hidden; text-align: center; padding: 20px 18px;
  background:
    radial-gradient(420px 220px at 50% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    linear-gradient(180deg, var(--card2), var(--card));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.nextmatch::before { /* lignes de terrain en filigrane */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background: radial-gradient(circle at 50% 58%, transparent 52px, #fff 53px, #fff 55px, transparent 56px), linear-gradient(90deg, transparent calc(50% - 1px), #fff calc(50% - 1px), #fff calc(50% + 1px), transparent calc(50% + 1px));
}
.nextmatch h3 { color: var(--text); opacity: .85; }
.nextmatch .vs { position: relative; display: flex; align-items: center; justify-content: space-around; margin: 16px 0 18px; }
.nextmatch .vs .team { width: 40%; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.nextmatch .vs .mid { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--muted); }
.nextmatch .vs .mid small { display: block; font-family: var(--body); font-size: 12px; font-weight: 600; }

/* ---------- Feuilles (bas d'écran en portrait, fenêtre centrée en paysage) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(5, 6, 14, .72); animation: fadeBg .2s; }
@keyframes fadeBg { from { opacity: 0; } }
.sheet {
  position: relative; width: 100%; max-width: 600px; max-height: calc(var(--H, 100vh) * 0.88); overflow-y: auto;
  background: linear-gradient(180deg, var(--card2), var(--bg2) 240px);
  border-radius: 22px 22px 0 0; border: 1px solid var(--line2); border-bottom: 0;
  padding: 8px max(18px, var(--safe-r)) calc(18px + var(--safe-b)) max(18px, var(--safe-l));
  animation: slideUp .24s var(--ease); overscroll-behavior: contain; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
}
.sheet.full { max-height: var(--H, 100vh); height: 100%; border-radius: 0; max-width: 820px; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 4px auto 12px; }
.sheet h2 { margin-bottom: 6px; }
@keyframes slideUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 100;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); max-width: calc(var(--W, 100vw) * 0.9); text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Fiche joueur ---------- */
.attr { display: grid; grid-template-columns: 90px 1fr 46px; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.attr .v { text-align: right; font-family: var(--display); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.statgrid div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 2px; }
.statgrid b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.statgrid small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Tactique : terrain de compo ---------- */
.tpitch {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 68 / 80; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2);
  background: repeating-linear-gradient(0deg, #1d6a3a 0 10%, #22773f 10% 20%); touch-action: none;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .35);
}
.tpitch::before { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 4px; border-bottom: 0; }
.tpitch::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 8px; height: 16%; border: 2px solid rgba(255, 255, 255, .5); border-bottom: 0; }
.slot {
  position: absolute; transform: translate(-50%, -50%); width: 70px; display: flex; flex-direction: column; align-items: center;
  left: calc(var(--y) * 84% + 8%); top: calc(94% - var(--x) * 105%);
  z-index: 2; touch-action: none; user-select: none; cursor: grab; transition: left .25s var(--ease), top .25s var(--ease);
}
.slot .shirt {
  width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex;
  align-items: center; justify-content: center; font-family: var(--display); font-size: 19px; font-weight: 700;
  border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 4px 10px rgba(0, 0, 0, .45); position: relative;
}
.slot .shirt .fit { position: absolute; right: -4px; top: -4px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #0b0e1c; }
.slot .nm { margin-top: 3px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .6); padding: 1px 6px; border-radius: 6px; max-width: 78px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .ps { font-size: 9.5px; color: #ffffffd0; font-weight: 700; letter-spacing: .04em; }
.slot.sel .shirt, .prow.sel { outline: 3px solid #fff; outline-offset: 2px; }
.slot.empty .shirt { background: rgba(0, 0, 0, .35); color: #fff; border-style: dashed; }
.drop-hover .shirt, .prow.drop-hover { box-shadow: 0 0 0 4px var(--info); }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; transform: translate(-50%, -60%) scale(1.12); opacity: .92; }
.benchrow { min-height: 52px; }
.tpitch.editing { box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 60px rgba(0, 0, 0, .35); }
.slot.editable .shirt { background: #fff; color: #0b0e1c; cursor: move; }
.slot .shirt small { font-size: 10px; font-weight: 800; color: inherit; }
.pi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.pi-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.pi-grid select { min-height: 36px; font-size: 12.5px; padding: 0 4px; width: 100%; }
.pi-card select[data-act=role] { min-height: 36px; font-size: 12.5px; }

/* ---------- Écran de match ---------- */
.match-screen {
  position: fixed; inset: 0; z-index: 40; background: #060c09; display: grid;
  grid-template-columns: 100%; grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "sb" "pitch" "feed" "ctl";
}
.scoreboard { grid-area: sb; padding: calc(8px + var(--safe-t)) max(12px, var(--safe-r)) 8px max(12px, var(--safe-l)); background: linear-gradient(180deg, #121530, #0c0f22); border-bottom: 1px solid var(--line); }
.sb-main { display: flex; align-items: center; gap: 8px; }
.sb-team { flex: 1; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 18px; min-width: 0; letter-spacing: .03em; }
.sb-team.away { flex-direction: row-reverse; text-align: right; }
.sb-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-score {
  font-family: var(--display); font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 96px; text-align: center; letter-spacing: 2px; line-height: 1;
  padding: 2px 10px; border-radius: 10px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line2);
}
.sb-score.pop { animation: pop .55s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); color: #fff; } }
.sb-clock { text-align: center; font-family: var(--display); font-size: 15px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 3px; letter-spacing: .06em; }
.sb-scorers { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); min-height: 14px; gap: 8px; margin-top: 2px; }
.sb-scorers div { flex: 1; } .sb-scorers div:last-child { text-align: right; }
.momentum { height: 6px; display: flex; border-radius: 3px; overflow: hidden; margin-top: 6px; background: var(--bg2); gap: 2px; }
.momentum i { display: block; height: 100%; transition: width .45s var(--ease); }
.pitch-area { grid-area: pitch; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #1d6a3a, #0e2a19 80%); position: relative; overflow: hidden; }
.pitch-area canvas { display: block; border-radius: 6px; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
.feed { grid-area: feed; height: calc(var(--H, 100vh) * 0.24); min-height: 120px; overflow-y: auto; background: #0c0f22; border-top: 1px solid var(--line); padding: 4px 12px; font-size: 14px; }
.feed .ln { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); animation: fadeIn .2s; }
.feed .ln .mn { color: var(--muted); min-width: 40px; font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.feed .ln.key { font-weight: 600; }
.feed .ln.goal { background: linear-gradient(90deg, color-mix(in srgb, var(--gc) 40%, transparent), transparent); border-radius: 8px; padding-left: 8px; font-weight: 800; }
.controls { grid-area: ctl; display: flex; gap: 6px; padding: 8px max(10px, var(--safe-r)) calc(8px + var(--safe-b)) max(10px, var(--safe-l)); background: #0c0f22; border-top: 1px solid var(--line); }
.controls .btn { flex: 1; padding: 0 6px; min-height: 48px; font-size: 13px; }
.controls .btn.on { background: var(--accent); color: var(--accent-ink); }

.tapcard { position: absolute; left: calc(10px + var(--safe-l)); top: 10px; z-index: 3; width: min(300px, 70%); padding: 10px 12px; border-radius: 14px;
  background: rgba(8, 14, 11, .94); border: 1px solid var(--line2); font-size: 13px; animation: fadeIn .18s; }
.tapcard b { font-family: var(--display); font-size: 17px; }
.tc-num { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 18px; flex: none; }

.topcoach { border: 0; background: none; padding: 0; cursor: pointer; display: flex; }
.coach-head { display: flex; align-items: center; gap: 16px; padding-top: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line2); cursor: pointer; }
.sw.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.skillrow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.skillrow:last-child { border-bottom: 0; }
.skillv { font-family: var(--display); font-size: 24px; min-width: 32px; text-align: center; }

/* Barres de stats comparées */
.cmp { margin: 10px 0; }
.cmp .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.cmp .lbl b { font-family: var(--display); font-size: 17px; }
.cmp .lbl span:nth-child(2) { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cmp .bar { display: flex; height: 7px; gap: 3px; }
.cmp .bar i { display: block; height: 100%; border-radius: 4px; }

.rating { font-family: var(--display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; border-radius: 8px; padding: 3px 0; }
.motm { background: linear-gradient(135deg, #ffd36b, #d89a2c); color: #241800; border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center; font-weight: 700; box-shadow: 0 10px 30px -12px #d89a2c; }
.motm span { font-family: var(--display); }

.hero { text-align: center; padding: 30px 10px 10px; }
.hero h1 { font-size: 46px; font-weight: 800; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); }
.logo-ball { width: 92px; height: 92px; margin: 0 auto 16px; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 50%, transparent)); }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.bars i { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }

select, input[type=text], input[type=number] {
  min-height: var(--tap); border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--text);
  padding: 0 10px; font: inherit; max-width: 100%;
}
input[type=range] { width: 100%; accent-color: var(--accent); min-height: var(--tap); }
textarea { width: 100%; min-height: 90px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font: 13px/1.35 ui-monospace, monospace; padding: 10px; }
.formrow { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 8px; padding: 5px 0; }
.formrow select { width: 100%; }

#busy { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; background: rgba(9, 11, 22, .8); font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: .05em; }
#busy.show { display: flex; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.slot-card { display: flex; align-items: center; gap: 12px; }

/* Mises en page à deux colonnes (actives en paysage) */
.layout-2, .tac-layout, .start-layout { display: block; }
.tab-body { display: block; }

/* ---------- Invitation à tourner le téléphone ---------- */
#rotate { display: none; }
/* (paysage effectif : html.ask-rotate) */
html.ask-rotate #rotate {
    display: flex; position: fixed; inset: 0; z-index: 1000; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    padding: 30px; text-align: center; background: radial-gradient(600px 400px at 50% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--bg);
  }
html.ask-rotate #rotate .phone { width: 64px; height: 108px; border: 4px solid var(--text); border-radius: 14px; position: relative; animation: rot 2.4s var(--ease) infinite; }
html.ask-rotate #rotate .phone::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 16px; height: 4px; margin-left: -8px; border-radius: 2px; background: var(--text); }
html.ask-rotate #rotate h2 { font-size: 30px; text-transform: uppercase; }
html.ask-rotate #rotate p { color: var(--muted); margin: 0; max-width: 300px; }
html.ask-rotate #rotate .rot-hint { font-size: 12px; opacity: .8; }
html.ask-rotate #app, html.ask-rotate #overlay-root { visibility: hidden; }
@keyframes rot { 0%, 25% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }

/* ==========================================================================
   PAYSAGE : rail de navigation, deux colonnes, match en panneau latéral
   ========================================================================== */
/* (paysage effectif : html.land) */
html.land #app { max-width: none; padding-left: calc(var(--rail) + var(--safe-l)); }
html.land #topbar { padding-left: 24px; padding-right: max(24px, var(--safe-r)); padding-top: calc(8px + var(--safe-t)); min-height: 58px; }
html.land #screen { width: 100%; max-width: 1180px; margin: 0 auto; padding: 4px max(24px, var(--safe-r)) 28px 24px; }
html.land #tabbar {
    top: 0; bottom: 0; right: auto; width: calc(var(--rail) + var(--safe-l)); flex-direction: column; justify-content: center;
    border-top: 0; border-right: 1px solid var(--line); padding: var(--safe-t) 0 var(--safe-b) var(--safe-l);
    background: linear-gradient(180deg, var(--bg2), var(--bg));
  }
html.land #tabbar .inner { flex-direction: column; gap: 6px; }
html.land #tabbar button { flex: none; min-height: 66px; }
html.land #tabbar button.on::after { top: 18%; bottom: 18%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
html.land #toast { bottom: calc(24px + var(--safe-b)); left: calc(50% + var(--rail) / 2); }
html.land body.no-nav #app { padding-left: 0; }
html.land .layout-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
html.land .layout-2 > .col > .card:first-child { margin-top: 12px; }
html.land .tab-body { columns: 2 380px; column-gap: 18px; }
html.land .tab-body > * { break-inside: avoid; }
html.land .tab-body > .card:first-child { margin-top: 12px; }
html.land .list.cols2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
html.land .list.cols2 .prow:last-child { border-bottom: 1px solid var(--line); }
/* Tactique : terrain horizontal à gauche, réglages à droite. */
html.land .tac-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
html.land .tac-layout > .tac-side { max-height: calc(var(--H, 100vh) - 90px); overflow-y: auto; padding-right: 4px; position: sticky; top: 70px; }
html.land .tpitch { aspect-ratio: 105 / 64; background: repeating-linear-gradient(90deg, #1d6a3a 0 10%, #22773f 10% 20%); }
html.land .tpitch::before { border-bottom: 2px solid rgba(255, 255, 255, .5); border-right: 0; }
html.land .tpitch::after { left: 8px; right: auto; top: 25%; bottom: 25%; height: auto; width: 14%; border: 2px solid rgba(255, 255, 255, .5); border-left: 0; }
html.land .slot { left: calc(var(--x) * 104% + 5%); top: calc(var(--y) * 84% + 8%); width: 60px; }
html.land .slot .nm { max-width: 66px; padding: 0 4px; }
html.land .slot .ps { display: none; }
html.land .tac-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
html.land .tac-main > .row { margin: 0 !important; gap: 10px; }
html.land .tac-main > .row small { display: none; }
html.land .tac-main > .tpitch, html.land .tac-main > p { grid-column: 1 / -1; }
html.land .tac-main .tpitch { aspect-ratio: 3 / 2; width: min(100%, calc((var(--H, 100vh) - 116px - var(--safe-b)) * 1.5)); margin: 6px auto 0; }
html.land .slot { top: calc(var(--y) * 88% + 6%); }
html.land .slot .shirt { width: 30px; height: 30px; font-size: 14px; border-width: 2px; }
html.land .slot .shirt .fit { width: 10px; height: 10px; right: -3px; top: -3px; }
html.land .slot .nm { font-size: 9.5px; margin-top: 1px; line-height: 1.3; }
/* Fenêtres : centrées au lieu de remonter du bas. */
html.land .sheet-wrap { align-items: center; padding: 16px; }
html.land .sheet { border-radius: 22px; border-bottom: 1px solid var(--line2); max-height: calc(var(--H, 100vh) * 0.92); max-width: 640px; padding-bottom: 18px; animation: zoomIn .22s var(--ease); }
html.land .sheet.full { max-width: 900px; height: auto; max-height: calc(var(--H, 100vh) * 0.94); border-radius: 22px; }
html.land .sheet .grab { display: none; }
@keyframes zoomIn { from { transform: scale(.96); opacity: .3; } to { transform: none; opacity: 1; } }
/* Match : terrain à gauche, panneau latéral (score, commentaires, contrôles). */
html.land .match-screen {
    grid-template-columns: minmax(0, 1fr) clamp(280px, calc(var(--W, 100vw) * 0.32), 380px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "pitch sb" "pitch feed" "pitch ctl";
  }
html.land .scoreboard { border-left: 1px solid var(--line); padding-left: 14px; padding-right: max(14px, var(--safe-r)); }
html.land .sb-team { font-size: 16px; }
html.land .sb-score { font-size: 34px; min-width: 88px; }
html.land .pitch-area { padding: calc(6px + var(--safe-t)) 6px calc(6px + var(--safe-b)) calc(6px + var(--safe-l)); }
html.land .feed { height: auto; border-left: 1px solid var(--line); }
html.land .controls { flex-wrap: wrap; border-left: 1px solid var(--line); padding-left: 10px; }
html.land .controls .btn { flex: 1 1 28%; min-height: 44px; }
html.land .start-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; min-height: calc(var(--H, 100vh) - 40px); }
html.land .start-layout .hero { text-align: left; padding: 10px; }
html.land .start-layout .logo-ball { margin: 0 0 16px; }

/* Téléphones en paysage : écran peu haut, on gagne de la place verticale. */
/* (paysage effectif : html.land.short) */
html.land.short #topbar { min-height: 48px; padding-top: calc(4px + var(--safe-t)); padding-bottom: 4px; }
html.land.short #topbar .club b { font-size: 17px; }
html.land.short #topbar .crest { width: 30px; height: 30px; }
html.land.short #tabbar button { min-height: 56px; font-size: 10px; }
html.land.short .card { padding: 14px; margin: 10px 0; }
html.land.short .nextmatch .vs { margin: 8px 0 12px; }
html.land.short .crest.lg { width: 58px; height: 62px; font-size: 17px; }
html.land.short .btn.lg { min-height: 50px; }
html.land.short .tac-main .chips { padding-bottom: 2px; }
html.land.short .tac-main .tpitch { width: min(100%, calc((var(--H, 100vh) - 96px - var(--safe-b)) * 1.5)); }
html.land.short .tac-main > p { display: none; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Vie du club : boîte de réception, presse, deadline day ---------- */
.msg.dec { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.press-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.press-btn { min-height: 74px; text-align: left; white-space: normal; line-height: 1.25; padding: 10px 12px; font-size: 13px; }
.press-btn small { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.deadline-card { border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.deadline-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--card2); font-weight: 900; letter-spacing: .06em; }
.deadline-head b { font-family: var(--display); font-size: 30px; }
.deadline-head.hot { background: color-mix(in srgb, var(--bad) 35%, var(--card2)); animation: dlpulse 1s infinite; }
@keyframes dlpulse { 50% { filter: brightness(1.25); } }
.dl-feed { margin: 10px 0; max-height: calc(var(--H, 100vh) * 0.52); overflow-y: auto; }
.dl-item { padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 14px; animation: dlin .3s ease-out; }
.dl-item.in { border-left: 3px solid var(--ok); } .dl-item.deal { border-left: 3px solid var(--good); } .dl-item.end { font-weight: 800; }
.dl-item .btns { margin-top: 6px; }
@keyframes dlin { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 420px) { html:not(.land) .press-grid { grid-template-columns: 1fr; } }
.world-btn { display: block; width: 100%; text-align: left; padding: 14px 16px; margin-top: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--card2); color: inherit; cursor: pointer; font: inherit; }
.world-btn.on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 14%, var(--card2)); }
.world-btn b { font-size: 17px; display: block; } .world-btn small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.3; }

/* ---------- Logos, visages, notes façon FM ---------- */
.crest { position: relative; overflow: hidden; }
.crest > i { font-style: normal; }
/* L'écusson / les initiales restent visibles tant que l'image n'est pas chargée. */
.crest.img-ok { background: transparent !important; box-shadow: none; }
.crest.img-ok > i { visibility: hidden; }
.crest > img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; opacity: 0; }
.crest.img-ok > img { opacity: 1; }
.face { position: relative; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 12px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); }
.face > i { font-style: normal; }
.face.img-ok { background: #1b2430 !important; }
.face.img-ok > i { visibility: hidden; }
.face > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; opacity: 0; }
.face.img-ok > img { opacity: 1; }
.face.lg { width: 76px; height: 76px; font-size: 24px; }
.face.sm { width: 26px; height: 26px; font-size: 10px; }
.starbar { position: relative; display: inline-block; color: rgba(255, 255, 255, .16); letter-spacing: 1px; font-size: 13px; line-height: 1; white-space: nowrap; }
.starbar .fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #e3b341; }
.stars-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 74px; justify-content: flex-end; }
.ovr-n { min-width: 30px; padding: 2px 6px; border-radius: 7px; text-align: center; font: 700 14px var(--display); font-variant-numeric: tabular-nums;
  color: var(--oc); background: color-mix(in srgb, var(--oc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--oc) 40%, transparent); }
.attr20 { columns: 2; column-gap: 22px; }
.attr20 .attr-group, .attr20 .a { break-inside: avoid; }
@media (max-width: 520px) { html:not(.land) .attr20 { columns: 1; } }
.attr20 .a { display: flex; justify-content: space-between; align-items: center; padding: 5px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.attr20 .a b { font-family: var(--display); font-size: 17px; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.attr-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 2px 2px; }
/* Bandeau de commentaire sur le terrain (vue 2D façon FM). */
.pitch-caption { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: min(92%, 640px); padding: 7px 14px; border-radius: 12px;
  background: rgba(8, 12, 18, .88); color: #fff; font-size: 14px; line-height: 1.3; text-align: center; pointer-events: none; transition: opacity .3s; }
.pitch-caption b { color: #ffd166; font-family: var(--display); margin-right: 4px; }
.pitch-caption.key { box-shadow: 0 0 0 1px rgba(255, 209, 102, .5); }
.pitch-caption.goal { background: rgba(31, 140, 70, .92); font-weight: 700; font-size: 16px; }
.pitch-caption.hidden { opacity: 0; }
/* Match en 3D : le canevas WebGL est dessous, le canevas 2D (bandeaux) transparent par-dessus. */
.pitch-area canvas.pitch3d { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 6px; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
.pitch-area canvas.overlay3d { position: relative; z-index: 1; background: transparent; box-shadow: none; }

/* ---------- Comptes et carrière en ligne ---------- */
.auth-card { max-width: 440px; margin: 0 auto; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font: inherit; font-size: 16px; }
.auth-err { color: var(--bad); min-height: 18px; font-size: 13px; margin: 6px 0; }
.account-line { font-size: 13px; color: var(--muted); }
.online-card .prow { cursor: pointer; }
.lobby-code { font-family: var(--display); letter-spacing: .25em; font-size: 40px; margin: 6px 0; }
.online-ready { border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.online-ready.is-ready { border-color: color-mix(in srgb, var(--good) 60%, transparent); }
.ready-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.online-tag { margin-right: 8px; font-size: 11px; }

/* ==========================================================================
   DIRECTION ARTISTIQUE « bureau du manager » : menu latéral, en-tête avec
   date et bouton Continuer, accueil en tableau de bord (3 colonnes).
   ========================================================================== */
#tabbar .brand, #tabbar .nav-foot, #tabbar button.more { display: none; }
#tabbar button svg { width: 22px; height: 22px; }
.nav-badge { position: absolute; top: 6px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 11px/18px var(--body); font-style: normal; text-align: center; }
.ttl { display: flex; align-items: center; gap: 8px; color: var(--text) !important; font-size: 15px !important; letter-spacing: .02em !important; text-transform: none !important; font-weight: 700 !important; }
.ttl .ico { width: 18px; height: 18px; color: var(--accent2); flex: none; }
.ico { width: 18px; height: 18px; }
.crest.xl { width: 112px; height: 118px; font-size: 30px; border-radius: 22px 22px 46px 46px; }
.crest.xl > img { inset: 2%; width: 96%; height: 96%; }

/* En-tête */
#topbar { gap: 10px; background: linear-gradient(180deg, rgba(9, 11, 22, .92), rgba(9, 11, 22, .55)); border-bottom: 1px solid var(--line); }
.top-club { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.top-club .club { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.top-club .club b { font-family: var(--body); font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-club .club small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.chev { font-style: normal; opacity: .7; }
#topbar .grow { flex: 1; }
.top-date { display: flex; align-items: center; gap: 9px; padding: 6px 12px; border-radius: 12px; background: rgba(22, 25, 44, .85); border: 1px solid var(--line); }
.top-date svg { width: 22px; height: 22px; color: var(--text); }
.top-date > span { display: flex; flex-direction: column; line-height: 1.15; }
.top-date b { font-size: 13.5px; white-space: nowrap; }
.top-date small { font-size: 11.5px; white-space: nowrap; }
#topbar .budget { font-size: 15px; background: rgba(22, 25, 44, .85); }
.top-go { min-height: 46px; padding: 0 18px; border-radius: 12px; font-size: 16px; font-weight: 700; gap: 10px; clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); padding: 0 26px; }
.top-go svg { width: 18px; height: 18px; }
.top-go i { font-style: normal; font-size: 18px; }

/* Accueil */
.dash { display: block; }
.club-hero { text-align: center; padding: 20px 14px 16px; background:
  radial-gradient(260px 180px at 50% 18%, color-mix(in srgb, var(--club) 30%, transparent), transparent 70%), var(--card); }
.hero-crest { display: flex; justify-content: center; margin-bottom: 10px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .55)); }
.club-hero h2 { font-family: var(--body); font-size: 24px; font-weight: 700; }
.club-hero > small { display: block; margin-top: 3px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 10px; }
.hero-stats > div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats > div + div { border-left: 1px solid var(--line2); }
.hero-stats b { font-family: var(--display); font-size: 24px; font-weight: 700; }
.hero-stats sup { font-size: 13px; }
.hero-stats small { font-size: 12px; }
.hero-form { display: flex; justify-content: center; }
.gauges2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.g-line { font-size: 12.5px; }
.g-line .row { margin-bottom: 3px; }
.g-line .gauge { height: 6px; }

.nextmatch { text-align: center; background:
  radial-gradient(60% 50% at 18% 0%, rgba(200, 210, 255, .22), transparent 70%),
  radial-gradient(60% 50% at 82% 0%, rgba(200, 210, 255, .22), transparent 70%),
  linear-gradient(180deg, rgba(40, 46, 92, .9), rgba(22, 25, 50, .95) 55%, rgba(20, 60, 40, .55));
  border-color: rgba(140, 120, 255, .35); }
.nextmatch h3.ttl { justify-content: flex-start; }
.nextmatch .vs .mid { display: flex; flex-direction: column; font-size: 26px; color: var(--text); }
.nextmatch .vs .team { font-family: var(--body); font-size: 16px; }
.nm-meta { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.objs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); text-align: center; }
.objs > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 8px; }
.objs > div + div { border-left: 1px solid var(--line2); }
.objs .ico { width: 26px; height: 26px; color: var(--text); }
.objs small { font-size: 12.5px; line-height: 1.25; color: var(--text); opacity: .85; }
.news-top { padding: 16px 14px; margin: 0 -4px 6px; border-radius: 12px; background:
  linear-gradient(0deg, rgba(9, 11, 22, .9), rgba(9, 11, 22, .2)), radial-gradient(120% 140% at 80% 0%, color-mix(in srgb, var(--club) 55%, transparent), transparent 70%), var(--card2); min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.news-top b { font-size: 17px; line-height: 1.25; }
.news-top small { font-size: 12px; }
.news-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.3; }
.news-row .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--card2); display: flex; align-items: center; justify-content: center; flex: none; }
.news-row small { display: block; margin-top: 2px; font-size: 11.5px; }
.fx-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.fx-row:first-of-type { margin-top: 8px; }
.fx-d { width: 58px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

/* (paysage effectif : html.land) */
html.land { --rail: 196px; }
html.land #tabbar { justify-content: flex-start; background: linear-gradient(180deg, rgba(12, 14, 28, .97), rgba(9, 11, 22, .97)); overflow-y: auto; scrollbar-width: none; }
html.land #tabbar .brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px 18px; }
html.land #tabbar .brand .brand-ball { width: 38px; height: 42px; color: var(--text); flex: none; }
html.land #tabbar .brand b { font-family: var(--display); font-size: 18px; line-height: .95; text-transform: uppercase; letter-spacing: .03em; }
html.land #tabbar .inner { gap: 2px; padding: 0 8px; }
html.land #tabbar .nav-foot { display: flex; flex-direction: column; gap: 2px; padding: 8px; margin-top: auto; border-top: 1px solid var(--line); }
html.land #tabbar button, html.land #tabbar button.more { display: flex; flex-direction: row; justify-content: flex-start; gap: 13px; min-height: 42px; padding: 0 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; letter-spacing: 0; color: #c4c8de; }
html.land #tabbar button:hover { background: rgba(255, 255, 255, .04); }
html.land #tabbar button.on { color: #fff; background: linear-gradient(90deg, rgba(124, 92, 255, .55), rgba(124, 92, 255, .12)); box-shadow: inset 3px 0 0 #a78bfa; }
html.land #tabbar button.on svg { color: #fff; transform: none; }
html.land #tabbar button.on::after { display: none; }
html.land .nav-badge { position: static; margin-left: auto; }
html.land #screen { max-width: 1320px; }
html.land .dash { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
html.land .dash > .col > .card:first-child { margin-top: 12px; }
/* (paysage effectif : html.land.short) */
html.land.short { --rail: 176px; }
html.land.short #tabbar .brand { padding: 10px 14px 6px 16px; }
html.land.short #tabbar .brand .brand-ball { width: 30px; height: 34px; }
html.land.short #tabbar .brand b { font-size: 15px; }
html.land.short #tabbar button, html.land.short #tabbar button.more { min-height: 36px; font-size: 13.5px; gap: 11px; }
html.land.short #tabbar button svg { width: 19px; height: 19px; }
html.land.short .top-go { min-height: 40px; font-size: 15px; }
html.land.short .top-date { padding: 4px 10px; }
html.land.short .crest.xl { width: 88px; height: 94px; }
html.land.short .club-hero { padding: 14px 12px 12px; }
html.land.short .club-hero h2 { font-size: 21px; }
html.land.short .hero-stats { margin: 10px 0 8px; }
html.land.short .hero-stats b { font-size: 21px; }
html.land.short .news-top { min-height: 90px; padding: 12px; }
/* (paysage effectif : html.land.narrow) */
html.land.narrow #topbar .budget { display: none; }
.nextmatch::before { opacity: .035; }
.nextmatch .btns .btn { white-space: nowrap; padding: 0 12px; font-size: 15px; }

/* ---------- Composition : visages, banc, glisser-déposer ---------- */
.slot .tok { position: relative; width: 46px; height: 46px; }
.slot .tok .face { width: 46px; height: 46px; font-size: 15px; font-family: var(--display); font-weight: 700; border: 2px solid rgba(255, 255, 255, .92); box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.slot .tok .shirt { width: 46px; height: 46px; }
.tok .num, .btok .num { position: absolute; left: -5px; bottom: -3px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; background: #0b0e1c; color: #fff;
  font: 700 10.5px/18px var(--display); font-style: normal; text-align: center; border: 1px solid rgba(255, 255, 255, .35); }
.tok .fit { position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #0b0e1c; }
.slot .ps { display: block !important; font-size: 9.5px; text-shadow: 0 1px 2px #000; }
.slot.dragging, .btok.dragging, .dragrow.dragging { opacity: .35; }
.drop-hover .tok .face, .drop-hover > .face { box-shadow: 0 0 0 4px #a78bfa, 0 0 18px #a78bfa; }
.drag-ghost.face { width: 58px; height: 58px; border: 3px solid #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, .6); }
.bench-strip { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; padding: 8px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.bench-strip .bs-l { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); align-self: center; }
.btok { position: relative; flex: 1 0 52px; max-width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; touch-action: none; user-select: none; cursor: grab; }
.btok .face { width: 40px; height: 40px; font-size: 13px; font-family: var(--display); font-weight: 700; border: 2px solid rgba(255, 255, 255, .6); }
.btok .num { left: 6px; bottom: auto; top: 26px; }
.btok small { font-size: 10.5px; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.btok b { font: 700 9.5px var(--display); color: var(--muted); }
.btok.empty .face { background: rgba(255, 255, 255, .04); border-style: dashed; border-color: var(--line2); }
.btok.dim { opacity: .5; }
.dragrow { display: flex; align-items: center; }
.dragrow > .prow { flex: 1; min-width: 0; border-bottom: 0; }
.dragrow + .dragrow { border-top: 1px solid var(--line); }
.grip { flex: none; width: 26px; align-self: stretch; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; touch-action: none; cursor: grab; }
.dragrow .face, .dragrow .posb { touch-action: none; }
.tac-help { font-size: 12px; margin: 6px 2px; color: var(--muted); }
/* (paysage effectif : html.land) */
html.land .tac-main .tpitch { width: min(100%, calc((var(--H, 100vh) - 232px - var(--safe-b)) * 1.5)); }
html.land .slot { width: 70px; }
html.land .slot .tok, html.land .slot .tok .face, html.land .slot .tok .shirt { width: 40px; height: 40px; }
html.land .tac-main > .bench-strip { grid-column: 1 / -1; }
/* (paysage effectif : html.land.short) */
html.land.short .tac-main .tpitch { width: min(100%, calc((var(--H, 100vh) - 196px - var(--safe-b)) * 1.5)); }
html.land.short .tac-help { display: none; }
html.land.short .slot .tok, html.land.short .slot .tok .face, html.land.short .slot .tok .shirt { width: 34px; height: 34px; }
html.land.short .btok .face { width: 34px; height: 34px; }
html.land.short .btok .num { top: 21px; }
html.land.short .bench-strip { padding: 5px 8px; }

/* ---------- Téléphone tenu à la verticale : le jeu reste à l'horizontale (pivoté de 90°) ---------- */
/* Le corps pivoté devient le repère des éléments « fixes » (menu, fenêtres, toasts) ;
   c'est #app qui défile. */
html.rot, html.rot body { overflow: hidden; height: 100%; }
html.rot body {
  position: fixed; top: 0; left: 0; width: var(--W); height: var(--H); overflow: hidden;
  transform-origin: 0 0; transform: rotate(90deg) translateY(-100%);
}
html.rot #app { height: var(--H); min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* ---------- Mode PC (souris, grand écran) ---------- */
html.pc #screen { max-width: 1480px; padding-top: 10px; }
html.pc .btn, html.pc .chip, html.pc .prow, html.pc .msg, html.pc [data-act], html.pc [data-nav] { cursor: pointer; }
html.pc .card { transition: border-color .15s; }
html.pc .card:hover { border-color: var(--line2); }
html.pc .prow:hover, html.pc .msg:hover, html.pc .fx-row:hover, html.pc .news-row:hover { background: rgba(167, 139, 250, .07); }
html.pc .btn.primary:hover { filter: brightness(1.1); }
html.pc .slot:hover .face, html.pc .btok:hover .face { box-shadow: 0 0 0 3px rgba(167, 139, 250, .7); }
html.pc ::-webkit-scrollbar { width: 10px; height: 10px; }
html.pc ::-webkit-scrollbar-thumb { background: var(--card3); border-radius: 5px; border: 2px solid var(--bg); }
html.pc ::-webkit-scrollbar-track { background: transparent; }
html.pc .crest.xl { width: 128px; height: 134px; }
html.pc .tac-main .tpitch { width: min(100%, calc((var(--H, 100vh) - 250px) * 1.5)); }
html.pc .slot .tok, html.pc .slot .tok .face, html.pc .slot .tok .shirt { width: 50px; height: 50px; }
html.pc .slot { width: 84px; }
html.pc .slot .nm { font-size: 11.5px; max-width: 90px; }

/* Mise à jour obligatoire en cours */
#updating { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(9, 11, 22, .94); text-align: center; padding: 24px; }
#updating b { font-family: var(--display); font-size: 24px; }
#updating small { color: var(--muted); }
.pos2 .posb { opacity: .55; min-width: 34px; height: 22px; font-size: 11px; }

/* ---------- Choix du club ---------- */
.picker { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.pk-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pk-top h2 { font-family: var(--body); font-size: 22px; font-weight: 700; flex: 1; min-width: 180px; }
.pk-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--line2); flex: 1; max-width: 360px; }
.pk-search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: 15px var(--body); outline: none; }
.pk-body { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.pk-leagues { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 8px 10px; max-height: calc(var(--H, 100vh) - 150px); overflow-y: auto; position: sticky; top: 70px; }
.lg-group .label { margin: 12px 6px 4px; font-size: 11px; }
.lg-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.lg-row:hover { background: rgba(255, 255, 255, .04); }
.lg-row.on { background: linear-gradient(90deg, rgba(124, 92, 255, .45), rgba(124, 92, 255, .1)); box-shadow: inset 3px 0 0 #a78bfa; }
.lg-row .flag { font-size: 20px; width: 26px; text-align: center; }
.lg-row b { display: block; font-size: 14px; font-weight: 600; }
.lg-row small { font-size: 11.5px; color: var(--muted); }
.starbar.sm { font-size: 11px; }
.pk-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 2px 10px; font: 700 20px var(--body); color: var(--text); text-transform: none; letter-spacing: 0; }
.pk-title small { font-size: 13px; font-weight: 500; color: var(--muted); }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.club-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer; text-align: center; transition: transform .12s var(--ease), border-color .15s; }
.club-card:hover { border-color: rgba(167, 139, 250, .6); }
.club-card:active { transform: scale(.97); }
.club-card.on { border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167, 139, 250, .35); }
.club-card b { font-size: 14px; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
.club-card small { font-size: 12px; color: var(--muted); }
.pk-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 4px; }
.pk-facts > div { background: var(--card2); border-radius: 12px; padding: 8px 12px; }
.pk-facts small { display: block; font-size: 11px; color: var(--muted); }
.pk-facts b { font-size: 14px; }
html:not(.land) .pk-body { grid-template-columns: 1fr; }
html:not(.land) .pk-leagues { position: static; max-height: 240px; }

/* ---------- Éditeur du coach ---------- */
.coach-ed { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.ce-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px; border-radius: var(--radius);
  background: radial-gradient(160px 120px at 50% 20%, rgba(124, 92, 255, .3), transparent 70%), var(--card2); position: sticky; top: 0; }
.ce-avatar svg { width: 132px; height: 132px; }
.ce-side h2 { font-family: var(--body); font-size: 22px; margin-top: 6px; word-break: break-word; }
.ce-side small { font-size: 12px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.stepper button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.stepper button b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--card3); color: var(--text); font-size: 12px; }
.stepper button.on { color: #fff; border-color: transparent; background: linear-gradient(100deg, rgba(106, 61, 255, .7), rgba(168, 85, 247, .5)); }
.stepper button.on b { background: #fff; color: #5b3df5; }
.stepper button.done b { background: var(--good); color: #062; }
.ce-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ce-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=search], .field select {
  min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: 16px var(--body); outline: none; }
.field input:focus, .field select:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .25); }
.field.big input { min-height: 54px; font-size: 20px; font-weight: 600; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.ce-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ce-foot .btn { min-width: 150px; min-height: 48px; }
.pts { font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); font-size: 13px; }
.pts.left { background: rgba(167, 139, 250, .25); color: #fff; }
.skillrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.sk-ic { font-size: 22px; width: 30px; text-align: center; }
.sk-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .07); margin-top: 6px; overflow: hidden; }
.sk-bar i { display: block; height: 100%; background: var(--grad); }
.btn.round { width: 40px; padding: 0; border-radius: 50%; font-size: 20px; }
.skillv { min-width: 28px; text-align: center; font: 700 20px var(--display); }
html:not(.land) .coach-ed { grid-template-columns: 1fr; }
html.land.short .ce-avatar svg { width: 96px; height: 96px; }
html.land.short .ce-side { padding: 10px; }
/* Boutons d'action toujours visibles en bas des fenêtres (téléphone en paysage : peu de hauteur). */
.ce-foot, .sheet-actions { position: sticky; bottom: -18px; z-index: 3; margin: 12px -4px -4px; padding: 12px 4px 14px;
  background: linear-gradient(180deg, rgba(14, 17, 32, 0), var(--bg2) 35%); }
.picker { padding-top: 14px; }

/* Recrutement : recherche + filtre budget. */
.mkt-tools { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.mkt-tools .pk-search { max-width: 420px; }

/* ---------- Match : banc de touche (compo, changements, tactique) ---------- */
.mlay { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
html.land .mlay { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.mpitch { max-width: 420px; margin: 0 auto; }
html.land .mpitch { max-height: calc(var(--H) - 210px); width: auto; aspect-ratio: 68 / 80; }
.mpitch .slot { cursor: pointer; }
.mpitch .slot .en { width: 40px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .55); margin-top: 2px; overflow: hidden; }
.mpitch .slot .en i { display: block; height: 100%; }
.mpitch .slot.sel .tok { outline: 3px solid #fff; outline-offset: 3px; border-radius: 50%; }
.mhelp { font-size: 12px; margin: 2px 0 8px; }
.msel { margin: 0 0 10px; padding: 10px 12px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mrow > span { flex: 0 0 auto; color: var(--muted); }
.mrow .hint { font-style: normal; display: inline-flex; width: 15px; height: 15px; border-radius: 50%; background: var(--line2); font-size: 10px; align-items: center; justify-content: center; }
.seg.sm { flex: 0 1 auto; }
.seg.sm button { padding: 6px 9px; font-size: 12px; min-height: 32px; }
.qplans { display: flex; flex-wrap: wrap; gap: 8px; }
.mtac { display: grid; grid-template-columns: 1fr; gap: 4px 20px; }
html.land .mtac { grid-template-columns: 1fr 1fr; }
.edgecard { margin: 0 0 10px; }
.edgebar { height: 8px; border-radius: 4px; margin: 8px 0; background: color-mix(in srgb, var(--bad) 55%, transparent); overflow: hidden; }
.edgebar i { display: block; height: 100%; background: var(--good); }
.edgelist { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.edgelist li { padding: 3px 0; }
.edgelist li.good { color: var(--good); }
.edgelist li.bad { color: var(--bad); }
.nextmatch .vs .team { cursor: pointer; border-radius: 14px; transition: background .15s; }
.nextmatch .vs .team:hover { background: rgba(255, 255, 255, .05); }

/* ---------- Menu latéral en rubriques ---------- */
#tabbar .nav-group { display: none; }
html.land #tabbar .inner { overflow-y: auto; scrollbar-width: none; justify-content: flex-start; padding-bottom: 6px; }
html.land #tabbar .nav-group { display: block; padding: 12px 18px 3px; font: 600 10.5px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .75; }
html.land.short #tabbar .nav-group { padding: 7px 16px 1px; font-size: 9.5px; }
html.land.short #tabbar .inner button, html.land.short #tabbar .inner button.more { min-height: 32px; }
/* En-tête de page : titre + sous-onglets de la rubrique. */
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 2px; }
.page-head h2 { font-size: 22px; margin: 0; }
.page-head .sub-tabs { margin: 0; padding: 0; }

/* ==========================================================================
   HABILLAGE TÉLÉ DU MATCH
   ========================================================================== */
.bcast { position: absolute; inset: 0; pointer-events: none; z-index: 4; font-family: var(--body); }
.bcast > * { position: absolute; }
/* Scorebug */
.bc-bug { top: 12px; left: 14px; display: flex; align-items: stretch; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  background: rgba(8, 10, 20, .9); color: #fff; font: 700 15px var(--display); letter-spacing: .04em; }
.bc-bug .t { padding: 6px 10px; border-left: 4px solid var(--tc); display: flex; align-items: center; }
.bc-bug .t + b + .t { border-left: 0; border-right: 4px solid var(--tc); }
.bc-bug b { background: #fff; color: #0b0e1c; padding: 6px 10px; font-size: 17px; display: flex; gap: 5px; align-items: center; font-variant-numeric: tabular-nums; }
.bc-bug b i { font-style: normal; opacity: .4; }
.bc-bug em { font-style: normal; padding: 6px 10px; background: var(--accent); color: #fff; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
/* Bandeau bas */
.bc-lower { left: 50%; bottom: 52px; transform: translate(-50%, 20px); opacity: 0; transition: opacity .3s, transform .35s var(--ease);
  display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; min-width: min(460px, 86%); max-width: 92%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 85%, #000) 0 8px, rgba(8, 10, 20, .94) 8px); border-radius: 12px; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.bc-lower.show { opacity: 1; transform: translate(-50%, 0); }
.bc-lower .ico { font-size: 26px; margin-left: 6px; }
.bc-lower .face { width: 44px; height: 44px; flex: none; border: 2px solid #fff; }
.bc-lower .txt { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.bc-lower .txt small { font: 600 11px var(--display); letter-spacing: .14em; opacity: .75; }
.bc-lower .txt b { font: 700 20px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-lower .txt span { font-size: 12.5px; opacity: .85; }
.bc-lower .sc { font: 700 26px var(--display); padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .2); }
.bc-lower .card { width: 20px; height: 28px; border-radius: 3px; margin-left: 6px; flex: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.bc-lower .card.yellow { background: #ffd60a; } .bc-lower .card.red { background: #e5383b; }
/* Panneau du 4e arbitre */
.bc-board { right: 14px; top: 12px; opacity: 0; transform: translateY(-12px); transition: opacity .3s, transform .3s var(--ease);
  background: #050608; border: 2px solid #2a2f3a; border-radius: 10px; padding: 8px 12px; color: #fff; min-width: 190px; box-shadow: 0 8px 24px rgba(0, 0, 0, .6); }
.bc-board.show { opacity: 1; transform: none; }
.bc-board small { display: block; font: 600 10.5px var(--display); letter-spacing: .14em; opacity: .7; margin-bottom: 4px; }
.bc-board .row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.bc-board .led { font: 700 24px/1 'Courier New', monospace; color: #ff3b30; text-shadow: 0 0 8px rgba(255, 59, 48, .8); min-width: 34px; text-align: center; }
.bc-board .led.big { font-size: 40px; color: #ffcc00; text-shadow: 0 0 10px rgba(255, 204, 0, .8); margin: 2px auto; }
.bc-board .up { color: #34c759; } .bc-board .down { color: #ff3b30; }
.bc-board .nm { font-size: 13px; font-weight: 600; }
/* Cartes plein cadre (présentation, mi-temps, fin) */
.bc-full { inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .35s; background: radial-gradient(ellipse at center, rgba(5, 7, 16, .55), rgba(5, 7, 16, .85)); }
.bc-full.show { opacity: 1; pointer-events: auto; }
.bc-full .box { background: rgba(10, 13, 26, .95); border: 1px solid var(--line2); border-radius: 18px; padding: 18px 24px; min-width: min(440px, 92%); color: #fff; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.bc-full .box > small { font: 600 12px var(--display); letter-spacing: .2em; color: var(--accent); }
.bc-full .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 10px 0 12px; }
.bc-full .teams > div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; }
.bc-full .teams span { border-bottom: 3px solid var(--tc); padding-bottom: 2px; }
.bc-full .teams > b { font: 700 40px var(--display); }
.bc-full .st { display: grid; grid-template-columns: 70px 1fr 70px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bc-full .st span { color: var(--muted); }
.bc-full .intro { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; width: min(980px, 96%); align-items: center; }
.bc-full .intro .side { background: rgba(10, 13, 26, .94); border-top: 4px solid var(--tc); border-radius: 14px; padding: 10px 12px; }
.bc-full .intro .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bc-full .intro .head b { font: 700 17px var(--display); display: block; }
.bc-full .intro .head small { color: var(--muted); font-size: 12px; }
.bc-full .intro ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bc-full .intro li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; animation: bcIn .4s var(--ease) both; }
.bc-full .intro li:nth-child(n) { animation-delay: calc(var(--i, 0) * 1ms); }
.bc-full .intro li .face { width: 24px; height: 24px; font-size: 9px; flex: none; }
.bc-full .intro li em { font-style: normal; font: 700 13px var(--display); width: 22px; text-align: right; color: var(--muted); }
.bc-full .intro li span { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-full .intro li small { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.bc-full .intro .mid { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; }
.bc-full .intro .mid > small { font: 600 12px var(--display); letter-spacing: .2em; color: var(--accent); }
.bc-full .intro .facts { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; background: rgba(10, 13, 26, .9); border-radius: 12px; padding: 10px 12px; }
@keyframes bcIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
html.land.short .bc-full .intro li { font-size: 11.5px; padding: 0; }
html.land.short .bc-full .intro li .face { width: 18px; height: 18px; }
html.land.short .bc-lower { bottom: 40px; padding: 6px 12px 6px 10px; }
html.land.short .bc-lower .txt b { font-size: 16px; }
/* Avant-match : conditions du jour et les deux onze. */
.pm-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; }
.pm-xi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.pm-xi ol { list-style: none; margin: 0; padding: 6px 10px; background: var(--bg2); border-radius: 12px; border: 1px solid var(--line); }
.pm-xi li { display: flex; gap: 8px; align-items: center; font-size: 12.5px; padding: 2px 0; }
.pm-xi li em { font-style: normal; width: 20px; text-align: right; color: var(--muted); font-weight: 700; }
.pm-xi li span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-xi li small { color: var(--muted); font-weight: 700; font-size: 10.5px; }
/* Calendrier du club : date, compétition, domicile / extérieur, résultat. */
.cal-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cal-row.next { background: var(--card2); border-radius: 10px; box-shadow: inset 3px 0 0 var(--accent); }
.cal-row.past { opacity: .85; }
.fx-date { width: 92px; font-size: 12px; color: var(--muted); text-transform: capitalize; flex: none; }
.fx-comp { width: 120px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-venue { flex: none; font: 700 10px var(--display); letter-spacing: .08em; padding: 2px 6px; border-radius: 5px; }
.fx-venue.h { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.fx-venue.a { background: rgba(255, 255, 255, .07); color: var(--muted); }
html.land.short .fx-date { width: 74px; font-size: 11px; } html.land.short .fx-comp { width: 90px; }
/* Légende des icônes (effectif). */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: 8px 2px 0; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .ovr-n { font-size: 11px; min-width: 0; padding: 0 5px; }
.legend .mini { display: inline-block; }

/* ---- Niveaux (sans étoiles), brassard, notes compactes ---- */
.lvlbar { display: inline-flex; align-items: center; gap: 3px; }
.lvlbar i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); }
.lvlbar i.on { background: linear-gradient(90deg, var(--accent), #b48cff); }
.lvlbar b { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.ovr-n.sm { font-size: 12px; min-width: 26px; padding: 1px 5px; }
.xi-tag { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .3px; padding: 1px 4px; border-radius: 4px; background: rgba(124,92,255,.22); color: #c9bbff; vertical-align: 1px; }
.xi-tag.cap { background: #f4c430; color: #1a1200; }
.xi-tag.vc { background: rgba(244,196,48,.25); color: #f4c430; }
.cap-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 8px 0; border-radius: 12px; background: linear-gradient(90deg, rgba(244,196,48,.10), transparent); border: 1px solid rgba(244,196,48,.22); }
.cap-box small { display: block; color: var(--muted); font-size: 11px; }
.slot .tok { position: relative; }
.armband { position: absolute; left: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: #f4c430; color: #1a1200; font: 800 10px/16px var(--display); text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.crest.xs { width: 16px; height: 16px; font-size: 6px; border-radius: 4px 4px 7px 7px; vertical-align: -3px; }

/* ==========================================================================
   CHAMPIONNAT MIS EN AVANT + STATISTIQUES
   ========================================================================== */
.div-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.div-pick .chip small { opacity: .75; font-weight: 500; }
.div-pick .sel { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 999px; padding: 7px 12px; font: 600 13px var(--body); max-width: 320px; }
.tbl-hero { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin: 6px 0 10px; border-radius: 18px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--club) 28%, var(--card)) 0%, var(--card) 60%); border: 1px solid var(--line2); box-shadow: 0 14px 34px -18px rgba(0,0,0,.7); }
.tbl-hero h3 { margin: 0 0 4px; font-size: 20px; }
.tbl-hero .pos { text-align: center; min-width: 70px; }
.tbl-hero .pos b { font: 800 46px/1 var(--display); }
.tbl-hero .pos sup { font-size: 18px; }
.tbl-hero .pos small { display: block; color: var(--muted); font-size: 11px; }
.tbl-hero .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 4px; font-size: 13px; }
.tbl-hero .top-sc { text-align: right; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); cursor: pointer; }
.tbl-hero .top-sc small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.tbl-hero .top-sc b { display: block; font-size: 15px; }
.tbl-hero .top-sc span { color: var(--ok); font: 700 14px var(--display); }
.league-card .lc-head { display: flex; align-items: center; gap: 8px; padding: 8px 6px 4px; }
.league-card .lc-head b { font: 700 18px var(--display); letter-spacing: .02em; }
.league-card .lc-head small { color: var(--muted); margin-left: auto; }
.ltbl td { padding: 7px 6px; }
.ltbl tr.me td { background: color-mix(in srgb, var(--club) 18%, transparent); }
.ltbl tr.me td:first-child { box-shadow: inset 3px 0 0 var(--club); }
.ltbl tr.cut td { border-top: 2px dashed var(--line2); }
.ltbl tbody tr:hover td { background: rgba(255,255,255,.03); }
.fpill { display: inline-block; width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 4px; font: 700 10px var(--display); margin-right: 2px; color: #06110c; }
.fpill.V { background: var(--good); } .fpill.N { background: #9aa8a1; } .fpill.D { background: var(--bad); color: #fff; }
@media (max-width: 760px) { .hide-s { display: none; } .tbl-hero .top-sc { display: none; } }

.stat-hero { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin: 8px 0 10px; border-radius: 18px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--club) 24%, var(--card)), var(--card) 65%); border: 1px solid var(--line2); }
.stat-hero h2 { margin: 2px 0 6px; }
.stat-hero small { color: var(--muted); }
.stat-hero .wdl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat-hero .wdl span { font: 700 15px var(--display); padding: 3px 10px; border-radius: 8px; }
.wdl .w { background: rgba(61,220,132,.16); color: var(--good); } .wdl .d { background: rgba(154,168,161,.16); color: #c3cbc7; } .wdl .l { background: rgba(255,93,108,.16); color: var(--bad); }
.hero-pos { text-align: center; } .hero-pos b { font: 800 42px/1 var(--display); } .hero-pos sup { font-size: 16px; } .hero-pos small { display: block; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font: 800 26px/1.05 var(--display); }
.kpi span { font-size: 12px; color: var(--text); font-weight: 600; }
.kpi small { font-size: 11px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 12px; }
.grid2 > .card { margin-top: 0; margin-bottom: 12px; }
.srow { display: grid; grid-template-columns: 1fr auto 56px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.srow:last-of-type { border-bottom: 0; }
.srow b { font: 700 16px var(--display); text-align: right; }
.rk { font-style: normal; font-size: 11px; color: var(--muted); text-align: right; }
.rk.top { color: var(--good); font-weight: 700; } .rk.low { color: var(--bad); }
.ha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.ha > div { background: rgba(255,255,255,.03); border-radius: 12px; padding: 10px; text-align: center; }
.ha small { display: block; color: var(--muted); } .ha b { display: block; font: 800 24px var(--display); } .ha span { font-size: 11px; color: var(--muted); }
.poschart { width: 100%; height: 150px; display: block; }
.poschart .grid { stroke: var(--line2); stroke-dasharray: 3 4; }
.poschart text { fill: var(--muted); font-size: 11px; }
.poschart .line { fill: none; stroke: var(--club); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.poschart .dotc { fill: #fff; stroke: var(--club); stroke-width: 3; }
.stbl th { cursor: pointer; white-space: nowrap; user-select: none; }
.stbl th.on { color: var(--text); }
.stbl td { padding: 7px 6px; white-space: nowrap; }
.stbl tbody tr { cursor: pointer; } .stbl tbody tr:hover td { background: rgba(255,255,255,.03); }
.stbl tfoot td { border-top: 2px solid var(--line2); }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 12px; }
.lead-card { margin-top: 0; margin-bottom: 12px; padding: 10px 12px; }
.lead-card h3 { margin: 0 0 6px; font-size: 15px; }
.lead-row { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 8px; cursor: pointer; }
.lead-row:hover { background: rgba(255,255,255,.04); }
.lead-row.me { background: color-mix(in srgb, var(--club) 16%, transparent); }
.lead-row em { font-style: normal; width: 18px; color: var(--muted); font: 700 13px var(--display); text-align: right; }
.lead-row .face { width: 30px; height: 30px; }
.lead-row b { font-size: 13px; } .lead-row small { display: block; color: var(--muted); font-size: 11px; }
.lead-row .v { font: 800 18px var(--display); min-width: 36px; text-align: right; }
.ms-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; margin: 8px 0; }
.ms-head > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ms-head .sc { font: 800 40px var(--display); } .ms-head .sc small { display: block; font-size: 12px; color: var(--muted); }
.ms-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; margin-bottom: 10px; font-size: 13px; }
.ms-goals .gl.l { grid-column: 1; text-align: right; } .ms-goals .gl.r { grid-column: 2; }
.ms-goals .gl b { color: var(--ok); font-family: var(--display); }

/* ==========================================================================
   COUPES & TROPHÉES
   ========================================================================== */
.ltbl td.zone-eu, .tbl td.zone-eu[style] { box-shadow: inset 3px 0 0 var(--zc, var(--info)); }
.trophy { display: block; filter: drop-shadow(0 4px 10px rgba(244, 196, 48, .25)); }
.cabinet { margin: 8px 0 12px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(244,196,48,.25);
  background: radial-gradient(120% 140% at 0% 0%, rgba(244,196,48,.14), transparent 55%), linear-gradient(180deg, #1a1530, var(--card)); }
.cab-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cab-head b { font: 700 18px var(--display); letter-spacing: .02em; }
.cab-head small { color: var(--muted); }
.cab-row { display: flex; gap: 14px; overflow-x: auto; padding: 12px 2px 4px; border-bottom: 6px solid rgba(80,56,20,.55); border-radius: 0 0 6px 6px; }
.cab-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; text-align: center; }
.cab-item small { font-size: 10px; color: var(--muted); line-height: 1.25; }
.cab-empty { color: var(--muted); font-size: 13px; padding: 16px 4px; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.comp-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; border-radius: 16px; cursor: pointer; color: var(--text);
  border: 1px solid var(--line2); background: linear-gradient(110deg, color-mix(in srgb, var(--cc) 22%, var(--card)), var(--card) 70%); transition: transform .15s var(--ease), border-color .15s; }
.comp-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--cc) 60%, transparent); }
.comp-card .tro { width: 48px; display: flex; justify-content: center; }
.comp-card small { display: block; color: var(--muted); font-size: 11px; }
.comp-card b { display: block; font: 700 17px var(--display); letter-spacing: .01em; }
.comp-card .st { font-size: 12px; color: var(--muted); }
.comp-card .pz { text-align: right; } .comp-card .pz b { font-size: 15px; color: #f4c430; }
.comp-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin: 6px 0 12px; border-radius: 18px; border: 1px solid var(--line2);
  background: linear-gradient(110deg, color-mix(in srgb, var(--cc) 26%, var(--card)), var(--card) 65%); }
.comp-hero h3 { margin: 2px 0 4px; font-size: 22px; }
.comp-hero small { color: var(--muted); }
.prize-box { min-width: 250px; margin-left: auto; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.22); font-size: 12.5px; }
.prize-box > b { display: block; font: 700 13px var(--display); text-transform: uppercase; letter-spacing: .1em; color: #f4c430; margin-bottom: 4px; }
.prize-box .row { padding: 2px 0; }
.winner-card { display: flex; align-items: center; justify-content: center; gap: 14px; }
.fam { color: var(--muted); }
.duel { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: 12px; color: var(--muted); }
.duel-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--bad); overflow: hidden; }
.duel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--good), #9bd35a); }
ul.notes { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.ind-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 16px; }
.ind-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ind-row .sel { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 6px; font: 500 12px var(--body); max-width: 160px; }
.tr-row { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.proj-total { margin-top: 6px; padding-top: 8px; border-top: 2px solid var(--line2); font-size: 15px; } .proj-total b { font: 800 20px var(--display); }
.tro-art { position: relative; display: inline-flex; width: var(--ts); height: calc(var(--ts) * 1.2); align-items: center; justify-content: center; }
.tro-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; opacity: 0; transition: opacity .3s; box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.tro-art.img-ok img { opacity: 1; }
.tro-art.img-ok .trophy { opacity: 0; }

/* ==========================================================================
   MESSAGERIE (messages + conversations avec les joueurs)
   ========================================================================== */
.mb-tabs { display: flex; gap: 8px; margin: 4px 0; }
.nb { font-style: normal; display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.chip.sm { padding: 5px 10px; font-size: 12px; }
.mb-list { max-height: 62vh; overflow-y: auto; }
.chat-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.chat-row:hover { background: rgba(255,255,255,.03); }
.chat-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.chat-row.unread b { color: #fff; } .chat-row.unread small { color: var(--text); }
.chat-row .posb { transform: scale(.85); }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.chat-head small { display: block; color: var(--muted); font-size: 12px; }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 2px; max-height: 48vh; overflow-y: auto; }
.bub { position: relative; max-width: 78%; padding: 9px 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.4; }
.bub.them { align-self: flex-start; background: var(--card2); border-bottom-left-radius: 4px; }
.bub.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.bub .when { position: absolute; right: 10px; bottom: 3px; font-size: 9px; opacity: .6; }
.bub .note { display: block; margin-top: 4px; font-size: 11px; opacity: .75; font-style: italic; }
.quick { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.quick .btn { text-align: left; white-space: normal; }

/* Bouton retour (barre du haut) et croix de fermeture des fenêtres */
.top-back { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); cursor: pointer; margin-right: 4px; }
.top-back svg { width: 20px; height: 20px; }
.top-back:hover:not([disabled]) { background: var(--card2); }
.top-back[disabled] { opacity: .35; cursor: default; }
.sheet-x { position: sticky; float: right; top: 4px; margin: 0 -4px 0 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card2); color: var(--muted); font-size: 14px; cursor: pointer; }
.sheet-x:hover { color: var(--text); background: var(--card3); }
/* Visages : la photo est recadrée sur la tête (portrait en pied → zoom en haut, photo large → zoom au tiers supérieur). */
.face > img { transition: opacity .25s; }
.face > img.tall { object-position: 50% 4%; transform: scale(1.22); transform-origin: 50% 10%; }
.face > img.sq { object-position: 50% 12%; transform: scale(1.06); transform-origin: 50% 16%; }
.face > img.wide { object-position: 50% 14%; transform: none; }
.face.lg > img.tall { transform: scale(1.15); }
.face.md { width: 44px; height: 44px; font-size: 14px; } .bc-coach { margin-left: auto; } .bc-coach svg { border-radius: 50%; }
/* Choix du système (groupes) et déplacement des postes en match */
.form-groups { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.form-groups .fg small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.form-groups .chips { padding-bottom: 2px; }
.mpitch.moving { cursor: crosshair; box-shadow: inset 0 0 0 2px rgba(167, 139, 250, .6); }
.seg.wrap { flex-wrap: wrap; }
.form-pick { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.form-pick .chips { flex: 1; min-width: 0; padding: 2px 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); cursor: pointer; }
.fcard.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.fcard b { font: 700 14px var(--display); }
.fmini { width: 100%; }
.fmini rect { fill: #1f6b3b; stroke: rgba(255,255,255,.5); }
.fmini circle { fill: #fff; } .fmini circle.gk { fill: #f4c430; }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.opt-card { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.opt-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.opt-card small { color: var(--muted); font-size: 12px; } .opt-card span { font-size: 11px; color: #c9bbff; }
.opt-card[disabled] { opacity: .55; cursor: default; }
/* Logos de compétitions et de championnats : image PNG nette sur une plaque claire */
.comp-logo { position: relative; display: inline-flex; width: var(--ts); height: var(--ts); align-items: center; justify-content: center; }
.comp-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; border-radius: 12px; background: #fff; opacity: 0; transition: opacity .3s; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.comp-logo.img-ok img { opacity: 1; } .comp-logo.img-ok .trophy { opacity: 0; }
.lg-logo { display: inline-flex; width: var(--ls); height: var(--ls); border-radius: 7px; background: #fff; align-items: center; justify-content: center; overflow: hidden; vertical-align: middle; flex: none; }
.lg-logo img { width: 86%; height: 86%; object-fit: contain; opacity: 0; }
.lg-logo.img-ok img { opacity: 1; }
.lg-logo:not(.img-ok) { display: none; }
.face.gen { background: #2a3140; } .face.gen svg { width: 100%; height: 100%; }
.youth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.ycard { margin: 0; }
.ycard .sel { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 6px; font: 500 12px var(--body); flex: 1; min-width: 140px; }
.yverdict { font-size: 12.5px; color: #c9bbff; margin: 8px 0; }
.offer-list { display: flex; flex-direction: column; gap: 8px; }
.offer-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); color: var(--text); text-align: left; cursor: pointer; }
.offer-card:hover { border-color: var(--accent); }
.offer-card small { display: block; color: var(--muted); font-size: 12px; }
.offer-card b { font: 700 17px var(--display); }
.pm-facts .wx-eff { color: #f4c430; }
/* Porteur du ballon (bas gauche, style Football Manager) */
.bc-carrier { left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 10px; background: rgba(8,10,20,.82);
  border-left: 4px solid var(--tc, #7c5cff); color: #fff; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.bc-carrier.show { opacity: 1; transform: none; }
.bc-carrier .face { width: 30px; height: 30px; }
.bc-carrier em { font: 800 15px var(--display); font-style: normal; color: var(--tc, #fff); filter: brightness(1.6); }
.bc-carrier b { font: 700 14px var(--display); letter-spacing: .02em; }
.bc-carrier small { color: #aab; font-size: 11px; }

/* ---------- Sélections : tournois internationaux ---------- */
.nt { cursor: pointer; white-space: nowrap; }
.nt.w { font-weight: 700; }
.tourn-up { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tourn-up .tu { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; }
.tourn-up .tu-ic { font-size: 28px; }
.tourn-up small { display: block; color: var(--muted); }
.tourn-win { display: flex; gap: 14px; align-items: center; text-align: left; justify-content: flex-start; }
.tourn-win .tw-flag { font-size: 58px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.bracket { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; min-width: 168px; scroll-snap-align: start; }
.br-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.br-m { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; font-size: 13px; }
.br-m > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; opacity: .7; }
.br-m > div.w { opacity: 1; font-weight: 700; }
.br-m sup { font-size: 9px; margin-left: 2px; color: var(--muted); }
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.tbl.mini td { padding: 5px 4px; font-size: 13px; }
.tbl.mini td b { font-size: 14px; }
.tbl.mini tr.q td:first-child { box-shadow: inset 3px 0 0 var(--good); }
/* Fiche joueur : carrière et blessures */
.car-tbl td, .car-tbl th { padding: 6px 4px; font-size: 12.5px; }
.car-tbl tr.cur td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.car-tbl tr.pre td { opacity: .8; }
.inj-row { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.inj-row .d { color: var(--muted); min-width: 78px; font-variant-numeric: tabular-nums; }
/* Pré-saison : stages */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.camp-opt { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2, rgba(255,255,255,.03)); color: inherit; cursor: pointer; font: inherit; }
.camp-opt:hover:not(:disabled) { border-color: var(--accent); }
.camp-opt:disabled { opacity: .45; cursor: not-allowed; }
.camp-opt .ci { font-size: 26px; }
.camp-opt small { color: var(--muted); font-size: 12px; }
.controls .btn.hl-on { background: linear-gradient(135deg, #f4c430, #ff8a3d); color: #1a1205; border-color: transparent; }

/* ---------- Mercato : recherche filtrée ---------- */
.search-box .mkt-tools { display: flex; gap: 8px; align-items: center; }
.search-box .mkt-tools select { max-width: 46%; }
.pos-chips { flex-wrap: wrap; margin-top: 8px; }
.pos-chips .sep { width: 1px; background: var(--line); margin: 0 4px; align-self: stretch; }
.filters summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 16px; margin: 10px 0; }
.fgrid .fr { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.fgrid .fr b { color: var(--text, #fff); }
.fgrid .fr.chk { flex-direction: row; align-items: center; gap: 8px; color: inherit; }
.fgrid input[type=range] { width: 100%; }
/* ---------- Dossiers de transfert ---------- */
.deal-steps { display: flex; align-items: center; gap: 4px; margin: 6px 0 2px; }
.deal-steps i { flex: 1; height: 2px; background: var(--line); }
.deal-steps .ds { font-size: 11px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.deal-steps .ds.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.deal-steps .ds.ok { background: color-mix(in srgb, var(--good) 22%, transparent); border-color: var(--good); color: inherit; }
.deal-steps .ds.x { border-color: var(--bad); color: var(--bad); }
.deal-wait { display: flex; gap: 12px; align-items: center; }
.deal-wait .spin { font-size: 26px; animation: dealspin 2.4s linear infinite; }
@keyframes dealspin { 50% { transform: rotate(180deg); } 100% { transform: rotate(180deg); } }
.deal-log { display: flex; flex-direction: column; gap: 2px; }
.deal-log .dl { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 5px 2px; border-bottom: 1px solid var(--line); }
.deal-log .dl small { color: var(--muted); min-width: 40px; font-variant-numeric: tabular-nums; }
.deal-row { padding: 8px 0; border-bottom: 1px solid var(--line); gap: 10px; cursor: pointer; }
/* Cohésion */
.coh-card summary { list-style: none; cursor: pointer; }
.coh-card summary::-webkit-details-marker { display: none; }
.coh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; }

/* ---------- Match : temps forts / accéléré ---------- */
.pitch-area canvas { transition: filter .45s ease; }
.pitch-area.mode-ff canvas { filter: saturate(.45) brightness(.72) contrast(.95); }
.pitch-area.mode-hl::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3; box-shadow: inset 0 0 0 3px rgba(255, 70, 70, .85), inset 0 0 50px rgba(255, 60, 60, .35); animation: hlpulse 1.4s ease-in-out infinite; }
@keyframes hlpulse { 50% { box-shadow: inset 0 0 0 3px rgba(255, 70, 70, .45), inset 0 0 30px rgba(255, 60, 60, .15); } }
.ff-tag { position: absolute; top: 10px; right: 12px; z-index: 6; font: 800 12px/1 var(--display, system-ui); letter-spacing: .12em; padding: 6px 10px; border-radius: 6px; pointer-events: none; }
.ff-tag:empty { display: none; }
.mode-ff .ff-tag { background: rgba(20, 30, 50, .85); color: #9fc3ff; }
.mode-hl .ff-tag { background: #e53935; color: #fff; animation: hlpulse2 .9s ease-in-out infinite; }
@keyframes hlpulse2 { 50% { transform: scale(1.06); } }
.ff-panel { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 6; width: min(760px, calc(100% - 20px)); max-height: calc(100% - 60px); overflow: auto;
  background: rgba(10, 14, 24, .88); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 12px; transition: opacity .3s, transform .3s; }
.ff-panel.hidden { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.ff-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ff-head small { color: var(--muted); flex: 1; }
.ff-x { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.ff-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .ff-body { grid-template-columns: 1fr; } }
.ffs { display: grid; grid-template-columns: 34px 1fr auto 1fr 34px; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; }
.ffs > b { text-align: center; font-variant-numeric: tabular-nums; }
.ffs small { color: var(--muted); white-space: nowrap; text-align: center; min-width: 96px; }
.ffs > span { height: 5px; background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; display: flex; justify-content: flex-end; }
.ffs > span.r { justify-content: flex-start; }
.ffs > span i { display: block; height: 100%; background: var(--accent); }
.ffs > span.r i { background: #9fc3ff; }
.ff-rt { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
.ff-rt .neg { color: var(--bad); }
.ffr { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ffr small { min-width: 64px; color: var(--muted); }
.ffq { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.fr-today { background: color-mix(in srgb, var(--good) 12%, transparent); border-radius: 8px; padding-left: 6px !important; }
/* Négociations */
.neg-prof { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); margin-bottom: 8px; font-size: 13px; }
.neg-notes { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 10px; padding: 8px 10px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.03); border-radius: 6px; }
.neg-notes > div { display: grid; grid-template-columns: 22px minmax(110px, auto) 1fr; gap: 6px; font-size: 13px; align-items: baseline; }
.neg-notes small { color: var(--muted); }
.msg.counter { border: 1px solid var(--accent); }
.neg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; margin: 8px 0; }
.neg-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.neg-step { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.neg-step span { flex: 1; min-width: 120px; }
.neg-step b { min-width: 90px; font-size: 16px; }
.appr { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.appr button { text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.appr button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.appr small { color: var(--muted); font-size: 11px; }

/* ---------- Écran titre & logo ---------- */
.logo-full { display: flex; align-items: center; gap: 16px; }
.logo-mark { filter: drop-shadow(0 10px 30px rgba(124, 58, 237, .45)); flex: none; }
.logo-word { display: flex; flex-direction: column; line-height: .9; font-family: var(--display); letter-spacing: .02em; }
.logo-word b { font-size: 54px; font-weight: 900; color: #fff; }
.logo-word em { font-style: normal; font-size: 46px; font-weight: 900; background: linear-gradient(90deg, #a78bfa, #f0abfc 60%, #fcd34d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-word small { font-family: var(--body); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.title-screen .hero { position: relative; }
.title-screen .hero::before { content: ''; position: absolute; inset: -40px -20px; background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, .28), transparent 60%), radial-gradient(circle at 70% 80%, rgba(245, 158, 11, .12), transparent 55%); pointer-events: none; z-index: -1; }
.tagline { font-size: 18px; margin: 18px 0 8px; }
.lang-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
.continue-last { margin-bottom: 10px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.slot-grid .slot-card { margin: 0; display: flex; gap: 10px; align-items: center; }
.slot-grid .slot-card.empty { opacity: .75; border-style: dashed; }
.slot-btns { display: flex; flex-direction: column; gap: 5px; }
.brand .logo-mark { filter: none; }

/* ---------- Effectif (tableau) ---------- */
.sq-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.sq-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; }
.sq-kpi b { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.sq-kpi small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sq-kpi.warn b { color: var(--warn, #f59e0b); }
.sq-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 8px 0; }
.sq-bar .seg { flex: 1 1 320px; }
.sq-table-wrap { padding: 0; overflow-x: auto; }
.sq-table { min-width: 640px; }
.sq-table th { cursor: pointer; white-space: nowrap; user-select: none; }
.sq-table th.on { color: var(--accent); }
.sq-table td { vertical-align: middle; padding: 6px 8px; }
.sq-table tbody tr { cursor: pointer; transition: background .15s; }
.sq-table tbody tr:hover td { background: rgba(255, 255, 255, .04); }
.sq-table tr.dim td { opacity: .6; }
.sq-table td.nm { display: flex; gap: 8px; align-items: center; min-width: 190px; }
.sq-table td.nm b { font-size: 14px; }
.mtr { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; vertical-align: middle; }
.mtr i { display: block; height: 100%; }

/* ---------- Journal ---------- */
.np-mast { text-align: center; border-top: 3px double var(--line); border-bottom: 3px double var(--line); padding: 10px 0; margin: 6px 0 10px; }
.np-mast b { display: block; font-family: Georgia, 'Times New Roman', serif; font-size: 34px; letter-spacing: .06em; }
.np-mast small { color: var(--muted); font-style: italic; }
.np-art { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.np-art.big { display: grid; grid-template-columns: 1.2fr 1fr; margin: 10px 0; }
@media (max-width: 760px) { .np-art.big { grid-template-columns: 1fr; } }
.np-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0f172a; }
.np-art.big .np-img { aspect-ratio: auto; min-height: 240px; }
.np-img .np-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.np-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(1.05) contrast(1.05); }
.np-img.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, .55)); }
.np-crest { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) scale(1.8); filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6)); }
.np-txt { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.np-tag { align-self: flex-start; font: 800 10px/1 var(--body); letter-spacing: .14em; padding: 4px 7px; border-radius: 4px; background: var(--tc); color: #0b1020; }
.np-txt h3 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; line-height: 1.25; }
.np-art.big .np-txt h3 { font-size: 26px; }
.np-body { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text, #e5e7eb); }
.np-txt blockquote { margin: 2px 0; padding: 6px 10px; border-left: 3px solid var(--accent); font-style: italic; font-size: 13px; color: var(--muted); }
.np-txt cite { font-style: normal; font-size: 12px; }
.np-by { color: var(--muted); font-size: 11px; }
.np-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
/* Marché des entraîneurs */
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.cm-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin: 0; }
.cm-card .grow small { display: block; color: var(--muted); }
.cm-rep { text-align: center; min-width: 52px; }
.cm-rep b { font-family: var(--display); font-size: 22px; display: block; }
.flag { display: inline-block; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); height: 1em; width: auto; margin-right: 2px; }
.tw-flag .flag { height: 48px; } .comp-hero .flag { height: 40px; }
.ff-head .ff-spd { flex: none; } .ff-head .btn.sm { flex: none; }
.talk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; } .talk-grid .btn { text-align: left; justify-content: flex-start; }
.tc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0 4px; } .tc-stats span { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--muted); background: rgba(255,255,255,.04); border-radius: 6px; padding: 3px 0; } .tc-stats b { color: var(--text,#fff); font-size: 13px; } .tc-traits { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; } .ps-tbl td, .ps-tbl th { white-space: nowrap; font-size: 12px; }
.trait { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); white-space: nowrap; }
.trait.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.traits-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
/* Classement en direct (multiplex) */
.lt-games { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.lt-g { background: var(--card2, rgba(255,255,255,.06)); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.lt-tbl td, .lt-tbl th { padding: 4px 6px; }
.lt-up { color: var(--good); font-size: 10px; }
.lt-dn { color: var(--bad); font-size: 10px; }
.lt-live { color: #ff4d4d; font-size: 9px; animation: ltpulse 1.4s infinite; }
@keyframes ltpulse { 50% { opacity: .25; } }
.sale-stage { margin-top: 6px; font-size: 12px; color: var(--warn, #e3b341); }
.stars-y { color: #f4c542; letter-spacing: 1px; font-size: 14px; }
.moves { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.move-chip { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: rgba(244,197,66,.12); border: 1px solid rgba(244,197,66,.35); color: #f4d27a; }
.ce-3d { width: 100%; max-width: 220px; height: 260px; margin: 8px auto 0; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.08), rgba(0,0,0,.25)); cursor: grab; touch-action: pan-y; }
.ce-3d canvas { display: block; }
.adj-card { margin: 8px 0 12px; font-size: 13px; }
.adj-why { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
.adj-why li { margin: 2px 0; }
#upd-banner { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9999; background: #3a86ff; color: #fff; border: 0; border-radius: 20px; padding: 8px 16px; font: 600 13px system-ui; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
/* Tutoriel */
.tuto { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.tuto-dim { position: absolute; inset: 0; background: rgba(4,6,14,.62); pointer-events: auto; }
.tuto-hole { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(4,6,14,.62), 0 0 0 3px #f4c542; pointer-events: none; transition: all .25s ease; }
.tuto-card { position: absolute; left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); background: var(--card, #161a2b); border: 1px solid rgba(244,197,66,.45); border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 50px rgba(0,0,0,.5); pointer-events: auto; animation: tutoIn .25s ease; }
.tuto-card.bottom { bottom: calc(18px + env(safe-area-inset-bottom)); }
.tuto-card.top { top: 18px; }
.tuto-card h3 { margin: 4px 0 6px; }
.tuto-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.tuto-card .btns { display: flex; gap: 8px; align-items: center; }
.tuto-prog { display: flex; gap: 3px; margin-bottom: 6px; }
.tuto-prog i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.15); }
.tuto-prog i.on { background: #f4c542; }
@keyframes tutoIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.top-help { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text, #fff); font-weight: 800; cursor: pointer; flex: none; }
/* Écran titre : ambiance de stade (projecteurs, lignes du terrain en filigrane). */
.title-screen { position: relative; }
.stadium-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 80% 55% at 50% 115%, rgba(31, 122, 76, .38), transparent 70%), radial-gradient(ellipse 60% 40% at 20% -5%, rgba(255, 244, 214, .14), transparent 70%), radial-gradient(ellipse 60% 40% at 80% -5%, rgba(255, 244, 214, .12), transparent 70%), linear-gradient(180deg, #0a0d1d 0%, #0b1022 55%, #0c1a17 100%); }
.stadium-bg .beam { position: absolute; top: -20%; width: 34vw; height: 120%; background: linear-gradient(180deg, rgba(255, 246, 220, .16), transparent 70%); filter: blur(8px); transform-origin: top center; animation: beamSway 9s ease-in-out infinite alternate; }
.stadium-bg .b1 { left: 4%; transform: rotate(18deg); }
.stadium-bg .b2 { right: 4%; transform: rotate(-18deg); animation-delay: -4s; }
@keyframes beamSway { from { opacity: .55; } to { opacity: 1; } }
.stadium-bg .pitch-lines { position: absolute; left: 50%; bottom: -30vh; width: 120vw; height: 70vh; transform: translateX(-50%) perspective(600px) rotateX(58deg); border: 2px solid rgba(255, 255, 255, .07); border-radius: 4px;
  background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, .07) calc(50% - 1px), rgba(255, 255, 255, .07) calc(50% + 1px), transparent calc(50% + 1px)), repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 8%, transparent 8% 16%); }
.stadium-bg .pitch-lines::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18vh; height: 18vh; transform: translate(-50%, -50%); border: 2px solid rgba(255, 255, 255, .07); border-radius: 50%; }
.feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 14px; max-width: 440px; }
.feat { display: flex; flex-direction: column; gap: 1px; padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); font-weight: 700; font-size: 13px; backdrop-filter: blur(4px); }
.feat b { font-size: 18px; line-height: 1; margin-bottom: 3px; }
.feat small { font-weight: 500; color: var(--muted, #9aa3b5); font-size: 11px; }
.slot-card.empty .slot-plus { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #a78bfa; border: 1.5px dashed rgba(167, 139, 250, .45); margin-right: 10px; }
.slot-card { transition: transform .15s ease, border-color .15s ease; }
.slot-card:hover { transform: translateY(-2px); border-color: rgba(167, 139, 250, .45); }
.continue-last { box-shadow: 0 10px 30px rgba(124, 58, 237, .35); }
.slot-grid .slot-card b { white-space: nowrap; }
.slot-grid .slot-card .grow { min-width: 0; }
.det20 summary { cursor: pointer; list-style: none; }
.det20-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 16px; margin-top: 8px; }
.det20-grid h4 { margin: 6px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #a78bfa; }
.det20-grid .row { font-size: 12.5px; padding: 1px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
