@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: rgba(21, 25, 32, 0.86);
  --surface-2: rgba(28, 33, 42, 0.9);
  --surface-3: #262c37;
  --line: #2b313c;
  --text: #eceef2;
  --muted: #98a1b0;
  --jersey: #f1f2f4;
  --ink: #0d1015;
  --red: #e3262f;
  --red-soft: #3a1518;
  --blue: #3157d8;
  --green: #2f9e58;
  --green-deep: #1f6e3d;
  --green-soft: #12291c;
  --amber: #e2a529;
  --amber-soft: #33270f;
  --focus: #7d9bff;
  --radius-s: 6px;
  --radius-m: 10px;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--focus); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Liseré tricolore, repris du logo */
.tricolore { height: 4px; background: linear-gradient(90deg, var(--blue) 0 33.33%, var(--jersey) 33.33% 66.66%, var(--red) 66.66%); }

/* ---------- Boutons et champs ---------- */
button, .btn {
  font: 600 0.95rem/1 var(--body);
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-decoration: none;
}
button:hover:not(:disabled) { background: var(--surface-3); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--jersey); color: var(--ink); border-color: var(--jersey); }
.btn-primary:hover:not(:disabled) { background: #ffffff; }
.btn-go { background: var(--green); border-color: var(--green); color: #fff; }
.btn-go:hover:not(:disabled) { background: #36b366; }
.btn-danger { color: #ff8c91; border-color: #5a2328; background: transparent; }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.btn-small { min-height: 34px; padding: 0.45rem 0.7rem; font-size: 0.85rem; }

label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.35rem; }
input, select, textarea {
  font: 400 1rem/1.4 var(--body);
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.65rem 0.75rem;
  min-height: 44px;
}
textarea { min-height: 220px; resize: vertical; font-variant-numeric: tabular-nums; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; }
.field + .field { margin-top: 1rem; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.35rem; }
.error-text { color: #ff8c91; font-size: 0.9rem; }

/* ---------- Connexion : visuel à gauche, panneau à droite ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 460px); }
.auth-visual { position: relative; overflow: hidden; background: #0a0d12; isolation: isolate; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; }
.blob-blue { width: 46vw; height: 46vw; left: -14vw; top: -18vw; background: rgba(49, 87, 216, 0.38); }
.blob-red { width: 40vw; height: 40vw; right: -12vw; bottom: -16vw; background: rgba(227, 38, 47, 0.28); }
.blob-white { width: 22vw; height: 22vw; left: 8vw; bottom: -10vw; background: rgba(241, 242, 244, 0.06); }
.auth-season {
  position: absolute; right: 4%; top: 6%; z-index: -1;
  font: 700 clamp(7rem, 17vw, 15rem)/0.85 var(--display);
  color: transparent; -webkit-text-stroke: 1.5px rgba(241, 242, 244, 0.09);
  letter-spacing: -0.01em; user-select: none;
}

.mock {
  position: absolute; left: 50%; top: 52%; width: min(560px, 62%);
  transform: translate(-50%, -50%) perspective(1400px) rotateY(-14deg) rotateX(6deg) rotate(-3deg);
  background: #151a22; border: 1px solid #2a313d; border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #232934; background: #12161d; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2f3643; }
.mock-bar span { margin-left: 10px; font-size: 0.78rem; color: #8b94a3; }
.mock-body { display: grid; grid-template-columns: 64px 1fr; min-height: 250px; }
.mock-side { background: linear-gradient(180deg, #1c2a5c, #121a38); padding: 16px 12px; display: grid; align-content: start; gap: 10px; }
.mock-side span { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.mock-side .dot { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); margin-bottom: 8px; }
.mock-main { padding: 16px; display: grid; gap: 14px; align-content: start; }
.mock-hero { border-radius: 10px; padding: 14px 16px; background: linear-gradient(100deg, #3157d8, #23338c 60%, #6b1e35); display: grid; gap: 2px; }
.mock-hero b { font: 700 1.35rem/1 var(--display); color: #fff; }
.mock-hero span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }
.mock-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; }
.mock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mock-grid span { height: 18px; border-radius: 3px; background: #222834; border: 1px solid #2b313c; }
.mock-grid span.on { background: repeating-linear-gradient(90deg, var(--green) 0 6px, #2a9050 6px 12px); border-color: var(--green); }
.mock-list { display: grid; gap: 6px; }
.mock-fixture { display: flex; gap: 8px; align-items: center; background: #1c212a; border-radius: 6px; padding: 6px 8px; font-size: 0.75rem; color: #c7ccd5; }
.mock-fixture b { font-family: var(--display); color: var(--green); }

.tile {
  position: absolute; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: #161b23; border: 1px solid #2a313d; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}
.tile svg { width: 26px; height: 26px; padding: 7px; box-sizing: content-box; border-radius: 50%; }
.tile-1 { left: 15%; top: 24%; color: #8fa8ff; } .tile-1 svg { background: rgba(49, 87, 216, 0.18); }
.tile-2 { right: 14%; top: 18%; color: #f2f3f5; } .tile-2 svg { background: rgba(241, 242, 244, 0.1); }
.tile-3 { left: 22%; bottom: 14%; color: #6fd796; } .tile-3 svg { background: rgba(47, 158, 88, 0.18); }
.tile-4 { right: 18%; bottom: 20%; color: #ff8c91; } .tile-4 svg { background: rgba(227, 38, 47, 0.18); }
.auth-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(22, 27, 35, 0.9); border: 1px solid #2a313d; font-size: 0.85rem; font-weight: 500; color: #dfe3ea;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}
.auth-chip .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47, 158, 88, 0.2); }
.chip-a { left: 30%; top: 72%; }
.chip-b { right: 26%; top: 30%; }

.auth-panel { background: #0f1218; border-left: 1px solid var(--line); display: flex; align-items: center; padding: 2.5rem 2.25rem; }
.auth-panel-inner { width: 100%; }
.auth-logo { display: block; width: 150px; margin: 0 0 1.25rem; filter: drop-shadow(0 14px 30px rgba(227, 38, 47, 0.16)); }
.auth-kicker { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
.auth-tag { font: 600 0.82rem/1 var(--body); padding: 0.4rem 0.65rem; border-radius: 999px; background: #18213f; color: #a9bcff; border: 1px solid #2a3a78; }
.auth-tag-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.auth-title { font-size: 1.85rem; color: #9fb4ff; margin-bottom: 0.4rem; }
.auth-lead { color: var(--muted); margin-bottom: 1.6rem; max-width: 34ch; }
.auth form .field + .field { margin-top: 1rem; }
.btn-auth {
  width: 100%; margin-top: 1.25rem; border: 0; color: #fff; font-size: 1rem;
  background: linear-gradient(90deg, #3157d8, #2a3fa8 55%, #b4213a);
}
.btn-auth:hover:not(:disabled) { background: linear-gradient(90deg, #3a62ea, #3047bd 55%, #c8263f); }
.auth-help { margin-top: 1.1rem; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { border-left: 0; justify-content: center; min-height: 100vh; background: radial-gradient(70% 40% at 50% 0%, rgba(49, 87, 216, 0.22), transparent 70%), #0f1218; }
  .auth-panel-inner { max-width: 420px; }
  .auth-logo { margin: 0 auto 1.25rem; width: 170px; }
  .auth-kicker { justify-content: center; }
  .auth-title, .auth-lead, .auth-help { text-align: center; margin-left: auto; margin-right: auto; }
}

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(13, 16, 21, 0.92); backdrop-filter: blur(10px); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: rgba(13, 16, 21, 0.92); backdrop-filter: blur(10px); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand strong { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.02em; }
.who { text-align: right; line-height: 1.2; }
.who b { display: block; font-family: var(--display); font-size: 1.05rem; }
.who span { font-size: 0.8rem; color: var(--muted); }

main { max-width: 1120px; margin: 0 auto; padding: 1.25rem 1rem 7rem; }

/* ---------- Bandeau de semaine ---------- */
.weekbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1.25rem; }
.weekbar .field { min-width: 220px; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.85rem; padding: 0.3rem 0.65rem; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-ouverte { color: var(--amber); background: var(--amber-soft); border-color: #5b4517; }
.status-planifiee { color: #9fb4ff; background: #182042; border-color: #2a3a78; }
.status-publiee { color: #6fd796; background: var(--green-soft); border-color: #24502f; }
.status-pret { color: #6fd796; background: var(--green-soft); border-color: #24502f; }
.status-encours { color: var(--amber); background: var(--amber-soft); border-color: #5b4517; }
.status-rien { color: var(--muted); background: var(--surface-2); }
.status-inactif { color: #6b7280; background: transparent; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.1rem; }
.panel-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.notice { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 0.8rem 1rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.notice-ok { border-left-color: var(--green); background: var(--green-soft); }
.notice-info { border-left-color: var(--blue); background: #141c38; }
.notice-bad { border-left-color: var(--red); background: var(--red-soft); }

/* ---------- Adversaires ---------- */
.opponents { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-family: var(--display); font-weight: 600; font-size: 1rem; padding: 0.3rem 0.7rem; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- Grille de disponibilités (le cœur du site) ---------- */
.grid-wrap { overflow-x: auto; }
.avail {
  display: grid;
  grid-template-columns: 4.2rem repeat(4, minmax(64px, 1fr));
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
  min-width: 320px;
}
.avail .dayhead {
  font-family: var(--display); text-align: center; padding: 0.35rem 0.2rem 0.5rem; line-height: 1.05;
  background: none; border: 0; min-height: 0; flex-direction: column; gap: 0.1rem; color: var(--text); border-radius: var(--radius-s);
}
.avail .dayhead b { font-size: 1.15rem; display: block; }
.avail .dayhead small { font-family: var(--body); color: var(--muted); font-size: 0.78rem; }
.avail button.dayhead:hover:not(:disabled) { background: var(--surface-2); }
.avail .time { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.4rem; font-variant-numeric: tabular-nums; }
.cell {
  min-height: 40px; padding: 0; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: background-color 90ms ease, border-color 90ms ease;
}
.cell:hover:not(:disabled) { background: var(--surface-3); }
.cell[aria-pressed="true"] {
  border-color: var(--green);
  background: repeating-linear-gradient(90deg, var(--green) 0 12px, #2a9050 12px 24px);
}
.cell[aria-pressed="true"]:hover:not(:disabled) { background: repeating-linear-gradient(90deg, #36b366 0 12px, #2f9e58 12px 24px); }
.cell:disabled { cursor: default; opacity: 1; }
.avail.locked .cell[aria-pressed="false"] { background: transparent; border-style: dashed; }
.avail.locked .cell[aria-pressed="true"] { opacity: 0.85; }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: rgba(21, 25, 32, 0.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.actionbar-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.dirty { color: var(--amber); font-size: 0.9rem; font-weight: 500; }

/* ---------- Planning ---------- */
.my-matches { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.fixture { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 0.8rem 0.9rem; }
.fixture .when { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1; }
.fixture .when small { font-size: 1rem; color: var(--muted); font-weight: 600; margin-left: 0.35rem; }
.fixture .vs { margin-top: 0.35rem; font-weight: 500; }
.fixture.unset .when { color: var(--amber); font-size: 1.15rem; }

.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 0.75rem; }
.board-day h3 { padding-bottom: 0.4rem; border-bottom: 2px solid var(--line); margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: baseline; }
.board-day h3 small { font-family: var(--body); color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.board-item { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.5rem; align-items: start; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.board-item .t { font-family: var(--display); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.board-item .m { font-size: 0.92rem; line-height: 1.3; }
.board-item.mine .m { font-weight: 600; color: #fff; }
.board-item.mine .t { color: var(--green); }
.board-item.manual .t::after { content: " •"; color: var(--amber); }
.board-empty { color: var(--muted); font-size: 0.9rem; padding: 0.5rem 0; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.82rem; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.club { font-family: var(--display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.ok-line td:first-child { color: #6fd796; }
.bad-line td { color: #ff8c91; }

/* ---------- Onglets admin ---------- */
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; scrollbar-width: none; }
.tabs a { padding: 0.7rem 0.9rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--red); }

.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width 300ms ease; }

.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.5rem; }
.club-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.6rem 0.75rem; display: grid; gap: 0.25rem; }
.club-card .name { font-family: var(--display); font-weight: 700; font-size: 1.1rem; display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.club-card .meta { color: var(--muted); font-size: 0.82rem; }
.club-card.is-ready { border-color: #24502f; }
.club-card.is-off { opacity: 0.5; }

.audit-item { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.audit-item time { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.audit-item .what b { font-weight: 600; }
.audit-item .detail { color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; word-break: break-word; }
.audit-item.fail .what b { color: #ff8c91; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* ---------- Fenêtres ---------- */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem; width: min(440px, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.secret { font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.06em; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 0.75rem; text-align: center; user-select: all; -webkit-user-select: all; }

#toasts { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); display: grid; gap: 0.5rem; width: min(440px, calc(100vw - 2rem)); pointer-events: none; }
.toast { background: var(--jersey); color: var(--ink); padding: 0.75rem 1rem; border-radius: var(--radius-s); font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); animation: toast-in 160ms ease-out; }
.toast.bad { background: var(--red); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.6rem; }
  .board { grid-template-columns: 1fr; }
  .brand strong { display: none; }
  .avail { grid-template-columns: 3.4rem repeat(4, minmax(56px, 1fr)); gap: 3px; }
  .avail .time { font-size: 0.95rem; }
  .cell { min-height: 38px; }
  .audit-item { grid-template-columns: 1fr; gap: 0.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Écussons des clubs */
.crest { flex: none; border-radius: 50%; object-fit: contain; vertical-align: middle; }
.crest-initials { display: inline-grid; place-items: center; font-family: var(--display); font-weight: 700; color: #f1f2f4; border: 1px solid; letter-spacing: 0.02em; line-height: 1; }
.chip { display: inline-flex; align-items: center; gap: 0.45rem; }
.fixture .vs { display: flex; align-items: center; gap: 0.45rem; }

/* Rythme vertical du contenu */
main > * + * { margin-top: 1rem; }
main > .weekbar + * { margin-top: 0; }

.topbar button { white-space: nowrap; }
.avail { max-width: 860px; }
@media (max-width: 560px) {
  .topbar-inner { gap: 0.4rem; padding: 0.5rem 0.75rem; }
  .who { display: none; }
  .topbar .btn-small { padding: 0.4rem 0.55rem; font-size: 0.8rem; }
}

/* Logo de la ligue en filigrane, derrière tout le site */
.backdrop {
  position: fixed;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: min(92vw, 720px);
  aspect-ratio: 1218 / 1292;
  max-height: 86vh;
  background: url("/logo-vft.png") no-repeat center / contain;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}
body.is-login .backdrop { display: none; }
#app { position: relative; z-index: 1; }
.brand strong { font-size: 1.35rem; letter-spacing: 0.03em; }
@media (max-width: 560px) {
  .brand strong { display: inline; font-size: 1.05rem; }
  .backdrop { opacity: 0.08; }
}

/* Publication Discord : aperçu fidèle au thème sombre de Discord */
.dc-card { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.dc-card-head { padding: 0.6rem 0.8rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dc-msg { background: #313338; color: #dbdee1; padding: 0.9rem 1rem; font: 400 0.95rem/1.45 "gg sans", "Noto Sans", var(--body); max-height: 420px; overflow: auto; }
.dc-line { min-height: 1.3em; white-space: pre-wrap; word-break: break-word; }
.dc-gap { min-height: 0.6em; }
.dc-h1 { font-size: 1.45rem; font-weight: 700; color: #f2f3f5; margin: 0.15rem 0 0.25rem; }
.dc-h2 { font-size: 1.15rem; font-weight: 700; color: #f2f3f5; margin: 0.5rem 0 0.15rem; }
.dc-sub { font-size: 0.78rem; color: #949ba4; }
.dc-li { padding-left: 0.4rem; }
.dc-msg code { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 0.05rem 0.3rem; font-family: Consolas, "Courier New", monospace; font-size: 0.85rem; }
.dc-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-link { color: #00a8fc; }
@media (max-width: 560px) {
  .actionbar-inner > .spacer { flex-basis: 100%; height: 0; }
  .actionbar-inner > button { flex: 1 1 0; }
}

/* Validation des matchs et Premium */
.status-bad { color: #ff8c91; background: var(--red-soft); border-color: #5a2328; }
.status-premium { color: #f3d27a; background: #2e2510; border-color: #6b5420; }
.status-premium::before { background: linear-gradient(135deg, #f7e08b, #c79a2c); }
.fixture { display: grid; gap: 0.55rem; align-content: start; }
.fixture-litige { border-color: #5a2328; }
.fixture-confirme { border-color: #24502f; }
.fixture-reporte, .fixture-forfait { opacity: 0.75; }
.fixture .when-empty { font-size: 1.2rem; color: var(--amber); }
.fixture-actions { gap: 0.4rem; }
.fixture-actions .btn-small { min-height: 34px; }
.ans { font-size: 0.82rem; color: var(--muted); }
.ans-ok { color: #6fd796; font-weight: 600; }
.ans-no { color: #ff8c91; font-weight: 600; }
.my-matches { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.my-matches { align-items: start; }

/* Consultation des dispos des autres clubs */
.avail.read .cell { min-height: 34px; display: grid; place-items: center; font: 700 0.95rem/1 var(--display); color: #fff; cursor: default; }
.avail.read button.cell { cursor: pointer; }
.avail.read .cell:not([class*="cmp-"]):not([style]) { background: transparent; border-style: dashed; }
.cell.cmp-both { border-color: var(--green); background: repeating-linear-gradient(90deg, var(--green) 0 12px, #2a9050 12px 24px); }
.cell.cmp-a { border-color: #3157d8; background: rgba(49, 87, 216, 0.45); }
.cell.cmp-b { border-color: #8a6a1e; background: rgba(226, 165, 41, 0.22); }
.cell.heat { border-color: rgba(47, 158, 88, 0.45); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.88rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend-item .cell { display: inline-block; width: 22px; min-height: 16px; height: 16px; border: 1px solid; border-radius: 4px; }

/* Connexion admin */
.auth-tag-admin { background: var(--red-soft); color: #ff9aa0; border-color: #5a2328; }
.auth-admin .auth-title { color: #f1f2f4; }
.auth-admin .btn-auth { background: linear-gradient(90deg, #b4213a, #7a1730); }
.auth-admin .btn-auth:hover:not(:disabled) { background: linear-gradient(90deg, #c8263f, #8a1a36); }
.auth-switch { margin-top: 1.5rem; font-size: 0.9rem; }
.auth-switch a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.auth-switch a:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 900px) { .auth-switch { text-align: center; } }
.saved { color: #6fd796; font-weight: 600; }

/* ---------- Écussons des clubs ---------- */
.crest-logo { border-radius: 0; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)); }

/* Connexion : mur des 24 écussons (ordinateur) */
.wall { position: absolute; inset: 0; display: grid; place-items: center; padding: 5vh 3vw; overflow: auto; }
.wall-title { font: 600 1rem/1 var(--display); color: var(--muted); margin-bottom: 14px; letter-spacing: 0.03em; }
.wall-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; width: min(900px, 94%); }
.wall-item {
  display: grid; justify-items: center; align-content: start; gap: 8px; padding: 14px 6px 12px; min-height: 0;
  border-radius: 14px; background: rgba(22, 27, 35, 0.6); border: 1px solid #2a313d; color: #c7ccd5;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}
.wall-item span { font: 600 0.78rem/1.15 var(--display); text-align: center; letter-spacing: 0.02em; }
.wall-item:hover:not(:disabled) { background: rgba(32, 38, 49, 0.85); transform: translateY(-2px); }
.wall-item[aria-pressed="true"] { background: rgba(49, 87, 216, 0.24); border-color: #7d9bff; box-shadow: 0 0 0 2px rgba(125, 155, 255, 0.35); transform: translateY(-3px); color: #fff; }
.wall-item .crest-logo { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55)); }

/* Connexion : grille compacte (mobile) et club choisi */
.mini-grid { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 1rem; }
.mini-item { padding: 6px; min-height: 0; border-radius: 10px; border: 1px solid #2a313d; background: #151a22; display: grid; place-items: center; }
.mini-item[aria-pressed="true"] { border-color: #7d9bff; background: rgba(49, 87, 216, 0.24); }
.pick-prompt { color: var(--muted); margin-bottom: 1rem; }
.picked { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #151a22; margin-bottom: 1rem; }
.picked[hidden] { display: none; }
.picked b { display: block; font: 700 1.35rem/1.1 var(--display); }
.linklike { background: none; border: 0; min-height: 0; padding: 0; margin-top: 4px; color: var(--muted); font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.linklike:hover:not(:disabled) { background: none; color: var(--text); }
@media (max-width: 900px) {
  .mini-grid { display: grid; }
  .picked { margin-top: 0.25rem; }
}

/* Face-à-face des deux écussons */
.faceoff { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.faceoff > div { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.faceoff small { font: 600 0.8rem/1.15 var(--display); color: #c7ccd5; overflow-wrap: anywhere; }
.faceoff i { font: 700 1rem var(--display); color: var(--muted); font-style: normal; }

/* Deux clubs l'un sous l'autre, avec mini-écusson */
.teams { display: grid; gap: 3px; }
.teams > span { display: flex; align-items: center; gap: 7px; }
.board-item .teams { font-size: 0.9rem; }
.opp-btn { gap: 6px; }
.wall > div { width: min(920px, 94%); }
.wall-grid { width: 100%; }
@media (max-width: 900px) { .has-pick .mini-grid { display: none; } }

/* Fenêtre « Modifier un club » */
.club-edit { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 132px; height: 132px; display: grid; place-items: center; border-radius: 14px; border: 1px dashed var(--line); background: repeating-conic-gradient(#1a1f27 0% 25%, #141820 0% 50%) 50% / 16px 16px; }

/* Clôture des dispos */
.countdown::before { background: var(--amber); }
.countdown-urgent { color: #ff9aa0; background: var(--red-soft); border-color: #5a2328; }
.deadline-panel.is-closed { border-color: #2a3a78; }

/* Zone sensible (retrait / suppression d'un club) */
.danger-zone { margin-top: 0.5rem; padding: 0.9rem 1rem; border: 1px solid #5a2328; border-radius: var(--radius-m); background: rgba(58, 21, 24, 0.35); }
.danger-zone h3 { color: #ff9aa0; }
.danger-zone p { margin-top: 0.15rem; }
dialog { background: #151920; }

/* Audit → Activité des clubs */
.seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: 1rem; }
.seg button { min-height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); padding: 0.4rem 1rem; }
.seg button.on { background: var(--jersey); color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1rem 1.1rem; display: grid; gap: 2px; }
.stat-card b { font: 700 2.2rem/1 var(--display); }
.stat-card b small { font-size: 1.1rem; color: var(--muted); }
.stat-card span { font-weight: 600; }
.stat-card em { font-style: normal; color: var(--muted); font-size: 0.82rem; }

/* Menu admin : liste déroulante sur mobile */
.tabs-select-wrap { display: none; margin-bottom: 1rem; }
.tabs-select { font: 700 1.05rem var(--display); letter-spacing: 0.02em; background-color: var(--surface); border-color: var(--line); min-height: 48px; }
@media (max-width: 760px) {
  nav.tabs.has-select { display: none; }
  .tabs-select-wrap { display: block; }
  main > .tabs-select-wrap + * { margin-top: 0; }
}

/* Bandeau de maintenance (site en cours de mise à jour) */
.maint-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.5rem; background: rgba(8, 10, 14, 0.82); backdrop-filter: blur(6px); }
.maint-box { max-width: 420px; text-align: center; background: #151920; border: 1px solid var(--line); border-radius: 16px; padding: 1.75rem 1.5rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.maint-box h2 { font-size: 1.8rem; }
.maint-box p { color: var(--muted); margin-top: 0.6rem; }
.maint-wait { display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 1.2rem; padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; color: #c7ccd5; }
.maint-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); animation: maint-pulse 1.4s ease-in-out infinite; }
@keyframes maint-pulse { 50% { opacity: 0.25; } }

/* ---------- Tableaux en cartes sur mobile ---------- */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; }
  table.rtable, table.rtable tbody { display: block; width: 100%; }
  table.rtable thead { display: none; }
  table.rtable tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.9rem;
    padding: 0.85rem 0.9rem; margin-bottom: 0.6rem;
    border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface-2);
  }
  table.rtable td { display: flex; flex-direction: column; gap: 0.15rem; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  table.rtable td::before { content: attr(data-label); font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
  /* première colonne = titre de la carte */
  table.rtable td:first-child { grid-column: 1 / -1; padding-bottom: 0.45rem; margin-bottom: 0.2rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  table.rtable td:first-child::before { display: none; }
  table.rtable td.rt-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.4rem; }
  table.rtable td.rt-actions::before { display: none; }
  table.rtable td.rt-actions:empty { display: none; }
  table.rtable td[data-label=""]::before { display: none; }
  table.rtable td input[type="number"] { width: 6rem !important; }
  table.rtable td select { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card b { font-size: 1.8rem; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; padding-left: 0.5rem; padding-right: 0.5rem; }
}
@media (max-width: 760px) {
  table.rtable td .status { white-space: normal; align-self: flex-start; }
  table.rtable td[data-label="Situation"], table.rtable td[data-label="GM Discord"] { grid-column: 1 / -1; }
}
.auto-week { align-self: center; padding-bottom: 0.6rem; } @media (max-width: 760px) { .auto-week { flex-basis: 100%; order: 5; padding: 0; } }
@media (max-width: 760px) { .my-matches { grid-template-columns: 1fr; } }

/* ---------- Messagerie (pastille flottante) ---------- */
.unread-count { min-width:20px; height:20px; display:grid; place-items:center; border-radius:999px; background:var(--red); color:#fff; font-weight:700; font-size:.72rem; padding:0 6px; }
.tag { font-size:.68rem; font-weight:700; padding:.15rem .45rem; border-radius:999px; letter-spacing:.02em; }
.tag-litige { color:#ff8c91; background:var(--red-soft); border:1px solid #5a2328; }
.tag-caler { color:var(--amber); background:var(--amber-soft); border:1px solid #5b4517; }
.tag-ok { color:#6fd796; background:var(--green-soft); border:1px solid #24502f; }
.tag-admin { color:#fff; background:linear-gradient(90deg,#3157d8,#b4213a); }

.chat { display:flex; flex-direction:column; min-height:0; }
.chat-head { padding:12px 16px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; background:#12161d; }
.chat-head .vs { display:flex; align-items:center; gap:8px; }
.chat-head .vs img { width:38px; height:38px; }
.chat-head .vs i { font: 700 .85rem var(--display); color:var(--muted); font-style:normal; }
.chat-head .ttl b { font: 700 1.1rem/1.1 var(--display); display:block; }
.chat-head .ttl span { font-size:.8rem; color:var(--muted); }
.chat-head .actions { margin-left:auto; display:flex; gap:8px; }
.privacy { font-size:.78rem; color:var(--muted); text-align:center; padding:8px 12px; border-bottom:1px solid rgba(43,49,60,.6); background:rgba(13,16,21,.6); }
.msgs { flex:1; overflow:auto; padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
.day { align-self:center; font-size:.72rem; color:var(--muted); padding:.2rem .6rem; border:1px solid var(--line); border-radius:999px; }
.sys { align-self:center; max-width:80%; text-align:center; font-size:.8rem; color:#c7ccd5; background:#1a1f28; border:1px dashed #333b48; border-radius:10px; padding:.45rem .75rem; }
.sys b { color:#fff; }
.m { display:flex; gap:8px; align-items:flex-end; max-width:78%; }
.m img { width:28px; height:28px; flex:none; }
.bubble { padding:.55rem .8rem; border-radius:16px; background:#232935; line-height:1.4; font-size:.94rem; }
.bubble .author { display:block; font-size:.72rem; font-weight:700; color:#9fb4ff; margin-bottom:2px; }
.bubble time { display:block; font-size:.68rem; color:var(--muted); margin-top:3px; text-align:right; }
.m.me { align-self:flex-end; flex-direction:row-reverse; }
.m.me .bubble { background:linear-gradient(135deg,#3157d8,#2a46b8); color:#fff; border-bottom-right-radius:5px; }
.m.me .bubble time { color:rgba(255,255,255,.7); }
.m.them .bubble { border-bottom-left-radius:5px; }
.m.admin .bubble { background:#2b1b22; border:1px solid #6b2a35; }
.m.admin .bubble .author { color:#ff9aa0; }
.admin-av { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,#3157d8,#b4213a); color:#fff; font:700 .72rem var(--display); flex:none; }
.prop { align-self:center; width:min(380px, 92%); border:1px solid #2a3a78; background:#141c38; border-radius:14px; padding:12px 14px; display:grid; gap:8px; }
.prop .h { font-size:.78rem; color:#a9bcff; font-weight:600; }
.prop .slot { font: 700 1.3rem/1 var(--display); }
.prop .row { gap:8px; }
.expire { margin:0; text-align:center; font-size:.8rem; padding:8px 12px; background:var(--green-soft); color:#9fe0b6; border-bottom:1px solid #24502f; }
.composer { border-top:1px solid var(--line); padding:10px 12px; display:grid; gap:8px; background:#12161d; }
.composer .tools { display:flex; gap:8px; flex-wrap:wrap; }
.composer .tools button { min-height:32px; font-size:.82rem; padding:.35rem .7rem; }
.composer .line { display:flex; gap:8px; }
.composer input { flex:1; min-height:44px; border-radius:999px; padding:.6rem 1rem; }
.composer .send { border-radius:999px; min-width:44px; background:var(--jersey); color:var(--ink); border-color:var(--jersey); }
.btn-admin { background:transparent; border-color:#6b2a35; color:#ff9aa0; }
.notif { position:fixed; right:22px; bottom:22px; z-index:60; display:flex; gap:12px; align-items:center; background:#1b2029; border:1px solid #3a4352; border-left:4px solid var(--red); border-radius:12px; padding:12px 14px; box-shadow:0 18px 50px rgba(0,0,0,.55); width:340px; }
.notif img { width:40px; height:40px; }
.notif b { font: 700 1rem var(--display); display:block; }
.notif span { font-size:.85rem; color:#c7ccd5; }
.fixture .contact { border-color:#2a3a78; color:#a9bcff; }
.unread-pill { display:inline-flex; gap:6px; align-items:center; font-size:.78rem; font-weight:700; color:#fff; background:var(--red); padding:.2rem .55rem; border-radius:999px; }
.back { font-size:1.4rem; background:none; border:0; min-height:0; padding:0 4px; color:var(--text); }
@media (max-width: 760px) {
  .msgr { grid-template-columns: 1fr; height: calc(100vh - 140px); border-radius:12px; }
  .msgs { padding:12px; }
  .m { max-width:88%; }
  .notif { left:12px; right:12px; width:auto; bottom:12px; }
}
.bubble .author { text-align:left; }
.conv > div:nth-child(2) { min-width:0; }
.notif { top: 84px; bottom: auto; }
@media (max-width: 760px) { .notif { top: 70px; } }
/* ---------- Pastille de discussion flottante (maquette) ---------- */
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #3157d8, #2a3fa8 55%, #b4213a); color: #fff; border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 0 6px rgba(49,87,216,.15); cursor: pointer; }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .badge { position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #e3262f; color: #fff;
  font: 700 .8rem/24px var(--body); text-align: center; border: 2px solid #0d1015; }
.chat-fab.pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(227,38,47,.7); animation: fabpulse 1.6s ease-out infinite; }
@keyframes fabpulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.chat-peek { position: fixed; right: 24px; bottom: 100px; z-index: 70; width: 320px; display: flex; gap: 10px; align-items: flex-start;
  background: #1b2029; border: 1px solid #3a4352; border-radius: 16px 16px 4px 16px; padding: 12px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.chat-peek img { width: 38px; height: 38px; flex: none; }
.chat-peek b { font: 700 1rem var(--display); display: block; }
.chat-peek span { font-size: .88rem; color: #d7dbe2; }
.chat-peek .x { margin-left: auto; color: var(--muted); font-size: 1.1rem; line-height: 1; }
.chat-panel { position: fixed; right: 24px; bottom: 100px; z-index: 70; width: 390px; height: min(620px, calc(100vh - 130px)); display: flex; flex-direction: column;
  background: #151920; border: 1px solid #2f3643; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.chat-panel .ph { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(100deg, #1c2a5c, #151920 70%); border-bottom: 1px solid #2f3643; }
.chat-panel .ph h3 { font: 700 1.25rem var(--display); }
.chat-panel .ph .sp { flex: 1; }
.chat-panel .ph button { min-height: 32px; padding: .3rem .6rem; }
.chat-panel .tricolore { height: 3px; }
.chat-panel .convs { flex: 1; overflow: auto; }
.chat-panel .msgs { padding: 12px; }
.chat-panel .m { max-width: 86%; }
@media (max-width: 760px) {
  .chat-fab { right: 16px; bottom: 96px; width: 58px; height: 58px; }
  .chat-peek { right: 16px; left: 16px; width: auto; bottom: 166px; }
  .chat-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; }
}

/* compléments widget */
.chat-panel .chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-panel .chat-head { padding: 10px 12px; }
.chat-panel .conv { display:grid; grid-template-columns: 46px 1fr auto; gap:10px; align-items:center; padding:12px 14px; border-bottom:1px solid rgba(43,49,60,.6); position:relative; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; border-radius: 0; text-align: left; width: 100%; min-height: 0; color: var(--text); }
.chat-panel .conv:hover { background: rgba(255,255,255,.03); }
.chat-panel .conv > div:nth-child(2) { min-width: 0; }
.chat-panel .conv .t { font: 700 1rem/1.15 var(--display); display:flex; gap:6px; align-items:center; flex-wrap: wrap; }
.chat-panel .conv .s { font-size:.76rem; color:var(--muted); margin-top:2px; }
.chat-panel .conv .p { font-size:.85rem; color:#aeb5c2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:3px; }
.chat-panel .conv .r { display:grid; justify-items:end; gap:6px; font-size:.72rem; color:var(--muted); }
.chat-panel .conv.unread { background: rgba(227,38,47,.08); }
.chat-panel .conv.unread .p { color:#fff; font-weight:600; }
.chat-panel .conv.unread .t::after { content:""; width:8px; height:8px; border-radius:50%; background:var(--red); box-shadow:0 0 0 3px rgba(227,38,47,.25); }
.chat-panel .conv-filters { display:flex; gap:6px; flex-wrap:wrap; }
.chat-panel .conv-filters button { font-size:.76rem; font-weight:600; padding:.3rem .6rem; border-radius:999px; min-height: 0; }
.chat-panel .conv-filters button.on { background:var(--jersey); color:var(--ink); border-color:var(--jersey); }
.chat-panel .empty { padding: 1.5rem 1rem; color: var(--muted); text-align: center; }
.pair { display:flex; gap:2px; align-items:center; }
.group-av { width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:#232935; border:1px solid var(--line); font-size:1.2rem; }
.bubble .hide-btn { background:none; border:0; min-height:0; padding:0; margin-left:8px; font-size:.68rem; color:var(--muted); text-decoration:underline; }
.bubble.hidden { font-style: italic; color: var(--muted); }
.prop.done { border-color:#24502f; background: var(--green-soft); }
.prop.stale { opacity:.55; }
.picker-row { display:grid; gap:8px; padding:10px 12px; border-top:1px solid var(--line); background:#151a22; }
.people { overflow:auto; flex:1; padding: 6px 12px; display:grid; gap:6px; align-content:start; }
.people label { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; border:1px solid var(--line); margin:0; font-weight:500; }
.people label.sel { border-color:#7d9bff; background:rgba(49,87,216,.18); }
.people h4 { font: 700 .78rem var(--display); color: var(--muted); margin: 8px 2px 0; letter-spacing:.03em; }
body:has(.actionbar) .chat-fab { bottom: 96px; }
body:has(.actionbar) .chat-peek, body:has(.actionbar) .chat-panel { bottom: 170px; }
@media (max-width: 760px) {
  body:has(.actionbar) .chat-fab { bottom: 150px; }
  body:has(.actionbar) .chat-peek { bottom: 220px; }
  body:has(.actionbar) .chat-panel { bottom: 0; }
}
.chat-root [hidden], .chat-panel[hidden], .chat-peek[hidden], .chat-fab[hidden] { display: none !important; }

/* ---------- Admin : barre de semaine commune, étapes, compteurs ---------- */
.weekbar { position: sticky; top: 0; z-index: 15; margin: 0 -1rem 1rem; padding: 0.6rem 1rem 0; background: rgba(13, 16, 21, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.more-menu { position: relative; padding-bottom: 0.6rem; }
.more-menu summary { list-style: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0.3rem 0.8rem; cursor: pointer; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-list { position: absolute; right: 0; top: calc(100% - 0.3rem); z-index: 20; min-width: 220px; display: grid; gap: 2px; padding: 6px; background: #1b2029; border: 1px solid #3a4352; border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.more-list button { justify-content: flex-start; width: 100%; min-height: 38px; }
.stepper { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.st { position: relative; padding: 0.7rem 0.6rem 0.7rem 2.6rem; border: 1px solid var(--line); background: var(--surface); font-size: 0.86rem; line-height: 1.25; }
.st:first-child { border-radius: 12px 0 0 12px; }
.st:last-child { border-radius: 0 12px 12px 0; }
.st + .st { border-left: 0; }
.st b { display: block; font: 700 1rem var(--display); }
.st span { color: var(--muted); font-size: 0.78rem; }
.st::before { content: attr(data-n); position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 0.8rem var(--display); background: var(--surface-3); color: var(--muted); }
.st.done::before { content: "✓"; background: var(--green); color: #fff; }
.st.cur { background: linear-gradient(180deg, rgba(49, 87, 216, 0.25), rgba(49, 87, 216, 0.08)); border-color: #3d5bd0; }
.st.cur::before { background: #3157d8; color: #fff; box-shadow: 0 0 0 4px rgba(49, 87, 216, 0.25); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; }
.kpi b { font: 700 1.9rem/1 var(--display); }
.kpi b small { font-size: 1rem; color: var(--muted); }
.kpi span { display: block; font-weight: 600; margin-top: 2px; }
.kpi em { font-style: normal; color: var(--muted); font-size: 0.8rem; }
.kpi.warn { border-color: #5b4517; }
.kpi.bad { border-color: #5a2328; }
.alert-box { display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 1rem; padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid #5b4517; background: var(--amber-soft); }
.alert-box.bad { border-color: #5a2328; background: var(--red-soft); }
.panel.later { opacity: 0.7; }
.panel.later .btn-go:disabled { opacity: 0.6; }
@media (max-width: 760px) {
  .stepper { grid-template-columns: 1fr; }
  .st:not(.cur) { display: none; }
  .st.cur, .st.cur:first-child, .st.cur:last-child { border-radius: 10px; border-left: 1px solid #3d5bd0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .weekbar { margin: 0 -0.75rem 1rem; padding: 0.5rem 0.75rem 0; }
}

@media (max-width: 760px) { .st.cur b::after { content: "  ·  étape " attr(data-n) " sur 5"; font: 600 0.75rem var(--body); color: var(--muted); } }

/* ---------- v2.3.0 : scores, cartons rouges, classement ---------- */
.score-entry { display: grid; justify-items: center; gap: 3px; }
.score-fields { display: flex; align-items: center; gap: 6px; }
.score-sep { font: 700 1.1rem var(--display); color: var(--muted); }
.score-input {
  width: 3.1rem; min-height: 44px; padding: 0.2rem 0.1rem; text-align: center;
  font: 700 1.5rem var(--display); font-variant-numeric: tabular-nums;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-s);
  -moz-appearance: textfield; appearance: textfield;
}
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input::placeholder { color: var(--muted); font-weight: 400; }
.score-input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.score-status { min-height: 1.1em; font-size: 0.72rem; color: var(--muted); }
.score-status.ok { color: #6fd796; }
.score-status.bad { color: #ff8c91; }
.faceoff i.score-final { font: 700 1.6rem var(--display); color: var(--jersey); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.red-card-icon { display: inline-block; width: 0.7em; height: 1em; border-radius: 2px; background: var(--red); vertical-align: -0.12em; flex: none; }
.red-cards { display: grid; gap: 0.35rem; }
.red-card-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.red-card { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid #5a2328; background: var(--red-soft); font-size: 0.85rem; }
.red-card small { color: var(--muted); }
.red-card-x { border: 0; background: transparent; color: #ff8c91; min-width: 28px; min-height: 28px; padding: 0; border-radius: 50%; line-height: 1; }
.red-card-note { margin: 0; font-size: 0.82rem; color: #ff8c91; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.red-card-note b { color: var(--text); }
.red-card-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
.red-card-form { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.red-card-form[hidden] { display: none; }
.red-card-form select, .red-card-form input { flex: 1 1 8rem; min-height: 40px; min-width: 0; }
.red-card-form .btn-small { min-height: 40px; }

.standings-wrap { overflow-x: auto; }
table.standings { font-size: 0.95rem; }
table.standings th.num, table.standings td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.standings td { padding: 0.45rem 0.6rem; }
table.standings td.rank, table.standings th.rank { width: 2.2rem; text-align: center; font-family: var(--display); font-weight: 700; color: var(--muted); }
table.standings td.rank-1 { color: #e9c15a; }
table.standings td.rank-2 { color: #c7ccd5; }
table.standings td.rank-3 { color: #d98a4a; }
table.standings td.team { width: 100%; }
.team-cell { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.team-cell b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
table.standings td.pts { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
table.standings td.diff.pos { color: #6fd796; }
table.standings td.diff.neg { color: #ff8c91; }
table.standings tr.is-me td { background: rgba(49, 87, 216, 0.14); }
table.standings tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.forme { display: inline-flex; gap: 3px; }
.form-dot { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; font: 700 0.68rem var(--body); color: #fff; }
.form-V { background: var(--green); }
.form-N { background: #5b6370; }
.form-D { background: var(--red); }

.results-group h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.results-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.result-card.is-mine { border-color: var(--blue); }

@media (max-width: 640px) {
  .col-extra { display: none; }
  table.standings td { padding: 0.55rem 0.4rem; }
  table.standings td.rank, table.standings th.rank { width: 1.6rem; }
  .results-grid { grid-template-columns: 1fr; }
}
