/* ============================================================================
   Rift Ready — style « champ select » (bleu nuit, or sable, bleu électrique, rouge : les couleurs du logo)
   Palette calée sur le logo (nov. 2026 #34), dessinée à la main, dessinée à la main (aucun fichier graphique Riot
   hormis les portraits / splash arts de Data Dragon).
============================================================================ */
:root {
  --void: #010a13;
  --navy: #091428;
  --navy-2: #0a1428;
  --panel: rgba(1, 10, 19, 0.78);
  --panel-solid: #0b1622;
  --panel-2: #1e2328;

  --gold-1: #f0e6d2;   /* texte principal */
  --gold-2: #e8bf7a;   /* titres, bordures actives */
  --gold-3: #d6a14f;
  --gold-4: #785a28;   /* bordures */
  --gold-5: #463714;
  --accent-rgb: 232, 191, 122; /* teinte d'accent (fonds, liserés transparents) */
  --line-rgb: 120, 90, 40;     /* teinte des traits */
  --accent-2-rgb: 200, 155, 60; /* fonds des onglets / boutons actifs */

  --blue-1: #d8e8ff;
  --blue-2: #2f86ff;   /* bleu du logo : alliés, « tu gères » */
  --blue-3: #1d6ff0;
  --blue-4: #0b47c4;
  --blue-5: #0a2560;

  --red-1: #ff8d8d;
  --red-2: #ff3048;    /* ennemis, dangers */
  --red-5: rgba(255, 48, 72, 0.14);

  --grey-1: #a09b8c;   /* texte secondaire (contraste ≈ 7:1 sur le fond) */
  --grey-2: #8a8678;
  --line: rgba(var(--line-rgb), 0.55);
  --line-soft: rgba(var(--line-rgb), 0.28);

  --side-blue: #2a7dff;  /* side bleu (comme les bandeaux du client / des retransmissions) */
  --side-red: #f0304a;   /* side rouge */
  --my-side: var(--side-blue);

  --title: "Barlow Semi Condensed", "Mulish", sans-serif; /* comme la Compétition (#34) */
  --cast: "Barlow Semi Condensed", "Mulish", sans-serif;
  --ui: "Mulish", system-ui, sans-serif;
  --splash: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--void);
  color: var(--gold-1);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; }
kbd {
  font-family: var(--ui); font-size: 0.7em; font-weight: 700;
  color: var(--gold-2); border: 1px solid var(--line); padding: 0 0.3em; margin-right: 0.35em;
}
[hidden] { display: none !important; }

/* ---------- fond : splash art + dégradés ---------- */
/* Indicateur de chargement des pages (retiré par common.js loadAll : html.rr-loaded) */
.page-loading { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 0.9rem; pointer-events: none;
  color: var(--gold-1); font-size: 0.9rem; letter-spacing: 0.06em; background: rgba(1, 10, 19, 0.55); animation: pl-in 0.2s 0.15s both; }
.page-loading::before { content: ""; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(var(--accent-rgb), 0.2); border-top-color: var(--gold-2); animation: pl-spin 0.9s linear infinite; }
html.rr-loaded .page-loading { display: none; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .page-loading::before { animation-duration: 3s; } }

/* Bandeau cookies (consent.js, seulement si la pub est activée) */
.cs-banner { position: fixed; left: 50%; bottom: 1rem; z-index: 900; transform: translateX(-50%); width: min(720px, calc(100% - 2rem));
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; padding: 0.9rem 1.1rem; background: #0b1520; border: 1px solid var(--gold-4);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6); color: var(--gold-1); font-size: 0.85rem; }
.cs-banner p { margin: 0; flex: 1 1 320px; line-height: 1.45; }
.cs-banner a { color: var(--gold-2); }
.cs-acts { display: flex; gap: 0.5rem; }

/* Logo dans le bouton Accueil */
.home-logo { width: 24px; height: 24px; display: block; object-fit: contain; }

/* Fenêtre de confirmation du site (dialog.js), à la place de confirm() du navigateur */
.dlg-back { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(1, 6, 12, 0.7); backdrop-filter: blur(3px); animation: dlg-in 0.15s ease-out; }
.dlg { width: min(440px, 100%); padding: 1.2rem 1.3rem 1rem; background: #0b1520; border: 1px solid var(--gold-4); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 24px 70px rgba(0, 0, 0, 0.65); color: var(--gold-1); animation: dlg-pop 0.18s ease-out; }
.dlg.danger { border-top: 2px solid var(--red-2); }
.dlg h2 { margin: 0 0 0.5rem; font-family: var(--title); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--gold-2); }
.dlg p { margin: 0 0 1.1rem; font-size: 0.92rem; line-height: 1.45; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.dlg-btn { min-width: 110px; padding: 0.5rem 1rem; font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; color: var(--gold-1); background: transparent; border: 1px solid var(--gold-4); }
.dlg-btn:hover, .dlg-btn:focus-visible { border-color: var(--gold-2); color: #fff; outline: none; }
.dlg-btn.main { background: linear-gradient(180deg, var(--panel-2), #10151a); border-color: var(--gold-2); }
.dlg.danger .dlg-btn.main { border-color: var(--red-2); color: #ffd7dc; }
.dlg.danger .dlg-btn.main:hover, .dlg.danger .dlg-btn.main:focus-visible { background: rgba(255, 48, 72, 0.18); }
@keyframes dlg-in { from { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .dlg-back, .dlg { animation: none; } }

.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(1, 10, 19, 0.55), rgba(1, 10, 19, 0.96) 75%),
    linear-gradient(180deg, rgba(1, 10, 19, 0.6), rgba(1, 10, 19, 0.92)),
    var(--splash) center 20% / cover no-repeat,
    radial-gradient(ellipse at 50% 0%, #0d2338, var(--void) 70%);
  filter: saturate(0.85);
  transition: background 0.6s ease;
}

.app {
  position: relative; z-index: 1;
  height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr);
}

/* ---------- barre de phase ---------- */
.phasebar {
  display: grid; grid-template-columns: 1fr minmax(0, 2fr) 1fr; align-items: center; gap: 1rem;
  padding: 0.9rem 1.4rem 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  width: 26px; height: 26px; transform: rotate(45deg);
  border: 2px solid var(--gold-3);
  background: linear-gradient(135deg, var(--blue-5), var(--void));
  box-shadow: inset 0 0 0 3px var(--void), inset 0 0 0 5px var(--blue-3);
}
.brand-name { font-family: var(--title); font-weight: 700; letter-spacing: 0.12em; font-size: 0.95rem; text-transform: uppercase; }
.brand-sub { font-size: 0.75rem; color: var(--grey-1); letter-spacing: 0.06em; }

.phase { text-align: center; }
.phase h1 {
  margin: 0; font-family: var(--title); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.25rem, 2.3vw, 2.1rem); letter-spacing: 0.06em; line-height: 1.1;
  color: var(--gold-1);
}
.phase-meter {
  position: relative; height: 4px; margin: 0.55rem auto 0.4rem; max-width: 520px;
  background: linear-gradient(90deg, transparent, var(--blue-5) 15%, var(--blue-5) 85%, transparent);
}
.phase-meter::before, .phase-meter::after {
  content: ""; position: absolute; top: -5px; width: 60px; height: 14px; border-top: 1px solid var(--gold-4);
}
.phase-meter::before { left: -70px; border-left: 1px solid var(--gold-4); transform: skewX(-35deg); }
.phase-meter::after { right: -70px; border-right: 1px solid var(--gold-4); transform: skewX(35deg); }
.phase-meter span {
  display: block; height: 100%; width: 0; margin: 0 auto;
  background: linear-gradient(90deg, var(--blue-3), var(--blue-2), var(--blue-3));
  transition: width 0.4s ease;
}
.phase-sub { margin: 0; color: var(--grey-1); font-size: 0.85rem; }

.controls { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.role-pick { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-2); }

select, input[type="text"], input[type="password"], input[type="url"], input[type="email"], input[type="search"], input[type="number"], textarea {
  font-family: var(--ui); font-size: 0.92rem; color: var(--gold-1);
  background: rgba(1, 10, 19, 0.85); border: 1px solid var(--gold-4); border-radius: 0;
  padding: 0.45rem 0.7rem; outline: none;
}
select { appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%), linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus-visible, input[type="text"]:focus, input[type="password"]:focus, input[type="url"]:focus, input[type="email"]:focus,
input[type="search"]:focus, input[type="number"]:focus, textarea:focus { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2); }
input::placeholder, textarea::placeholder { color: var(--grey-2); opacity: 1; }
/* Lisibilité (#34) : sur téléphone, toutes les tailles (en rem) grandissent d'un cran ; le plus petit texte ≈ 13 px. */
@media (max-width: 760px) { html { font-size: 17px; } }
option { background: var(--navy); }

/* bouton hextech */
.hx-btn {
  position: relative; cursor: pointer; white-space: nowrap;
  font-family: var(--title); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; /* comme les titres (#35) */
  color: var(--gold-1);
  background: linear-gradient(180deg, var(--panel-2), #10161c);
  border: 1px solid var(--gold-4); border-image: linear-gradient(180deg, var(--gold-2), var(--gold-4)) 1;
  padding: 0.5rem 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.hx-btn:hover { background: linear-gradient(180deg, #2a3038, #151c24); color: #fff; }
.hx-btn:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.hx-btn.small { padding: 0.35rem 0.65rem; font-size: 0.82rem; }
/* Bouton principal : bleu électrique dans les drafters (#35), bleu pétrole + liseré cyan sur les pages (#45) */
.hx-btn.primary {
  color: var(--btn-ink, #fff);
  background: linear-gradient(180deg, var(--btn-a, #1f6cf0), var(--btn-b, #0b3fb0));
  border-image: linear-gradient(180deg, var(--btn-line, #7fb2ff), var(--btn-b, #0b3fb0)) 1;
}
.hx-btn.primary:hover { background: linear-gradient(180deg, var(--btn-a-hover, #2f7bff), var(--btn-b-hover, #1048c4)); }
.hx-btn[aria-pressed="true"] { color: var(--blue-1); border-image: linear-gradient(180deg, var(--blue-2), var(--blue-4)) 1; }

/* ---------- scène : 3 colonnes ---------- */
.stage {
  display: grid; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 260px);
  gap: 1.2rem; padding: 0.4rem 1.4rem 0.8rem; min-height: 0;
}
.side { display: flex; flex-direction: column; gap: 0.6rem; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.side-head {
  font-family: var(--title); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-2); padding-bottom: 0.4rem; border-bottom: 1px solid var(--line-soft);
}
.side-head { display: flex; align-items: center; gap: 0.6rem; }
.side-right .side-head { flex-direction: row-reverse; }
.side-tag { font-family: var(--ui); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; padding: 0.15rem 0.45rem; color: #fff; }
/* Fond plus foncé que la couleur du side : texte blanc lisible (contraste ≥ 4,5:1, #34) */
.side-tag.blue { background: #1556cf; }
.side-tag.red { background: #c41f37; }
body { --enemy-side: var(--side-red); }
body[data-side="red"] { --my-side: var(--side-red); --enemy-side: var(--side-blue); }

/* ---------- sièges (une ligne par joueur, comme le client) ---------- */
.team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.seat {
  position: relative; display: flex; align-items: center; gap: 0.85rem;
  padding: 0.6rem 0.4rem 0.6rem 0.9rem; min-height: 86px;
  border-bottom: 1px solid var(--line-soft);
}
.seat::after { /* petit losange de séparation, comme dans le client */
  content: ""; position: absolute; left: 0; bottom: -4px; width: 6px; height: 6px;
  transform: rotate(45deg); border: 1px solid var(--gold-4); background: var(--void);
}
.side-right .seat { flex-direction: row-reverse; text-align: right; padding: 0.6rem 0.9rem 0.6rem 0.4rem; }
.side-right .seat::after { left: auto; right: 0; }

.seat-portrait {
  flex: none; width: 66px; height: 66px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  border: 2px solid var(--gold-4);
  background: radial-gradient(circle, #1a2a36, var(--void));
  box-shadow: inset 0 0 0 2px var(--void);
}
.seat-portrait img, .seat-portrait .av-fallback { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.seat-portrait .role-ico { width: 30px; height: 30px; color: var(--gold-4); }
.seat-text { min-width: 0; display: flex; flex-direction: column; }
.seat-role { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-1); }
.seat-name { font-family: var(--title); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-sub { font-size: 0.8rem; color: var(--grey-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat:not(.filled) .seat-name { color: var(--grey-2); font-family: var(--ui); font-weight: 500; font-size: 0.85rem; text-transform: none; letter-spacing: 0; }

.seat-tools { position: absolute; top: 6px; right: 4px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.15s; }
.side-right .seat-tools { right: auto; left: 4px; flex-direction: row-reverse; }
.seat:hover .seat-tools, .seat-tools:focus-within { opacity: 1; }
.seat-tool { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; cursor: pointer; background: rgba(1, 10, 19, 0.85); border: 1px solid var(--line); color: var(--gold-1); font-size: 0.95rem; line-height: 1; }
.seat-tool svg { width: 15px; height: 15px; }
.seat-tool:hover { border-color: var(--gold-2); }
.seat-tool.x:hover { color: var(--red-1); border-color: var(--red-2); }

/* bout de splash art sur la carte (comme le joueur qui survole un champion dans le client) */
.seat.has-art { background: linear-gradient(90deg, rgba(1, 10, 19, 0.94) 30%, rgba(1, 10, 19, 0.4) 78%, rgba(1, 10, 19, 0.7)), var(--seat-art) 70% 20% / cover no-repeat; }
.side-right .seat.has-art { background: linear-gradient(270deg, rgba(1, 10, 19, 0.94) 30%, rgba(1, 10, 19, 0.4) 78%, rgba(1, 10, 19, 0.7)), var(--seat-art) 30% 20% / cover no-repeat; }
.seat.ghost.has-art { background-blend-mode: normal, luminosity; }

/* le joueur en train de choisir : pulsation de la couleur de son side */
.seat.picking { animation: seat-pulse 1.6s ease-in-out infinite; }
.team-ally .seat.picking { --pulse: var(--my-side); }
.team-enemy .seat.picking { --pulse: var(--enemy-side); }
@keyframes seat-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pulse) 35%, transparent), inset 0 0 18px color-mix(in srgb, var(--pulse) 10%, transparent); }
  50% { box-shadow: inset 0 0 0 1px var(--pulse), inset 0 0 34px color-mix(in srgb, var(--pulse) 32%, transparent); }
}
.seat.picking .seat-name { color: var(--gold-1); }

/* glisser-déposer des alliés */
.team-ally .seat { cursor: grab; }
.team-ally .seat.dragging { opacity: 0.45; }
.team-ally .seat.dragging-champ .seat-portrait { opacity: 0.4; }
.team-ally .seat.drop-target { outline: 1px dashed var(--gold-2); outline-offset: -3px; }

/* bans sous chaque équipe */
.ban-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0 0.2rem; }
.side-right .ban-row { flex-direction: row-reverse; }
.ban-label { font-family: var(--title); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-1); background: none; border: 1px solid transparent; padding: 0.2rem 0.35rem; cursor: pointer; }
.ban-label:hover { color: var(--gold-1); }
.ban-label.active { color: var(--gold-1); border-color: var(--gold-2); }
.ban-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; flex: 1; }
.ban-slot { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--line-soft); background: rgba(1, 10, 19, 0.6); cursor: pointer; }
.ban-slot.empty { cursor: default; background: linear-gradient(45deg, transparent 47%, rgba(var(--accent-rgb), 0.18) 47% 53%, transparent 53%), rgba(1, 10, 19, 0.5); }
.ban-slot img, .ban-slot .av-fallback { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(0.85) brightness(0.7); }
.ban-slot:not(.empty)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(45deg, transparent 47%, var(--red-2) 47% 53%, transparent 53%); }
.ban-slot:hover { border-color: var(--red-2); }
.ban-slot .none-ico { filter: none; transform: scale(2.3); } /* le casque remplit la case */
.ban-slot:has(.none-ico)::after { display: none; }

.team-ally .seat.filled .seat-portrait { border-color: color-mix(in srgb, var(--my-side) 70%, var(--void)); }
.team-enemy .seat.filled .seat-portrait { border-color: #8f2a3a; }
.team-enemy .seat.lane .seat-sub { color: var(--red-1); font-weight: 700; }
.team-enemy .seat.lane .seat-portrait { border-color: var(--red-2); }

/* toi : ta ligne, avec la barre de la couleur de ton side */
.seat.you:not(.has-art) { background: linear-gradient(90deg, color-mix(in srgb, var(--my-side) 16%, transparent), transparent 85%); }
.side-right .seat.you:not(.has-art) { background: linear-gradient(270deg, color-mix(in srgb, var(--my-side) 16%, transparent), transparent 85%); }
.seat.you::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--my-side); }
.side-right .seat.you::before { left: auto; right: 0; }
.seat.you .seat-portrait { border-color: var(--my-side); width: 74px; height: 74px; }
.seat.you .seat-role { color: color-mix(in srgb, var(--my-side) 55%, #fff); }
.seat.you.ghost .seat-portrait img { opacity: 0.45; filter: grayscale(0.4); }
.seat.you .seat-sub b { color: var(--gold-2); font-weight: 700; }

/* zone « à placer » */
.overflow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.82rem; padding: 0.5rem; border: 1px dashed var(--line); background: var(--panel); }
.ov-label { color: var(--gold-2); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ov-champ { display: inline-flex; align-items: center; gap: 0.35rem; }
.ov-champ img, .ov-champ .av-fallback { width: 24px; height: 24px; }
.ov-roles button { font-size: 0.76rem; font-weight: 700; color: var(--gold-1); background: var(--panel-2); border: 1px solid var(--line); padding: 0.15rem 0.35rem; cursor: pointer; margin-left: 2px; }
.ov-roles button:hover { border-color: var(--gold-2); }

/* boîtes pool / bans */
.box { border: 1px solid var(--line-soft); background: var(--panel); padding: 0.7rem 0.8rem; }
.box summary, .box-head {
  font-family: var(--title); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2);
  cursor: default; list-style: none;
}
.box summary { cursor: pointer; }
.box summary::-webkit-details-marker { display: none; }
.box summary::after { content: " ▾"; color: var(--gold-4); }
.box:not([open]) summary::after { content: " ▸"; }
.count { color: var(--grey-1); font-family: var(--ui); font-weight: 600; letter-spacing: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; min-height: 30px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid var(--line-soft); background: rgba(1, 10, 19, 0.7); padding: 2px 4px 2px 2px; font-size: 0.8rem; }
.chip img, .chip .av-fallback { width: 26px; height: 26px; }
.chip button { background: none; border: none; color: var(--grey-1); cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0 2px; }
.chip button:hover { color: var(--red-1); }
.ban-chip img { filter: grayscale(0.8) brightness(0.8); }
.empty-line { color: var(--grey-1); font-size: 0.8rem; }
.switch-line { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.6rem; font-size: 0.8rem; color: var(--grey-1); }

.toggle { background: none; border: none; padding: 0; cursor: pointer; }
.toggle-track { display: inline-block; width: 40px; height: 20px; background: var(--void); border: 1px solid var(--gold-4); position: relative; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--gold-4); transition: transform 0.18s, background 0.18s; }
.toggle[aria-checked="true"] .toggle-track { border-color: var(--blue-2); }
.toggle[aria-checked="true"] .toggle-thumb { transform: translateX(20px); background: var(--blue-2); }
.toggle:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* ---------- centre ---------- */
.center { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 350px); gap: 1rem; min-height: 0; } /* grille plus large (#34) */
.picker { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); min-height: 0; }

.picker-tabs { display: flex; gap: 2px; margin-bottom: 0.55rem; align-items: stretch; }
.pool-seg { margin-left: 0.6rem; flex: none; }
.ptab {
  flex: 1; cursor: pointer; padding: 0.5rem 0.3rem; white-space: nowrap;
  font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-1); background: rgba(1, 10, 19, 0.7);
  border: 1px solid var(--line-soft); border-bottom: 2px solid transparent;
}
.ptab:hover { color: var(--gold-1); }
.ptab.active { color: var(--gold-1); border-color: var(--gold-4); border-bottom-color: var(--gold-2); background: linear-gradient(180deg, rgba(var(--accent-2-rgb), 0.14), rgba(1, 10, 19, 0.7)); }
.ptab[data-target="enemy"].active { border-bottom-color: var(--enemy-side); }
.ptab[data-target="ally"].active { border-bottom-color: var(--my-side); }
.ptab:focus-visible { outline: 2px solid var(--blue-2); outline-offset: -2px; }
.ptab-group { flex: 1; display: flex; align-items: stretch; gap: 2px; min-width: 0; }
.ptab-group[hidden] { display: none; }
.ptab-group + .ptab-group { margin-left: 0.5rem; }
.pg-lbl { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; padding: 0 0.55rem; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); background: rgba(1, 10, 19, 0.85); border: 1px solid var(--line-soft); }
.ptab[data-ban="theirs"].active { border-bottom-color: var(--enemy-side); }
.ptab[data-ban="mine"].active { border-bottom-color: var(--my-side); }

.picker-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.role-filters { display: flex; gap: 2px; }
.rf { width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--grey-1); background: rgba(1, 10, 19, 0.7); border: 1px solid var(--line-soft); }
.rf .role-ico { width: 20px; height: 20px; }
.rf.all { width: auto; padding: 0 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; }
.rf:hover { color: var(--gold-1); }
.rf.active { color: var(--gold-2); border-color: var(--gold-2); }
.rf:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 1px; }
.search { position: relative; flex: 1; min-width: 150px; }
.search svg { position: absolute; left: 0.6rem; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--grey-1); }
.search input { width: 100%; padding-left: 2rem; }
.suggest { display: none; }

.grid-wrap { position: relative; min-height: 0; overflow: hidden; border: 1px solid var(--line-soft); background: rgba(1, 10, 19, 0.4); }
.grid-wrap::before { /* anneau gradué derrière la grille */
  content: ""; position: absolute; left: 50%; top: 50%; width: 118%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 10px solid rgba(var(--accent-rgb), 0.07); pointer-events: none;
  -webkit-mask: repeating-conic-gradient(#000 0 0.6deg, transparent 0.6deg 2.4deg);
          mask: repeating-conic-gradient(#000 0 0.6deg, transparent 0.6deg 2.4deg);
}
.champ-grid {
  position: relative; height: 100%; overflow-y: auto; padding: 0.9rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0.7rem 0.5rem; align-content: start;
  scrollbar-color: var(--gold-4) transparent;
}
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: none; border: none; padding: 0; cursor: pointer; color: var(--grey-1); }
.tile-img { position: relative; width: 64px; height: 64px; border: 1px solid var(--gold-4); background: var(--void); overflow: hidden; transition: border-color 0.12s, transform 0.08s; }
.tile-img img, .tile-img .av-fallback { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.08); }
.tile-name { font-size: 0.78rem; line-height: 1.15; max-width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover .tile-img { border-color: var(--gold-2); }
.tile:hover .tile-name { color: var(--gold-1); }
.tile:active .tile-img { transform: translateY(1px); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-img { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.tile.used .tile-img img { filter: grayscale(0.85) brightness(0.55); }
.tile-flag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.1em; text-align: center; color: var(--gold-1); background: rgba(1, 10, 19, 0.85);
}
.tile.used-enemy .tile-img { border-color: var(--red-2); }
.tile.used-enemy .tile-flag { color: var(--red-1); }
.tile.used-ally .tile-img { border-color: var(--blue-3); }
.tile.used-ally .tile-flag { color: var(--blue-1); }
.tile.used-ban .tile-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(45deg, transparent 47%, var(--red-2) 47% 53%, transparent 53%); }
.tile.used-pool .tile-img { border-color: var(--gold-2); }
.tile.used-pool .tile-img img { filter: none; }
.tile.used-pick .tile-img { border-color: var(--gold-2); box-shadow: 0 0 0 2px var(--gold-3); }
.tile.used-pick .tile-img img { filter: none; }
.tile.untagged .tile-img img { filter: grayscale(0.6); }
.tile.in-pool:not(.used) .tile-img { border-color: var(--gold-3); }
.tile.none .tile-img { display: grid; place-items: center; background: radial-gradient(circle, #1a2a36, var(--void)); }
.tile.none .tile-img img { transform: none; }
.tile-unk { position: absolute; top: 0; left: 0; padding: 0 4px; font-size: 0.76rem; font-weight: 800; color: var(--gold-1); background: var(--gold-5); }
.grid-empty { grid-column: 1 / -1; color: var(--grey-1); text-align: center; padding: 1rem; }
.grid-empty a, .note a { color: var(--gold-2); }

/* ---------- panneau de conseil ---------- */
.analysis {
  min-height: 0; overflow-y: auto; padding: 0.9rem 1rem;
  border: 1px solid var(--line-soft); border-top: 2px solid var(--gold-4);
  background: linear-gradient(180deg, rgba(9, 20, 40, 0.82), rgba(1, 10, 19, 0.82));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  scrollbar-color: var(--gold-4) transparent;
}
.a-section + .a-section { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line-soft); }
.a-title {
  display: flex; align-items: baseline; gap: 0.6rem; margin: 0 0 0.6rem;
  font-family: var(--title); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2);
}
.a-title .hint { font-family: var(--ui); font-weight: 500; font-size: 0.78rem; letter-spacing: 0; text-transform: none; color: var(--grey-1); }
.a-intro { margin: -0.2rem 0 0.7rem; color: var(--grey-1); font-size: 0.86rem; }

/* carte « top pick » : splash en fond */
.hero {
  position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0.6rem 0.9rem; align-items: center;
  padding: 0.9rem 1rem; border: 1px solid var(--gold-4); overflow: hidden;
  background: linear-gradient(90deg, rgba(1, 10, 19, 0.96) 35%, rgba(1, 10, 19, 0.55)), var(--hero) right 25% / cover no-repeat, var(--navy);
}
.hero-portrait { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold-2); box-shadow: inset 0 0 0 2px var(--void); }
.hero-portrait img, .hero-portrait .av-fallback { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero-kicker { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); }
.hero-name { font-family: var(--title); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.1; margin: 0.1rem 0 0.3rem; }
.hero-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
/* #57 : le bouton « Je le prends » n'est plus coupé (la jauge rétrécit, puis passe à la ligne) ; l'analyse d'attente
   prend toute la largeur au lieu d'une colonne de 66 px. */
.hero-side { flex-wrap: wrap; }
.hero-side .score { min-width: 0; flex: 1 1 auto; }
.hero-side .meter { width: auto; flex: 1 1 48px; max-width: 120px; }
.hero-side > .hx-btn { flex: none; }
.hero-side .wait-box { flex: 1 1 100%; max-width: none; }
.hero-side:empty { display: none; }
.hero-side .score { display: flex; align-items: baseline; gap: 0.5rem; text-align: left; }
.hero-side .meter { width: 120px; }

.why { margin: 0 0 0.2rem; font-size: 0.88rem; color: #d8d2c2; }
.why b { color: var(--gold-1); }
.why .vs { color: var(--red-1); font-weight: 700; }
.why.syn { color: var(--blue-1); }
.why.syn .with { color: var(--grey-1); }
.why.lane { color: var(--grey-1); font-style: italic; font-size: 0.82rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.tag { font-size: 0.76rem; font-weight: 700; color: var(--blue-1); background: rgba(26, 125, 255, 0.12); border: 1px solid rgba(26, 125, 255, 0.35); padding: 0.05rem 0.4rem; }

.score { text-align: right; }
.score-num { font-family: var(--title); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--gold-1); }
.score-lbl { display: block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-1); }
.meter { width: 90px; height: 3px; background: var(--blue-5); margin-top: 4px; }
.meter span { display: block; height: 100%; background: var(--blue-2); }
.dots { color: var(--gold-2); letter-spacing: 0.12em; }

/* alternatives : lignes compactes */
.alts { display: flex; flex-direction: column; gap: 2px; margin-top: 0.5rem; }
.alt {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 0.75rem; align-items: center;
  padding: 0.45rem 0.6rem; background: rgba(1, 10, 19, 0.6); border: 1px solid var(--line-soft);
}
.alt:hover { border-color: var(--gold-4); }
.alt-img { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 1px solid var(--gold-4); }
.alt-img img, .alt-img .av-fallback { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.alt-name { font-weight: 700; color: var(--gold-1); }
.alt-why { font-size: 0.8rem; color: var(--grey-1); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.alt .score-num { font-size: 1.15rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill { font-size: 0.78rem; font-weight: 700; color: var(--red-1); background: var(--red-5); border: 1px solid rgba(255, 48, 72, 0.35); padding: 0.2rem 0.5rem; }
.pill .src { color: var(--grey-1); font-weight: 500; margin-left: 0.35rem; }
.pill.lane { border-color: var(--red-2); }

.tips { display: flex; flex-direction: column; gap: 0.45rem; }
.tip { display: flex; gap: 0.6rem; font-size: 0.86rem; color: #d8d2c2; }
.tip::before { content: "◆"; color: var(--blue-2); font-size: 0.7rem; margin-top: 0.35rem; flex: none; }
.tip.danger::before { color: var(--red-2); }

.ban-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.4rem; }
.ban-card { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.55rem; background: rgba(1, 10, 19, 0.6); border: 1px solid rgba(255, 48, 72, 0.35); }
.ban-card .alt-img img { filter: grayscale(0.3); }
.ban-card .alt-name { display: flex; gap: 0.4rem; align-items: center; }
.lane-tag { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-1); border: 1px solid rgba(255, 48, 72, 0.5); padding: 0 0.25rem; }

.note { color: var(--grey-1); font-size: 0.84rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--line); background: rgba(1, 10, 19, 0.5); }
.note b { color: var(--gold-1); }

/* plan de jeu */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
@media (max-width: 1399px) and (min-width: 1181px) { .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan-col { background: rgba(1, 10, 19, 0.6); border: 1px solid var(--line-soft); border-top: 2px solid var(--blue-2); padding: 0.6rem 0.7rem; }
.plan-col.bad { border-top-color: var(--red-2); }
.plan-col.syn { border-top-color: var(--gold-3); }
.plan-col h4 { margin: 0 0 0.45rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-1); }
.plan-col.bad h4 { color: var(--red-1); }
.plan-col.syn h4 { color: var(--gold-2); }
.plan-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.plan-col li { font-size: 0.84rem; color: #d8d2c2; }
.plan-col li b { color: var(--gold-1); }
.plan-col li .lane-tag { margin-left: 0.3rem; }
.plan-col .none { color: var(--grey-1); font-style: italic; }

/* ---------- pied de page ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem;
  padding: 0.45rem 1.4rem; border-top: 1px solid var(--line-soft); background: rgba(1, 10, 19, 0.85);
  font-size: 0.78rem; color: var(--grey-1);
}
.data-alert { color: var(--gold-2); }
.legal { margin-left: auto; }

.flash {
  position: fixed; left: 50%; bottom: 3rem; transform: translateX(-50%); z-index: 20;
  background: var(--panel-2); border: 1px solid var(--gold-4); color: var(--gold-1); font-size: 0.86rem; padding: 0.55rem 1rem;
}

/* #57 : la cible de la recherche, l'éclat sur la case remplie, la bulle « Annuler ». */
.search .target-chip {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 0.3rem; pointer-events: none;
  font: 700 0.75rem/1 var(--title); letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.32rem 0.55rem; border-radius: 3px; color: #fff;
  background: color-mix(in srgb, var(--chip-c) 30%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--chip-c) 70%, transparent);
}
.search .target-chip svg { width: 11px; height: 11px; }
.search .target-chip.blue { --chip-c: var(--side-blue); }
.search .target-chip.red { --chip-c: var(--side-red); }
.search .target-chip.manual { box-shadow: inset 0 -2px 0 var(--gold-2); }
.search .target-chip.moved { animation: chip-moved 0.9s cubic-bezier(.2,.8,.2,1); }
@keyframes chip-moved { 0% { transform: translateY(-50%) scale(1.18); background: var(--chip-c); } 100% { transform: translateY(-50%) scale(1); } }
.search input { padding-right: 9.5rem; }
.fly-champ { position: fixed; z-index: 40; border-radius: 4px; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); object-fit: cover; }
.seat.just-added, .ban-slot.just-added { animation: just-added 0.9s cubic-bezier(.2,.8,.2,1); }
@keyframes just-added { 0% { box-shadow: 0 0 0 2px var(--gold-1), 0 0 22px 2px rgba(240, 230, 210, 0.55); } 100% { box-shadow: 0 0 0 0 transparent; } }
.undo-toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 0.8rem; padding: 0.45rem 0.5rem 0.45rem 0.6rem;
  background: var(--panel-2); border: 1px solid var(--gold-4); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  color: var(--gold-1); font-size: 0.86rem;
}
.undo-toast.show { animation: undo-in 0.22s cubic-bezier(.2,.8,.2,1); }
@keyframes undo-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.undo-toast .ut-champ { display: inline-flex; align-items: center; gap: 0.5rem; }
.undo-toast .ut-champ img { width: 28px; height: 28px; border-radius: 3px; }
.undo-toast .ut-btn { font: 700 0.8rem/1 var(--title); letter-spacing: 0.06em; text-transform: uppercase; padding: 0.5rem 0.8rem; min-height: 32px;
  background: transparent; color: var(--gold-2); border: 1px solid var(--gold-4); cursor: pointer; }
.undo-toast .ut-btn:hover, .undo-toast .ut-btn:focus-visible { background: rgba(200, 170, 110, 0.12); color: var(--gold-1); }
.undo-toast kbd { font: 600 0.75rem/1 var(--body, inherit); color: var(--grey-1); }
@media (pointer: coarse) { .undo-toast kbd { display: none; } .undo-toast .ut-btn { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .search .target-chip.moved, .seat.just-added, .ban-slot.just-added, .undo-toast.show { animation: none; } }
body.overlay .search input { padding-right: 7rem; }
body.overlay .search .target-chip { font-size: 0.7rem; padding: 0.28rem 0.45rem; }

.av-fallback { display: inline-grid; place-items: center; background: var(--panel-2); color: var(--gold-2); font-weight: 800; }

/* ---------- écrans moyens ---------- */
@media (max-width: 1399px) {
  .center { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .analysis { max-height: 42vh; }
}
@media (max-width: 1180px) {
  .stage { grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 0.8rem; padding-inline: 0.8rem; }
  .seat-portrait { width: 52px; height: 52px; }
  .seat.you .seat-portrait { width: 58px; height: 58px; }
  .plan-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   OVERLAY — vue compacte à placer à côté du client (fenêtre étroite)
   Activée par le bouton « Overlay », par ?overlay=1, ou automatiquement si la
   fenêtre fait moins de 760 px de large.
============================================================================ */
body.overlay { font-size: 14px; }
body.overlay .app { max-width: 460px; margin-left: auto; border-left: 1px solid var(--line-soft); background: rgba(1, 10, 19, 0.6); }
body.overlay .phasebar { grid-template-columns: 1fr auto; gap: 0.4rem 0.6rem; padding: 0.6rem 0.8rem 0.4rem; }
/* Vue compacte : on garde le bouton Accueil (seul moyen de revenir, sur téléphone), sans le titre. */
body.overlay .brand > :not(#homeBtn) { display: none; }
body.overlay .phase { text-align: left; }
body.overlay .phase h1 { font-size: 1.05rem; }
body.overlay .phase-meter { margin: 0.35rem 0 0.25rem; max-width: none; }
body.overlay .phase-meter::before, body.overlay .phase-meter::after { display: none; }
body.overlay .phase-meter span { margin: 0; }
body.overlay .phase-sub { font-size: 0.78rem; }
body.overlay .controls { flex-direction: column; align-items: flex-end; gap: 0.3rem; }
body.overlay .role-pick span { display: none; }
body.overlay .controls .hx-btn { padding: 0.3rem 0.55rem; font-size: 0.76rem; }

/* tout passe en une colonne ; on réordonne les blocs selon l'importance */
body.overlay .stage { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.2rem 0.8rem 0.6rem; overflow-y: auto; }
body.overlay .side, body.overlay .center { display: contents; }
body.overlay .side-head { display: none; }
/* chaque bloc garde sa hauteur naturelle : c'est la colonne entière qui défile */
body.overlay .picker, body.overlay .team, body.overlay .analysis { flex-shrink: 0; }
body.overlay .picker { order: 1; display: block; }
body.overlay .enemy-side .team { order: 2; }
body.overlay .enemy-side .ban-row { order: 3; }
body.overlay .ally-side .team { order: 4; }
body.overlay .ally-side .ban-row { order: 5; }
body.overlay .analysis { order: 6; max-height: none; overflow: visible; padding: 0.7rem 0.75rem; }
body.overlay .ban-row, body.overlay .side-right .ban-row { flex-direction: row; padding: 0; flex-shrink: 0; }
body.overlay .ban-slots { max-width: 260px; }
body.overlay .seat.has-art { background: none; }
body.overlay .seat-tools { display: none; }
body.overlay .pool-seg button { padding: 0.3rem 0.45rem; font-size: 0.76rem; }
body.overlay .icon-btn { width: 32px; height: 32px; }
/* Écran tactile : boutons d'icône assez grands pour un doigt (44 px, #34) */
@media (pointer: coarse) { .icon-btn, body.overlay .icon-btn { min-width: 44px; min-height: 44px; } }
body.overlay .controls { flex-direction: row; }

body.overlay .picker-tabs { margin-bottom: 0.4rem; }
body.overlay .ptab { padding: 0.4rem 0.2rem; font-size: 0.76rem; letter-spacing: 0.04em; }
body.overlay .pg-lbl { padding: 0 0.3rem; font-size: 0.76rem; letter-spacing: 0.04em; }
body.overlay .ptab-group + .ptab-group { margin-left: 0.25rem; }
body.overlay .ptab kbd { display: none; }
body.overlay .picker-bar { margin-bottom: 0.4rem; gap: 0.4rem; }
body.overlay .grid-wrap { display: block; height: 260px; margin-top: 0.4rem; } /* la grille est toujours là en overlay */
body.overlay .champ-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 0.4rem; padding: 0.5rem; }
body.overlay .tile-img { width: 48px; height: 48px; }
body.overlay .tile-name { font-size: 0.76rem; }

/* résultats de recherche rapides (overlay) */
body.overlay .suggest { display: flex; flex-wrap: wrap; gap: 0.3rem; }
body.overlay .suggest:empty { display: none; }
.sg { display: inline-flex; align-items: center; gap: 0.35rem; padding: 2px 8px 2px 2px; cursor: pointer; color: var(--gold-1); font-size: 0.8rem; font-weight: 600; background: rgba(1, 10, 19, 0.8); border: 1px solid var(--line-soft); }
.sg:first-child { border-color: var(--gold-2); }
.sg img, .sg .av-fallback { width: 28px; height: 28px; }
.sg:hover { border-color: var(--gold-2); }
.sg.used { opacity: 0.55; }

/* les deux équipes deviennent deux bandeaux de 5 portraits */
body.overlay .team { display: grid; grid-template-columns: 30px repeat(5, minmax(0, 1fr)); gap: 0.3rem; align-items: start; }
body.overlay .team::before {
  writing-mode: vertical-rl; transform: rotate(180deg); align-self: stretch; text-align: center;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.16em; padding: 2px 0;
}
body.overlay .team-enemy::before { content: "ENNEMIS"; color: var(--gold-1); border-right: 2px solid var(--enemy-side); }
body.overlay .team-ally::before { content: "ALLIÉS"; color: var(--gold-1); border-right: 2px solid var(--my-side); }
body.overlay .seat, body.overlay .side-right .seat {
  flex-direction: column; align-items: center; text-align: center; gap: 0.15rem; min-height: 0; padding: 0.2rem 0; border: none; background: none;
}
body.overlay .seat::after, body.overlay .seat::before { display: none; }
body.overlay .seat-portrait, body.overlay .seat.you .seat-portrait { width: 46px; height: 46px; }
body.overlay .seat-portrait .role-ico { width: 20px; height: 20px; }
body.overlay .seat-role { font-size: 0.7rem; letter-spacing: 0.02em; }
/* Téléphone (#34, texte agrandi) : barre du haut sur 2 lignes (Accueil + titre, puis boutons), onglets qui passent à la ligne */
@media (max-width: 760px) {
  body.overlay .phasebar { grid-template-columns: auto minmax(0, 1fr); }
  body.overlay .phasebar .controls { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  body.overlay .picker-tabs { flex-wrap: wrap; row-gap: 0.35rem; }
  body.overlay .ptab-group { flex: 1 1 auto; }
  body.overlay .seat-role { font-size: 0.72rem; letter-spacing: 0; }
}
body.overlay .seat-name { font-family: var(--ui); font-size: 0.76rem; letter-spacing: 0; text-transform: none; font-weight: 600; max-width: 100%; }
body.overlay .seat:not(.filled) .seat-name, body.overlay .seat-sub { display: none; }
body.overlay .seat.you .seat-portrait { border-color: var(--my-side); box-shadow: 0 0 0 2px color-mix(in srgb, var(--my-side) 45%, transparent); }
body.overlay .team-enemy .seat.lane .seat-portrait { border-color: var(--red-2); box-shadow: 0 0 0 2px rgba(255, 48, 72, 0.45); }
body.overlay .seat.picking { animation: none; }
body.overlay .seat.picking .seat-portrait { animation: seat-pulse 1.6s ease-in-out infinite; }

body.overlay .hero { grid-template-columns: 60px minmax(0, 1fr); padding: 0.7rem 0.75rem; }
body.overlay .hero-portrait { width: 60px; height: 60px; }
body.overlay .hero-name { font-size: 1.2rem; }
body.overlay .hero-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
body.overlay .alt { grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 0.5rem; padding: 0.35rem 0.45rem; }
body.overlay .alt-img { width: 36px; height: 36px; }
body.overlay .plan-grid { grid-template-columns: 1fr; }
body.overlay .why.lane { display: none; }
body.overlay .ban-cards { grid-template-columns: 1fr; }

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

/* ---------- qui gagne la draft ? ---------- */
.duel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; font-size: 0.82rem; color: var(--grey-1); }
.duel-head b { font-family: var(--title); font-size: 1.3rem; color: var(--gold-1); }
.duel-verdict { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-2); }
.duel-verdict.a { color: var(--blue-1); }
.duel-verdict.b { color: var(--red-1); }
.duel-bar { height: 6px; margin: 0.4rem 0 0.7rem; background: var(--red-2); }
.duel-bar span { display: block; height: 100%; background: var(--blue-2); transition: width 0.4s ease; }
.duel-rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 0.6rem; }
.duel-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: center; padding: 0.25rem 0.5rem; background: rgba(1, 10, 19, 0.6); font-size: 0.84rem; }
.duel-role { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-1); text-align: center; min-width: 4.5rem; }
.duel-name { color: var(--grey-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel-name.enemy { text-align: right; }
.duel-name b { color: var(--gold-1); margin: 0 0.15rem; }
.duel-name.lead { color: var(--blue-1); }
.duel-name.enemy.lead { color: var(--red-1); }
.why .ally { color: var(--blue-1); }
.why .foe { color: var(--red-1); }

/* comparatif « Qui gagne la draft ? » : affiché à la demande */
.duel-toggle { display: block; margin: 0.8rem auto 0; }

/* overlay SoloQ : sons coupés, donc pas de bouton son */
body.overlay [data-sound-toggle] { display: none; }
.ban-label { min-height: 28px; }

/* ---------- avertissements : rôle secondaire, counterpick encore disponible ---------- */
.why.warn { margin-top: 0.35rem; }
.warn-tag { display: inline-block; padding: 0 0.35rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; color: #e9c27a; border: 1px solid rgba(233, 194, 122, 0.5); }
.stat-tag { display: inline-block; padding: 0 0.35rem; font-size: 0.78rem; font-weight: 800; color: #8fd0ff; border: 1px solid rgba(143, 208, 255, 0.45); }
.risk { font-size: 0.8rem; color: #ffb36b; }
.risk b { color: #ffd2a3; }

/* catégories SoloQ en accordéon : la catégorie repliée ne montre que son titre */
.ptab-group:not(.open) { flex: none; }
.ptab-group:not(.open) .ptab { display: none; }
.pg-lbl::after { content: "▸"; font-size: 0.8em; transition: transform 0.15s; }
.ptab-group.open .pg-lbl::after { transform: rotate(90deg); }
.ptab-group:not(.open) .pg-lbl { padding: 0.5rem 0.8rem; color: var(--grey-1); }
.ptab-group:not(.open) .pg-lbl:hover { color: var(--gold-1); border-color: var(--gold-4); }
.ptab-group.open .pg-lbl { color: var(--gold-1); border-color: var(--gold-4); }
.pg-lbl:focus-visible { outline: 2px solid var(--blue-2); outline-offset: -2px; }

/* ---------- synergies : combos et duo de lane ---------- */
.combo-tag { display: inline-block; margin-right: 0.35rem; padding: 0 0.35rem; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #1a1205; background: var(--gold-2); vertical-align: 0.08em; }
.combo-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.25rem; font-size: 0.84rem; color: var(--grey-1); }
.combo-list b.ally, .duo-lane b.ally { color: var(--blue-1); }
.combo-list b.foe, .duo-lane b.foe { color: var(--red-1); }
.duo-lane { margin-top: 0.7rem; padding: 0.55rem 0.7rem; background: rgba(1, 10, 19, 0.6); border: 1px solid rgba(var(--line-rgb), 0.35); }
.duo-title { margin: 0 0 0.25rem; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-1); }
.duo-verdict { margin: 0 0 0.35rem; font-weight: 800; color: var(--gold-1); }
.duo-verdict.a { color: var(--blue-1); }
.duo-verdict.b { color: var(--red-1); }
.duo-lane ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; font-size: 0.84rem; color: var(--grey-1); }
.duo-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem 1rem; }
.duo-side h5 { margin: 0 0 0.3rem; font-size: 0.86rem; font-weight: 800; }
.duo-side h5.ally { color: var(--blue-1); } .duo-side h5.foe { color: var(--red-1); }
.duo-side h5 small { margin-left: 0.3rem; font-weight: 700; color: var(--grey-1); }
.duo-side li.none { list-style: none; margin-left: -1.1rem; font-style: italic; }


/* ---------- bouton libellé (« Nouvelle draft ») ---------- */
.set-btn { display: inline-flex; align-items: center; gap: 0.45rem; height: 36px; padding: 0 0.85rem; font: inherit; font-size: 0.82rem;
  font-weight: 700; letter-spacing: 0.04em; color: var(--gold-1); background: rgba(1, 10, 19, 0.75); border: 1px solid var(--gold-4, var(--gold-4));
  cursor: pointer; white-space: nowrap; }
.set-btn svg { width: 18px; height: 18px; flex: none; }
.set-btn:hover, .set-btn:focus-visible { border-color: var(--gold-2); color: #fff; background: rgba(30, 35, 40, 0.9); }
body.overlay .set-btn { height: 30px; padding: 0 0.6rem; font-size: 0.78rem; }

/* SoloQ sans conseiller : la grille prend toute la place */
body.no-advice .analysis { display: none; }
body.no-advice .center { grid-template-columns: minmax(0, 1fr); }

/* ---------- fond du SoloQ : ambiance hextech ---------- */
.backdrop.hextech { background: radial-gradient(ellipse 90% 70% at 50% 40%, #0a1f30 0%, #06121e 45%, var(--void, var(--void)) 80%); filter: none; overflow: hidden; }
.hx-glow { position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 22% 32%, rgba(26, 125, 255, 0.34), transparent 36%),
    radial-gradient(circle at 80% 70%, rgba(var(--accent-rgb), 0.28), transparent 38%),
    radial-gradient(circle at 60% 16%, rgba(30, 120, 190, 0.3), transparent 34%),
    radial-gradient(circle at 12% 88%, rgba(var(--accent-rgb), 0.16), transparent 30%);
  animation: hx-drift 48s ease-in-out infinite alternate; }
/* lumières hextech qui remontent doucement (tailles, vitesses et départs variés) */
.hx-motes i { position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%; background: #8fc2ff; box-shadow: 0 0 9px 2px rgba(26, 125, 255, 0.7);
  opacity: 0; animation: hx-mote 15s linear infinite; }
.hx-motes i:nth-child(3n) { background: #f6d59a; box-shadow: 0 0 9px 2px rgba(var(--accent-rgb), 0.7); }
.hx-motes i:nth-child(4n) { width: 6px; height: 6px; }
.hx-motes i:nth-child(5n) { width: 3px; height: 3px; }
.hx-motes i:nth-child(1) { left: 4%; animation-delay: -0s; animation-duration: 15s; }
.hx-motes i:nth-child(2) { left: 10%; animation-delay: -6s; animation-duration: 19s; }
.hx-motes i:nth-child(3) { left: 16%; animation-delay: -11s; animation-duration: 14s; }
.hx-motes i:nth-child(4) { left: 22%; animation-delay: -3s; animation-duration: 21s; }
.hx-motes i:nth-child(5) { left: 28%; animation-delay: -9s; animation-duration: 16s; }
.hx-motes i:nth-child(6) { left: 34%; animation-delay: -14s; animation-duration: 18s; }
.hx-motes i:nth-child(7) { left: 40%; animation-delay: -1s; animation-duration: 20s; }
.hx-motes i:nth-child(8) { left: 46%; animation-delay: -7s; animation-duration: 15s; }
.hx-motes i:nth-child(9) { left: 52%; animation-delay: -12s; animation-duration: 17s; }
.hx-motes i:nth-child(10) { left: 58%; animation-delay: -4s; animation-duration: 22s; }
.hx-motes i:nth-child(11) { left: 64%; animation-delay: -10s; animation-duration: 16s; }
.hx-motes i:nth-child(12) { left: 70%; animation-delay: -2s; animation-duration: 19s; }
.hx-motes i:nth-child(13) { left: 76%; animation-delay: -13s; animation-duration: 15s; }
.hx-motes i:nth-child(14) { left: 82%; animation-delay: -5s; animation-duration: 20s; }
.hx-motes i:nth-child(15) { left: 88%; animation-delay: -8s; animation-duration: 17s; }
.hx-motes i:nth-child(16) { left: 93%; animation-delay: -15s; animation-duration: 21s; }
.hx-motes i:nth-child(17) { left: 97%; animation-delay: -1s; animation-duration: 18s; }
.hx-motes i:nth-child(18) { left: 1%; animation-delay: -11s; animation-duration: 23s; }
@keyframes hx-mote { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.9; } 80% { opacity: 0.5; } 100% { transform: translate(30px, -105vh); opacity: 0; } }
.backdrop.hextech::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(1, 6, 12, 0.85) 100%); } /* vignette seule (#35 : plus de rayures) */
@keyframes hx-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(4%, -3%) scale(1.06); } 100% { transform: translate(-3%, 3%) scale(1.02); } }
@keyframes hx-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .hx-glow { animation: none; } .hx-motes { display: none; } }
body.overlay .hx-motes { display: none; }
body.overlay [data-music-toggle] { display: none; } /* aucun son ni musique en overlay */

/* SoloQ : la console est partie dans la fenêtre flottante (overlay) */
.pip-away { position: fixed; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 1rem; text-align: center; color: var(--gold-1); }
.pip-away p { margin: 0; line-height: 1.5; }

/* ============================================================================
   Pages hors drafters (accueil, pool, préparation, données, compte, mentions : body.page) — #45
   Couleurs du logo Rift Ready : cyan #00E5FF, bleu pétrole #006A8E, blanc glacé. Les drafters (SoloQ, compétition,
   drafter de préparation) gardent l'or du client LoL (décision de l'utilisateur). Les jetons --gold-* gardent leur nom.
============================================================================ */
body.page {
  /* #48 : logo Rift Ready (RR crème + colonne bleu électrique, sur bleu nuit) — avant : cyan du logo Zilsee */
  --gold-1: #efe6d6;   /* texte principal : crème du logo */
  --gold-2: #5aa2ff;   /* titres, bordures actives : bleu du logo */
  --gold-3: #2f86ff;
  --gold-4: #24467e;   /* bordures : bleu profond */
  --gold-5: #142a52;
  --accent-rgb: 47, 134, 255;
  --accent-2-rgb: 30, 110, 240;
  --line-rgb: 45, 85, 150;
  --line: rgba(45, 85, 150, 0.55);
  --line-soft: rgba(45, 85, 150, 0.28);
  --grey-1: #a7aebb;   /* texte secondaire (contraste ≈ 8:1) */
  --grey-2: #8d93a0;
  --blue-1: #d8e8ff;
  --blue-2: #4a98ff;
  --blue-3: #2f86ff;
  --blue-4: #1d5fd0;
  --blue-5: #0c2a66;
  --btn-a: #1f6cf0; --btn-b: #0b3fb0; --btn-line: #8cbcff; --btn-a-hover: #2f7bff; --btn-b-hover: #1048c4; /* blanc ≥ 4,5:1 */
}

/* #51 : pas encore ton tour de pick → une courte analyse à la place de « Je le prends » */
.wait-box { display: grid; gap: 0.25rem; max-width: 230px; padding: 0.55rem 0.7rem; font-size: 0.78rem; line-height: 1.35; color: var(--grey-1); text-align: left;
  background: rgba(1, 10, 19, 0.6); border: 1px solid rgba(var(--line-rgb, 120, 90, 40), 0.6); }
.wait-box b { color: var(--gold-1); font-family: var(--title); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.76rem; }
.wb-bad { color: #ff8a98; }
.wb-good { color: #8fe0b2; }
.curve-tag { font-size: 0.72rem; color: var(--grey-1); white-space: nowrap; }

/* #53 — SoloQ : groupes Bans / Picks entourés, conseillés qui s'ouvrent, runes et sorts, capacité spéciale */
.ptab-group { padding: 2px; border: 1px solid rgba(255, 255, 255, 0.14); }
.ptab-group.open { border-color: rgba(255, 255, 255, 0.7); }
.alt.has-more { cursor: pointer; flex-wrap: wrap; }
.alt.has-more:hover { background: rgba(255, 255, 255, 0.04); }
.alt-chev { margin-left: 0.4rem; font-size: 0.75em; color: var(--grey-1); display: inline-block; transition: transform 0.15s; }
.alt.open .alt-chev { transform: rotate(90deg); }
.alt-more { flex: 1 1 100%; padding: 0.4rem 0 0.2rem 0.2rem; border-top: 1px solid var(--line-soft); margin-top: 0.4rem; }
.score-lbl + .score-num small { font-size: 0.55em; opacity: 0.7; }
.side-extra { padding: 0.5rem 0 0; }
.sx { display: grid; gap: 0.35rem; padding: 0.55rem 0.6rem; background: rgba(1, 10, 19, 0.55); border: 1px solid var(--line-soft); }
.sx-h { font-family: var(--title); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); }
.sx-h small { margin-left: 0.35rem; font-family: var(--ui); font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--grey-1); }
.sx-row { display: flex; align-items: center; gap: 0.35rem; }
.sx-row img { width: 34px; height: 34px; object-fit: contain; }
.sx-row img.tree { width: 24px; height: 24px; opacity: 0.85; }
.sx-row img.spell { width: 30px; height: 30px; border: 1px solid var(--line-soft); }
.sx-sep { width: 1px; height: 24px; background: var(--line-soft); margin: 0 0.2rem; }
.sx-txt { font-size: 0.72rem; color: var(--grey-1); padding: 0.15rem 0.3rem; border: 1px solid var(--line-soft); }
.sx-why { margin: 0; font-size: 0.74rem; line-height: 1.4; color: var(--grey-1); }
.sx-why b { color: var(--gold-1); }
.sx.soon { border-style: dashed; }
.side-right .sx { text-align: right; } .side-right .sx-row { justify-content: flex-end; }
body.overlay .side-extra { display: none; }

/* #54 : identité de la compo (SoloQ, compétition, préparation) */
.cid { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px solid rgba(200, 170, 110, 0.55); background: rgba(10, 14, 20, 0.72);
  color: #f0e6d2; font: 600 0.74rem/1.3 "Barlow Semi Condensed", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; cursor: default; }
.cid.blue { border-color: rgba(42, 125, 255, 0.7); } .cid.red { border-color: rgba(240, 48, 74, 0.7); }
.cid-box { display: grid; gap: 6px; }
.cid-box p { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cid-box .cid-win { color: #c9c3b6; font-size: 0.86rem; }
.cid-box ul { margin: 0; padding-left: 1.1rem; font-size: 0.82rem; color: #a9a39a; }
.cid-box ul b { color: #f0e6d2; font-weight: 600; }
.cid-pair { display: grid; gap: 12px; }

/* #54 : conseillés tous présentés comme le premier ; un seul ouvert */
.picklist { display: flex; flex-direction: column; gap: 4px; }
.pl-item.closed { grid-template-columns: 52px minmax(0, 1fr) auto; padding: 0.55rem 0.9rem; cursor: pointer; border-color: var(--line-soft);
  background: linear-gradient(90deg, rgba(1, 10, 19, 0.97) 45%, rgba(1, 10, 19, 0.7)), var(--hero) right 25% / cover no-repeat, var(--navy); }
.pl-item.closed:hover, .pl-item.closed:focus-visible { border-color: var(--gold-4); }
.pl-item.closed .hero-portrait { width: 52px; height: 52px; }
.pl-item.closed .hero-name { font-size: 1.2rem; margin: 0 0 0.15rem; }
.pl-score { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pl-score .score-num { font-size: 1.25rem; }
.pl-score .meter { width: 70px; }

/* #54 : grille de champions à ouvrir (champ-picker.js) */
.cpk { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(1, 6, 12, 0.72); }
.cpk-box { width: min(920px, 100%); height: min(720px, 100%); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 10px;
  padding: 16px; background: #0b0f15; border: 1px solid rgba(200, 170, 110, 0.45); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.cpk-head { display: flex; justify-content: space-between; align-items: center; font-family: "Barlow Semi Condensed", sans-serif; font-size: 1.15rem; color: #f0e6d2; }
.cpk-x { width: 34px; height: 34px; font-size: 1.4rem; line-height: 1; color: #c9c3b6; background: none; border: 1px solid rgba(200, 170, 110, 0.35); cursor: pointer; }
.cpk-x:hover { color: #fff; border-color: #c8aa6e; }
.cpk-bar { display: flex; gap: 8px; align-items: center; }
.cpk-seg { display: inline-flex; border: 1px solid rgba(200, 170, 110, 0.35); }
.cpk-seg button { padding: 7px 12px; font: inherit; font-size: 0.86rem; color: #a9a39a; background: none; border: 0; cursor: pointer; }
.cpk-seg button[aria-pressed="true"] { color: #0b0f15; background: #c8aa6e; font-weight: 700; }
.cpk-search { flex: 1; min-width: 0; padding: 8px 12px; font: inherit; color: #f0e6d2; background: #05080d; border: 1px solid rgba(200, 170, 110, 0.35); }
.cpk-search:focus { outline: none; border-color: #c8aa6e; }
.cpk-pool { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; font-size: 0.84rem; color: #a9a39a; }
.cpk-lbl { font-weight: 700; color: #f0e6d2; margin-right: 4px; }
.cpk-chip { position: relative; width: 34px; height: 34px; padding: 0; border: 1px solid #c8aa6e; background: none; cursor: pointer; }
.cpk-chip img { width: 100%; height: 100%; display: block; }
.cpk-chip i { position: absolute; right: -5px; top: -7px; font-style: normal; font-size: 0.8rem; color: #fff; background: #b8323f; width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 50%; opacity: 0; }
.cpk-chip:hover i { opacity: 1; }
.cpk-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0.7rem 0.5rem; align-content: start; padding: 4px; }
.sp-add { display: inline-flex; align-items: center; gap: 0.4rem; padding: 2px 0.6rem 2px 2px; cursor: pointer; color: var(--gold-1); background: rgba(1, 10, 19, 0.7);
  border: 1px dashed var(--gold-4); font: inherit; font-size: 0.82rem; }
.sp-add:hover { border-color: var(--gold-2); }
.sp-add img { width: 26px; height: 26px; opacity: 0.85; }

/* #54 : dans les drafters (SoloQ, compétition, préparation), le bouton principal est or comme le reste (plus de bleu). */
body:not(.page) { --btn-a: #d8bc82; --btn-b: #a8874c; --btn-line: #f0dcae; --btn-a-hover: #e6cb94; --btn-b-hover: #b8975a; --btn-ink: #17120a; }

/* #54 : barres de défilement dans le thème (fines, or sur fond sombre), sur tout le site */
* { scrollbar-width: thin; scrollbar-color: rgba(200, 170, 110, 0.55) rgba(8, 10, 14, 0.6); }

/* #54 : sélecteurs maison (widgets.js) à la place des outils du navigateur */
.rrw-hide { position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.rrw-sel, .rrw-field { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 6px 10px 6px 12px;
  font: inherit; font-size: 0.9rem; color: #f0e6d2; text-align: left; background: #0a0d12; border: 1px solid rgba(200, 170, 110, 0.4); border-radius: 0; cursor: pointer; max-width: 100%; }
.rrw-sel:hover, .rrw-field:hover, .rrw-sel[aria-expanded="true"], .rrw-field[aria-expanded="true"] { border-color: #c8aa6e; }
.rrw-sel:focus-visible, .rrw-field:focus-visible { outline: 2px solid #c8aa6e; outline-offset: 1px; }
.rrw-sel:disabled, .rrw-field:disabled { opacity: 0.5; cursor: default; }
.rrw-sel span, .rrw-field span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrw-sel i { flex: none; width: 8px; height: 8px; border-right: 1.6px solid #c8aa6e; border-bottom: 1.6px solid #c8aa6e; transform: translateY(-2px) rotate(45deg); }
.rrw-sel.short { justify-content: center; text-align: center; min-width: 72px; }
.rrw-sel.short span { flex: 1; text-align: center; }
.rrw-field svg { flex: none; width: 17px; height: 17px; color: #c8aa6e; }
.rrw-field.empty span { color: #8d877d; }
.rrw-pop { position: fixed; z-index: 1000; background: #0b0f15; border: 1px solid rgba(200, 170, 110, 0.55); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65); color: #f0e6d2; font-size: 0.9rem; }
.rrw-list > div { display: grid; max-height: 290px; overflow-y: auto; padding: 4px; }
.rrw-list button { padding: 7px 12px; font: inherit; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.rrw-list button.short { text-align: center; }
.rrw-list button:hover, .rrw-list button:focus-visible { background: rgba(200, 170, 110, 0.14); outline: none; }
.rrw-list button[aria-selected="true"] { color: #17120a; background: #c8aa6e; font-weight: 700; }
.rrw-list button:disabled { opacity: 0.4; cursor: default; }
.rrw-cal { width: 268px; padding: 10px; }
.rrw-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rrw-cal-head b { font-family: "Barlow Semi Condensed", sans-serif; font-size: 1rem; text-transform: capitalize; }
.rrw-cal-head button { width: 30px; height: 30px; font-size: 1.2rem; color: #c8aa6e; background: none; border: 1px solid rgba(200, 170, 110, 0.3); cursor: pointer; }
.rrw-cal-days, .rrw-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.rrw-cal-days span { font-size: 0.72rem; color: #8d877d; padding: 4px 0; }
.rrw-cal-grid button { height: 32px; font: inherit; font-size: 0.85rem; color: inherit; background: none; border: 1px solid transparent; cursor: pointer; }
.rrw-cal-grid button:hover, .rrw-cal-grid button:focus-visible { border-color: rgba(200, 170, 110, 0.6); outline: none; }
.rrw-cal-grid button.today { color: #e8bf7a; font-weight: 700; }
.rrw-cal-grid button.on { color: #17120a; background: #c8aa6e; font-weight: 700; }
.rrw-cal-grid button:disabled { opacity: 0.3; cursor: default; }
.rrw-cal-foot, .rrw-clock-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(200, 170, 110, 0.2); }
.rrw-cal-foot button, .rrw-clock-foot button { padding: 5px 10px; font: inherit; font-size: 0.82rem; color: #e8d6ae; background: none; border: 1px solid rgba(200, 170, 110, 0.35); cursor: pointer; }
.rrw-clock { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 190px; padding: 10px; }
.rrw-col b { display: block; font-size: 0.72rem; color: #8d877d; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.rrw-col > div { display: grid; max-height: 200px; overflow-y: auto; gap: 1px; }
.rrw-col button { padding: 5px 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.rrw-col button:hover { background: rgba(200, 170, 110, 0.14); }
.rrw-col button.on { color: #17120a; background: #c8aa6e; font-weight: 700; }
.rrw-clock-foot { grid-column: 1 / -1; justify-content: flex-end; }
.rrw-clock-foot button { color: #17120a; background: #c8aa6e; border-color: #c8aa6e; font-weight: 700; }
.rrw-num { display: inline-flex; align-items: stretch; max-width: 100%; }
.rrw-num input { min-width: 0; -moz-appearance: textfield; appearance: textfield; text-align: center; }
.rrw-num input::-webkit-outer-spin-button, .rrw-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rrw-num button { flex: none; width: 32px; font: inherit; font-size: 1.05rem; color: #c8aa6e; background: #0a0d12; border: 1px solid rgba(200, 170, 110, 0.4); cursor: pointer; }
.rrw-num button:hover { border-color: #c8aa6e; color: #f0e6d2; }
input[type="checkbox"], input[type="radio"] { accent-color: #c8aa6e; }
.rrw-block { display: flex; width: 100%; }
/* #54 : bouton enfoncé (icônes musique / son / conseils actives) en or dans les drafters, plus en bleu */
body:not(.page) .hx-btn[aria-pressed="true"] { color: var(--gold-1); border-image: linear-gradient(180deg, #e6cb94, #785a28) 1; }
body:not(.page) .hx-btn:focus-visible { outline-color: #c8aa6e; }

/* #55 : langues — page cachée le temps de charger la traduction (1,5 s max), sélecteur à drapeaux */
html.i18n-wait body { opacity: 0; }
.lang-switch button svg, .lang-fab svg { width: 20px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.lang-switch button { display: inline-flex; align-items: center; gap: 6px; }
.lang-fab { position: fixed; left: 14px; bottom: 14px; z-index: 60; }
.lang-fab .lang-cur { display: grid; place-items: center; width: 38px; height: 30px; padding: 0; border: 1px solid rgba(200, 170, 110, 0.45); border-radius: 8px; background: rgba(8, 10, 14, 0.85); cursor: pointer; }
.lang-fab .lang-cur:hover, .lang-fab .lang-cur:focus-visible { border-color: #c8aa6e; outline: none; }
.lang-fab .lang-menu { position: absolute; left: 0; bottom: 38px; display: grid; gap: 2px; min-width: 150px; padding: 4px; border: 1px solid rgba(200, 170, 110, 0.45); border-radius: 10px; background: #0b0e14; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.lang-fab .lang-menu[hidden] { display: none; }
.lang-fab .lang-menu button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: #e8e1d2; font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.lang-fab .lang-menu button:hover, .lang-fab .lang-menu button[aria-pressed="true"] { background: rgba(200, 170, 110, 0.16); }

/* #57 : fenêtres de confirmation (dialog.js) en style 1 partout, drafters compris */
.dlg { border-radius: 0 !important; background: #0f1115 !important; border: 0 !important; box-shadow: inset 0 3px 0 #ffd23f, 0 30px 60px rgba(0, 0, 0, 0.6) !important; }
.dlg.danger { box-shadow: inset 0 3px 0 #f0304a, 0 30px 60px rgba(0, 0, 0, 0.6) !important; }
.dlg h2, .dlg #dlgT { font-family: "Barlow Semi Condensed", sans-serif !important; font-weight: 800 !important; font-style: italic; text-transform: uppercase; color: #f4f2ee !important; }
.dlg-btn { border-radius: 0 !important; font-family: "Barlow Semi Condensed", sans-serif !important; font-weight: 800 !important; letter-spacing: 0.08em; text-transform: uppercase;
  color: #f4f2ee !important; background: transparent !important; border: 1px solid #2a2e38 !important; }
.dlg-btn.ok, .dlg-btn[data-dlg="1"] { color: #0a0b0e !important; background: #f4f2ee !important; border-color: #f4f2ee !important; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.dlg.danger .dlg-btn[data-dlg="1"] { color: #fff !important; background: #f0304a !important; border-color: #f0304a !important; }

/* Listes à icônes (<option data-html>, ex. « Moi » de Préparer un match) : l'icône seule, le texte pour les lecteurs d'écran. */
.rrw-ico { display: inline-grid; place-items: center; min-width: 22px; height: 22px; }
.rrw-ico svg { width: 20px; height: 20px; }
.rrw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rrw-list button.ico { display: grid; place-items: center; padding: 6px 10px; }

/* #57 (23/11, audit) : étiquette « Méta pro 42 % » (pro-meta.js metaChip) dans les drafters */
.meta-chip { display: inline-block; margin-left: 8px; padding: 1px 6px; vertical-align: middle; font: 700 0.68rem/1.5 var(--cast, "Barlow Semi Condensed", sans-serif); letter-spacing: 0.06em; text-transform: uppercase; color: #cfd2d8; border: 1px solid rgba(255,255,255,0.22); white-space: nowrap; }
.meta-chip.hot { color: #111; background: #ffd23f; border-color: #ffd23f; }

/* #57 (23/11) : bulle du site (tooltips.js), à la place des bulles du navigateur. Même style dans les drafters et les pages. */
.rr-tip { position: fixed; z-index: 10000; max-width: min(340px, calc(100vw - 12px)); padding: 7px 10px; pointer-events: none;
  font: 500 0.82rem/1.4 "Mulish", "Barlow Semi Condensed", system-ui, sans-serif; color: #f4f2ee; background: #15171d;
  border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); opacity: 0; transform: translateY(3px);
  transition: opacity 0.12s, transform 0.12s; white-space: pre-line; }
.rr-tip.on { opacity: 1; transform: none; }
/* 24/11 : bulle structurée (tooltips.js fill) : titre, valeurs de lui / de l'adversaire, fourchette, tableau */
.rr-tip.rich { display: grid; gap: 7px; width: max-content; max-width: min(380px, calc(100vw - 12px)); padding: 12px 14px 13px; white-space: normal; }
.rr-tip.rich .rt-t { font: 800 0.92rem/1.15 "Barlow Semi Condensed", sans-serif; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.rr-tip.rich p { margin: 0; color: #b9bec8; font-size: 0.8rem; line-height: 1.4; }
.rr-tip.rich .rt-v { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; padding-left: 9px; border-left: 3px solid #f0304a; font-size: 0.82rem; }
.rr-tip.rich .rt-v.ours { border-left-color: #ffd23f; border-left-style: dashed; }
.rr-tip.rich .rt-v b { font: 600 0.95rem/1.1 "Barlow Semi Condensed", sans-serif; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-tip.rich .rt-r { display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; gap: 10px; margin-top: 2px; font: 600 0.8rem/1.15 "Barlow Semi Condensed", sans-serif; color: #f4f2ee; white-space: nowrap; }
.rr-tip.rich .rt-r > span { display: grid; gap: 2px; } .rr-tip.rich .rt-r > span:last-child { text-align: right; }
.rr-tip.rich .rt-r small { font-weight: 600; font-size: 0.75rem; color: #9aa0ab; }
.rr-tip.rich .rt-bar { position: relative; height: 6px; background: linear-gradient(90deg, #7a2030, #2a2e38 45%, #2a2e38 55%, #1f6b45); }
.rr-tip.rich .rt-bar.grad { background: linear-gradient(90deg, #7a2030, #7a2030 var(--lo, 0%), #2a2e38 var(--mid, 50%), #1f6b45 var(--hi, 100%), #1f6b45); }
.rr-tip.rich .rt-bar s { position: absolute; top: -3px; bottom: -3px; width: 1px; background: #8a909b; }
.rr-tip.rich .rt-r.bare { grid-template-columns: minmax(0, 1fr); margin: 5px 2px 3px; } .rr-tip.rich .rt-r.bare > span { display: none; }
.rr-tip.rich .rt-bar u { position: absolute; top: -5px; width: 4px; height: 16px; translate: -50% 0; background: #f0304a; text-decoration: none; }
.rr-tip.rich .rt-bar u.ours { width: 10px; background: none; border: 2px dashed #ffd23f; box-sizing: border-box; }
.rr-tip.rich .rt-row { display: grid; grid-template-columns: 1fr 74px 74px; gap: 8px; font-size: 0.79rem; font-variant-numeric: tabular-nums; }
.rr-tip.rich .rt-row span:nth-child(2) { color: #ff8a98; } .rr-tip.rich .rt-row span:nth-child(3) { color: #ffd23f; } .rr-tip.rich .rt-row span:nth-child(4) { color: #9aa0ab; text-align: right; }
.rr-tip.rich .rt-head { font: 700 0.75rem/1.2 "Barlow Semi Condensed", sans-serif; color: #9aa0ab; border-top: 1px solid #2a2e38; padding-top: 7px; }
@media (prefers-reduced-motion: reduce) { .rr-tip { transition: none; } }

/* 26/11 (audit, demande utilisateur) : au doigt, toute cible fait au moins 44 px (boutons, onglets, listes, champs, cases à cocher,
   liens qui servent de bouton). Les liens au milieu d'une phrase gardent leur taille (règle d'accessibilité : ils en sont dispensés).
   « !important » : beaucoup de règles plus précises fixent une petite hauteur ; sur écran tactile, celle-ci doit gagner. */
@media (pointer: coarse) {
  :is(button, [role="tab"], [role="button"], select, summary, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"])):not(.rrw-hide):not([hidden]) { min-height: 44px !important; }
  :is(button, [role="tab"], [role="button"]):not(.rrw-hide) { min-width: 44px !important; }
  input[type="checkbox"], input[type="radio"] { width: 22px !important; height: 22px !important; }
  label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { min-height: 44px !important; display: inline-flex; align-items: center; gap: 8px; }
  :is(.rr-pill, .home-more, .hx-btn, .legal-toc a, .legal-pages a, .faq-toc a, .acc-banner a, #guestBar a, .rr-hubs a, .rr-sub a) { min-height: 44px !important; display: inline-flex; align-items: center; }
}
