/* Mise en page de l'application : barre latérale + contenu. */
body { min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); }
.boot { padding: 60px 20px; text-align: center; color: var(--muted); }
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: calc(20px + env(safe-area-inset-top, 0px)) 14px 18px max(14px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-right: 1px solid var(--line-soft); overflow-y: auto; z-index: 40; }
.side .logo { padding: 0 6px; }
.team-switch { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--bg); }
.team-switch .tag { font: 700 11px/1 var(--f-data); color: var(--accent); letter-spacing: .06em; }
.team-switch select { font: 700 16px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; background: var(--surface); }
.team-switch .role { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .sep { height: 1px; background: var(--line-soft); margin: 8px 6px; }
.nav .group { font: 600 10.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.nav a.cta { color: var(--accent-ink); background: var(--accent); margin: 6px 0 4px; justify-content: center; }
.nav a.cta:hover { filter: brightness(1.08); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 6px; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 6px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 15px/1 var(--f-display); flex: none; text-transform: uppercase; }
.who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 12px; color: var(--muted); }
.side-actions { display: flex; gap: 6px; }
.side-actions .btn { flex: 1; }

.topbar { display: none; }
.scrim { display: none; }
main.main { padding: 28px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, 32px); min-width: 0; }
.wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 6px; }
.page-head .sub { color: var(--muted); margin-top: 8px; max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters label.field { flex: 1 1 150px; max-width: 230px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 8px 12px; font: 600 13px/1 var(--f-body); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-soft); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.demo-bar b { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .04em; font-size: 17px; margin-right: 6px; }
.demo-bar .btn { background: var(--accent-ink); color: var(--accent); border-color: transparent; }

/* Forme récente */
.form-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.fchip { flex: none; min-width: 96px; border-radius: 6px; padding: 9px 10px; border: 1px solid var(--line-soft); background: var(--bg); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); border-top: 3px solid var(--muted); }
.fchip.w { border-top-color: var(--win); } .fchip.l { border-top-color: var(--loss); }
.fchip b { font: 700 18px/1 var(--f-data); }
.fchip.w b { color: var(--win); } .fchip.l b { color: var(--loss); }
.fchip span { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.fchip small { font-size: 11px; color: var(--muted); }
.axis-note { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Analyse */
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.insights li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.insights .ic { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; font: 700 14px/1 var(--f-data); }
.insights .bad .ic { background: var(--loss-soft); color: var(--loss); } .insights .good .ic { background: var(--win-soft); color: var(--win); } .insights .mid .ic { background: var(--warn-soft); color: var(--warn); }
.insights b { display: block; font-weight: 700; }
.insights span { font-size: 14px; color: var(--muted); }
.mode-bars { display: flex; flex-direction: column; gap: 14px; }
.mode-bars .row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px; gap: 12px; align-items: center; }
.mode-bars .row b { font-weight: 700; font-size: 14px; }
.mode-bars .track { height: 22px; background: var(--surface-2); border-radius: 3px; overflow: hidden; position: relative; }
.mode-bars .track i { position: absolute; inset: 0 auto 0 0; }
.mode-bars .track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1.5px dashed var(--muted); opacity: .6; }
.mode-bars .row span { font: 600 13px/1.2 var(--f-data); text-align: right; }
.mode-block + .mode-block { margin-top: 22px; }
table.fixed { table-layout: fixed; min-width: 640px; }
table.fixed td { overflow: hidden; text-overflow: ellipsis; }
.mode-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.upcoming { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.upcoming li { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.upcoming li:first-child { border-top: 0; }
.upcoming .when { font: 600 13px/1.3 var(--f-data); }
.upcoming .when small { display: block; color: var(--muted); font: 500 12px var(--f-body); }

/* Matchs */
.matches { display: flex; flex-direction: column; gap: 10px; }
.match { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); border-left: 4px solid var(--muted); }
.match.w { border-left-color: var(--win); } .match.l { border-left-color: var(--loss); }
.m-head { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 13px 16px; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; color: inherit; font: inherit; }
.m-head:hover { background: var(--surface-2); }
.m-date { font: 600 13px/1.3 var(--f-data); }
.m-date small { display: block; color: var(--muted); font-family: var(--f-body); font-weight: 500; }
.m-opp { min-width: 0; }
.m-opp b { font: 700 19px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-opp .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.m-maps { display: flex; gap: 4px; }
.m-maps .mm { font: 600 11px/1 var(--f-data); padding: 5px 6px; border-radius: 4px; }
.m-maps .mm.w { background: var(--win-soft); color: var(--win); } .m-maps .mm.l { background: var(--loss-soft); color: var(--loss); }
.m-score { font: 700 28px/1 var(--f-display); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.m-score.w { color: var(--win); } .m-score.l { color: var(--loss); }
.m-body { border-top: 1px solid var(--line-soft); padding: 16px; display: flex; flex-direction: column; gap: 16px; background: var(--bg); }
.m-map { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; padding: 14px; }
.m-map-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.m-map-head .sc { font: 700 18px/1 var(--f-data); margin-left: auto; }
.m-map-head b { font-weight: 700; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs img { width: 120px; height: 68px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); cursor: zoom-in; background: var(--surface-2); }
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.note-box { background: var(--surface); border-left: 3px solid var(--accent); padding: 10px 12px; border-radius: 0 6px 6px 0; font-size: 14px; }
details.opp-stats summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 8px; }

/* Joueurs */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.pcard:hover { border-color: var(--ink); }
.pcard-head { display: flex; align-items: center; gap: 10px; }
.pcard-head b { font: 700 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.pcard .big { display: flex; align-items: baseline; gap: 8px; }
.pcard .big .v { font: 700 40px/1 var(--f-display); }
.pcard dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.pcard dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pcard dd { margin: 2px 0 0; font: 600 15px/1 var(--f-data); }

/* Formulaire de match */
.maprow { border: 1px solid var(--line-soft); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.maprow.bad { border-color: var(--loss); }
.mr-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mr-n { font: 700 13px/1 var(--f-data); color: var(--accent); width: 54px; }
.mr-head select { flex: 1 1 150px; width: auto; }
.mr-head input[type=number] { width: 86px; }
.mr-head .vs { color: var(--muted); }
.mr-head .rm { margin-left: auto; }
.stat-grid { overflow-x: auto; }
.stat-grid table input { width: 76px; padding: 6px 7px; text-align: right; }
.stat-grid table input.t { width: 70px; }
.stat-grid td { padding: 5px 6px; }
.scan { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1.5px dashed var(--accent); border-radius: 8px; background: var(--accent-soft); }
.scan > div { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.scan span { color: var(--muted); font-size: 13px; }
.scan.run b::after { content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 9px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.scanres { border: 1.5px solid var(--accent); border-radius: 8px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.scanres input { width: 72px; padding: 5px 6px; text-align: right; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 7px 14px; font: 600 14px/1 var(--f-body); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.live { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); }
.live b { font: 700 26px/1 var(--f-display); }
.fsec { display: flex; flex-direction: column; gap: 14px; }
.fsec + .fsec { border-top: 1px solid var(--line-soft); padding-top: 20px; margin-top: 4px; }
.ffoot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-foot { position: sticky; bottom: 0; background: var(--surface); padding: 14px 0 calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); margin-top: 6px; z-index: 5; }

/* Planning */
.day { display: flex; flex-direction: column; gap: 8px; }
.day-title { display: flex; align-items: baseline; gap: 10px; border-bottom: 1.5px solid var(--ink); padding-bottom: 6px; }
.day-title b { font: 700 19px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.day-title.today b { color: var(--accent); }
.ev { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; }
.ev .time { font: 700 16px/1.2 var(--f-data); }
.ev .time small { display: block; font: 500 12px var(--f-body); color: var(--muted); }
.ev-title { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev p { color: var(--muted); font-size: 14px; margin-top: 4px; white-space: pre-line; }
.ev-type-Scrim { --c: var(--accent); } .ev-type-Tournoi, .ev-type-Ligue { --c: var(--warn); } .ev-type-Revue\ VOD { --c: var(--win); }
.ev { border-left: 4px solid var(--c, var(--muted)); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font: 13px var(--f-data); }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; font-size: 14px; }
.howto div { background: var(--bg); border-radius: 6px; padding: 10px 12px; }
.howto b { display: block; margin-bottom: 3px; }

/* Captures */
.meter { display: flex; flex-direction: column; gap: 6px; min-width: 200px; flex: 1; }
.meter .track { height: 8px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.meter .track i { display: block; height: 100%; background: var(--accent); }
.meter .lab { display: flex; justify-content: space-between; font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.shot { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.shot img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; cursor: zoom-in; background: var(--surface-2); display: block; }
.shot .meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.shot .meta .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 10, 9, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; }
#lightbox img { max-height: calc(100vh - 100px); object-fit: contain; border-radius: 6px; }

/* Réglages */
.roster-edit { display: flex; flex-direction: column; gap: 8px; }
.roster-edit .r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.members .m { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.members .m:first-child { border-top: 0; }
.danger-zone { border-color: color-mix(in srgb, var(--loss) 40%, transparent); }

/* Ranked */
.rank-badge { display: inline-flex; align-items: center; gap: 10px; }
.rank-badge i { width: 14px; height: 14px; transform: rotate(45deg); border-radius: 2px; background: var(--c); display: inline-block; }
.import-preview { background: var(--bg); border-radius: 8px; padding: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--ink); color: var(--bg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.auth-side .logo { color: var(--bg); }
.auth-side h2 { font-size: clamp(34px, 4vw, 52px); line-height: .95; }
.auth-side p { color: color-mix(in srgb, var(--bg) 70%, transparent); max-width: 42ch; margin-top: 14px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.ticker { font: 600 13px/1.6 var(--f-data); display: flex; flex-direction: column; gap: 2px; opacity: .85; }
.ticker .w { color: #4fdd9d; } .ticker .l { color: #ff8a80; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 45; background: var(--surface); border-bottom: 1px solid var(--line-soft);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
  .topbar .logo { font-size: 18px; }
  .topbar .t { margin-left: auto; font: 700 14px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .app.menu-open .side { transform: none; }
  .scrim { display: none; }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  main.main { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
  .m-head { grid-template-columns: minmax(0, 1fr) auto; }
  .m-head .m-date { grid-column: 1 / -1; display: flex; gap: 8px; }
  .m-maps { grid-column: 1 / -1; grid-row: 3; }
  .m-score { grid-row: 2; grid-column: 2; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 28px 20px; }
  .auth-side .ticker { display: none; }
  .mode-bars .row { grid-template-columns: 92px minmax(0, 1fr) 76px; }
  .members .m { grid-template-columns: minmax(0, 1fr) auto; }
  .members .m select { grid-column: 1; }
  .ev { grid-template-columns: 58px minmax(0, 1fr); }
  .ev .ev-actions { grid-column: 1 / -1; }
}

/* Identité dans l'application */
.side { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px); }
.nav .pill { font-size: 11px; padding: 2px 7px; }
.eyebrow svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; }
.kpi { position: relative; }
.pcard dt svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
.maprow { border-left: 4px solid var(--line); }
.maprow.mode-HP { border-left-color: var(--hp); } .maprow.mode-SND { border-left-color: var(--snd); } .maprow.mode-HJ { border-left-color: var(--hj); }
.m-maps .mb { padding: 4px 6px 4px 4px; }
.m-maps .mm-w { box-shadow: inset 0 -2px 0 var(--win); } .m-maps .mm-l { box-shadow: inset 0 -2px 0 var(--loss); opacity: .75; }
.auth-side .logo .w1 { color: var(--bg); }
.auth-side .logo svg rect { fill: var(--bg); }
.auth-side .logo svg circle, .auth-side .logo svg path[stroke] { stroke: var(--ink); }
.auth-side { background-image: radial-gradient(rgba(255,255,255,.07) 1.1px, transparent 1.3px); background-size: 20px 20px; }
.scan .tile { background: var(--accent); color: var(--accent-ink); } .scan .tile::after { background: var(--ink); }

/* Offres */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.plan.current { border: 2px solid var(--accent); }
.plan-solo { border-top: 4px solid var(--accent); }
.plan-structure { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plan-structure .hint, .plan-structure .price span, .plan-structure .feat-list span { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.plan-structure .tile { background: var(--bg); color: var(--ink); }
.plan-structure .pill { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); background: transparent; }
.plan-structure .feat-list li { border-color: color-mix(in srgb, var(--bg) 15%, transparent); }
.plan-top { display: flex; gap: 12px; align-items: center; }
.plan-top h3 { font-size: 24px; }
.price b { font: 800 40px/1 var(--f-display); }
.price span { color: var(--muted); margin-left: 6px; }
.feat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feat-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.feat-list svg { width: 17px; height: 17px; color: var(--accent); }
.plan-structure .feat-list svg { color: #9aa3ff; }
.feat-list b { font-family: var(--f-data); font-size: 13px; }
.plan-cta { margin-top: auto; }
.plan-cta .btn { width: 100%; }
.incl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px 20px; }
.incl li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.incl svg { width: 17px; height: 17px; color: var(--win); flex: none; margin-top: 2px; }

/* Boutique (achats) */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.product { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.product > img, .product .noimg { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.product .noimg svg { width: 40px; height: 40px; }
.pbody { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pbody h3 { font-size: 20px; }
.pbody .btn { margin-top: auto; }

/* Ligues */
.league-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 22px; background: var(--ink); color: var(--bg); border-radius: 12px; }
.league-hero .tile { background: var(--bg); color: var(--ink); }
.league-hero .sub, .league-hero .eyebrow { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.league-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.league-hero .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.mini-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: center; }
.mini-row .wr { min-width: 0; }

/* Passeport */
.passport-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 48px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.passport { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px -32px rgba(0, 0, 0, .5); overflow: visible; }
.pp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 22px; background: var(--ink); border-radius: 18px 18px 0 0; }
.pp-head .logo { font-size: 19px; } .pp-head .logo .w1 { color: var(--bg); } .pp-head .eyebrow { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.pp-head .logo svg rect { fill: var(--bg); } .pp-head .logo svg circle, .pp-head .logo svg path[stroke] { stroke: var(--ink); }
.pp-id { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 24px 22px; }
.pp-photo { width: 76px; height: 76px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); border: 2px dashed var(--line); }
.pp-photo svg { width: 38px; height: 38px; }
.pp-id h1 { font-size: clamp(32px, 6vw, 46px); }
.pp-kd { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pp-kd b { font: 800 54px/1 var(--f-display); }
.pp-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line-soft); }
.pp-stats div { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line-soft); min-width: 0; }
.pp-stats div:last-child { border-right: 0; }
.pp-stats svg { width: 18px; height: 18px; color: var(--accent); }
.pp-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pp-stats b { font: 700 20px/1 var(--f-data); }
.pp-modes { padding: 14px 22px; display: flex; flex-direction: column; gap: 10px; }
.pp-mode { display: grid; grid-template-columns: 170px 70px 54px minmax(0, 1fr); gap: 12px; align-items: center; }
.pp-best, .pp-form { padding: 12px 22px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft); }
.pp-best { flex-direction: row; flex-wrap: wrap; align-items: center; }
.pp-best .eyebrow { width: 100%; }
.pp-map { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; background: var(--bg); border-radius: 8px; }
.pp-last { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 8px; min-width: 52px; }
.pp-last.w { background: var(--win-soft); } .pp-last.l { background: var(--loss-soft); }
.pp-last b { font: 700 12px/1 var(--f-data); }
.pp-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 22px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); }
.pp-share { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }

/* Divers */
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.status-list li { display: flex; align-items: center; gap: 12px; }
.status-list li > :last-child:is(button) { margin-left: auto; }
.status-list .res svg { width: 15px; height: 15px; }
.th-wrap { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.admin-product { display: flex; flex-direction: column; gap: 12px; }
.session b { font: 800 44px/1 var(--f-display); margin-right: 10px; }
.session span { color: var(--muted); }
.tier-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.tier-bar .track { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.tier-bar .track i { display: block; height: 100%; }
.res svg { width: 14px; height: 14px; }

@media (max-width: 700px) {
  .league-hero { grid-template-columns: auto minmax(0, 1fr); }
  .league-hero .actions { grid-column: 1 / -1; }
  .pp-id { grid-template-columns: 60px minmax(0, 1fr); }
  .pp-photo { width: 60px; height: 60px; }
  .pp-kd { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .pp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pp-stats div:nth-child(3) { border-right: 0; }
  .pp-stats div:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .pp-mode { grid-template-columns: minmax(0, 1fr) 54px 60px; }
  .pp-mode .wr { grid-column: 1 / -1; }
  .pp-share { grid-template-columns: auto minmax(0, 1fr); }
  .pp-share .ffoot { grid-column: 1 / -1; }
  .passport-page { padding-top: 28px; }
}

/* Tampon animé (victoire, défaite, palier) */
.celebrate { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; pointer-events: auto; background: radial-gradient(circle, color-mix(in srgb, var(--bg) 55%, transparent) 0%, transparent 60%); animation: c-fade 1.9s ease forwards; }
.c-stamp { font: 800 clamp(44px, 9vw, 96px)/1 var(--f-display); text-transform: uppercase; letter-spacing: .1em; padding: 14px 28px 10px; border: 6px solid currentColor; border-radius: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 7px currentColor, 0 20px 60px -20px rgba(0,0,0,.5); animation: c-hit .45s cubic-bezier(.2,1.6,.4,1) both; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.c-win .c-stamp { color: var(--win); } .c-loss .c-stamp { color: var(--loss); } .c-rankup .c-stamp { color: var(--accent); }
.celebrate i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 2px; background: var(--accent); opacity: 0; animation: c-burst 1s ease-out .12s forwards; }
.c-win i:nth-child(odd) { background: var(--win); } .c-rankup i:nth-child(odd) { background: #ffd65c; }
.celebrate i:nth-child(2) { --x: -260px; --y: -150px; } .celebrate i:nth-child(3) { --x: 250px; --y: -170px; } .celebrate i:nth-child(4) { --x: -300px; --y: 90px; } .celebrate i:nth-child(5) { --x: 290px; --y: 120px; }
.celebrate i:nth-child(6) { --x: -110px; --y: -230px; } .celebrate i:nth-child(7) { --x: 120px; --y: 230px; } .celebrate i:nth-child(8) { --x: -150px; --y: 210px; } .celebrate i:nth-child(9) { --x: 160px; --y: -230px; }
@keyframes c-hit { 0% { transform: scale(2.6) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }
@keyframes c-burst { 0% { opacity: 1; transform: translate(-50%, -50%) rotate(0); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(220deg); } }
@keyframes c-fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }

.keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px 20px; }
.keys li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
kbd { font: 700 12px/1 var(--f-data); padding: 5px 8px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface); min-width: 28px; text-align: center; white-space: nowrap; }
.side-actions .btn { padding: 7px 6px; font-size: 12.5px; }
.side-actions .btn[aria-pressed="false"] { color: var(--loss); }

/* Comparaison de joueurs */
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; margin-bottom: 14px; }
.versus .vs { font: 800 26px/1 var(--f-display); color: var(--accent); padding-bottom: 8px; }
.cmp td.better { color: var(--win); font-weight: 700; }
.cmp td.better::after { content: " ▲"; font-size: 10px; }
.cmp td:nth-child(2) { text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cmp td:first-child, .cmp th:first-child { text-align: right; }
.cmp td:last-child { text-align: left; }
.pcard dt { white-space: nowrap; letter-spacing: .03em; } .pcard dt svg { display: block; margin-bottom: 4px; }

/* ---------- Tableau tactique ---------- */
:root { --ally: #2f6bff; --foe: #ec3c3c; --tok-edge: #101317; --board: #f1f3ef; --grid: rgba(19, 23, 20, .07);
  --sch-wall: #3a423c; --sch-floor: #cfd4cb; --sch-hatch: rgba(19, 23, 20, .35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --board: #0e1013; --grid: rgba(231, 235, 229, .06); --sch-wall: #eef1f4; --sch-floor: #3a4048; --sch-hatch: rgba(238, 241, 244, .4); } }
:root[data-theme="dark"] { --board: #0e1013; --grid: rgba(231, 235, 229, .06); --sch-wall: #eef1f4; --sch-floor: #3a4048; --sch-hatch: rgba(238, 241, 244, .4); }
.wrap:has(.tac) { max-width: none; }
.tac { display: grid; gap: 12px; }
.tac-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tac-title { font: 700 24px/1.1 var(--f-display); text-transform: uppercase; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: var(--r); min-width: 0; flex: 0 1 340px; color: var(--ink); }
.tac-title:hover:not([readonly]), .tac-title:focus { border-color: var(--line); background: var(--surface); }
.tac-top select { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 8px 10px; font: 600 13px var(--f-body); color: var(--ink); width: auto; max-width: 240px; }
.tac-sp { flex: 1; }
.tac-main { display: grid; grid-template-columns: auto minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.tac-tools { display: flex; flex-direction: column; gap: 4px; padding: 8px; position: sticky; top: 12px; }
.tac-tool { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--muted); position: relative; }
.tac-tool svg { width: 19px; height: 19px; }
.tac-tool:hover { color: var(--ink); background: var(--surface-2); }
.tac-tool[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tac-tool kbd { display: none; }
.tac-tool svg[viewBox] { width: 19px; height: 19px; }
.tac-tools hr { width: 100%; border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.tac-cap { font: 600 9px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 2px 0 4px; }
.tac-sw { display: grid; gap: 6px; justify-items: center; }
.tac-sw .swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.tac-sw .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.tac-board { position: relative; padding: 8px; overflow: hidden; background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 64px 64px, var(--board); }
.tac-board svg { width: 100%; height: auto; display: block; touch-action: none; user-select: none; max-height: calc(100vh - 230px); }
.tac-hud { position: absolute; left: 12px; top: 10px; display: flex; gap: 6px; pointer-events: none; z-index: 1; }
.tac-hint { margin: 6px auto 0; width: fit-content; max-width: 100%; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line-soft); padding: 4px 10px; border-radius: 99px; text-align: center; }
.tac-textin { position: absolute; z-index: 5; padding: 6px 8px; border: 1px solid var(--accent); border-radius: 6px; background: var(--surface); width: 190px; font: 13px var(--f-body); color: var(--ink); }
.tac-side { padding: 0; display: flex; flex-direction: column; max-height: calc(100vh - 150px); overflow: auto; }
.tac-side section { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); display: grid; gap: 8px; }
.tac-side section:last-child { border-bottom: 0; }
.tac-side h3 { font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tac-side h3 .hint { font: 500 11px var(--f-body); text-transform: none; letter-spacing: 0; }
.tac-side .field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.tac-side .field input { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 7px 9px; font: 500 13px var(--f-body); color: var(--ink); }
.tac-side .check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.tac-side textarea { width: 100%; min-height: 76px; resize: vertical; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px 10px; font: 13px/1.45 var(--f-body); color: var(--ink); }
.tac-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tac-layers { display: flex; flex-wrap: wrap; gap: 6px; }
.tac-layer { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: 600 12px var(--f-body); cursor: pointer; color: var(--muted); }
.tac-layer[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.tac-layer i { width: 9px; height: 9px; border-radius: 50%; }
.tac-toks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#tacOurs.tac-toks { grid-template-columns: 1fr 1fr; }
.tac-tok { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); cursor: pointer; font: 600 11px var(--f-body); color: var(--muted); min-width: 0; }
.tac-tok.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.tac-tok > button { border: 0; background: none; cursor: pointer; padding: 0; }
.tac-tok select { width: 100%; border: 0; background: transparent; font: 600 11px var(--f-body); color: var(--ink); text-align: center; }
.tac-ut { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); color: var(--ink); }
.tac-ut svg { width: 17px; height: 17px; }
.tac-legend { display: grid; gap: 4px; font-size: 13px; } .tac-legend span { display: flex; align-items: center; gap: 6px; }
.tac-timeline { display: flex; align-items: center; gap: 10px; padding: 10px; overflow-x: auto; }
.tac-steps { display: flex; gap: 8px; }
.tac-step { flex: none; display: grid; gap: 3px; min-width: 150px; padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); cursor: pointer; position: relative; text-align: left; font: inherit; color: var(--ink); }
.tac-step .k { font: 600 10px/1 var(--f-data); color: var(--muted); letter-spacing: .06em; }
.tac-step b { font-size: 13px; } .tac-step small { color: var(--muted); font-size: 11px; }
.tac-step.on { border-color: var(--accent); background: var(--accent-soft); min-width: 200px; }
.tac-step.on .k { color: var(--accent); }
.tac-step input, .tac-step select { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); padding: 4px 6px; font: 600 12px var(--f-body); color: var(--ink); }
.tac-step .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; }
.tac-step.add { border-style: dashed; color: var(--muted); place-items: center; min-width: 100px; font-weight: 600; }
#tacSvg .tac-wall { stroke: var(--sch-wall); stroke-width: 7; stroke-linecap: square; fill: none; }
#tacSvg .tac-block { fill: url(#tacHatch); stroke: var(--sch-wall); stroke-width: 3; }
#tacSvg .tac-floor { fill: var(--sch-floor); }
#tacSvg .tac-draw { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#tacSvg .tac-tokl { font: 700 14px var(--f-data); fill: #fff; paint-order: stroke; stroke: var(--tok-edge); stroke-width: 3px; pointer-events: none; }
#tacSvg .tac-objt { font: 700 15px var(--f-data); fill: #fff; pointer-events: none; }
#tacSvg .tac-note { font: 600 17px var(--f-body); paint-order: stroke; stroke: var(--board); stroke-width: 5px; }
#tacSvg .tac-credit { font: 600 12px var(--f-body); fill: var(--muted); paint-order: stroke; stroke: var(--board); stroke-width: 3px; }
#tacSvg .tac-big { font: 700 24px var(--f-display); text-transform: uppercase; fill: var(--ink); }
#tacSvg .tac-small { font: 500 14px var(--f-body); fill: var(--muted); }
.tac-fade { animation: tacFade .35s ease both; } @keyframes tacFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tac-fade { animation: none; } }
.strat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.strat-card { display: grid; gap: 8px; text-decoration: none; color: inherit; padding: 16px; }
.strat-card:hover { border-color: var(--line); }
.strat-card .sc-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.map-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.map-admin .mcard { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.map-admin img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--board); border-radius: 6px; }
@media (max-width: 1100px) { .tac-main { grid-template-columns: auto minmax(0, 1fr); } .tac-side { grid-column: 1 / -1; max-height: none; } }
@media (max-width: 640px) {
  .tac-main { grid-template-columns: minmax(0, 1fr); }
  .tac-tools { flex-direction: row; flex-wrap: wrap; justify-content: center; position: static; }
  .tac-tools hr, .tac-cap, .tac-tool kbd { display: none; }
  .tac-sw { display: flex; } #tacSchTools { display: contents; }
  .tac-tool { width: 38px; height: 38px; }
}
.codes{font-family:var(--mono,monospace);background:var(--paper-2,rgba(127,127,127,.1));padding:12px 16px;border-radius:8px;columns:2;line-height:1.8;max-width:360px;margin:10px 0}
