:root {
  --bg: #0a0806; --panel: rgba(20,16,11,.86); --panel2: rgba(38,30,18,.92); --line: #4a3a1c; --text: #f4ecdc; --muted: #b0a389;
  --brand: #f2a91b; --brand2: #ffc24a; --on-brand: #1a1204; --ok: #2ecc71; --warn: #f39c12; --bad: #e74c3c; --info: #5aa9e6;
  --gold-glow: 0 0 18px rgba(242,169,27,.25);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--text);
  background: linear-gradient(180deg, rgba(10,8,6,.6), rgba(10,8,6,.8) 55%, rgba(10,8,6,.93)), url(/static/bg.webp) center top / cover no-repeat fixed, var(--bg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand2); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; margin: 0 0 1rem; font-style: italic; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 0 22px rgba(242,169,27,.35); } h2 { font-size: 1.15rem; margin: 0 0 .75rem; } h3 { margin: 0 0 .5rem; }
code { background: var(--panel2); padding: .1rem .35rem; border-radius: 6px; font-size: .85em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .pre { white-space: pre-wrap; word-break: break-word; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: .5rem 1.25rem; background: rgba(10,8,6,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--brand); box-shadow: 0 2px 18px rgba(242,169,27,.18); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; } .brand img { height: 52px; width: auto; max-width: 60vw;  display: block; filter: drop-shadow(0 0 8px rgba(242,169,27,.35)); }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.nav a { color: var(--muted); padding: .4rem .8rem; border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; } .nav a:hover, .nav a.on { background: var(--panel2); color: var(--brand2); text-decoration: none; box-shadow: inset 0 -2px 0 var(--brand); }
.userbox { display: flex; align-items: center; gap: .6rem; margin: 0; } .userbox img { border-radius: 50%; }
.role { padding: .1rem .45rem; border-radius: 99px; font-size: .7rem; background: var(--panel2); color: var(--muted); }
.role-staff { background: #5a3d0a; color: #ffd27a; } .role-captain { background: #1f4a3a; color: #8df0c0; } .role-moderator { background: #2c3a5a; color: #a9c4ff; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 1rem 2.5rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; backdrop-filter: blur(4px); box-shadow: 0 6px 22px rgba(0,0,0,.4); }
.center { text-align: center; } .narrow { max-width: 460px; margin: 3rem auto; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; } .row form { margin: 0; } .between { justify-content: space-between; }
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .grid2 .card { margin-bottom: 0; } .grid2 { margin-bottom: 1rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } .cards .card { margin: 0; } .cards p { margin: .3rem 0; }

.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 1rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .15rem; color: var(--muted); }
.stat .n { font-size: 2rem; font-weight: 800; color: var(--text); } .small-stats .stat { padding: .6rem; } .small-stats .n { font-size: 1.4rem; }

.btn { display: inline-block; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .95rem; font: inherit; cursor: pointer; }
.btn:hover { border-color: var(--brand); text-decoration: none; } .btn-primary { background: linear-gradient(180deg, var(--brand2), var(--brand)); border-color: var(--brand); color: var(--on-brand); font-weight: 700; } .btn-primary:hover { background: var(--brand2); box-shadow: var(--gold-glow); }
.btn-danger { background: #4a1f27; border-color: #7a2c39; color: #ffb3bd; } .btn-ghost { background: transparent; } .btn-sm { padding: .25rem .6rem; font-size: .85rem; } .btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; }

input, select, textarea { background: rgba(8,6,4,.85); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; font: inherit; max-width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.form { display: flex; flex-direction: column; gap: .9rem; max-width: 640px; } .form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; }
label.inline { flex-direction: row; align-items: center; gap: .4rem; font-weight: 600; } label.inline input { width: 5rem; }
.filters { margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--brand2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; } .table-wrap { overflow-x: auto; padding: .4rem; }
.list { list-style: none; margin: 0 0 .75rem; padding: 0; } .list li { padding: .5rem 0; border-bottom: 1px solid var(--line); } .list li:last-child { border: 0; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; } dt { color: var(--muted); } dd { margin: 0; }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .75rem; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge-lg { font-size: .9rem; padding: .25rem .8rem; }
.b-official { background: #173a29; border-color: #1f6b44; color: #7ff0b0; } .b-prov { background: #4a3510; border-color: #7a5a1a; color: #ffcf7a; }
.s-pending { color: var(--info); } .s-accepted { color: #7ff0b0; } .s-in_progress { color: var(--warn); } .s-score_pending { color: #ffcf7a; } .s-finished { color: var(--ok); } .s-cancelled { color: var(--muted); text-decoration: line-through; }
.score-official { color: var(--ok); } .score-prov { color: var(--warn); }

.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 1rem; }
.scoreboard .team { display: flex; flex-direction: column; font-size: 1.2rem; font-weight: 700; } .scoreboard .big { font-size: 2.4rem; font-weight: 800; }

.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash-ok { background: #173a29; border-color: #1f6b44; color: #b9f7d4; } .flash-error { background: #4a1f27; border-color: #7a2c39; color: #ffc9d0; }

@media (max-width: 640px) {
  .topbar { padding: .6rem .8rem; } .userbox span { display: none; }
  .scoreboard { grid-template-columns: 1fr; } .scoreboard .big { font-size: 2rem; }
  dl { grid-template-columns: 1fr; } h1 { font-size: 1.3rem; }
}

/* Images */
.logo { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; vertical-align: middle; background: var(--panel2); }
.logo-sm { width: 28px; height: 28px; border-radius: 6px; margin-right: .35rem; }
.logo-lg { width: 72px; height: 72px; margin-right: .5rem; }
.post-img { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: .6rem; background: var(--panel2); }
.proof { max-width: 100%; max-height: 480px; border-radius: 8px; border: 1px solid var(--line); }
.check input { width: auto; }

/* Mercato : réponses */
details.reply { margin: .5rem 0; }
details.reply > summary { cursor: pointer; list-style: none; display: inline-block; }
details.reply > summary::-webkit-details-marker { display: none; }
details.reply[open] > summary { margin-bottom: .5rem; }

/* Page de connexion */
.login-hero { text-align: center; max-width: 560px; margin: 2rem auto; }
.login-hero img.logo-xl { width: min(520px, 90%); height: auto; filter: drop-shadow(0 0 22px rgba(242,169,27,.45)); }
.login-hero .tagline { color: var(--brand2); font-style: italic; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: .5rem 0 1.2rem; }
.stat .n { color: var(--brand2); }
@media (max-width: 640px) { .brand img { height: 42px; width: auto; } .topbar { padding: .5rem .75rem; gap: .5rem; } .nav { order: 3; flex: 1 1 100%; flex-wrap: wrap; gap: .15rem; } .nav a { white-space: nowrap; padding: .35rem .5rem; font-size: .75rem; } .userbox { margin-left: auto; } .container { padding-top: 1rem; } }

/* Pages légales */
.legal { max-width: 800px; margin: 0 auto; } .legal h2 { color: var(--brand2); margin-top: 1.6rem; } .legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.2rem; } .todo { background: #5a3d0a; color: #ffd27a; padding: .05rem .4rem; border-radius: 6px; font-weight: 700; }

/* ===================== Identité FFC : soirée de match ===================== */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(115deg, transparent 38%, rgba(242,169,27,.09) 46%, transparent 54%),
    linear-gradient(65deg, transparent 46%, rgba(242,169,27,.07) 54%, transparent 62%); }
body::after { content: ""; position: fixed; inset: -50% 0 0 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,200,90,.9), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,200,90,.8), transparent),
    radial-gradient(2px 2px at 80% 20%, rgba(255,215,130,.7), transparent),
    radial-gradient(1px 1px at 35% 85%, rgba(255,200,90,.8), transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, rgba(255,215,130,.8), transparent);
  background-size: 420px 420px; animation: dust 60s linear infinite; }
@keyframes dust { to { background-position: -420px 420px; } }
.topbar, .container, .foot { position: relative; z-index: 1; }
.topbar { position: sticky; z-index: 20; } /* toujours au-dessus du contenu qui défile */

h1::after { content: ""; display: block; width: 130px; height: 5px; margin-top: .45rem; transform: skewX(-30deg);
  background: linear-gradient(90deg, var(--brand), rgba(242,169,27,0)); border-radius: 2px; }
h2 { text-transform: uppercase; letter-spacing: .05em; font-style: italic; font-size: 1.05rem; }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transition: transform .6s; }
.btn-primary:hover::after { transform: translateX(120%) skewX(-20deg); }
.role-captain::before { content: "♛ "; color: var(--brand2); } .role-staff::before { content: "♛ "; }

/* Blason */
.crest { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid var(--brand); background: #120d06; box-shadow: 0 0 14px rgba(242,169,27,.3); vertical-align: middle; }
.crest-sm { width: 30px; height: 30px; font-size: .7rem; border-width: 1px; } .crest-md { width: 56px; height: 56px; font-size: 1.1rem; } .crest-lg { width: 92px; height: 92px; font-size: 1.8rem; }
.crest-ini { background: linear-gradient(160deg, var(--brand2), #8a5a06); color: var(--on-brand); font-weight: 900; font-style: italic; }

/* Accueil */
.hero { text-align: center; padding: .5rem 0 1rem; }
.hero-logo { width: min(460px, 90%); height: auto; filter: drop-shadow(0 0 24px rgba(242,169,27,.5)); }
.hero .tagline { margin: .3rem 0 0; color: var(--brand2); font-style: italic; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: rgba(10,8,6,.7); margin-bottom: 1.25rem; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 1.4rem; padding: .55rem 0; animation: ticker 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { color: var(--text); } .ticker strong { color: var(--brand2); } .ticker .sep { color: var(--brand); }
@keyframes ticker { to { transform: translateX(-50%); } }
.affiche { text-align: center; margin-bottom: 1.25rem; padding: 1.4rem 1rem 1.6rem; border: 1px solid var(--brand); border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(242,169,27,.22), transparent 65%), var(--panel); box-shadow: 0 0 30px rgba(242,169,27,.15), 0 8px 26px rgba(0,0,0,.5); }
.eyebrow { margin: 0; color: var(--brand2); text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; font-weight: 700; }
.affiche-teams { display: flex; align-items: center; justify-content: center; gap: clamp(.8rem, 4vw, 3rem); margin: 1rem 0; }
.affiche-teams .side { display: flex; flex-direction: column; align-items: center; gap: .5rem; max-width: 170px; font-size: 1.1rem; }
.vs { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 900; font-style: italic; color: var(--brand2); text-shadow: 0 0 22px rgba(242,169,27,.6); }
.affiche-date { margin: 0 0 .3rem; color: var(--muted); } .countdown { font-size: 1.4rem; font-weight: 800; color: var(--text); margin: .2rem 0 1rem; min-height: 1.6em; font-variant-numeric: tabular-nums; }

/* Billets de match */
.tickets { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.ticket { position: relative; display: flex; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.ticket:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--gold-glow); text-decoration: none; }
.stub { display: flex; flex-direction: column; justify-content: center; gap: .3rem; padding: .8rem; min-width: 92px; max-width: 110px; border-right: 2px dashed var(--line); background: rgba(242,169,27,.06); text-align: center; }
.stub-n { font-weight: 900; font-style: italic; color: var(--brand2); font-size: 1.1rem; } .stub-d { font-size: .72rem; color: var(--muted); }
.ticket::before, .ticket::after { content: ""; position: absolute; left: 92px; width: 18px; height: 18px; border-radius: 50%; background: #0b0907; border: 1px solid var(--line); }
.ticket::before { top: -10px; } .ticket::after { bottom: -10px; }
.ticket-main { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; padding: .9rem .8rem 2.1rem; min-width: 0; }
.ticket .side { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; min-width: 0; }
.tname { font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.ticket .mid { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.tscore { font-size: 1.7rem; font-weight: 900; font-style: italic; white-space: nowrap; } .tvs { font-size: 1.3rem; font-weight: 900; font-style: italic; color: var(--muted); }
.stamp { position: absolute; right: 10px; bottom: 6px; transform: rotate(-6deg); padding: .1rem .5rem; border: 2px solid; border-radius: 6px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; opacity: .95; }
.stamp-official { color: var(--brand2); border-color: var(--brand2); box-shadow: 0 0 10px rgba(242,169,27,.4); background: rgba(242,169,27,.08); }
.stamp-prov { color: #ffcf7a; border-color: #ffcf7a; border-style: dashed; opacity: .75; }

/* Podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; margin: 0 0 1.5rem; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; flex: 0 1 200px; padding: 1rem .6rem; color: var(--text); text-align: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: 14px 14px 0 0; background: linear-gradient(180deg, rgba(242,169,27,.18), var(--panel)); }
.step:hover { text-decoration: none; border-color: var(--brand); }
.step-1 { min-height: 250px; border-color: var(--brand); box-shadow: 0 0 28px rgba(242,169,27,.3); } .step-2 { min-height: 205px; } .step-3 { min-height: 175px; }
.crown { font-size: 2rem; color: var(--brand2); text-shadow: 0 0 16px rgba(242,169,27,.7); line-height: 1; }
.pname { overflow-wrap: anywhere; } .ppts { color: var(--brand2); font-weight: 800; }
.rank { margin-top: auto; font-style: italic; font-weight: 900; font-size: 1.5rem; color: var(--brand); }

/* Cartes Mercato façon carte de joueur */
.cards .fut { position: relative; border-radius: 16px 16px 26px 26px; border: 1px solid var(--brand);
  background: radial-gradient(circle at 30% 0%, rgba(242,169,27,.28), transparent 55%), linear-gradient(180deg, rgba(40,30,12,.95), var(--panel)); }
.fut-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.fut-pos { font-size: 2rem; font-weight: 900; font-style: italic; line-height: 1; color: var(--brand2); text-shadow: 0 0 16px rgba(242,169,27,.45); overflow-wrap: anywhere; max-width: 70%; }
.fut h3 { text-transform: uppercase; letter-spacing: .05em; }
.chip { display: inline-block; padding: .1rem .6rem; border: 1px solid var(--line); border-radius: 99px; background: rgba(242,169,27,.1); font-size: .8rem; }

@media (max-width: 640px) {
  .tickets { grid-template-columns: 1fr; } .stub { min-width: 74px; padding: .5rem; } .ticket::before, .ticket::after { left: 74px; }
  .podium { gap: .4rem; } .step { flex-basis: 33%; padding: .6rem .3rem; font-size: .85rem; } .crest-lg { width: 70px; height: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .ticker-track { animation: none; } .ticker { overflow-x: auto; } .btn-primary::after { display: none; }
}

/* Mercato : onglets clubs / joueurs */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tab { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-weight: 700; background: rgba(10,8,6,.6); }
.tab:hover { text-decoration: none; border-color: var(--brand); color: var(--text); }
.tab.on { background: linear-gradient(180deg, var(--brand2), var(--brand)); color: var(--on-brand); border-color: var(--brand); }
.tab-cta { margin-left: auto; border-style: dashed; color: var(--brand2); }
.cards .fut-player { background: radial-gradient(circle at 70% 0%, rgba(242,169,27,.3), transparent 55%), linear-gradient(180deg, rgba(20,24,34,.95), var(--panel)); }

/* Tournois et palmarès */
.trn { display: block; color: var(--text); } .trn:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--gold-glow); }
.trn-finished { opacity: .9; } .trn-cancelled { opacity: .55; } .prizes { color: var(--brand2); font-weight: 700; }
.round-title { margin-top: 1.6rem; } .entrants .chip { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem .2rem .25rem; color: var(--text); }
.hall { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 1rem; }
.hall .card { margin: 0; } .trophy { border-color: var(--brand); background: radial-gradient(circle at 50% 0%, rgba(242,169,27,.2), transparent 60%), var(--panel); }
.trophy-1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .6rem 0; font-size: 1.1rem; } .trophy-1 .crown { font-size: 1.6rem; }

/* ---- Staff, forme, bannières, jour de match */
.count-badge{display:inline-block;min-width:1.3em;padding:0 .35em;border-radius:999px;background:var(--gold,#f2a91b);color:#0a0806;font-size:.75em;font-weight:700;text-align:center}
.form-chips{display:inline-flex;gap:3px;vertical-align:middle}
.fchip{display:inline-block;width:1.5em;height:1.5em;line-height:1.5em;text-align:center;border-radius:4px;font-size:.75em;font-weight:700;color:#0a0806}
.f-V{background:#3ecf6e}.f-N{background:#9a9a9a}.f-D{background:#e5484d}
.banners{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:1.2rem;margin:1rem 0}
.banner{display:flex;flex-direction:column;align-items:center;text-decoration:none;color:inherit}
.banner-pole{width:100%;height:6px;border-radius:3px;background:linear-gradient(90deg,#6b4a12,#f2a91b,#6b4a12)}
.banner-flag{width:86%;padding:1.2rem .6rem 2rem;display:flex;flex-direction:column;align-items:center;gap:.35rem;text-align:center;background:linear-gradient(180deg,#1a140c,#0f0b07);border:1px solid #3a2c14;border-top:0;clip-path:polygon(0 0,100% 0,100% 90%,50% 100%,0 90%);transform-origin:top center;transition:transform .25s}
.banner:hover .banner-flag{animation:wave 1.2s ease-in-out infinite}
.banner-pts{color:#f2a91b;font-weight:700}
@keyframes wave{0%,100%{transform:rotate(0)}25%{transform:rotate(1.5deg)}75%{transform:rotate(-1.5deg)}}
.matchday{margin:1rem 0;padding:.9rem 1.1rem;border:1px solid #f2a91b;border-radius:12px;background:linear-gradient(90deg,rgba(242,169,27,.18),rgba(242,169,27,.04));animation:mdglow 2.4s ease-in-out infinite}
.matchday-title{margin:0 0 .5rem;font-weight:800;letter-spacing:.12em;color:#f2a91b}
.live-dot{display:inline-block;width:.6em;height:.6em;border-radius:50%;background:#e5484d;margin-right:.4em;animation:blink 1s infinite}
.matchday-list{display:flex;flex-wrap:wrap;gap:.5rem 1.2rem}
.matchday-item{color:inherit;text-decoration:none}
.vs-sm{color:#f2a91b;font-size:.8em;margin:0 .3em}
@keyframes blink{50%{opacity:.25}}
@keyframes mdglow{50%{box-shadow:0 0 18px rgba(242,169,27,.35)}}
@media (prefers-reduced-motion:reduce){.matchday,.live-dot,.banner:hover .banner-flag{animation:none}}

/* ---- v12 : réglages, classements de poule */
.setting{align-items:flex-end;gap:.6rem;margin-bottom:.6rem}
.setting label{flex:1 1 260px;display:flex;flex-direction:column;gap:.25rem}
tr.qualified td{background:rgba(242,169,27,.12)}

/* ---- Double cadre (bordures « écusson ») : deux filets dorés séparés par un jour */
:root { --frame: #8a6a22; --frame-hi: #f2a91b; }
.card, .stat, .ticket, .matchday, .affiche, .banner-flag { border: 4px double var(--frame); }
.trophy, .cards .fut { border: 4px double var(--frame-hi); }
.card:hover, .ticket:hover, a.card:hover { border-color: var(--frame-hi); }
.btn { border: 3px double var(--frame); padding: .4rem .85rem; }
.btn:hover { border-color: var(--frame-hi); }
.btn-primary { border: 3px double #6b4a08; }
.btn-primary:hover { border-color: #6b4a08; }
.btn-danger { border-color: #7a2c39; }
.btn-sm { padding: .2rem .5rem; }
.banner-flag { border-top: 0; }
@media (max-width: 640px) { .card, .stat { border-width: 3px; } }
@media (max-width: 640px) {
  .tname { overflow-wrap: break-word; word-break: normal; hyphens: auto; font-size: .8rem; }
  .stub { min-width: 60px; max-width: 70px; padding: .4rem .3rem; } .stub-d { font-size: .62rem; }
  .ticket::before, .ticket::after { left: 60px; }
  .ticket-main { gap: .3rem; padding: .7rem .4rem 2.1rem; }
}

/* ---- Vrai menu : liens principaux + menus déroulants (<details>, sans script) + burger mobile */
.topbar { flex-wrap: nowrap; }
.menu { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; }
.menu .nav { flex: 1; flex-wrap: nowrap; align-items: center; }
.burger { display: none; margin-left: auto; background: transparent; border: 3px double var(--frame); border-radius: 8px; padding: .45rem .5rem; cursor: pointer; flex-direction: column; gap: 4px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--brand2); border-radius: 2px; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; color: var(--muted); padding: .4rem .8rem; border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; display: flex; align-items: center; gap: .4rem; user-select: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.dd[open] > summary, .dd > summary:hover, .dd > summary.on { background: var(--panel2); color: var(--brand2); box-shadow: inset 0 -2px 0 var(--brand); }
.dd-panel { position: absolute; left: 0; top: calc(100% + 6px); min-width: 180px; background: var(--panel2); border: 3px double var(--frame); border-radius: 10px; padding: .3rem; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,.6); z-index: 30; }
.dd-right { left: auto; right: 0; }
.dd-panel a, .dd-btn { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text, #f3ead7); padding: .5rem .7rem; border-radius: 6px; font: inherit; font-size: .9rem; cursor: pointer; }
.dd-panel a:hover, .dd-btn:hover, .dd-panel a.on { background: rgba(242,169,27,.15); color: var(--brand2); text-decoration: none; }
.dd-panel form { margin: 0; border-top: 1px solid rgba(242,169,27,.25); margin-top: .2rem; padding-top: .2rem; }
.userdd > summary { text-transform: none; letter-spacing: 0; } .userdd > summary img { border-radius: 50%; }
@media (max-width: 1100px) {
  .burger { display: flex; }
  .topbar { flex-wrap: wrap; }
  .menu { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: .5rem; padding: .5rem 0 .25rem; }
  .menu.open { display: flex; }
  .menu .nav { order: 0; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: .15rem; }
  .menu .nav > a, .dd > summary { padding: .65rem .8rem; font-size: .9rem; white-space: normal; }
  .dd-panel, .dd-right { position: static; box-shadow: none; margin: .2rem 0 .3rem .8rem; min-width: 0; }
  .userdd { border-top: 1px solid rgba(242,169,27,.25); padding-top: .4rem; }
  .userdd > summary span { display: inline; }
}

/* ---- Barre de recherche */
.search { display: flex; align-items: center; margin: 0; border: 3px double var(--frame); border-radius: 10px; background: rgba(0,0,0,.35); }
.search:focus-within { border-color: var(--frame-hi); }
.search input { background: transparent; border: 0; color: inherit; padding: .35rem .6rem; width: 11rem; font: inherit; font-size: .9rem; outline: none; min-width: 0; }
.search button { background: transparent; border: 0; cursor: pointer; padding: .3rem .55rem; font-size: .95rem; }
ul.plain { list-style: none; margin: 0; padding: 0; } ul.plain li { padding: .45rem 0; border-bottom: 1px solid rgba(242,169,27,.15); } ul.plain li:last-child { border-bottom: 0; }
@media (max-width: 1100px) { .search { order: -1; } .search input { width: 100%; flex: 1; } }

.bell { position: relative; display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .5rem; border-radius: 8px; color: var(--muted); font-size: 1.05rem; text-decoration: none; } .bell:hover { background: var(--panel2); text-decoration: none; }
@media (max-width: 1100px) { .bell { padding: .65rem .8rem; } }

/* Écrans moyens : barre compacte pour que tout tienne sur une ligne sans débordement */
.menu .nav > a, .dd > summary { white-space: nowrap; }
@media (min-width: 1101px) and (max-width: 1280px) {
  .menu { gap: .4rem; }
  .menu .nav > a, .dd > summary { padding: .4rem .5rem; font-size: .8rem; letter-spacing: .02em; }
  .search input { width: 7rem; }
  .userdd > summary > span { display: none; }
}
@media (min-width: 1281px) { .userdd > summary > span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Feuille de match (joueurs) : colonnes compactes, tient sur un téléphone */
table.sheet { width: 100%; table-layout: fixed; }
table.sheet th, table.sheet td { padding: .3rem .25rem; }
table.sheet th:nth-child(2), table.sheet td:nth-child(2), table.sheet th:nth-child(3), table.sheet td:nth-child(3) { width: 3.8rem; }
table.sheet th:nth-child(4), table.sheet td:nth-child(4) { width: 2.6rem; text-align: center; }
table.sheet input { width: 100%; min-width: 0; padding: .4rem .35rem; }
table.sheet input[type=radio] { width: auto; }
.card h3 { margin-top: 1.1rem; }

/* Rôles : Owner > LeadAdmin > Admin > Modérateur ; GM / CO-GM ; Joueur ; F/A */
.role-owner { background: #6b1f2a; color: #ffc2cb; } .role-leadadmin { background: #5a3d0a; color: #ffd27a; } .role-admin { background: #4a3a14; color: #f3d98a; }
.role-gm { background: #1f4a3a; color: #8df0c0; } .role-cogm { background: #1d3f4a; color: #9fe3f5; }
.role-player { background: #2c2c3a; color: #cfd2ff; } .role-freeagent { background: #3a2c2c; color: #ffd0b0; }
.role-owner::before { content: "♚ "; } .role-leadadmin::before, .role-admin::before { content: "♛ "; } .role-gm::before { content: "♛ "; color: var(--brand2); }

/* Calendrier : 7 jours, en grille sur grand écran, en liste sur mobile */
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.cal-day h2 { font-size: .95rem; text-transform: capitalize; margin-top: 0; }

/* ---- Tableau de tournoi (arbre) ---- */
.crest-xs { width: 22px; height: 22px; font-size: .55rem; border-width: 1px; }
.bracket-wrap { overflow-x: auto; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; }
.bracket { --gap: 44px; --cardw: 224px; display: grid; grid-auto-flow: column; grid-auto-columns: var(--cardw); column-gap: var(--gap); width: max-content; align-items: stretch; padding: .25rem .1rem; }
.br-col { display: flex; flex-direction: column; min-width: 0; }
.br-head { background: #d9d9d9; color: #141414; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .35rem .6rem; border-radius: 6px; margin-bottom: .6rem; }
.br-cells { flex: 1; display: flex; flex-direction: column; }
.br-cell { flex: 1; display: flex; align-items: center; padding: .4rem 0; position: relative; min-height: 6.4rem; }
.br-card { position: relative; display: block; width: 100%; background: #1c1c1c; border: 1px solid #2c2c2c; border-radius: 6px; color: var(--text); overflow: visible; }
a.br-card:hover { border-color: var(--brand); text-decoration: none; }
.br-card.is-bye { opacity: .85; }
.br-row { display: flex; align-items: center; gap: .5rem; min-height: 2.6rem; padding: .35rem .6rem; border-left: 3px solid transparent; }
.br-row + .br-row { border-top: 1px solid #2c2c2c; }
.br-row .br-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.br-row .br-score { font-weight: 800; min-width: 1.2rem; text-align: right; }
.br-row.is-win { border-left-color: var(--brand); font-weight: 700; }
.br-row.is-lose { color: #8d8d8d; } .br-row.is-lose .crest { opacity: .55; }
.br-row.is-tbd { color: var(--muted); }
.br-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #444; background: #151515; flex: none; }
.br-crown { color: var(--brand2); }
.br-foot { display: block; padding: .15rem .6rem .3rem; font-size: .72rem; color: var(--muted); border-top: 1px solid #2c2c2c; }
.br-third { margin-top: 1rem; width: var(--cardw, 224px); max-width: 100%; }
/* lignes de liaison : trait vers la droite, trait vertical qui relie les deux matchs d'une paire, trait d'entrée du tour suivant */
.br-col:not(.br-last) .br-cell::after { content: ""; position: absolute; top: 50%; right: calc(var(--gap) / -2); width: calc(var(--gap) / 2); border-top: 2px solid #3a3a3a; }
.br-col:not(.br-last) .br-cell::before { content: ""; position: absolute; right: calc(var(--gap) / -2); border-right: 2px solid #3a3a3a; }
.br-col:not(.br-last) .br-cell.br-up::before { top: 50%; bottom: 0; }
.br-col:not(.br-last) .br-cell.br-down::before { top: 0; bottom: 50%; }
.br-col + .br-col .br-card::before { content: ""; position: absolute; top: 50%; left: calc(var(--gap) / -2); width: calc(var(--gap) / 2); border-top: 2px solid #3a3a3a; }
@media (max-width: 640px) { .bracket { --gap: 32px; --cardw: 196px; } }

.pens-input { width: 4.2rem; }

/* Matchday : sections lisibles */
.md-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.md-chip { padding: .3rem .75rem; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .85rem; }
.md-chip b { margin-left: .25rem; }
.md-chip-todo { border-color: var(--accent, #4f8cff); }
.md-chip-warn { border-color: #d9822b; }
.md-section { margin: 1.4rem 0; }
.md-section h2, .md-todo h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.md-count { font-size: .8rem; color: var(--muted); font-weight: normal; }
.md-todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.md-todo-list a { display: block; padding: .5rem .7rem; border-radius: 8px; background: var(--panel2); color: var(--text); text-decoration: none; }
.md-late .ticket { opacity: .9; border-color: #d9822b; }
.md-finished, .md-legend { margin: 1.4rem 0; }
.md-finished summary, .md-legend summary { cursor: pointer; font-weight: 600; margin-bottom: .6rem; }
.md-empty { text-align: center; }
.ticket .tag { position: absolute; top: .3rem; right: .6rem; font-size: .7rem; color: var(--muted); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket .hint { position: absolute; bottom: .3rem; left: calc(110px + .8rem); font-size: .72rem; padding: .05rem .5rem; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); }
@media (max-width: 640px) { .ticket .hint { left: calc(74px + .6rem); } .ticket .tag { max-width: 45%; } }
.ticket .ticket-main { padding-top: 1.5rem; }

/* Billets : heure en grand + couleur par compétition (liseré) */
.stub-t { font-weight: 900; font-size: 1.35rem; color: var(--brand2); line-height: 1; }
.stub-d { text-transform: capitalize; }
.ticket { border-left-width: 5px; }
.ticket.tc-f { border-left-color: #6b6b6b; }
.ticket.tc-0 { border-left-color: #e0a526; }
.ticket.tc-1 { border-left-color: #3f8cff; }
.ticket.tc-2 { border-left-color: #2fbf71; }
.ticket.tc-3 { border-left-color: #d45dd0; }
.ticket.tc-4 { border-left-color: #e5654d; }
.ticket.tc-5 { border-left-color: #2ec4c9; }
.ticket.tc-6 { border-left-color: #9b7cf0; }
.ticket.tc-7 { border-left-color: #8fb339; }
.ticket .tag { max-width: 70%; }
@media (max-width: 640px) { .stub-t { font-size: 1.1rem; } .ticket .tag { max-width: 62%; } }
@media (max-width: 640px) { .ticket .tag { white-space: normal; text-align: right; line-height: 1.15; top: .25rem; } }

/* ---- v25 : badges d'équipe, bannière, duels, TOTW */
.tbadge { display: inline-block; padding: .1rem .55rem; margin: 0 .15rem; border-radius: 99px; font-size: .75rem; background: var(--panel2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; text-decoration: none; }
.tbadge-best { border-color: var(--brand); color: var(--brand2); font-weight: 700; }
.team-badges { margin: .2rem 0 .8rem; }
.best-card { border-color: var(--brand); }
.form-V, .form-N, .form-D { display: inline-block; width: 1.4rem; height: 1.4rem; line-height: 1.4rem; text-align: center; border-radius: 50%; font-size: .72rem; font-weight: 700; margin-right: .15rem; background: var(--panel2); }
.form-V { background: #1f7a3d; color: #fff; } .form-D { background: #9b2c2c; color: #fff; }
.ad-banner { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .45rem 1rem; background: var(--panel2); border-bottom: 1px solid var(--brand); font-size: .9rem; text-align: center; }
.ad-banner img { border-radius: 8px; flex: none; } .ad-banner a { color: var(--brand2); font-weight: 600; }
.duel { padding: .6rem 0; border-bottom: 1px solid var(--line); } .duel:last-child { border-bottom: 0; }
.duel .num { width: 4.2rem; } .duel-link { display: block; text-decoration: none; color: inherit; }
.totw .cards { margin-top: .6rem; }

/* =====================================================================
   v30 — nouvelle disposition : menu d'icônes à gauche, barre du haut,
   grands titres, cartes arrondies qui se soulèvent, filtres en pastilles.
   Même ambiance noir et or. Tout ce qui suit remplace les règles plus haut.
   ===================================================================== */
:root { --rail-w: 88px; --r-lg: 22px; --r-md: 16px; --edge: rgba(242,169,27,.16); --edge-hi: rgba(242,169,27,.55);
  --surface: rgba(17,13,8,.88); --surface-2: rgba(28,22,14,.92); --lift: 0 14px 34px rgba(0,0,0,.55), 0 0 0 1px rgba(242,169,27,.25); }

/* ---- Coquille de l'application */
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main .container { width: 100%; max-width: 1240px; padding: 1.4rem 2rem 3rem; }

/* ---- Menu d'icônes (rail) */
.rail { position: sticky; top: 12px; align-self: flex-start; height: calc(100vh - 24px); width: var(--rail-w); flex: none; margin: 12px 0 12px 12px;
  display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: .8rem .4rem; z-index: 30;
  background: linear-gradient(180deg, #120d07, #0b0805); border: 1px solid var(--edge); border-radius: 28px; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.rail-logo img { display: block; width: 44px; height: 44px; border-radius: 14px; filter: drop-shadow(0 0 10px rgba(242,169,27,.45)); }
.rail-nav { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; width: 100%; overflow-y: auto; scrollbar-width: none; padding: .2rem 0; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .2rem; border-radius: 16px;
  color: var(--muted); text-decoration: none; font-size: .62rem; font-weight: 600; line-height: 1.15; text-align: center; transition: background .2s, color .2s, transform .2s; }
.rail-nav a .ic { width: 22px; height: 22px; }
.rail-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-nav a:hover { color: var(--brand2); background: rgba(242,169,27,.08); text-decoration: none; }
.rail-nav a.on { color: var(--on-brand); background: linear-gradient(160deg, var(--brand2), var(--brand)); box-shadow: 0 6px 18px rgba(242,169,27,.35); }
.rail-nav hr { width: 60%; border: 0; border-top: 1px solid var(--edge); margin: .35rem auto; }
.dot { position: absolute; top: 2px; right: 10px; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 99px; background: #e5484d; color: #fff;
  font-size: .62rem; font-weight: 800; line-height: 1.15rem; text-align: center; box-shadow: 0 0 0 2px #0b0805; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }

/* ---- Barre du haut */
.app-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .8rem; padding: .9rem 2rem .7rem;
  background: linear-gradient(180deg, rgba(10,8,6,.92), rgba(10,8,6,.6) 80%, transparent); backdrop-filter: blur(6px); }
.crumb { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.crumb .today { color: var(--muted); font-size: .72rem; } .crumb .today::first-letter { text-transform: uppercase; }
.crumb .here { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb .here .ic { color: var(--brand2); }
.app-top .search { display: flex; align-items: center; gap: .4rem; width: min(340px, 34vw); padding: 0 .9rem; border: 1px solid var(--edge); border-radius: 99px; background: rgba(255,255,255,.04); color: var(--muted); }
.app-top .search:focus-within { border-color: var(--edge-hi); box-shadow: 0 0 0 3px rgba(242,169,27,.12); }
.app-top .search input { flex: 1; width: auto; min-width: 0; background: transparent; border: 0; padding: .6rem 0; color: var(--text); outline: none; font-size: .9rem; }
.round { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--edge); background: rgba(255,255,255,.04); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.round:hover { border-color: var(--edge-hi); transform: translateY(-1px); text-decoration: none; } .round .dot { top: -3px; right: -3px; }
.app-top .bell { padding: 0; font-size: inherit; }
.app-top .userdd > summary { padding: 0; border-radius: 50%; box-shadow: none; background: none; }
.app-top .userdd > summary::after { display: none; }
.app-top .userdd > summary img, .avatar-ini { display: block; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--brand); object-fit: cover; }
.avatar-ini { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--brand2), #8a5a06); color: var(--on-brand); font-weight: 900; }
.app-top .dd-panel { border: 1px solid var(--edge); border-radius: var(--r-md); min-width: 210px; padding: .4rem; background: #15100a; }
.dd-who { padding: .45rem .7rem .55rem; border-bottom: 1px solid var(--edge); margin-bottom: .25rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.app-top .burger { display: none; }
.app-top .search { order: 0; margin: 0; } .search-ic { display: inline-flex; cursor: pointer; }
.app-top .userdd > summary .avatar-ini { display: flex; }
.app-top .userdd { border: 0; padding: 0; }

/* ---- Titres de page : grand titre + sous-titre gris */
.has-app h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-style: normal; text-transform: none; letter-spacing: -.01em; font-weight: 800; margin: .2rem 0 .35rem; text-shadow: none; }
.has-app h1::after { display: none; }
.has-app h1 + p.muted, .has-app h1 + .muted { margin-top: 0; margin-bottom: 1.3rem; font-size: .92rem; }
.has-app h2 { font-style: normal; text-transform: none; letter-spacing: 0; font-size: 1.12rem; }

/* ---- Cartes : arrondies, filet fin, se soulèvent au survol */
.card, .stat, .ticket, .matchday, .affiche { border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 8px 26px rgba(0,0,0,.4);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card { padding: 1.25rem 1.4rem; }
.card:hover, .ticket:hover, a.card:hover, .stat:hover { transform: translateY(-4px); box-shadow: var(--lift); border-color: var(--edge-hi); }
form.card:hover, .card.form:hover, .card:has(form):hover, .card:has(table):hover, .card:has(input):hover { transform: none; } /* pas de saut quand on remplit un formulaire ou lit un tableau */
@media (max-width: 640px) { .card, .stat { border-width: 1px; } }

/* ---- Chiffres clés : la première carte en or, comme la carte rouge du modèle */
.stats { gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { padding: 1.1rem 1.2rem 1.2rem; min-height: 118px; justify-content: space-between; }
.stat .n { font-size: 2.3rem; line-height: 1; }
.stats .stat:first-child { background: radial-gradient(120% 140% at 85% 0%, #ffd27a 0%, var(--brand) 45%, #a96a06 100%); border-color: transparent; color: rgba(26,18,4,.75); }
.stats .stat:first-child .n, .stats .stat:first-child a, .stats .stat:first-child strong { color: var(--on-brand); }

/* ---- Boutons et champs en pastilles */
.btn, .btn-primary, .btn-danger { border: 1px solid var(--edge); border-radius: 99px; padding: .5rem 1.05rem; }
.btn:hover { border-color: var(--edge-hi); }
.btn-primary { border-color: transparent; box-shadow: 0 6px 18px rgba(242,169,27,.28); } .btn-primary:hover { border-color: transparent; }
.btn-danger { border-color: #7a2c39; }
.btn-sm { padding: .28rem .7rem; } .btn-lg { padding: .8rem 1.7rem; }
input, select, textarea { border: 1px solid var(--edge); border-radius: 12px; background: rgba(6,5,3,.75); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--edge-hi); box-shadow: 0 0 0 3px rgba(242,169,27,.14); }

/* ---- Filtres / onglets en pastilles, l'actif en or */
.tabs { gap: .45rem; }
.tabs .tab, .md-chip, .chip { border-radius: 99px; border: 1px solid var(--edge); background: rgba(255,255,255,.04); padding: .38rem .9rem; color: var(--text); text-decoration: none; font-size: .85rem; transition: background .2s, border-color .2s; }
.tabs .tab:hover, .md-chip:hover { border-color: var(--edge-hi); text-decoration: none; }
.tabs .tab.on { background: var(--text); color: #120d06; border-color: transparent; font-weight: 700; }
.md-chip b { display: inline-block; min-width: 1.4em; margin-left: .35rem; padding: 0 .35em; border-radius: 99px; background: rgba(242,169,27,.18); color: var(--brand2); text-align: center; }
.badge, .tbadge, .role { border-radius: 99px; }

/* ---- Tableaux plus aérés */
th { font-size: .74rem; } th, td { border-bottom-color: rgba(242,169,27,.1); }
tbody tr { transition: background .15s; } tbody tr:hover { background: rgba(242,169,27,.05); }

.foot { margin-top: auto; }
.ad-banner { margin: 0 2rem; border: 1px solid var(--edge); border-radius: var(--r-md); }

/* ---- Tablette et téléphone : le menu devient un tiroir */
@media (max-width: 900px) {
  .rail { position: fixed; top: 0; left: 0; bottom: 0; height: auto; margin: 0; width: 240px; align-items: stretch; border-radius: 0 24px 24px 0;
    transform: translateX(-105%); transition: transform .28s ease; padding: 1rem .7rem; }
  .rail.open { transform: none; }
  .rail-logo { align-self: flex-start; margin-left: .4rem; }
  .rail-nav a { flex-direction: row; gap: .8rem; padding: .7rem .8rem; font-size: .92rem; text-align: left; }
  .rail-nav a .dot { position: static; margin-left: auto; box-shadow: none; }
  .rail-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.menu-open .rail-backdrop { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .app-top { padding: .7rem 1rem; gap: .55rem; }
  .app-top .burger { display: flex; margin: 0; border: 1px solid var(--edge); border-radius: 12px; padding: .55rem .5rem; }
  .search-ic { width: 42px; height: 42px; align-items: center; justify-content: center; flex: none; }
  .app-top .search:focus-within .search-ic { width: auto; }
  .app-top .search { position: relative; width: 42px; padding: 0; justify-content: center; border-radius: 50%; height: 42px; overflow: hidden; }
  .app-top .search input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
  .app-top .search:focus-within { position: absolute; left: 1rem; right: 1rem; width: auto; z-index: 3; background: #15100a; border-radius: 99px; padding: 0 .9rem; justify-content: flex-start; }
  .app-top .search:focus-within input { position: static; opacity: 1; width: auto; }
  .app-main .container { padding: 1rem 1rem 2.5rem; }
  .ad-banner { margin: 0 1rem; }
}
@media (max-width: 420px) { .crumb .today { display: none; } }
@media (prefers-reduced-motion: reduce) { .card, .stat, .ticket, .rail, .rail-nav a { transition: none; } .card:hover, .stat:hover, .ticket:hover { transform: none; } }
.app-top .search input:focus { box-shadow: none; border: 0; }
.sort { color: inherit; text-decoration: none; white-space: nowrap; } .sort:hover { color: var(--brand2); text-decoration: underline; } th[aria-sort="ascending"] .sort, th[aria-sort="descending"] .sort { color: var(--brand2); }

/* =====================================================================
   v34 — animations inspirées du modèle : ouverture en cercle, changement de page
   en fondu flouté, titre qui glisse, cartes et lignes qui arrivent l'une après l'autre,
   chiffres qui défilent (app.js), boutons qui réagissent. Tout est coupé si l'appareil
   demande moins d'animations.
   ===================================================================== */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.7, 0, .2, 1); }
html { scroll-behavior: smooth; }

/* -- Transition entre pages (Chrome, Edge, Safari récents) : le menu et la barre du haut ne bougent pas */
@view-transition { navigation: auto; }
.rail { view-transition-name: rail; } .app-top { view-transition-name: topbar; } .app-main .container { view-transition-name: page; }
::view-transition-group(page) { animation-duration: .38s; }
::view-transition-old(page) { animation: pageOut .22s var(--ease-io) both; }
::view-transition-new(page) { animation: pageIn .32s var(--ease-out) .06s both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
@keyframes pageOut { to { opacity: 0; filter: blur(8px); transform: scale(.985) translateY(6px); } }
@keyframes pageIn { from { opacity: 0; } }

/* -- Ouverture (une fois par session) : un cercle part du logo et dévoile le Dashboard */
html.intro body { background-color: #050403; }
html.intro .app { animation: introReveal 1s var(--ease-io) .15s backwards; }
html.intro .rail-logo img { animation: introLogo .9s var(--ease-out) backwards; }
@keyframes introReveal { from { clip-path: circle(0 at 56px 56px); } to { clip-path: circle(150vmax at 56px 56px); } }
@keyframes introLogo { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }

/* -- Arrivée du contenu : titre qui glisse vers le haut, blocs puis cartes et lignes en cascade */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes riseBlur { from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(6px); } }
@keyframes titleUp { from { opacity: 0; transform: translateY(70%); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20% 0); } }
@keyframes crumbIn { from { opacity: 0; transform: translateY(8px); } }
.has-app .app-main .container > h1 { animation: titleUp .7s var(--ease-out) backwards; }
.has-app .app-main .container > * { animation: rise .6s var(--ease-out) backwards; }
.has-app .app-main .container > h1 { animation-name: titleUp; }
.has-app .app-main .container > :nth-child(2) { animation-delay: .06s; } .has-app .app-main .container > :nth-child(3) { animation-delay: .12s; }
.has-app .app-main .container > :nth-child(4) { animation-delay: .18s; } .has-app .app-main .container > :nth-child(5) { animation-delay: .24s; }
.has-app .app-main .container > :nth-child(6) { animation-delay: .3s; } .has-app .app-main .container > :nth-child(n+7) { animation-delay: .36s; }
.stats > *, .grid2 > *, .grid3 > *, .cards > *, .tabs > * { animation: riseBlur .65s var(--ease-out) backwards; }
.stats > :nth-child(1), .grid2 > :nth-child(1), .grid3 > :nth-child(1), .cards > :nth-child(1) { animation-delay: .12s; }
.stats > :nth-child(2), .grid2 > :nth-child(2), .grid3 > :nth-child(2), .cards > :nth-child(2) { animation-delay: .2s; }
.stats > :nth-child(3), .grid2 > :nth-child(3), .grid3 > :nth-child(3), .cards > :nth-child(3) { animation-delay: .28s; }
.stats > :nth-child(4), .grid2 > :nth-child(4), .grid3 > :nth-child(4), .cards > :nth-child(4) { animation-delay: .36s; }
.stats > :nth-child(n+5), .grid2 > :nth-child(n+5), .grid3 > :nth-child(n+5), .cards > :nth-child(n+5) { animation-delay: .42s; }
.tabs > * { animation-name: rise; animation-duration: .45s; } .tabs > :nth-child(2) { animation-delay: .04s; } .tabs > :nth-child(3) { animation-delay: .08s; } .tabs > :nth-child(n+4) { animation-delay: .12s; }
tbody tr { animation: rise .5s var(--ease-out) backwards; }
tbody tr:nth-child(1) { animation-delay: .18s; } tbody tr:nth-child(2) { animation-delay: .22s; } tbody tr:nth-child(3) { animation-delay: .26s; }
tbody tr:nth-child(4) { animation-delay: .3s; } tbody tr:nth-child(5) { animation-delay: .34s; } tbody tr:nth-child(6) { animation-delay: .38s; }
tbody tr:nth-child(7) { animation-delay: .42s; } tbody tr:nth-child(8) { animation-delay: .46s; } tbody tr:nth-child(n+9) { animation-delay: .5s; }
.crumb .here { animation: crumbIn .5s var(--ease-out) backwards; }

/* -- Sortie de page (navigateurs sans transition entre pages) */
body.leaving .app-main .container { opacity: 0; filter: blur(6px); transform: translateY(6px); transition: opacity .18s, filter .18s, transform .18s; }

/* -- Micro-interactions */
.btn, .round, .rail-nav a, .tabs .tab, .md-chip { transition: transform .18s var(--ease-out), background .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:active, .round:active, .tabs .tab:active, .md-chip:active { transform: scale(.96); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(242,169,27,.38); }
.rail-nav a .ic { transition: transform .25s var(--ease-out); }
.rail-nav a:hover .ic { transform: translateY(-2px) scale(1.08); }
.rail-nav a.on .ic { animation: iconPop .5s var(--ease-out) backwards; }
@keyframes iconPop { from { transform: scale(.6); } 60% { transform: scale(1.15); } }
.card, .stat, .ticket { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s; }
tbody tr { transition: background .2s; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::before { content: ''; position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--text) var(--text) var(--text) transparent; animation: spin .7s linear infinite; }
.btn-primary.is-loading::before { border-color: var(--on-brand) var(--on-brand) var(--on-brand) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.flash { animation: flashIn .5s var(--ease-out) backwards; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.dd-panel { transform-origin: top right; animation: ddIn .22s var(--ease-out); }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body.leaving .app-main .container { opacity: 1; filter: none; transform: none; }
}
/* Ouverture : écran sombre avec le logo qui respire, puis le cercle dévoile le Dashboard par-dessus */
html.intro::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(242,169,27,.18), transparent 42%), url('logo-ico.png') center / 96px no-repeat, #050403;
  animation: introVeil 1.5s ease .3s forwards, introPulse 1.1s ease-in-out; }
@keyframes introVeil { to { opacity: 0; visibility: hidden; } }
@keyframes introPulse { 0% { background-size: auto, 56px, auto; } 50% { background-size: auto, 104px, auto; } }
html.intro .app { animation-delay: .35s; }

/* =====================================================================
   v36 — confort sur téléphone : barre d'onglets en bas, tableaux en cartes
   ou en défilement avec nom figé, champs sans zoom iOS, grandes zones tactiles.
   ===================================================================== */
.tabbar { display: none; }
@media (max-width: 900px) {
  /* Barre d'onglets en bas (comme une appli), le ☰ du haut n'est plus nécessaire */
  .tabbar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 24; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px; border: 1px solid var(--edge); border-radius: 22px; background: rgba(14,10,6,.92); backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(0,0,0,.6); view-transition-name: tabbar; }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px;
    border: 0; border-radius: 16px; background: none; color: var(--muted); font: inherit; font-size: .66rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background .2s, color .2s, transform .15s; -webkit-tap-highlight-color: transparent; }
  .tabbar .ic { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--on-brand); background: linear-gradient(160deg, var(--brand2), var(--brand)); }
  .tabbar a:active, .tabbar button:active { transform: scale(.93); }
  .tabbar .dot { top: 4px; right: 22%; }
  .app-top .burger { display: none; }
  .app-main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .foot { padding-bottom: 1rem; }
  /* v40 : le tiroir fait la hauteur de l'écran (align-self du bureau l'agrandissait à la taille du contenu) et la liste défile */
  .rail { align-self: stretch; height: 100vh; height: 100dvh; max-height: 100dvh; overflow: hidden; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .rail-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
  .rail-nav a { min-height: 48px; }
}
@media (max-width: 640px) {
  /* Pas de zoom automatique de l'iPhone dans les champs ; zones tactiles de 44 px */
  input, select, textarea { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 38px; }
  .app-top { padding: .6rem .8rem; } .crumb .today { display: none; } .crumb .here { font-size: .95rem; }
  .app-main .container { padding: .8rem .8rem 2rem; }
  .has-app h1 { font-size: 1.65rem; line-height: 1.15; }
  .card { padding: 1rem; border-radius: 18px; }
  .ad-banner { margin: 0 .8rem; padding: .5rem .7rem; font-size: .85rem; }
  /* Formulaires de filtre / saisie : un champ par ligne, bouton en pleine largeur */
  main form.row, .card > form.row, section > form.row { flex-direction: column; align-items: stretch; gap: .6rem; }
  main form.row > label { display: flex; flex-direction: column; gap: .3rem; width: 100%; }
  main form.row > label > input, main form.row > label > select, main form.row > input, main form.row > select { width: 100%; }
  main form.row > .btn, main form.row > button { width: 100%; }
  td form.row, .t-stack form.row { flex-direction: row; flex-wrap: wrap; align-items: center; }
  td form.row > .btn, td form.row > button { width: auto; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -.8rem; padding-inline: .8rem; scroll-snap-type: x proximity; }
  .tabs::-webkit-scrollbar { display: none; } .tabs > * { flex: none; scroll-snap-align: start; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: .6rem; } .stat { min-height: 96px; padding: .9rem; } .stat .n { font-size: 1.8rem; }
  .row.between { flex-wrap: wrap; gap: .6rem; }

  /* Tableaux jusqu'à 6 colonnes : une carte par ligne */
  table.t-stack, table.t-stack tbody, table.t-stack tr, table.t-stack td { display: block; width: 100%; }
  table.t-stack thead { display: none; }
  table.t-stack tr { margin: 0 0 .6rem; padding: .55rem .8rem; border: 1px solid var(--edge); border-radius: 14px; background: rgba(255,255,255,.025); }
  table.t-stack tr:hover { background: rgba(255,255,255,.04); }
  table.t-stack td { padding: .45rem 0; border: 0; border-bottom: 1px dashed rgba(242,169,27,.1); text-align: right; overflow: hidden; }
  table.t-stack td:last-child { border-bottom: 0; }
  table.t-stack td::before { content: attr(data-label); float: left; max-width: 42%; margin-right: 1rem; padding-top: .12rem; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
  table.t-stack td:first-child { font-size: 1rem; }
  table.t-stack td[colspan] { text-align: center; } table.t-stack td[colspan]::before { display: none; }
  table.t-stack td.td-actions::before { display: none; }
  table.t-stack td.td-has-action form { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
  table.t-stack td:empty { display: none; }

  /* Tableaux de 7 colonnes et plus : défilement, nom figé à gauche, ombre si la suite est cachée */
  .t-scroll-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: -.2rem; }
  table.t-scroll { min-width: max-content; } table.t-scroll th, table.t-scroll td { white-space: nowrap; padding: .55rem .6rem; }
  table.t-scroll .t-sticky { position: sticky; z-index: 1; background: #15100a; }
  table.t-scroll th.t-sticky { z-index: 2; }
  .t-scroll-wrap.has-more { box-shadow: inset -26px 0 18px -18px rgba(242,169,27,.45); }
}
/* Image de l'équipe de la semaine */
.totw-card { margin: .6rem 0 1rem; }
.totw-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1671 / 941; border-radius: 16px; border: 1px solid var(--edge); background: #0b0805; opacity: 0; transition: opacity .4s; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.totw-canvas.ready { opacity: 1; }
.totw-card .row { margin-top: .6rem; }
[data-totw-msg]:empty { display: none; }

/* ---------- v50 : ordre de passage des matchs (un créneau par ligne) */
.prog-nav { margin: .4rem 0 .2rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; }
/* l'heure est déjà dans la colonne du créneau : on retire le talon du billet */
.prog-card .ticket .stub, .prog-card .ticket::before, .prog-card .ticket::after { display: none; }
.prog-day { margin: 0; text-transform: capitalize; font-size: 1.15rem; text-align: center; }
.center { text-align: center; }
.prog { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .65rem; position: relative; }
.prog::before { content: ''; position: absolute; left: 52px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--line), transparent); }
.prog-row { display: grid; grid-template-columns: 106px 1fr; gap: .8rem; align-items: center; position: relative; }
.prog-slot { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .3rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); position: relative; z-index: 1; text-align: center; }
.prog-n { font-size: .72rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.prog-time { font-size: 1.25rem; font-weight: 800; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.prog-end { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.prog-state { font-size: .72rem; font-weight: 700; margin-top: .15rem; }
.prog-flag { font-size: .66rem; color: var(--warn); }
.prog-card .ticket { margin: 0; }
.prog-group { margin: 1.4rem 0 .2rem; display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; color: var(--brand2); border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.prog-warn { margin: .3rem 0 0; font-size: .82rem; color: var(--warn); }
.prog-done .prog-slot, .prog-done .prog-card { opacity: .62; }
.prog-cancelled .prog-slot, .prog-cancelled .prog-card { opacity: .4; }
.prog-cancelled .prog-time { text-decoration: line-through; }
.prog-live .prog-slot { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad), 0 0 18px rgba(231,76,60,.35); }
.prog-live .prog-state { color: var(--bad); }
.prog-late .prog-slot { border-color: var(--warn); }
.prog-late .prog-state, .prog-validate .prog-state { color: var(--warn); }
.prog-next .prog-slot { border-color: var(--brand); box-shadow: var(--gold-glow); }
.prog-next .prog-state { color: var(--brand2); }
@media (prefers-reduced-motion: no-preference) {
  .prog-live .prog-slot { animation: prog-pulse 2s ease-in-out infinite; }
  @keyframes prog-pulse { 50% { box-shadow: 0 0 0 1px var(--bad), 0 0 28px rgba(231,76,60,.55); } }
}
@media (max-width: 640px) {
  .prog::before { left: 38px; }
  .prog-row { grid-template-columns: 78px 1fr; gap: .5rem; }
  .prog-time { font-size: 1.05rem; }
  .prog-nav .btn { padding: .35rem .55rem; font-size: .8rem; }
  .prog-day { font-size: .95rem; }
  .prog-day .badge { display: none; }
}

/* ---------- v52 : page tournoi en deux temps (poules / phase finale) */
.stage { margin: 1rem 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; padding: .3rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); margin-bottom: .8rem; }
.seg [role="tab"], .pills [role="tab"] { cursor: pointer; font: inherit; font-weight: 700; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 999px; padding: .55rem 1rem; transition: background .2s, color .2s, border-color .2s; }
.seg [role="tab"][aria-selected="true"] { background: linear-gradient(180deg, var(--brand2), var(--brand)); color: var(--on-brand); box-shadow: var(--gold-glow); }
.pills { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem .1rem .5rem; margin-bottom: .4rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.pills [role="tab"] { flex: 0 0 auto; border-color: var(--line); background: var(--panel); white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; }
.pills [role="tab"] small { font-size: .72rem; font-weight: 600; opacity: .8; }
.pills [role="tab"][aria-selected="true"] { border-color: var(--brand); color: var(--brand2); background: var(--panel2); }
.seg [role="tab"]:focus-visible, .pills [role="tab"]:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; }
.stage-head { display: flex; align-items: center; gap: .8rem; margin: 1.3rem 0 .6rem; font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.stage-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.stage [data-panel] > .card { margin-bottom: .4rem; }

/* v55 */
.input-narrow { width: 6em; }

/* =====================================================================
   v58 — version sobre « tableau d'affichage » : fond noir uni, or réservé
   à l'action principale et aux scores, arrondis 6-8 px, plus de halo ni de flou.
   Titres et chiffres en Barlow Condensed, texte en Barlow. Tout ce qui suit
   remplace les règles plus haut.
   ===================================================================== */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/barlow-condensed/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/barlow-condensed/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/barlow/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/barlow/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/barlow/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/barlow/barlow-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #0d0c0a; --surface: #15130f; --surface-2: #1d1a15; --panel: var(--surface); --panel2: var(--surface-2);
  --edge: #2b2720; --edge-hi: #4a4233; --line: #2b2720;
  --text: #ece6da; --muted: #9a917f; --brand: #e3a52b; --brand2: #f0b743; --on-brand: #141006;
  --r-lg: 8px; --r-md: 6px; --radius: 8px; --gold-glow: none; --lift: none;
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body { background: var(--bg); font: 15px/1.5 var(--f-body); }
body::before, body::after { display: none; }
h1, h2, h3, .eyebrow, .matchday-title, .prog-day, .rail-nav a span, .crumb .here { font-family: var(--f-display); }
.has-app h1, h1 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; font-style: normal; text-shadow: none; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; }
.has-app h2, h2 { font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 1.15rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); font-weight: 600; }
/* Chiffres type tableau d'affichage */
.sc, .score, .stat .n, .ticker strong, .affiche .vs, .countdown, .ppts, .banner-pts, .kpis b, td.num, th.num, .rk { font-family: var(--f-display); font-variant-numeric: tabular-nums; }
th.num, td.num { text-align: right; width: 1%; white-space: nowrap; }

/* Surfaces : unies, filet fin, pas d'ombre, pas de flou, pas de saut au survol */
.card, .stat, .ticket, .matchday, .affiche, .step, .banner-flag, .trn, .dd-panel, .app-top .dd-panel { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-lg); box-shadow: none; backdrop-filter: none; }
.card:hover, .ticket:hover, a.card:hover, .stat:hover, .trn:hover { transform: none; box-shadow: none; border-color: var(--edge-hi); }
.app-top { background: var(--bg); backdrop-filter: none; border-bottom: 1px solid var(--edge); }
.topbar { backdrop-filter: none; box-shadow: none; border-bottom-color: var(--edge); }
.rail { background: var(--surface); border-color: var(--edge); border-radius: 10px; box-shadow: none; }
.rail-logo img { filter: none; border-radius: 6px; }
.rail-nav a { border-radius: 6px; }
.rail-nav a:hover { background: var(--surface-2); color: var(--text); }
.rail-nav a.on { background: var(--surface-2); color: var(--brand2); box-shadow: inset 3px 0 0 var(--brand); }
@media (max-width: 900px) { .rail { border-radius: 0 10px 10px 0; } }

/* Boutons : gris par défaut, or uniquement pour l'action principale */
.btn, .btn-danger, .btn-primary { border-radius: var(--r-md); box-shadow: none; padding: .5rem 1rem; font-weight: 600; }
.btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--edge); }
.btn:hover { background: #24201a; border-color: var(--edge-hi); text-decoration: none; box-shadow: none; }
.btn.on { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-primary { background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); font-weight: 700; }
.btn-primary:hover { background: var(--brand2); border-color: var(--brand2); box-shadow: none; }
.btn-primary::after { display: none; }
.btn-danger { background: transparent; color: #f08a8a; border: 1px solid #5a2a2a; }
.btn-danger:hover { background: #2a1414; }
.btn:focus-visible, a:focus-visible, [role="tab"]:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
input, select, textarea { border-radius: var(--r-md); background: #0f0e0b; border: 1px solid var(--edge); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: none; }
.app-top .search { border-radius: var(--r-md); background: var(--surface); }
.app-top .search:focus-within { box-shadow: none; border-color: var(--edge-hi); }
.round { border-radius: var(--r-md); background: var(--surface); }
.app-top .userdd > summary img, .avatar-ini { border-width: 1px; border-color: var(--edge-hi); }
.avatar-ini { background: var(--surface-2); color: var(--brand2); }

/* Onglets, pastilles, badges : rectangles discrets */
.tabs .tab, .md-chip, .chip, .tab { border-radius: var(--r-md); background: transparent; border: 1px solid var(--edge); }
.tabs .tab.on, .tab.on { background: var(--text); color: var(--bg); }
.md-chip b { border-radius: 4px; background: var(--surface-2); color: var(--text); }
.badge, .tbadge, .role, .count-badge { border-radius: 4px; }
.tbadge-best { background: transparent; border-color: var(--brand); color: var(--brand2); }
.seg { border-radius: var(--r-md); background: var(--bg); border-color: var(--edge); }
.seg [role="tab"], .pills [role="tab"] { border-radius: 4px; }
.seg [role="tab"][aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.board .seg { grid-template-columns: repeat(3, 1fr); }
.tab-done { color: var(--muted); font-weight: 500; }

/* Blasons : à plat, initiales lisibles */
.crest { border: 1px solid var(--edge-hi); box-shadow: none; background: var(--surface-2); }
.crest-ini { background: var(--surface-2); color: var(--brand2); font-family: var(--f-display); font-style: normal; font-weight: 700; letter-spacing: .02em; }
.logo, .logo-sm { border-radius: 6px; }

/* Encadrés spéciaux sans halo */
.affiche { background: var(--surface); padding: 1.2rem 1rem 1.3rem; }
.affiche .vs { color: var(--muted); font-size: 1.4rem; text-shadow: none; }
.matchday { background: var(--surface); border-left: 3px solid var(--brand); animation: none; }
.live-dot { animation: none; }
.step { background: var(--surface); }
.step-1 { border-color: var(--brand); box-shadow: none; }
.cards .fut { border-radius: 8px; box-shadow: none; }
.banner-pole { background: var(--edge-hi); }
.stats .stat:first-child { background: var(--surface); color: var(--muted); border-color: var(--edge); }
.stats .stat:first-child .n, .stats .stat:first-child a, .stats .stat:first-child strong { color: var(--text); }
.ticker { background: var(--surface); border-block-color: var(--edge); }
.ticker .sep { color: var(--edge-hi); }
.ticker strong { font-size: 1.05em; }
th, td { border-bottom-color: var(--edge); } tbody tr:hover { background: rgba(255,255,255,.025); }
.login-hero img.logo-xl { width: min(220px, 60%); filter: none; }
.todo { border-radius: 4px; }

/* Moins d'animations : seulement le fondu de page et les retours d'action */
.has-app .app-main .container > *, .has-app .app-main .container > h1, tbody tr, .stats > *, .grid2 > *, .grid3 > *, .cards > *, .tabs > *, .crumb .here, .rail-nav a.on .ic { animation: none; }

/* Accueil : bandeau compact */
.home-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .2rem 0 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--edge); }
.home-head h1 { margin: 0 0 .2rem; font-size: 1.6rem; }
.home-head > div { flex: 1; min-width: 220px; }
.home-logo { width: 56px; height: 56px; object-fit: contain; flex: none; }
.home-head .btn-primary { margin-left: auto; }
.kpis { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .9rem; }
.kpis b { color: var(--text); font-size: 1.15rem; margin-right: .2rem; }
.kpis a { color: inherit; } .kpis a:hover { color: var(--text); }

/* Listes de scores (accueil) */
.home-board .card { padding: 1rem 1.1rem; }
.home-board h2 { margin: 0; }
.home-board .row.between { margin-bottom: .5rem; }
.scorelist { list-style: none; margin: 0; padding: 0; }
.scorelist li + li { border-top: 1px solid var(--edge); }
.scorelist a { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; padding: .55rem .2rem; color: var(--text); }
.scorelist a:hover { background: rgba(255,255,255,.025); text-decoration: none; }
.scorelist .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.scorelist .t-home { text-align: right; }
.scorelist .sc { min-width: 4.2rem; text-align: center; font-size: 1.35rem; font-weight: 700; color: var(--brand2); line-height: 1; }
.scorelist .sc i { font-style: normal; color: var(--muted); margin: 0 .2rem; }
.scorelist .sc-time { color: var(--text); font-size: 1.1rem; display: flex; flex-direction: column; }
.scorelist .sc-time small { font-family: var(--f-body); font-size: .7rem; color: var(--muted); font-weight: 500; margin-top: .15rem; }

/* Journal staff */
.list li.act { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.list li.act time { white-space: nowrap; }

/* Tableaux compacts (joueurs) */
table.dense td, table.dense th { padding: .45rem .6rem; }
table.dense td.score { color: var(--brand2); font-weight: 700; font-size: 1.1rem; }
.rk { display: inline-block; min-width: 1.4em; color: var(--muted); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .home-head .btn-primary { margin-left: 0; width: 100%; text-align: center; }
  .scorelist .sc { font-size: 1.2rem; min-width: 3.6rem; }
}
.step .rank { font-family: var(--f-display); font-style: normal; font-weight: 700; font-size: 1.3rem; color: var(--muted); text-shadow: none; background: none; -webkit-text-fill-color: currentColor; }
.step-1 .rank { color: var(--brand2); }
.step .ppts { color: var(--text); font-weight: 600; }
th { color: var(--muted); letter-spacing: .06em; }
@media (max-width: 900px) {
  .tabbar { background: var(--surface); backdrop-filter: none; border-radius: 10px; box-shadow: 0 -1px 0 var(--edge); }
  .tabbar a, .tabbar button { border-radius: 6px; }
  .tabbar a.on, .tabbar a[aria-current="page"] { background: var(--surface-2); color: var(--brand2); box-shadow: inset 0 2px 0 var(--brand); }
}
td a, .list a, .scorelist a { color: var(--text); } td a:hover, .list a:hover { color: var(--brand2); }

/* v60 */
:root { --muted: #a9a090; }
.pills [role="tab"][aria-selected="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.checks h3 { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; color: var(--muted); margin: 1.1rem 0 .3rem; }
.checks { border-left: 3px solid #c9853a; }

/* v61 : fiche match, tournoi, Mercato */
.sb { grid-template-columns: 1fr auto 1fr; padding: 1.4rem 1rem 1rem; }
.sb .team { display: flex; flex-direction: column; align-items: center; gap: .45rem; color: var(--text); font-size: 1.15rem; }
.sb .team:hover { text-decoration: none; } .sb .team:hover strong { color: var(--brand2); }
.sb .team small { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.sb .mid { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.sb .big { font-family: var(--f-display); font-variant-numeric: tabular-nums; font-size: 3.4rem; line-height: 1; font-weight: 700; }
.sb .big i { font-style: normal; color: var(--muted); margin: 0 .25rem; }
.sb .score-official { color: var(--brand2); } .sb .score-prov { color: var(--text); } .sb .sb-time { font-size: 2.4rem; color: var(--text); }
.sb-meta { grid-column: 1 / -1; text-align: center; margin: .6rem 0 0; padding-top: .7rem; border-top: 1px solid var(--edge); }
@media (max-width: 640px) { .sb { grid-template-columns: 1fr auto 1fr; gap: .5rem; } .sb .team { font-size: .95rem; } .sb .big { font-size: 2.4rem; } }
details.manage > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
details.manage > summary::-webkit-details-marker { display: none; }
details.manage > summary h2 { margin: 0; }
details.manage > summary::after { content: "+"; margin-left: auto; font-family: var(--f-display); font-size: 1.4rem; color: var(--muted); line-height: 1; }
details.manage[open] > summary::after { content: "–"; }
details.manage[open] > summary { margin-bottom: .8rem; padding-bottom: .7rem; border-bottom: 1px solid var(--edge); }
.manage-part + .manage-part { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--edge); }
.manage-part h2 { font-size: 1rem; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: .6rem 2rem; list-style: none; margin: 0 0 .6rem; padding: 0; }
.facts li { display: flex; flex-direction: column; }
.facts span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.facts b { font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; }
.post { display: flex; flex-direction: column; gap: .5rem; }
.post-head { display: flex; align-items: center; gap: .75rem; }
.post-head h3 { margin: 0; font-size: 1.1rem; }
.post-head p { margin: 0; }
.post-pos { color: var(--brand2); font-family: var(--f-display); font-size: 1rem; letter-spacing: .02em; }
.post-tags { margin: 0; } .post .row { margin-top: auto; }
.card.empty { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; grid-column: 1 / -1; }
.card.empty p { margin: 0; color: var(--muted); }

/* v62 : direct + check-in */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; margin-right: .3rem; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: livepulse 1.6s ease-out infinite; } }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.55); } 100% { box-shadow: 0 0 0 7px rgba(229,72,77,0); } }
.live-lbl { display: block; text-align: center; font-size: .7rem; margin: -.3rem 0 .35rem; }
.scorelist .sc small { font-family: var(--f-body); font-size: .72rem; color: #e5484d; font-weight: 600; text-transform: uppercase; }
h2.mt { margin-top: 1.4rem; }
.live-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.live-groups tr.qualified td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.checkin-row { align-items: center; gap: .6rem; padding: .4rem 0; border-top: 1px solid var(--edge); }
.ok-txt { color: #5bc97c; font-weight: 600; }
.chip-in { border-color: #2f6b41; } .chip-in::after { content: "présente"; font-size: .68rem; color: #5bc97c; margin-left: .35rem; }
.chip-out { opacity: .6; }

/* v64 : fiche joueur, face-à-face */
.player-head h1 { font-size: 2rem; }
.player-head p { margin: 0 0 .3rem; }
.vs-tally { font-size: 2.6rem !important; }
.sb .team .form { margin: 0 1px; }
.center { text-align: center; }

/* v65 : récompenses */
.awards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.awards li { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--surface-2); }
.awards span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.awards a { color: var(--text); font-family: var(--f-display); font-size: 1.25rem; }

/* v66 : palmarès, duels, formulaires */
.honours { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.honours > li { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.4fr) minmax(160px, 1fr) auto; align-items: center; gap: 1rem; }
.h-when span { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.h-when strong { font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; }
.h-champ { display: flex; align-items: center; gap: .7rem; }
.h-champ div { display: flex; flex-direction: column; }
.h-champ small:first-child { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--brand2); font-weight: 600; }
.h-champ strong { font-family: var(--f-display); font-size: 1.35rem; }
.h-rest p { margin: .1rem 0; }
@media (max-width: 760px) { .honours > li { grid-template-columns: 1fr; gap: .5rem; } }
.duel-new { margin-bottom: 1rem; } .duel-new > summary { list-style: none; } .duel-new > summary::-webkit-details-marker { display: none; }
.duel { padding: .7rem 0; border-top: 1px solid var(--edge); align-items: center; } .card h2 + .duel { border-top: 0; }
.scorelist .sl-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; padding: .55rem .2rem; }
form.form { max-width: 640px; display: flex; flex-direction: column; gap: .9rem; }
form.form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; color: var(--text); }
form.form label input, form.form label select, form.form label textarea { font-weight: 400; }
form.form .row label { flex: 1; min-width: 120px; }
form.form > .btn, form.form > button { align-self: flex-start; }
.duel-new:not([open]) { background: none; border: 0; padding: 0; }
.awards-card { margin-top: 1rem; } .awards-card > summary { list-style: none; } .awards-card > summary::-webkit-details-marker { display: none; }
.awards-card canvas { margin: .8rem 0; }

/* v67 : stats EA membres */
.ea-match { border-top: 1px solid var(--edge); padding: .55rem 0; }
.ea-match > summary { cursor: pointer; list-style: none; } .ea-match > summary::-webkit-details-marker { display: none; }
.ea-match table { margin-top: .5rem; }
.ea-score { display: inline-block; min-width: 3.2rem; text-align: center; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; border-radius: 4px; padding: .05rem .4rem; background: var(--surface-2); margin-right: .4rem; }
.ea-score.w { color: #5bc97c; } .ea-score.l { color: #f08a8a; } .ea-score.d { color: var(--muted); }

/* v68 : transitions de pages simplifiées. Plus de déformation (étirement / flou) de la page :
   un fondu court de l'ensemble ; le menu, la barre du haut et la barre du bas ne bougent pas. */
.app-main .container { view-transition-name: none; }
::view-transition-old(root) { animation: vtFadeOut .12s ease-out both; }
::view-transition-new(root) { animation: vtFadeIn .15s ease-out both; }
::view-transition-group(rail), ::view-transition-group(topbar), ::view-transition-group(tabbar) { animation: none; }
::view-transition-old(rail), ::view-transition-new(rail), ::view-transition-old(topbar), ::view-transition-new(topbar), ::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; }
::view-transition-old(rail), ::view-transition-old(topbar), ::view-transition-old(tabbar) { display: none; }
@keyframes vtFadeOut { to { opacity: 0; } }
@keyframes vtFadeIn { from { opacity: 0; } }
body.leaving .app-main .container { opacity: 1; filter: none; transform: none; transition: none; }
/* Ouverture une fois par session : plus courte et sans voile qui masque la page */
html.intro::after { animation-duration: .6s, .6s; animation-delay: 0s, 0s; }
html.intro .app { animation-duration: .45s; animation-delay: 0s; }

/* v69 : archétypes et stats EA détaillées */
.arch { display: inline-block; font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .85em; color: var(--brand2); border: 1px solid #5a4620; border-radius: 4px; padding: 0 .35rem; }
b.arch { font-size: 1rem; }
.facts-sm b { font-size: 1.05rem; } .facts-sm small { color: var(--muted); font-family: var(--f-body); font-size: .75rem; }
