/* SVG Team Hub — Sauvagerie Gaming
   Direction : sombre, nette, violet utilisé comme signal, pas comme décor. */
:root {
  --bg: #08070b;
  --bg-2: #0e0c14;
  --surface: #14111c;
  --surface-2: #1b1726;
  --line: #2a2438;
  --line-2: #3a3250;
  --primary: #2c263f;          /* violet foncé principal */
  --accent: #4c004c;           /* violet intense secondaire */
  --glow: #b14cff;             /* accent lumineux, avec modération */
  --glow-soft: rgba(177, 76, 255, .14);
  --text: #f1eee8;             /* blanc cassé */
  --muted: #9a94a8;
  --faint: #6b657a;
  --win: #2fd47a;
  --win-bg: rgba(47, 212, 122, .12);
  --loss: #ff4d5e;
  --loss-bg: rgba(255, 77, 94, .12);
  --soon: #ff9a2e;
  --soon-bg: rgba(255, 154, 46, .13);
  --info-bg: rgba(177, 76, 255, .12);
  --radius: 10px;
  --radius-sm: 7px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --sidebar: 236px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; margin: 0; line-height: 1.2; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-logo { width: 38px; height: 38px; flex: none; }
.brand-logo img, .brand-logo svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); padding: 14px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; transition: background .15s, color .15s; position: relative;
}
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { background: var(--primary); color: var(--text); }
.nav-link.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--glow); }
.nav-link svg { width: 18px; height: 18px; flex: none; }
.nav-badge { margin-left: auto; background: var(--glow); color: #120018; font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 0 7px; min-width: 20px; text-align: center; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.user-chip:hover { background: var(--surface); }
.user-chip .meta { min-width: 0; }
.user-chip .name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .role { font-size: .74rem; color: var(--muted); }

.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: 1280px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--glow); font-weight: 600; margin-bottom: 4px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Mobile ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: 10px 16px; background: rgba(8, 7, 11, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .topbar .brand-logo { width: 30px; height: 30px; }
  .topbar .spacer { flex: 1; }
  .main { padding: 18px 16px 100px; }
  h1 { font-size: 1.35rem; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(14, 12, 20, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .66rem; color: var(--muted); padding: 5px 0; border-radius: 8px; position: relative; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active svg { color: var(--glow); }
  .tabbar .dot { position: absolute; top: 3px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--glow); }
}
.icon-btn { background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px; cursor: pointer; color: var(--muted); position: relative; display: inline-flex; }
.icon-btn:hover { color: var(--text); background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); }

/* ---------- Cartes & grilles ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 1rem; }
.card-head .link { font-size: .82rem; color: var(--muted); }
.card-head .link:hover { color: var(--glow); }
.card.hoverable { transition: border-color .15s, transform .15s, background .15s; cursor: pointer; }
.card.hoverable:hover { border-color: var(--line-2); background: var(--surface-2); }
.card.flush { padding: 0; overflow: hidden; }
.card-section { padding: 16px 18px; border-top: 1px solid var(--line); }
.card-section:first-child { border-top: 0; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stat .value { font-family: var(--display); font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.stat.win .value { color: var(--win); }
.stat.loss .value { color: var(--loss); }
.stat.soon .value { color: var(--soon); }

/* Carte "prochain événement" */
.next {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(76, 0, 76, .55), transparent 55%), var(--surface);
}
.next .kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.next .title { font-family: var(--display); font-size: 1.3rem; font-weight: 700; margin: 8px 0 2px; }
.next .vs { color: var(--muted); font-weight: 500; }
.next .when { color: var(--text); font-weight: 500; }
.countdown { font-family: var(--display); font-size: .82rem; font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 28px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty svg { width: 28px; height: 28px; margin: 0 auto 8px; color: var(--faint); }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.win, .badge.going { color: var(--win); background: var(--win-bg); border-color: transparent; }
.badge.loss, .badge.absent, .badge.urgent, .badge.cancelled { color: var(--loss); background: var(--loss-bg); border-color: transparent; }
.badge.soon, .badge.pending, .badge.important, .badge.postponed { color: var(--soon); background: var(--soon-bg); border-color: transparent; }
.badge.accent { color: #e3c2ff; background: var(--info-bg); border-color: transparent; }
.badge.solid { background: var(--primary); color: var(--text); border-color: transparent; }
.type-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.t-official { background: var(--glow); } .t-scrim { background: #6aa7ff; } .t-training { background: var(--win); }
.t-tournament { background: #ffd34d; } .t-meeting { background: #9a94a8; } .t-other { background: #d58cff; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; min-height: 38px;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: #6d1a6d; }
.btn.primary:hover { background: #5e0a5e; border-color: var(--glow); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.danger { color: var(--loss); }
.btn.danger:hover { border-color: var(--loss); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: .8rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }

/* Boutons de présence : gros et accessibles au pouce */
.rsvp { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.rsvp button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: .85rem; transition: all .15s;
}
.rsvp button svg { width: 22px; height: 22px; }
.rsvp button:hover { border-color: var(--muted); }
.rsvp button.on.going { background: var(--win-bg); border-color: var(--win); color: var(--win); }
.rsvp button.on.absent { background: var(--loss-bg); border-color: var(--loss); color: var(--loss); }
.rsvp button.on.pending { background: var(--soon-bg); border-color: var(--soon); color: var(--soon); }
.rsvp button[disabled] { opacity: .45; cursor: not-allowed; }
.rsvp-mini { display: inline-flex; gap: 4px; }
.rsvp-mini button { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 7px; padding: 4px 9px; cursor: pointer; font-size: .78rem; font-weight: 600; }
.rsvp-mini button.on.going { color: var(--win); border-color: var(--win); background: var(--win-bg); }
.rsvp-mini button.on.absent { color: var(--loss); border-color: var(--loss); background: var(--loss-bg); }

/* Barre de répartition présences */
.att-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--line); }
.att-bar span { display: block; height: 100%; }
.att-bar .g { background: var(--win); } .att-bar .a { background: var(--loss); } .att-bar .p { background: var(--soon); opacity: .7; }
.att-legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.att-legend b { color: var(--text); font-family: var(--display); }
.att-legend .g b { color: var(--win); } .att-legend .a b { color: var(--loss); } .att-legend .p b { color: var(--soon); }

/* ---------- Listes ---------- */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row.link { cursor: pointer; border-radius: 6px; }
.row.link:hover .row-title { color: var(--glow); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.row-sub { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-tile { width: 46px; flex: none; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 0; }
.date-tile .d { font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.date-tile .m { font-size: .66rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.result-pill { font-family: var(--display); font-weight: 700; padding: 3px 10px; border-radius: 6px; min-width: 52px; text-align: center; }
.result-pill.win { color: var(--win); background: var(--win-bg); }
.result-pill.loss { color: var(--loss); background: var(--loss-bg); }
.result-pill.draw { color: var(--muted); background: var(--surface-2); }

/* Tableaux → listes sur mobile */
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--surface-2); }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
  .table td[data-label=""]::before { content: none; }
}

/* ---------- Avatars & joueurs ---------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; font-family: var(--display); font-weight: 700; flex: none; overflow: hidden; color: #e3c2ff; font-size: .9rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.7rem; border: 2px solid var(--line-2); }
.avatar.sm { width: 28px; height: 28px; font-size: .72rem; }
.player-card { display: flex; flex-direction: column; gap: 12px; }
.player-card .top { display: flex; gap: 12px; align-items: center; }
.player-card .nick { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.player-card .riot { font-size: .82rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: .76rem; padding: 2px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; }
.role-icon { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--muted); }
.source { font-size: .72rem; color: var(--faint); display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .form-row, .form-row.three { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .field .lbl { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field .hint { font-size: .76rem; color: var(--faint); }
.field .err { font-size: .76rem; color: var(--loss); }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px;
  min-height: 40px; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 3px var(--glow-soft); }
.input.invalid { border-color: var(--loss); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .9rem; padding: 4px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--glow); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .84rem; }
.seg button.on { background: var(--primary); color: var(--text); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { width: auto; min-width: 140px; flex: 1 1 140px; }
.map-row { display: grid; grid-template-columns: 1.4fr .7fr .7fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 600px) { .map-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Calendrier ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-head .period { font-family: var(--display); font-weight: 700; font-size: 1.15rem; min-width: 170px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--bg-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px; text-align: center; }
.cal .day { background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal .day:hover { background: var(--surface-2); }
.cal .day.other { background: var(--bg-2); }
.cal .day.other .num { color: var(--faint); }
.cal .num { font-size: .8rem; font-weight: 600; color: var(--muted); }
.cal .day.today .num { background: var(--glow); color: #120018; border-radius: 99px; width: 24px; height: 24px; display: grid; place-items: center; }
.cal .ev { display: flex; gap: 5px; align-items: center; font-size: .74rem; padding: 2px 5px; border-radius: 5px; background: var(--surface-2); white-space: nowrap; overflow: hidden; min-width: 0; }
.cal .ev span.t { overflow: hidden; text-overflow: ellipsis; }
.cal .ev:hover { background: var(--primary); }
.cal .ev.cancelled { text-decoration: line-through; opacity: .55; }
.cal .more { font-size: .72rem; color: var(--muted); padding-left: 4px; }
@media (max-width: 700px) {
  .cal .day { min-height: 54px; padding: 4px; align-items: center; }
  .cal .ev { display: none; }
  .cal .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
  .cal .more { display: none; }
}
@media (min-width: 701px) { .cal .dots { display: none; } }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 220px; min-width: 0; }
.week .col.today { border-color: var(--glow); }
.week .col-head { font-size: .78rem; color: var(--muted); margin-bottom: 8px; text-transform: capitalize; }
.week .col-head b { display: block; font-family: var(--display); color: var(--text); font-size: 1.1rem; }
.week .wev { display: block; padding: 7px 8px; border-radius: 7px; background: var(--surface-2); border-left: 3px solid var(--glow); margin-bottom: 6px; font-size: .8rem; }
.week .wev:hover { background: var(--primary); }
.week .wev .h { color: var(--muted); font-size: .74rem; }
.week .wev.cancelled { opacity: .5; text-decoration: line-through; }
@media (max-width: 900px) { .week { grid-template-columns: 1fr; } .week .col { min-height: 0; } }

/* ---------- Modale, toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; width: 100%; max-width: 620px; animation: rise .18s ease-out; }
.modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 600px) { .modal-back { padding: 0; align-items: flex-end; } .modal { border-radius: 14px 14px 0 0; max-height: 92vh; overflow-y: auto; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .toasts { bottom: 86px; left: 16px; right: 16px; } }
.toast { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--glow); border-radius: 9px; padding: 11px 14px; font-size: .88rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: rise .2s; max-width: 380px; }
.toast.err { border-left-color: var(--loss); }
.toast.ok { border-left-color: var(--win); }

/* ---------- Divers ---------- */
.notice { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--info-bg); border: 1px solid rgba(177, 76, 255, .25); font-size: .86rem; align-items: flex-start; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--glow); }
.notice.warn { background: var(--soon-bg); border-color: rgba(255, 154, 46, .3); } .notice.warn svg { color: var(--soon); }
.notice.err { background: var(--loss-bg); border-color: rgba(255, 77, 94, .3); } .notice.err svg { color: var(--loss); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .82rem; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-color: var(--glow); }
.form-strip { display: flex; gap: 3px; }
.form-strip span { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; font-family: var(--display); }
.form-strip .win { background: var(--win-bg); color: var(--win); } .form-strip .loss { background: var(--loss-bg); color: var(--loss); } .form-strip .draw { background: var(--surface-2); color: var(--muted); }
.mapbar { display: grid; grid-template-columns: 90px 1fr 70px; gap: 10px; align-items: center; font-size: .86rem; padding: 6px 0; }
.mapbar .bar { height: 8px; background: var(--loss-bg); border-radius: 99px; overflow: hidden; }
.mapbar .bar span { display: block; height: 100%; background: var(--win); border-radius: 99px; }
.loading { display: grid; place-items: center; padding: 60px; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line-2); border-top-color: var(--glow); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hr { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; letter-spacing: .12em; background: var(--bg-2); border: 1px dashed var(--glow); padding: 14px; border-radius: 8px; text-align: center; user-select: all; }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.notif:first-child { border-top: 0; }
.notif.unread { background: linear-gradient(90deg, var(--glow-soft), transparent 60%); }
.notif .bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--glow); margin-top: 7px; flex: none; }
.notif:not(.unread) .bullet { background: transparent; }
.ann { border-left: 3px solid var(--line-2); }
.ann.important { border-left-color: var(--soon); }
.ann.urgent { border-left-color: var(--loss); }
.ann.unread .ann-title::after { content: ''; display: inline-block; width: 7px; height: 7px; background: var(--glow); border-radius: 50%; margin-left: 8px; vertical-align: middle; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(76, 0, 76, .45), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 410px; }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .brand-logo { width: 64px; height: 64px; margin: 0 auto 12px; }
.auth-brand h1 { font-size: 1.5rem; }
.auth-brand p { color: var(--muted); margin: 4px 0 0; }
.riot-btn { background: #1c1c1c; border-color: #3a3a3a; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: .78rem; margin: 6px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

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

/* ---------- Correctifs ---------- */
.shell > div { min-width: 0; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.next .kicker svg { width: 16px; height: 16px; }
.row.wrap { flex-wrap: wrap; }
@media (max-width: 600px) { .row.wrap > .inline { width: 100%; } .row.wrap > .inline .btn { flex: 1; } }
.cap::first-letter { text-transform: uppercase; }

/* ---------- App installable ---------- */
.install-card:not([hidden]) { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: linear-gradient(90deg, rgba(76, 0, 76, .45), var(--surface) 70%); border-color: rgba(177, 76, 255, .3); }
.install-card img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--surface-2); font-size: .85em; }
.brand-logo img { object-fit: contain; }
@media (max-width: 900px) { .topbar { padding-top: calc(10px + env(safe-area-inset-top)); } }
@media (display-mode: standalone) { .auth { padding-top: calc(24px + env(safe-area-inset-top)); } }
.push-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.push-ico svg { width: 22px; height: 22px; }
/* ---------- Réorganisation des joueurs ---------- */
.reorder-row { display: flex; padding: 10px 14px; cursor: grab; background: var(--surface); }
.reorder-row.dragging { opacity: .5; background: var(--primary); }
.drag-handle { color: var(--faint); letter-spacing: -2px; font-weight: 700; user-select: none; }
.reorder-pos { font-family: var(--display); font-weight: 700; color: var(--glow); width: 18px; text-align: center; }
.rot90 { transform: rotate(90deg); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
@media (pointer: coarse) { .drag-handle { display: none; } .reorder-row { cursor: default; } }
