/* Polices hébergées sur le site : aucun appel à un service extérieur */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/archivo-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/archivo-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #121212;
  --surface: #1c1c1c;
  --surface-2: #232120;
  --line: #33302c;
  --line-soft: #2a2725;
  --hero: #1f1a16;
  --hero-line: #3a2a1c;
  --text: #f7f2ea;
  --text-2: #d7cfc6;
  --muted: #aaa39a;
  --faint: #8a837b;
  --orange: #FF6B00;
  --orange-txt: #FF8A33;
  --gold: #FFC107;
  --blue: #2196F3;
  --blue-txt: #5AB4FF;
  --ok: #7bd88f;
  --ko: #ff8a80;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--orange); text-decoration: none; }
button { font-family: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
main { flex: 1; outline: none; }

/* En-tête */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--orange); color: var(--bg); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 15px; }
.brand-name { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: .02em; }
.brand-name span { color: var(--orange); }

/* Puces compétitions */
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 4px 16px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--bg); font-weight: 700; }

/* Bandeau */
.hero { margin: 0 16px 18px; padding: 18px; border-radius: 20px; background: var(--hero); border: 1px solid var(--hero-line); }
.kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.hero h1 { margin: 6px 0 4px; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1.1; }
.hero p { margin: 0; font-size: 14px; color: #c9c1b7; }

.list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 24px; }
.day { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* Carte duel */
.duel { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; color: var(--text); transition: border-color .15s, transform .15s; }
.duel:hover { border-color: rgba(255,107,0,.6); }
.duel-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.time { font-weight: 700; color: var(--text); font-size: 14px; }
.tag { padding: 3px 8px; border-radius: 999px; background: #262320; color: var(--text-2); font-size: 12px; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: #3a1410; color: #ff9a8f; font-weight: 700; font-size: 12px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4a; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.team b { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.vs { font-family: var(--display); font-weight: 900; font-size: 13px; color: #77706a; }
.crest { width: 44px; height: 44px; object-fit: contain; }
.crest-lg { width: 60px; height: 60px; }
.initials { border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }

.probs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
.probs b { font-family: var(--display); font-size: 20px; }
.probs small { display: block; font-size: 11px; color: var(--muted); }
.c1 { color: var(--orange-txt); } .cN { color: var(--gold); } .c2 { color: var(--blue-txt); }
.bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; }
.bar span:nth-child(1) { background: var(--orange); } .bar span:nth-child(2) { background: var(--gold); } .bar span:nth-child(3) { background: var(--blue); }
.avis { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.avis b { color: var(--gold); }
.more { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 40px; border-top: 1px solid var(--line-soft); font-size: 14px; font-weight: 700; color: var(--orange); }

/* Analyse */
.back { display: flex; align-items: center; gap: 4px; padding: 4px 8px 8px; }
.back a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--text); }
.back span { font-size: 13px; color: var(--muted); }
.match-hero { margin: 0 16px 14px; padding: 20px 14px; border-radius: 22px; background: var(--hero); border: 1px solid var(--hero-line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.match-hero .team b { font-size: 16px; }
.match-hero small { font-size: 12px; color: var(--muted); }
.kickoff { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kickoff strong { font-family: var(--display); font-weight: 900; font-size: 26px; }
.kickoff span { font-size: 12px; color: var(--muted); }

.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 16px 14px; padding: 4px; background: var(--surface); border-radius: 14px; }
.tabs button { height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; padding: 0 4px; }
.tabs button[aria-selected="true"] { background: var(--orange); color: var(--bg); }

.panel { margin: 0 16px 14px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.panel[hidden] { display: none; }
.panel h2 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.probs-lg b { font-size: 28px; }
.probs-lg small + small { color: #77706a; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.cell { padding: 12px 10px; border-radius: 12px; background: var(--surface-2); }
.cell small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.cell b { font-size: 17px; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.row b { color: var(--gold); font-size: 17px; }
.note { margin: 0; font-size: 12px; color: var(--muted); }

.form-team { display: flex; flex-direction: column; gap: 8px; }
.form-head { display: flex; justify-content: space-between; align-items: center; }
.form-head span { font-size: 13px; color: var(--muted); }
.pills { display: flex; gap: 6px; }
.pill { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; color: #fff; }
.pill.V { background: #2e7d32; } .pill.N { background: #5d5a56; } .pill.D { background: #b3261e; }
.stats-table { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 16px; font-size: 14px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.stats-table span { color: var(--muted); }
.stats-table .h { font-size: 12px; color: var(--muted); font-weight: 700; text-align: right; }
.stats-table b { text-align: right; }

.h2h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.h2h small { font-size: 12px; color: var(--muted); flex: none; }
.h2h b { text-align: center; flex: 1; }
.h2h em { font-style: normal; font-size: 12px; font-weight: 700; flex: none; }

/* Verdict */
.score-big { font-family: var(--display); font-weight: 900; font-size: 22px; padding: 2px 12px; border-radius: 10px; background: #262320; }
.res { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.res .teams b { font-size: 14px; }
.res-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.res-line .muted { color: var(--muted); }
.ok, .ko { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; flex: none; }
.ok { color: var(--ok); } .ko { color: var(--ko); }
.ok svg, .ko svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }

/* États */
.empty, .error { margin: 0 16px; padding: 28px 18px; text-align: center; border-radius: 16px; border: 1px dashed #444; color: var(--muted); font-size: 14px; line-height: 1.5; }
.error { border: 1px solid #5a2929; background: #2b1717; color: #ff9a9a; }
.error button, .empty button { margin-top: 12px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--orange); background: transparent; color: var(--orange); font-weight: 700; cursor: pointer; }
.skel { height: 210px; border-radius: 18px; background: linear-gradient(90deg, #1a1a1a, #222, #1a1a1a); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.legal { margin: 8px 16px 16px; font-size: 11px; color: var(--faint); line-height: 1.5; }

/* Barre du bas */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; margin: 0 auto; background: #161616; border-top: 1px solid var(--line-soft); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 10; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; font-size: 12px; font-weight: 500; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--orange); font-weight: 700; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

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

/* ===== Version visuelle de l'analyse ===== */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.panel h2 { display: flex; align-items: center; gap: 8px; }
.panel h3 { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--text-2); }
.panel h3 .ico { width: 16px; height: 16px; color: var(--gold); }
.cell .ico { width: 16px; height: 16px; color: var(--gold); margin-bottom: 2px; }
.crest-xs { width: 24px; height: 24px; font-size: 9px; }
.crest-xxs { width: 18px; height: 18px; font-size: 8px; }
.probs > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nul-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #3a3420; color: var(--gold); font-weight: 900; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #262320; color: var(--text-2); font-size: 12px; font-weight: 700; }
.badge.b1 { background: #3a2312; color: var(--orange-txt); }
.badge.b2 { background: #12283a; color: var(--blue-txt); }

.pair { display: flex; align-items: center; gap: 10px; }
.pair-side { display: flex; align-items: center; gap: 6px; flex: none; font-size: 15px; }
.pair-bar { flex: 1; display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.pair-bar span:first-child { background: var(--orange); } .pair-bar span:last-child { background: var(--blue); }

.teamgoals { display: grid; gap: 8px; }
.teamgoals > div { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 8px; }
.teamgoals span { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.teamgoals small { color: var(--muted); font-size: 12px; }
.teamgoals b { font-size: 16px; }

.vrows { display: flex; flex-direction: column; gap: 8px; }
.vrow { display: grid; grid-template-columns: 1fr auto 3.2em auto 3.2em; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.vrow b { text-align: right; font-size: 15px; }

.topscores { display: flex; gap: 8px; }
.ts { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); }
.ts b { font-family: var(--display); font-size: 20px; }
.ts small { color: var(--muted); font-size: 12px; }
.ts.best { background: #3a2312; box-shadow: inset 0 0 0 1px var(--orange); }
.sgrid { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 3px; font-size: 11px; }
.sg-corner { display: flex; align-items: center; justify-content: center; gap: 1px; }
.sg-corner .crest-xs { width: 18px; height: 18px; }
.sg-h { display: grid; place-items: center; color: var(--muted); font-weight: 700; min-height: 22px; }
.sg-c { display: grid; place-items: center; aspect-ratio: 1.3; border-radius: 6px; font-weight: 700; }

.form-head { gap: 8px; justify-content: flex-start; }
.form-head .rank { margin-left: auto; font-size: 13px; color: var(--muted); }
.fpill { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 4px; border-radius: 10px; min-width: 50px; flex: 1; }
.fpill em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.fpill.V { background: #1f5a24; box-shadow: inset 0 -3px 0 #4caf50; }
.fpill.N { background: #45423e; box-shadow: inset 0 -3px 0 #9e9a94; }
.fpill.D { background: #6e1c17; box-shadow: inset 0 -3px 0 #ef5350; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.legend .lg { width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.lg.V { background: #4caf50; } .lg.N { background: #9e9a94; } .lg.D { background: #ef5350; }

.cmp-teams { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.cmp { display: flex; flex-direction: column; gap: 5px; }
.cmp-h { display: grid; grid-template-columns: 3.5em 1fr 3.5em; align-items: center; font-size: 13px; }
.cmp-h span { text-align: center; color: var(--muted); }
.cmp-h b:last-child { text-align: right; }
.cmp-bar { display: flex; height: 6px; gap: 3px; }
.cmp-bar span { border-radius: 3px; }
.cmp-bar span:first-child { background: var(--orange); } .cmp-bar span:last-child { background: var(--blue); }

.h2h-t { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center; }
.h2h-t b { font-family: var(--display); font-size: 17px; }

/* Compositions sur terrain */
.xi-h { display: flex; align-items: center; gap: 8px; }
.xi-f { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.xi-f.home { background: #3a2312; color: var(--orange-txt); } .xi-f.away { background: #12283a; color: var(--blue-txt); }
.xi-last { color: var(--muted); font-size: 12px; margin-top: -6px; }
.pitch { position: relative; aspect-ratio: 68 / 120; border-radius: 12px; overflow: hidden; background: repeating-linear-gradient(180deg, #2f8f4e 0 6.25%, #2a8447 6.25% 12.5%); border: 2px solid rgba(255,255,255,.5); }
.pt-mid { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(255,255,255,.5); }
.pt-circle { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid rgba(255,255,255,.5); border-radius: 50%; }
.pt-box { position: absolute; left: 25%; right: 25%; height: 11%; border: 2px solid rgba(255,255,255,.5); }
.pt-box.t { top: -2px; } .pt-box.b { bottom: -2px; }
.pl { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 22%; }
.pl-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.pl.home .pl-n { background: var(--orange); color: #121212; }
.pl.away .pl-n { background: var(--blue); color: #fff; }
.pl-name { max-width: 100%; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Bloc 2 : compte, pronostics du joueur, Arène ===== */
.account { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 46%; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; }
.account:has(.avatar) { padding-left: 5px; }
.account[aria-current="page"] { border-color: var(--orange); }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; font-family: var(--display); font-weight: 900; font-size: 14px; }
.account .avatar { color: var(--bg); }
.avatar-lg { width: 48px; height: 48px; font-size: 20px; }
.avatar-xl { width: 64px; height: 64px; font-size: 28px; }

.duel-link { display: flex; flex-direction: column; gap: 12px; color: var(--text); }
a.more { color: var(--orange); }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.picks.busy { opacity: .55; pointer-events: none; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; padding: 8px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.pick b { font-family: var(--display); font-size: 20px; line-height: 1.1; }
.pick small { font-size: 11px; color: var(--muted); }
.pick .pts { margin-top: 2px; padding: 2px 8px; border-radius: 999px; background: #2e2a26; color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pick:hover:not(:disabled) { border-color: rgba(255,107,0,.6); }
.pick:active:not(:disabled) { transform: scale(.97); }
.pick[aria-pressed="true"] { border-color: var(--orange); background: #3a2312; }
.pick[aria-pressed="true"] .pts { background: var(--orange); color: var(--bg); }
.pick:disabled { cursor: default; }
.picks.locked .pick:not([aria-pressed="true"]) { opacity: .5; }

.cta, .btn { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--orange); color: var(--bg); font-family: var(--body); font-size: 15px; font-weight: 700; cursor: pointer; }
.cta:disabled, .btn:disabled { opacity: .6; cursor: default; }
.btn { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-danger { border-color: #7a2a24; color: var(--ko); }
.cta-panel .note { font-size: 14px; color: var(--text-2); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form[hidden] { display: none; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.form input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; }
.form input:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.form label small { font-weight: 400; font-size: 12px; color: var(--muted); }
.form-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: #2b1717; border: 1px solid #5a2929; color: #ff9a9a; font-size: 14px; }
.form-err[hidden] { display: none; }
.me-hero { display: flex; align-items: center; gap: 14px; }
.me-hero h1 { margin: 4px 0 0; overflow-wrap: anywhere; }
.danger summary { min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.danger summary::-webkit-details-marker { display: none; }
.danger[open] summary { color: var(--ko); }
.cell sup, .rk sup { font-size: .6em; }
.cell .rule { display: block; font-size: 13px; line-height: 1.3; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; padding-top: 4px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.pod b { max-width: 100%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-pts { font-size: 13px; font-weight: 700; color: var(--gold); }
.pod-step { width: 100%; display: grid; place-items: center; border-radius: 12px 12px 0 0; background: var(--surface-2); font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--muted); }
.pod.p1 .pod-step { height: 76px; background: #3a2312; color: var(--orange); box-shadow: inset 0 3px 0 var(--orange); }
.pod.p2 .pod-step { height: 54px; }
.pod.p3 .pod-step { height: 38px; }
.pod.me b { color: var(--orange-txt); }
.rks { display: flex; flex-direction: column; gap: 6px; }
.rk { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.rk.me { box-shadow: inset 0 0 0 1.5px var(--orange); }
.rk-n { flex: none; width: 22px; text-align: center; font-family: var(--display); font-weight: 900; color: var(--muted); }
.rk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-name small, .rk-pts small { font-size: 11px; font-weight: 400; color: var(--muted); }
.rk-pts { flex: none; font-family: var(--display); font-size: 18px; color: var(--gold); }
.mp { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.mp-teams { flex: none; display: flex; align-items: center; gap: 6px; }
.mp-teams b { font-family: var(--display); font-size: 15px; }
.mp-teams small { color: var(--muted); font-size: 12px; }
.mp-pick { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mp-pick small { font-size: 11px; color: var(--muted); }
.mp-pick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wait { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 20; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px; background: #2a2725; border: 1px solid var(--orange); color: var(--text); font-size: 14px; font-weight: 700; text-align: center; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: #7a2a24; color: #ff9a9a; }
#arena .empty { margin-bottom: 14px; }

/* Puces compétitions en logos */
.chip-logo { width: 58px; height: 58px; padding: 0; border-radius: 16px; display: grid; place-items: center; background: #f4f1ec; border: 2px solid transparent; opacity: .72; transition: opacity .15s, box-shadow .15s; }
.chip-logo img { width: 40px; height: 40px; object-fit: contain; }
.chip-logo[aria-pressed="true"] { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); opacity: 1; }
.chip-logo:has(.chip-name) { width: auto; height: 40px; padding: 0 16px; border-radius: 999px; display: inline-block; background: var(--surface); border: 1px solid var(--line); opacity: 1; box-shadow: none; }
.chip-logo:has(.chip-name)[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); }
.chips { padding-top: 6px; }

/* Espace personnel */
.me-hero p:last-child { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.me-hero p:last-child:empty { display: none; }
.fan { display: inline-block; vertical-align: -3px; margin-left: 6px; }
.tabs.seg { margin: 0; background: var(--surface-2); }
.rks[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.club-row { display: flex; align-items: center; gap: 8px; }
#club-now { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); }
#club-now b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#club-now .muted { color: var(--muted); font-weight: 400; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; flex: none; }
.btn-sm[hidden] { display: none; }
#club-picker { margin-top: 6px; padding: 8px 0 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
#club-picker[hidden] { display: none; }
#club-picker .chips { padding: 6px 10px 10px; }
.club-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0 10px; }
.club-grid .note { grid-column: 1 / -1; }
.club { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; border: 1px solid transparent; background: var(--surface); color: var(--text-2); cursor: pointer; min-width: 0; }
.club:hover { border-color: var(--orange); }
.club small { max-width: 100%; font-size: 10px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold { border-radius: 12px; background: var(--surface-2); }
.fold summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 12px; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary b { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fold .form { padding: 4px 12px 14px; }

/* Logo */
.brand-logo { width: 48px; height: 48px; object-fit: contain; margin: -4px -2px -4px -4px; }
.hero-logo { display: flex; align-items: center; gap: 10px; padding-right: 10px; }
.hero-logo > div { flex: 1; min-width: 0; }
.hero-logo img { flex: none; width: 112px; height: 112px; object-fit: contain; margin: -8px 0; }
.big-logo { display: block; width: 200px; height: 200px; margin: 0 auto 6px; object-fit: contain; }
@media (max-width: 350px) { .hero-logo img { width: 84px; height: 84px; } }

/* Compétitions en colonne à gauche */
.with-rail { display: flex; align-items: flex-start; }
.rail-main { flex: 1; min-width: 0; }
.chips.rail { flex: none; flex-direction: column; align-items: center; gap: 8px; width: 66px; padding: 4px 0 12px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; position: sticky; top: 8px; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px - env(safe-area-inset-bottom)); }
.rail .chip-logo { width: 50px; height: 50px; border-radius: 14px; }
.rail .chip-logo img { width: 36px; height: 36px; }
.rail .chip-all, .rail .chip-logo:has(.chip-name) { width: 50px; height: auto; min-height: 50px; padding: 4px 2px; border-radius: 14px; display: grid; place-items: center; font-size: 10px; line-height: 1.15; font-weight: 700; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.rail .chip-all { font-size: 13px; }
.rail-main .hero, .rail-main .panel, .rail-main .empty, .rail-main .error { margin-left: 10px; margin-right: 12px; }
.rail-main .list { padding-left: 10px; padding-right: 12px; }
.rail-main .hero { padding: 16px 14px; }
.rail-main .hero h1 { font-size: 23px; }
.rail-main .hero-logo img { width: 76px; height: 76px; }
.rail-main .duel, .rail-main .res { padding-left: 10px; padding-right: 10px; }
.rail-main .picks { gap: 6px; }
.rail-main .pick .pts { padding: 2px 6px; font-size: 11px; }
@media (max-width: 350px) { .rail-main .hero-logo img { display: none; } .rail-main .team b { font-size: 13px; } .rail-main .score-big { font-size: 18px; padding: 2px 8px; } }

/* Calendrier des jours de match */
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 12px 12px 10px; padding-bottom: 2px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days[hidden] { display: none; }
.day-btn { flex: none; min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 8px 7px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.day-btn span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.day-btn b { font-family: var(--display); font-size: 20px; line-height: 1.1; color: var(--text); }
.day-btn i { font-style: normal; font-size: 10.5px; white-space: nowrap; }
.day-btn[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--bg); }
.day-btn[aria-pressed="true"] b { color: var(--bg); }

/* Boutons de prono sans points : plus compacts, le choix du joueur écrit dans le bouton */
.pick { min-height: 62px; }
.pick[aria-pressed="true"] small { color: var(--orange-txt); font-weight: 700; }

/* Pages d'information (à propos, conditions, confidentialité, mentions légales) */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.legal-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 28px; display: inline-flex; align-items: center; }
.doc { gap: 10px; }
.doc h2 { margin-top: 10px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.doc ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }
.doc .maj { font-size: 12px; color: var(--muted); }
.check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: 13px !important; line-height: 1.45; color: var(--text-2); }
.check input { flex: none; width: 22px; height: 22px; margin: 0; padding: 0; accent-color: var(--orange); }
.check a { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   VERSION ORDINATEUR (écran de 1000 px et plus)
   En dessous, c'est la mise en page téléphone ci-dessus qui s'applique.
   ============================================================ */
@media (min-width: 1000px) {
  .app { max-width: 1240px; padding-bottom: 24px; }

  /* En-tête fixe, avec la navigation au centre (plus de barre en bas) */
  .topbar { position: sticky; top: 0; z-index: 9; height: 76px; padding: 0 24px; background: rgba(18,18,18,.94); backdrop-filter: blur(8px); }
  .brand-name { font-size: 24px; }
  .account { max-width: 260px; min-height: 44px; font-size: 15px; }
  .tabbar { top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: auto; max-width: none; height: 76px; display: flex; align-items: center; gap: 6px; padding: 0; background: transparent; border: 0; }
  .tabbar a { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; transition: background .15s, color .15s; }
  .tabbar a:hover { color: var(--text); background: var(--surface); }
  .tabbar a[aria-current="page"] { background: #3a2312; }
  .toast { bottom: 32px; }
  main { padding-top: 12px; }
  .legal { margin: 28px 24px 8px; font-size: 12px; }

  /* Colonne des compétitions : logo + nom */
  .chips.rail { width: 236px; align-items: stretch; gap: 6px; padding: 4px 4px 16px 24px; top: 92px; max-height: calc(100vh - 112px); scrollbar-width: none; }
  .rail .chip-logo, .rail .chip-all, .rail .chip-logo:has(.chip-name) { width: 100%; height: 54px; min-height: 54px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 12px 0 7px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: none; opacity: 1; color: var(--text-2); font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap; }
  .rail .chip-logo img { flex: none; width: 40px; height: 40px; padding: 4px; border-radius: 10px; background: #f4f1ec; }
  .rail .chip-logo::after { content: attr(aria-label); overflow: hidden; text-overflow: ellipsis; }
  .rail .chip-logo:has(.chip-name)::after { content: none; }
  .rail .chip-all { justify-content: center; padding: 0 12px; font-weight: 700; }
  .rail .chip:hover { border-color: rgba(255,107,0,.6); color: var(--text); }
  .rail .chip[aria-pressed="true"] { background: #3a2312; border-color: var(--orange); box-shadow: none; color: var(--text); font-weight: 700; }
  .rail .chip-all[aria-pressed="true"] { background: var(--orange); color: var(--bg); }

  .rail-main .hero, .rail-main .panel, .rail-main .empty, .rail-main .error { margin-left: 16px; margin-right: 24px; }
  .rail-main .list { padding-left: 16px; padding-right: 24px; }
  .rail-main .hero { padding: 24px 28px; }
  .rail-main .hero h1, .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; }
  .rail-main .hero-logo img { width: 120px; height: 120px; margin: -14px 0; }
  .days { margin: 0 24px 14px 16px; }
  .day-btn { min-width: 76px; padding: 10px 12px 9px; }
  .day-btn:hover { border-color: rgba(255,107,0,.6); }

  /* Listes de matchs sur deux colonnes */
  .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .list > .day { grid-column: 1 / -1; margin-top: 10px; }
  .rail-main .duel, .rail-main .res { padding: 18px; }
  .rail-main .picks { gap: 8px; }
  .crest { width: 52px; height: 52px; }
  .crest-lg { width: 84px; height: 84px; }
  .crest-xs { width: 24px; height: 24px; } .crest-xxs { width: 18px; height: 18px; }
  .team b { font-size: 15px; }

  /* Analyse d'un match : en-tête centré, panneaux sur deux colonnes */
  #view[data-page="duel"] > .back, #view[data-page="duel"] > .match-hero, #view[data-page="duel"] > .panel, #view[data-page="duel"] > .tabs { max-width: 820px; margin-left: auto; margin-right: auto; }
  #view[data-page="duel"] > .match-hero, #view[data-page="duel"] > .panel, #view[data-page="duel"] > .tabs { margin-bottom: 16px; }
  .match-hero { padding: 28px 24px; }
  .match-hero .team b { font-size: 20px; }
  .kickoff strong { font-size: 36px; }
  .tabs button { height: 46px; font-size: 15px; }
  #view[data-page="duel"] > [data-panel]:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; padding: 0 24px; }
  #view[data-page="duel"] > [data-panel] > .panel { margin: 0; }
  #view[data-page="duel"] > [data-panel] > .panel:only-child { grid-column: 1 / -1; width: 100%; max-width: 620px; justify-self: center; }

  /* Arène : classement à gauche, le reste à droite */
  #view[data-page="arene"] > .hero, #view[data-page="arene"] > .chips { margin-left: 24px; margin-right: 24px; }
  #view[data-page="arene"] > .chips { padding-left: 0; padding-right: 0; }
  #arena { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; padding: 0 24px; }
  #arena > * { margin: 0; grid-column: 2; }
  #arena > .board { grid-column: 1; grid-row: 1 / span 4; }
  #arena > .error, #arena > .list { grid-column: 1 / -1; }
  .pod b { font-size: 16px; } .pod.p1 .pod-step { height: 110px; } .pod.p2 .pod-step { height: 78px; } .pod.p3 .pod-step { height: 54px; }
  .avatar-lg { width: 60px; height: 60px; font-size: 24px; }

  /* Mon espace : deux colonnes */
  #view[data-page="espace"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; padding: 12px 24px 0; }
  #view[data-page="espace"] > * { margin: 0; }
  #view[data-page="espace"] > .hero, #view[data-page="espace"] > .list, #view[data-page="espace"] > .error { grid-column: 1 / -1; }

  /* Connexion et pages d'information : colonne centrale */
  #view[data-page="compte"] > * { max-width: 480px; margin-left: auto; margin-right: auto; }
  #view[data-page="compte"] > .panel, #view[data-page="compte"] > .hero, #view[data-page="compte"] > .tabs { margin-bottom: 16px; }
  #view[data-page="doc"] > * { max-width: 780px; margin-left: auto; margin-right: auto; }
  #view[data-page="doc"] > .hero { margin-bottom: 16px; }
  .doc { padding: 28px 32px; }
  .doc p, .doc li { font-size: 15px; }
}

/* Page d'accueil « Tout » : rappel de la compétition sur chaque carte */
.lg-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 0 10px; min-width: 0; font-size: 12px; font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-tag img { flex: none; width: 18px; height: 18px; padding: 2px; border-radius: 5px; background: #f4f1ec; object-fit: contain; }
.duel-top .tag, .duel-top .live { flex: none; }
.rail .chip-all[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--bg); }

/* Mon espace : onglets Mon jeu / Paramètres (Général, Sécurité) */
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button .ico { width: 16px; height: 16px; }
.tabs[hidden] { display: none; }
.tabs.sub { background: transparent; padding: 0; gap: 8px; }
.tabs.sub button { height: 40px; border: 1px solid var(--line); background: var(--surface); }
.tabs.sub button[aria-selected="true"] { background: #3a2312; border-color: var(--orange); color: var(--text); }
@media (min-width: 1000px) {
  #view[data-page="espace"] > .tabs { grid-column: 1 / -1; width: 100%; max-width: 520px; }
  #view[data-page="espace"] > .solo { grid-column: 1 / -1; width: 100%; max-width: 640px; justify-self: center; }
  #view[data-page="espace"] > .tabs { justify-self: center; }
  #view[data-page="espace"] { align-content: start; }
}
