/* Myping Livecast - « L'Habillage de Diffusion »
   Thème sombre broadcast : le score est le héros, l'orange est la voix. */

:root {
  --orange: #f4610b;
  --orange-bright: #ff7d2e;
  --orange-deep: #b94a05;
  --orange-ink: #2b1505;
  --brand-navy: #0e0d2c;
  --bg: #161310;
  --surface: #221d18;
  --surface-2: #2d2620;
  --ink: #f5f1ec;
  --muted: #b3a99e;
  --line: #3a322a;
  --win: #57d98a;
  --loss: #e25c5c;
  --radius: 12px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --z-sticky: 20;
  --z-toast: 100;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Texte réservé aux lecteurs d'écran (labels, h1 des vues live) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Focus clavier visible sur tous les éléments interactifs (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
label:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
input[type=checkbox]:focus-visible,
input[type=radio]:focus-visible,
input[type=file]:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 2px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

.display, .btn, .badge-live, .badge-done {
  font-family: "Barlow Condensed", "Arial Narrow", -apple-system, sans-serif;
}

.wrap {
  max-width: 680px; margin: 0 auto;
  padding: 0 16px calc(60px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
/* Deux classes : évite que les @media .wrap (760/960 px) n’élargisse login, profil, CGU… */
.wrap.wrap-narrow { max-width: 480px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  margin-bottom: 20px;
}
.topbar .wrap { padding-bottom: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; row-gap: 10px; }
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: none;
  overflow: visible;
}
.logo-img,
.logo__svg {
  display: block;
  height: 50px;
  width: auto;
  max-width: min(167px, 46vw);
  overflow: visible;
}
.logo__ball { fill: #fff; }
.logo--animated .logo__ball:not([data-logo-ball-init="1"]) { opacity: 0; }
.logo-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
}
.topbar-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; flex: 1 1 auto; }
.topbar-nav .topbar-status { flex: none; align-self: center; }
.topbar-nav-with-status { gap: 12px; }
.topbar .spacer { flex: 1; min-width: 0; }
.topbar-text-link {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  line-height: 1.35; flex: none; min-width: 0; align-self: center;
  margin-right: 4px;
}
.topbar-text-link:hover { color: var(--orange-bright); }
.topbar-text-link.is-active { color: var(--orange-bright); }
.topbar-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px;
  transition: border-color .15s var(--ease-out), color .15s var(--ease-out);
  white-space: nowrap; min-width: 0;
}
.topbar-link:hover { border-color: var(--orange); color: var(--orange-bright); }
.topbar-link.is-active { border-color: var(--orange-deep); color: var(--orange-bright); }
.topbar-user { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.topbar-txt-short { display: none; }
.topbar-ico { flex: none; line-height: 1; }
.topbar-avatar-wrap { display: inline-flex; flex: none; }

/* Mobile & tablette (≤959 px) : logo seul sur la 1re ligne ;
   menu compte en grille sur la 2e. */
@media (max-width: 720px) {
  .topbar .wrap .spacer { display: none; }
  .topbar-nav:not(.topbar-nav-multi) {
    flex: 1 1 auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 8px;
  }
  .topbar-nav:not(.topbar-nav-multi) .topbar-text-link {
    display: none;
  }
  .topbar-nav-multi .topbar-text-link {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
    margin: 0 0 2px;
    font-size: 13px;
  }
  .topbar-nav-multi { order: 3; }
  .topbar-nav-multi {
    flex: 1 1 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }
  .topbar-nav-multi.topbar-nav-with-status {
    grid-template-columns: auto repeat(2, minmax(0, 1fr));
  }
  .topbar-nav-multi.topbar-nav-with-status .topbar-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .topbar-nav-multi .topbar-link {
    font-size: 13px;
    padding: 8px 10px;
  }
  .topbar-txt-full,
  .topbar-name { display: none; }
  .topbar-txt-short { display: inline; }
  .topbar-profile { gap: 0; }
}

/* Tablette paysage : menu compte en grille 4 colonnes sur la 2e ligne */
@media (min-width: 721px) and (max-width: 959px) {
  .topbar .wrap:has(.topbar-nav-multi) .spacer { display: none; }
  .topbar-nav-multi .topbar-text-link {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
    margin: 0 0 4px;
    font-size: 13px;
  }
  .topbar-nav-multi {
    flex: 1 1 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .topbar-nav-multi.topbar-nav-with-status {
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
  }
  .topbar-nav-multi.topbar-nav-with-status .topbar-status {
    grid-row: 1;
    grid-column: 1;
    align-self: center;
  }
  .topbar-nav-multi .topbar-link {
    font-size: 13.5px;
    padding: 7px 10px;
  }
  .topbar-name {
    max-width: 5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 18px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  padding: 13px 22px;
  background: var(--orange); color: var(--orange-ink);
  transition: background .15s var(--ease-out), transform .08s var(--ease-out);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--orange-bright); }
.btn:active { transform: scale(.97); background: var(--orange-deep); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--orange-bright); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-sm { padding: 8px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Cartes & formulaires ---------- */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 22px; margin-bottom: 16px;
}
.card h2,
.card h1.card-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 22px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 14px;
}
.card details summary { cursor: pointer; }
.live-settings > summary {
  color: var(--muted); font-size: 14px;
  list-style: none; padding-left: 0;
}
.live-settings > summary::-webkit-details-marker { display: none; }
.live-settings > summary::marker { content: none; }
.live-settings[open] > summary { margin-bottom: 12px; }
.live-settings-hint,
.live-settings-note { margin: 0 0 14px; font-size: 13px; }
.live-settings-form .btn { margin-top: 4px; }
.live-settings-form [data-ls-double] { display: none; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea,
.pf-row input {
  width: 100%; padding: 11px 13px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-family: inherit;
  transition: border-color .15s var(--ease-out);
}
.field input::placeholder, .composer input::placeholder, .pf-row input::placeholder { color: #a89e93; }
.field input:focus, .field select:focus, .field textarea:focus,
.pf-row input:focus {
  outline: none; border-color: var(--orange);
}
.pf-row input.input-error,
.field input.input-error { border-color: var(--loss); }
.pf-row input.input-error:focus,
.field input.input-error:focus { border-color: var(--loss); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; gap: 0; } }
.field-inline label.switch {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 15px; color: var(--ink); font-weight: 600;
}
.field-inline input[type=checkbox] {
  width: 20px; height: 20px; flex: none;
  accent-color: var(--orange);
  border: 1.5px solid var(--line); border-radius: 4px;
  background: var(--bg); cursor: pointer;
}
.terms-field label.switch,
.terms-field label.switch a {
  color: #fff;
}
.terms-field label.switch a {
  text-decoration: underline;
  text-decoration-color: #fff;
  text-underline-offset: 2px;
}
.visibility-choice { display: flex; flex-direction: column; gap: 8px; }
.visibility-choice label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 14.5px; color: var(--muted); font-weight: 500; margin: 0;
}
.visibility-choice label strong { color: var(--ink); }
.visibility-choice input[type=radio] { width: 18px; height: 18px; accent-color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.form-error {
  background: rgba(226, 92, 92, .12); border: 1px solid rgba(226, 92, 92, .45);
  color: #ffb3b3; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14.5px;
}
.form-error a { color: var(--orange-bright); }
.oauth-stack {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
}
.oauth-btn {
  text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 16px;
}
.oauth-google-btn {
  width: 100%; min-height: 44px; border: 1px solid #dadce0; border-radius: 4px;
  background: #fff; color: #3c4043; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font: 500 14px/20px Roboto, Arial, sans-serif; letter-spacing: .25px;
  padding: 10px 12px; transition: background .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.oauth-google-btn:hover { background: #f8fafd; box-shadow: 0 1px 2px rgba(60, 64, 67, .3); }
.oauth-google-btn:active { background: #f1f3f4; }
.oauth-google-btn:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.oauth-google-icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.auth-sep {
  display: flex; align-items: center; gap: 10px; color: var(--muted);
  font-size: 12.5px; margin: 18px 0;
}
.auth-sep::before, .auth-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 30px 10px 36px; }
.hero h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(44px, 9vw, 64px); font-weight: 700; line-height: .95;
  letter-spacing: .5px; text-transform: uppercase; text-wrap: balance;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { color: var(--muted); margin-top: 14px; font-size: 16px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-compact { padding: 14px 10px 22px; }
.hero-compact h1 { font-size: clamp(34px, 7vw, 48px); }

.hero-landing { position: relative; padding: 0; margin-bottom: 26px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.hero-img { position: relative; }
.hero-img img { display: block; width: 100%; height: 360px; object-fit: cover; object-position: center 30%; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22, 19, 16, .25) 0%, rgba(22, 19, 16, .82) 70%, var(--bg) 100%);
}
.hero-content { position: relative; margin-top: -150px; padding: 0 22px 28px; text-align: center; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 480px) { .hero-img img { height: 280px; } .hero-content { margin-top: -120px; } }

.auth-visual { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; }
.auth-visual img { display: block; width: 100%; height: 150px; object-fit: cover; object-position: center 28%; }
.auth-loading {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); text-align: center; padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .2s var(--ease-out), visibility .2s var(--ease-out);
}
.auth-loading.is-visible { opacity: 1; visibility: visible; }
.auth-loading-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.auth-loading-ball { flex: none; display: block; }
.auth-loading-msg { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Cartes de mode ---------- */
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (max-width: 560px) { .mode-cards { grid-template-columns: 1fr; } }
.mode-card {
  display: flex; flex-direction: column; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; color: var(--ink); font-family: inherit; padding: 0;
  transition: border-color .15s var(--ease-out), transform .15s var(--ease-out);
}
button.mode-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.mode-card.active { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.mode-card-static { cursor: default; }
.mode-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
.mode-card img.mode-img-player { object-position: right 30%; }
.mode-card .mode-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 12px 14px 2px;
}
.mode-card .mode-desc { padding: 0 14px 14px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ---------- Étapes ---------- */
.steps { display: flex; flex-direction: column; gap: 14px; margin: 26px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; }
.step-num {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--orange); color: var(--orange-ink); font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Liste des lives ---------- */
.match-list { display: flex; flex-direction: column; gap: 8px; }
/* Listes de lives tabulaires (date en 1re colonne) */
.match-list-cols .match-list-head,
.match-list-cols .match-item-row {
  display: grid;
  grid-template-columns: 4.5rem 5.25rem minmax(0, 1fr) auto auto;
  gap: 10px 13px;
  align-items: center;
}
.match-list-cols .match-list-head {
  padding: 0 16px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
}
.live-row-date {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex-shrink: 0;
}
.live-row-date-day {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
}
.live-row-date-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.live-row-date-empty {
  font-size: 14px;
  color: var(--muted);
  align-items: center;
}
.match-list-cols .match-item-row .names { min-width: 0; }
.match-list-cols .match-item-row .score { justify-self: end; }
.match-list-cols .match-item-row .row-actions { justify-self: end; }
.list-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.filter-search {
  width: 100%; padding: 11px 13px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-family: inherit;
}
.filter-search::placeholder { color: #a89e93; }
.filter-search:focus { outline: none; border-color: var(--orange); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }
.chip-filter.active { border-color: var(--orange); background: var(--orange); color: var(--orange-ink); }
.chip-filter.active:hover { color: var(--orange-ink); }
.match-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; text-decoration: none; color: var(--ink);
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out);
}
a.match-item:hover { border-color: var(--orange); background: var(--surface-2); }
.match-item .names { flex: 1; min-width: 0; }
.match-item .names strong {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  display: block; font-size: 18px; font-weight: 600; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-item .names span { font-size: 12.5px; color: var(--muted); }
.match-item .score {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700; font-size: 22px; white-space: nowrap; color: var(--orange);
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Lignes de lives (tableau de bord) : sur mobile, les actions passent sur une
   ligne dédiée pour laisser toute la largeur au nom du match. */
@media (max-width: 520px) {
  .match-list-cols .match-list-head,
  .match-list-cols .match-item-row {
    grid-template-columns: 3.25rem 4.25rem minmax(0, 1fr) auto;
  }
  .match-list-cols .match-list-head .live-row-score,
  .match-list-cols .match-list-head .live-row-actions {
    display: none;
  }
  .match-list-cols .match-item-row .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
.badge-live {
  background: var(--orange); color: var(--orange-ink); font-size: 13px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; letter-spacing: 1.5px;
  animation: pulse 1.6s infinite;
}
.badge-done { background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 4px; letter-spacing: 1px; }
.badge-paused {
  background: var(--surface-2); color: var(--orange-bright); border: 1px solid var(--orange-deep);
  font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: 4px; letter-spacing: 1.5px;
  font-family: "Barlow Condensed", "Arial Narrow", -apple-system, sans-serif;
}
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- Bandeau global : rencontre / journée ---------- */
.live-header {
  background: linear-gradient(135deg, #261d12, #1a1510);
  border: 1px solid var(--orange-deep);
  border-radius: var(--radius);
  padding: 14px 18px 12px; margin-bottom: 12px;
}
.team-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.team { min-width: 0; text-align: center; }
.tname {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700; font-size: 21px; line-height: 1.1; letter-spacing: .5px; text-transform: uppercase;
  display: block; overflow-wrap: anywhere;
}
.teamscore {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  display: flex; align-items: center; gap: 8px;
  font-size: 46px; font-weight: 700; line-height: 1; color: var(--orange-bright);
  font-variant-numeric: tabular-nums;
}
.teamscore .sep { color: var(--line); font-size: 34px; font-weight: 400; }
.teamscore .flash { animation: scoreflash .75s var(--ease-out); }
.day-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-player-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.day-player-photo { flex: none; }
.day-player-photo .sb-avatar { width: 48px; height: 48px; max-width: 48px; max-height: 48px; }
.day-player { min-width: 0; flex: 1; }
.lh-club { display: block; font-size: 12px; color: var(--muted); }
.day-record {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(20px, 6vw, 30px); font-weight: 700; display: flex; gap: 8px; align-items: center; white-space: nowrap;
}
.rec-win { color: var(--win); }
.rec-loss { color: var(--loss); }
.rec-sep { color: var(--line); font-weight: 400; }
.lh-sub {
  margin-top: 7px; text-align: center; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 2px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
}

/* ---------- Scoreboard : le héros ---------- */
.scoreboard {
  background: linear-gradient(180deg, #211c16, #181410);
  border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius);
  padding: 16px 16px 14px; margin-bottom: 16px;
  position: sticky; top: 10px; z-index: var(--z-sticky);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
.scoreboard .event-name {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 2px;
}
.score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.player { text-align: center; min-width: 0; }
.sb-player-photo, .rp-player-photo {
  display: flex; justify-content: center; margin-bottom: 6px;
}
.sb-avatar, .rp-avatar {
  width: 56px; height: 56px; max-width: 56px; max-height: 56px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line); background: var(--surface-2);
}
.sb-player-photo.is-double, .rp-player-photo.is-double { gap: 4px; }
.sb-avatar-sm, .rp-avatar-sm {
  width: 36px; height: 36px; max-width: 36px; max-height: 36px;
}
.player .name {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600; font-size: 20px; line-height: 1.1; letter-spacing: .5px;
  text-transform: uppercase; overflow-wrap: anywhere;
}
.player .club { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.serve-indic {
  display: none;
  margin-top: 6px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--orange-bright);
}
.serve-indic.is-serving { display: block; animation: servepulse 1.6s ease-in-out infinite; }
.serve-indic.is-receiver { color: var(--muted); animation: none; }
@keyframes servepulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.serve-pick { margin-bottom: 10px; }
.serve-pick-label { font-size: 13px; color: var(--muted); }
.serve-now { color: var(--orange-bright) !important; font-weight: 600; }
.bigscore {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  display: flex; align-items: center; gap: 10px;
  font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.bigscore .sep { color: var(--line); font-weight: 400; font-size: 48px; }
.flash { animation: scoreflash .75s var(--ease-out); }
@keyframes scoreflash {
  0% { color: var(--orange-bright); transform: scale(1.18); }
  100% { color: inherit; transform: scale(1); }
}
.sets-history { text-align: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.sets-history b { color: var(--ink); }
#sb-hint {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 17px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--orange-bright) !important;
  animation: pulse 1.2s infinite;
}
.final-banner {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-align: center; margin-top: 12px; background: var(--orange); color: var(--orange-ink);
  border-radius: 8px; padding: 9px 10px; font-weight: 700; font-size: 19px;
  letter-spacing: .5px; text-transform: uppercase;
}

/* Bandeau rencontre & scoreboard : réduction progressive puis empilement
   sous 400 px pour éviter tout chevauchement score ↔ noms d'équipes/joueurs. */
@media (max-width: 480px) {
  .team-row,
  .score-row,
  .replay-score {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
  }
  .tname {
    font-size: clamp(14px, 4.2vw, 21px);
    overflow-wrap: anywhere;
  }
  .teamscore {
    font-size: clamp(28px, 10vw, 46px);
    gap: 4px;
  }
  .teamscore .sep { font-size: clamp(22px, 7vw, 34px); }
  .player .name {
    font-size: clamp(13px, 3.8vw, 20px);
    overflow-wrap: anywhere;
    line-height: 1.15;
  }
  .player .club { font-size: 10.5px; }
  .sb-avatar {
    width: 44px; height: 44px; max-width: 44px; max-height: 44px;
  }
  .sb-avatar-sm {
    width: 32px; height: 32px; max-width: 32px; max-height: 32px;
  }
  .bigscore,
  .rp-big {
    font-size: clamp(34px, 11vw, 64px);
    gap: 4px;
  }
  .bigscore .sep,
  .rp-big .rp-sep {
    font-size: clamp(26px, 8vw, 48px);
  }
  .lh-sub {
    font-size: 10px;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
  }
  .sets-history {
    font-size: 12px;
    overflow-wrap: anywhere;
    padding-inline: 2px;
  }
}

@media (max-width: 399px) {
  .team-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "thome taway" "tscore tscore";
    row-gap: 6px;
  }
  .team-row > .team:first-child { grid-area: thome; }
  .team-row > .teamscore { grid-area: tscore; justify-self: center; }
  .team-row > .team:last-child { grid-area: taway; }

  .score-row,
  .replay-score {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "p1 p2" "score score";
    row-gap: 8px;
  }
  .score-row > .player:first-of-type,
  .replay-score > .rp-side:first-of-type { grid-area: p1; }
  .score-row > .player:last-of-type,
  .replay-score > .rp-side:last-of-type { grid-area: p2; }
  .score-row > .bigscore,
  .replay-score > .rp-big { grid-area: score; justify-self: center; }
}

/* ---------- Liste des parties (rencontre / journée) ---------- */
.parts-list { display: flex; flex-direction: column; gap: 6px; }
.part {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); font-size: 14.5px;
}
.part-current { border-color: var(--orange-deep); background: rgba(244, 97, 11, .07); }
.part-num {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.part-kind {
  flex: none; font-size: 11px; font-weight: 700; color: var(--orange-bright);
  border: 1px solid var(--orange-deep); border-radius: 4px; padding: 0 5px;
}
.part-names { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.part-names em { color: var(--muted); font-style: normal; font-size: 12px; }
.part-detail { display: block; font-size: 11.5px; color: var(--muted); }
.part-winner { color: var(--win); font-weight: 700; }
.part-score {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700; font-size: 18px; color: var(--ink); white-space: nowrap;
}
.part-live {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--orange-bright);
  animation: pulse 1.6s infinite; white-space: nowrap;
}
.part-tag {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  border-radius: 4px; padding: 2px 6px; white-space: nowrap;
}
.part-tag-perf { background: rgba(94, 201, 124, .15); color: var(--win); border: 1px solid rgba(94, 201, 124, .45); }
.part-tag-contre { background: rgba(226, 92, 92, .12); color: var(--loss); border: 1px solid rgba(226, 92, 92, .45); }

/* Parties cliquables : clic pour afficher le détail dans le scoreboard */
.part-clickable { cursor: pointer; transition: border-color .15s var(--ease-out), background .15s var(--ease-out); }
.part-clickable:hover { border-color: var(--orange-deep); background: rgba(244, 97, 11, .06); }
.part-clickable:focus-visible { outline: 2px solid var(--orange-bright); outline-offset: 2px; }
.part-selected { border-color: var(--orange); background: rgba(244, 97, 11, .12); box-shadow: inset 3px 0 0 var(--orange); }
.part-go {
  flex: none; color: var(--muted); font-size: 20px; line-height: 1;
  transition: transform .15s var(--ease-out), color .15s var(--ease-out);
}
.part-clickable:hover .part-go, .part-selected .part-go { color: var(--orange-bright); transform: translateX(2px); }

/* Tags perf/contre (console commentateur) */
.tag-actions { display: flex; gap: 6px; flex: none; }
.chip-tag { padding: 6px 10px; font-size: 12.5px; }
.chip-tag-on { border-color: var(--orange); background: var(--orange); color: var(--orange-ink); }
.chip-tag-on:hover { color: var(--orange-ink); }

/* ---------- Commandes commentateur ---------- */
.score-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.score-card-head h2 { margin: 0; }
.score-comment-btn { flex: none; white-space: nowrap; }
#card-score.score-paused .ctrl-points,
#card-score.score-paused details { display: none; }
.ctrl-points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.btn.btn-point {
  padding: 24px 10px; font-size: 28px; border-radius: 12px;
  display: flex; flex-direction: column; gap: 3px; line-height: 1.1;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  background: var(--surface-2);
  color: var(--orange-bright);
  border: 1.5px solid var(--orange-deep);
  text-transform: none;
}
.btn.btn-point:hover {
  background: rgba(244, 97, 11, .1);
  border-color: var(--orange);
}
.btn.btn-point:active {
  transform: scale(.97);
  background: rgba(244, 97, 11, .16);
  color: var(--orange-bright);
}
.btn.btn-point small {
  font-weight: 600; font-size: 13px; opacity: 1; letter-spacing: 1px;
  color: var(--ink); text-transform: uppercase;
}
@media (prefers-reduced-motion: no-preference) {
  .btn-point.score-nudge { animation: score-nudge .9s var(--ease-out); }
}
@keyframes score-nudge {
  0%, 100% { transform: scale(1); box-shadow: none; }
  30%, 55% { transform: scale(1.04); box-shadow: 0 0 0 3px var(--orange); }
}
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px;
  padding: 8px 13px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink);
  transition: border-color .15s var(--ease-out);
  font-family: inherit;
}
.chip:hover { border-color: var(--orange); color: var(--orange-bright); }

/* Volet dépliant des commentaires / emojis prédéfinis (fermé par défaut). */
.chips-fold { margin-bottom: 12px; }
.chips-fold > .chips-fold-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px;
  padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; list-style: none; user-select: none;
  transition: border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.chips-fold > .chips-fold-toggle::-webkit-details-marker { display: none; }
.chips-fold > .chips-fold-toggle::after { content: "▾"; color: var(--muted); font-size: 12px; }
.chips-fold[open] > .chips-fold-toggle::after { content: "▴"; }
.chips-fold > .chips-fold-toggle:hover { border-color: var(--orange); color: var(--orange-bright); }
.chips-fold-body { margin-top: 10px; }
.chips-fold-body .quick-row { margin-bottom: 0; }

.composer { display: flex; gap: 8px; }
.composer input[type=text], .composer input[type=url] {
  flex: 1; min-width: 0; padding: 12px 13px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
}
.composer input[type=text]:focus, .composer input[type=url]:focus { outline: none; border-color: var(--orange); }
.btn-icon { width: 48px; height: 48px; flex: none; padding: 0; font-size: 20px; border-radius: 10px; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.ev {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 15px;
  animation: pop .3s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.ev .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.ev .meta .who { font-weight: 700; color: var(--ink); }
.ev .meta .scorechip {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  background: var(--surface-2); color: var(--orange-bright); font-weight: 600;
  padding: 1px 8px; border-radius: 4px; font-size: 13px; letter-spacing: .5px;
}
.ev .meta .ev-edited { font-style: italic; }
.ev .meta .ev-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.ev-act {
  border: 1px solid var(--line); background: var(--bg); border-radius: 6px;
  padding: 2px 7px; font-size: 12px; cursor: pointer; color: var(--muted); line-height: 1.4;
}
.ev-act:hover { border-color: var(--orange); color: var(--orange-bright); }
.ev .content { font-size: 15.5px; white-space: pre-wrap; word-wrap: break-word; }
.ev img { max-width: 100%; border-radius: 8px; margin-top: 8px; display: block; }
.ev-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 8px; }
.ev-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
@supports not (aspect-ratio: 16 / 9) {
  .ev-video { height: 0; padding-bottom: 56.25%; }
}
.ev-video-link {
  display: inline-block; margin-top: 8px; padding: 8px 14px; border-radius: 8px;
  background: var(--surface-2); color: var(--orange-bright); font-weight: 600; text-decoration: none;
}
.ev-video-link:hover { text-decoration: underline; }

/* Album photo / vidéos de fin de live (hors fil) */
.postlive-gallery { display: flex; flex-direction: column; gap: 16px; margin-bottom: 12px; }
.postlive-gallery:empty { display: none; margin: 0; }
.postlive-item img { width: 100%; border-radius: 8px; display: block; }
.postlive-cap { margin: 0 0 6px; font-size: 0.92rem; color: var(--muted); }
.postlive-del { margin-top: 6px; }

.ev-set { background: var(--surface-2); border-color: var(--orange-deep); }
.ev-set .content {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600; font-size: 19px; letter-spacing: .3px; color: var(--orange-bright);
}
.ev-system { background: transparent; border: 1px dashed var(--line); }
.ev-system .content { font-weight: 600; color: var(--muted); font-size: 14.5px; text-align: center; }
.ev-fan { background: #1f2228; border-color: #343a45; border-radius: 16px; }
.ev-fan .content { font-style: italic; }

.react-row { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.react-btn {
  border: 1px solid var(--line); background: var(--bg); border-radius: 99px;
  padding: 3px 10px; font-size: 13px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; gap: 4px;
  transition: border-color .15s var(--ease-out);
}
.react-btn:hover { border-color: var(--orange); }
.react-btn.mine { background: var(--surface-2); border-color: var(--orange); color: var(--orange-bright); font-weight: 700; }

/* ---------- Champ joueur : liste déroulante + saisie libre + classement ---------- */
.player-field .pf-select { margin-bottom: 8px; }
.pf-combobox {
  position: relative;
  margin-bottom: 8px;
}
.pf-combobox-input {
  width: 100%;
  /* padding-right élargi pour laisser place au chevron sans rogner le texte */
  padding: 11px 38px 11px 13px;
  font-size: 16px; /* 16px : évite le zoom auto iOS au focus → saisie plus fluide */
  line-height: 1.3;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  text-overflow: ellipsis; /* dégrade proprement un libellé/valeur trop long */
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.pf-combobox-input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* Le placeholder est un texte d'aide assez long : police légèrement réduite
   pour qu'il tienne sur une ligne sur mobile/tablette sans être rogné. */
.pf-combobox-input::placeholder {
  color: #a89e93;
  font-size: 13.5px;
}
.pf-combobox-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 97, 11, .18);
}
.pf-combobox-open .pf-combobox-input {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--orange);
  box-shadow: none;
}
/* Chevron indiquant qu'on peut dérouler la liste ; pivote à l'ouverture. */
.pf-combobox::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform .18s var(--ease-out), margin-top .18s var(--ease-out);
}
.pf-combobox-open::after {
  margin-top: -2px;
  transform: rotate(225deg);
  border-color: var(--orange);
}
.pf-combobox-list {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--surface);
  border: 1.5px solid var(--orange);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .38);
}
.pf-combobox-group {
  padding: 8px 13px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.pf-combobox-option {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 13px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1.3;
}
.pf-combobox-option .pf-opt-name {
  font-size: 15px;
  font-weight: 600;
  word-break: break-word;
}
.pf-combobox-option .pf-opt-meta {
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-word;
}
.pf-combobox-option:hover,
.pf-combobox-option.is-active {
  background: var(--surface-2);
}
.pf-combobox-option:hover .pf-opt-name,
.pf-combobox-option.is-active .pf-opt-name {
  color: var(--orange-bright);
}
.pf-combobox-option[aria-selected="true"] {
  background: var(--surface-2);
}
.pf-combobox-option[aria-selected="true"] .pf-opt-name {
  color: var(--orange-bright);
}
.pf-combobox-empty {
  padding: 12px 13px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* Mobile/tablette tactile : cibles plus grandes, liste limitée pour ne pas
   passer sous le clavier virtuel, placeholder qui reste lisible. */
@media (max-width: 600px) {
  .pf-combobox-list { max-height: min(280px, 48vh); }
  .pf-combobox-option { padding: 11px 14px; }
  .pf-combobox-option .pf-opt-name { font-size: 15.5px; }
  .pf-combobox-input::placeholder { font-size: 13px; }
}
@media (hover: none) and (pointer: coarse) {
  .pf-combobox-option { min-height: 44px; justify-content: center; }
}
.pf-row { display: flex; gap: 8px; }
.pf-row input { min-width: 0; width: auto; }
.pf-row input:not(.pf-rank) { flex: 1; }
.pf-row .pf-rank { flex: none; width: 7.5rem; text-align: center; }
.roster-col { display: flex; flex-direction: column; }
.roster-col .roster-row { margin-bottom: 10px; }
.roster-details { margin-bottom: 13px; }
.roster-details > summary { color: var(--muted); font-size: 13.5px; }
.roster-details[open] > summary { margin-bottom: 4px; }
.roster-section { margin-bottom: 13px; }

/* ----- Panneau de saisie des joueurs par équipe ----- */
.roster-section-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.roster-team-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top-width: 2px;
  border-radius: var(--radius);
  padding: 12px 12px 4px;
}

.roster-team-panel--home { border-top-color: var(--orange-deep); }
.roster-team-panel--away { border-top-color: var(--line); }

.roster-team-label {
  display: block;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px;
  margin-bottom: 10px;
}

.roster-team-panel--home .roster-team-label { color: var(--orange); }
.roster-team-panel--away .roster-team-label { color: var(--muted); }

.roster-count-shared { max-width: 280px; }
.roster-hint { margin-top: 10px; }
.roster-sub { margin-bottom: 13px; }

/* ---------- Composition & forfaits (console) ---------- */
.roster-admin-team { margin-bottom: 14px; }
.roster-admin-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 6px;
}
.roster-admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.roster-admin-row:last-child { border-bottom: none; }
.roster-admin-row .ra-name { font-size: 15px; min-width: 0; }
.roster-admin-row .ra-rank { color: var(--muted); font-size: 12.5px; }
.roster-admin-row .ra-ff {
  color: var(--loss); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.roster-admin-row.is-forfeit .ra-name { text-decoration: line-through; color: var(--muted); }

/* ---------- Boutons icône (épinglage, archive…) ---------- */
.iconbtn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  border-radius: 8px; width: 36px; height: 36px; flex: none;
  font-size: 17px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s var(--ease-out), color .15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.iconbtn:hover { border-color: var(--orange); color: var(--orange-bright); }
.iconbtn:disabled { opacity: .5; cursor: default; }
.iconbtn-on { color: var(--orange-bright); border-color: var(--orange-deep); }
.iconbtn-pin-off { opacity: .6; }
.iconbtn-pin-off:hover { opacity: .85; }
.iconbtn-danger:hover { border-color: #e5484d; color: #fff; background: #e5484d; }

/* Mots-clés : puces en lecture seule (lives suivis) */
.match-item .names .hashtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.match-item .names .hashtag {
  font-size: 11.5px; line-height: 1.3; color: var(--muted);
  white-space: nowrap; cursor: pointer;
}
.match-item .names .hashtags .hashtag:hover { color: var(--orange-bright); }

/* Mots-clés du diffuseur : puces discrètes, clic pour éditer */
.live-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 4px; min-height: 18px; cursor: text;
}
.live-tags .hashtag {
  font-size: 11.5px; line-height: 1.3; color: var(--muted);
  white-space: nowrap;
}
.live-tags:hover .hashtag { color: var(--ink); }
.live-tags-hint {
  font-size: 11.5px; line-height: 1.3; color: var(--muted); opacity: .78;
}
.live-tags-hint .live-tags-hash { color: var(--orange-bright); opacity: 1; }
.live-tags:hover .live-tags-hint { opacity: .85; color: var(--ink); }
.live-tags:hover .live-tags-hint .live-tags-hash { color: var(--orange); }
.live-tags-empty:not(.live-tags-editing) {
  min-height: 18px;
}
.live-tags-editing .live-tags-hint { display: none; }
.live-tags:not(.live-tags-empty) .live-tags-hint { display: none; }
.live-tags-input {
  flex: 1 1 100%; min-width: 0; box-sizing: border-box;
  border: none; background: transparent; padding: 0;
  font-size: 11.5px; line-height: 1.3; color: var(--ink);
}
.live-tags:not(.live-tags-editing) .live-tags-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.live-tags-editing {
  margin-top: 4px; padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.live-tags-editing .hashtag { display: none; }
.live-tags-editing .live-tags-input {
  position: static; width: 100%; height: auto; margin: 0; overflow: visible; clip: auto;
}
.live-tags-editing .live-tags-input:focus { outline: none; }
.live-tags-input:disabled { opacity: .5; }

/* ---------- Mes joueurs ---------- */
.wrap.wrap-players,
.page-players .topbar .wrap {
  max-width: min(1320px, calc(100vw - 32px));
  width: 100%;
}

.players-layout {
  display: grid; gap: 20px;
}
.players-aside .hero-compact { padding-left: 0; padding-right: 0; }
.players-main { min-width: 0; container-type: inline-size; }
.players-main .section-title { margin-top: 0; }
.players-main .empty-state { text-align: left; padding-left: 0; padding-right: 0; }

#add-form .pf-row .pf-rank { width: 7.5rem; }

@media (min-width: 768px) {
  .wrap.wrap-players,
  .page-players .topbar .wrap {
    padding-left: clamp(20px, 3vw, 40px);
    padding-right: clamp(20px, 3vw, 40px);
  }
}

@media (min-width: 768px) {
  .players-layout {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 40px); align-items: start;
  }
  .players-aside {
    position: sticky; top: 12px;
  }
  .players-aside .hero-compact {
    text-align: left; padding-top: 0;
  }
  .players-aside .hero-compact p {
    margin-left: 0; max-width: none;
  }
  .players-main .section-title { margin-top: 4px; }
}

@media (max-width: 767px) {
  .players-main .section-title { margin-top: 8px; }
}

@media (max-width: 480px) {
  #add-form .pf-row {
    flex-direction: column; align-items: stretch;
  }
  #add-form .pf-row .pf-rank {
    width: 100%; text-align: left;
  }
}

/* Les lignes joueur s'adaptent à la largeur RÉELLE de leur colonne
   (.players-main est un conteneur), et non à celle de la fenêtre : cela évite
   tout débordement quand la colonne est étroite (ex. mise en page 2 colonnes
   sur tablette). Base mobile-first = disposition empilée en grille. */
.player-row {
  display: grid;
  grid-template-columns: 36px 36px 1fr 1fr;
  grid-template-areas:
    "avatar fav name name"
    "rank rank club club"
    "actions actions actions actions";
  gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.player-row.player-fav { border-color: var(--orange-deep); }
.player-row input {
  min-width: 0; padding: 8px 10px; font-size: 14.5px;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-family: inherit;
}
.player-row input:focus { outline: none; border-color: var(--orange); }
.player-row .pr-avatar { grid-area: avatar; }
.player-row [data-fav] { grid-area: fav; }
.player-row input[name=name] { grid-area: name; width: 100%; }
.player-row .pf-rank { grid-area: rank; width: 100%; }
.player-row .pr-club { grid-area: club; width: 100%; }
.player-row-actions {
  display: flex; align-items: center; gap: 6px;
  grid-area: actions; justify-content: flex-end; width: 100%;
}

/* Import CSV / Excel d'une liste de joueurs */
.import-intro { margin: 0 0 8px; }
.import-cols {
  list-style: none; margin: 0 0 10px; padding: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.import-cols li {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink);
}
.import-cols li em { color: var(--muted); font-style: normal; font-size: 12.5px; }
.import-col-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--orange-deep); color: #fff; font-size: 12px; font-weight: 700;
}
.import-hint { font-size: 12.5px; line-height: 1.4; margin: 0 0 12px; }
#import-form input[type=file] {
  width: 100%; padding: 7px 8px; font-size: 14px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink);
}
#import-form input[type=file]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; cursor: pointer;
  border: none; border-radius: 6px; font-family: inherit; font-size: 13px;
  background: var(--surface-2); color: var(--ink);
}
#import-btn[disabled] { opacity: .65; cursor: progress; }

/* Prévisualisation avant import définitif */
.import-preview { margin-bottom: 14px; }
.import-preview[hidden] { display: none; }
.import-preview-title {
  font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 8px;
}
.import-preview-stats { font-size: 13px; color: var(--muted); line-height: 1.45; margin-bottom: 10px; }
.import-preview-stats strong { color: var(--ink); }
.import-preview-table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 8px;
}
.import-preview-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.import-preview-table th,
.import-preview-table td {
  padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.import-preview-table th {
  background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .4px;
}
.import-preview-table tr:last-child td { border-bottom: none; }
.import-preview-table td:first-child { white-space: normal; min-width: 7rem; }
.import-preview-more td {
  text-align: center; color: var(--muted); font-style: italic; font-size: 12.5px;
}
.import-badge {
  display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px;
  border-radius: 999px; letter-spacing: .2px;
}
.import-badge-new { background: rgba(46, 160, 67, .18); color: #3fb950; }
.import-badge-existing { background: var(--line); color: var(--muted); }
.import-preview-warn {
  font-size: 12.5px; color: var(--orange-bright); margin: 0; line-height: 1.4;
}
.import-preview-warn[hidden] { display: none; }

/* Choix de la stratégie de fusion, affiché après la prévisualisation. */
.import-choice { display: flex; flex-direction: column; gap: 8px; }
.import-choice[hidden] { display: none; }
.import-choice-q { font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 2px; }
.import-choice-opt {
  display: block; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; color: var(--ink); font-family: inherit;
  transition: border-color .15s, background .15s;
}
.import-choice-opt:hover { border-color: var(--orange); background: var(--line); }
.import-choice-opt b { display: block; font-size: 14px; }
.import-choice-opt small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.import-choice-opt[disabled] { opacity: .55; cursor: progress; }
.import-choice-cancel {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 6px; font-size: 13px; align-self: center;
}
.import-choice-cancel:hover { color: var(--ink); }
.import-result {
  margin-top: 12px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.import-result[hidden] { display: none; }
.import-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.import-stats li { font-size: 14px; }
.import-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.import-empty { font-size: 13.5px; color: var(--orange-bright); margin: 0; }

/* Colonne moyennement large : nom en pleine largeur sur la 1re ligne,
   le reste (avatar, favori, classement, club, actions) s'enroule dessous. */
@container (min-width: 430px) {
  .player-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; row-gap: 10px;
  }
  .player-row input[name=name] {
    flex: 1 1 calc(100% - 96px); order: -1; width: auto;
  }
  .player-row .pf-rank { flex: none; width: 7rem; }
  .player-row .pr-club { flex: 1 1 8rem; width: auto; }
  .player-row-actions { margin-left: auto; width: auto; }
}

/* Colonne large : tout sur une seule ligne. */
@container (min-width: 620px) {
  .player-row { flex-wrap: nowrap; padding: 10px 14px; gap: 10px; }
  .player-row input[name=name] { flex: 2.4; min-width: 8rem; order: 0; }
  .player-row .pr-club { flex: 1.6; min-width: 6rem; }
  .player-row .pf-rank { width: 7.5rem; }
}

/* Repli pour les (rares) navigateurs sans container queries :
   on conserve une disposition fluide basée sur la fenêtre. */
@supports not (container-type: inline-size) {
  @media (min-width: 768px) {
    .player-row {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px; row-gap: 10px;
    }
    .player-row input[name=name] { flex: 1 1 12rem; order: 0; width: auto; }
    .player-row .pf-rank { flex: none; width: 7.5rem; }
    .player-row .pr-club { flex: 1 1 8rem; width: auto; }
    .player-row-actions { margin-left: auto; width: auto; }
  }
}

/* ---------- Archives ---------- */
.archive-block > summary { list-style: none; cursor: pointer; }
.archive-block > summary::-webkit-details-marker { display: none; }
.archive-block > summary.section-title::after { content: "▾"; flex: none; height: auto; background: none; color: var(--muted); }
.archive-block[open] > summary.section-title::after { content: "▴"; }
.archive-block .match-list { margin-top: 4px; opacity: .75; }

/* ---------- Divers ---------- */
.share-box { display: flex; gap: 8px; align-items: center; }
.share-box input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 13.5px; color: var(--muted); background: var(--bg);
}

/* ---------- Partage viral (WhatsApp / SMS / copie / QR) ---------- */
.share-actions {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px;
}
.share-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 10px; padding: 11px 12px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: border-color .15s var(--ease-out), transform .08s var(--ease-out);
}
.share-act:hover { border-color: var(--orange); }
.share-act:active { transform: scale(.97); }
.share-act .share-ic { font-size: 16px; }
.share-wa:hover { border-color: #25d366; }
.timeline:empty::after {
  content: "Le fil du live s'animera dès le premier point. Restez dans le coin !";
  display: block; text-align: center; color: var(--muted); font-size: 14px; padding: 26px 12px;
}
.fan-name-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.fan-name-meta[hidden] { display: none; }
.fan-name-meta .muted { font-size: 12.5px; }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
  color: var(--orange-bright); font-size: 12.5px; font-weight: 600; text-decoration: underline;
}
.warn-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: rgba(214, 158, 38, .12); border: 1px solid rgba(214, 158, 38, .35);
  color: #e8cf8c; font-size: 13px; line-height: 1.45;
}

/* ---------- Modale QR code ---------- */
.qr-modal { position: fixed; inset: 0; z-index: var(--z-toast); display: flex; align-items: center; justify-content: center; padding: 18px; }
.qr-modal[hidden] { display: none; }
.qr-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
.qr-modal-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 22px 20px; max-width: 360px; width: 100%; text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
}
.qr-close {
  position: absolute; top: 10px; right: 12px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 20px; line-height: 1; padding: 4px;
}
.qr-close:hover { color: var(--ink); }
.qr-title { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 24px; margin-bottom: 16px; }
.qr-canvas { display: inline-block; background: #fff; padding: 12px; border-radius: 12px; line-height: 0; }
.qr-canvas img, .qr-canvas canvas { display: block; }
.qr-url { margin-top: 12px; font-size: 13px; color: var(--muted); word-break: break-all; }
.qr-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
body.qr-open { overflow: hidden; }

/* ---------- Modale commentaire (console commentateur) ---------- */
.comment-modal {
  position: fixed; inset: 0; z-index: var(--z-toast);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.comment-modal[hidden] { display: none; }
.comment-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
.comment-modal-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px 16px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 480px; max-height: min(92vh, 680px); overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .45);
}
.comment-modal-close {
  position: absolute; top: 10px; right: 12px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 20px; line-height: 1; padding: 4px;
}
.comment-modal-close:hover { color: var(--ink); }
.comment-modal-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 24px; margin: 0 36px 6px 0;
}
.comment-modal-hint { margin: 0 0 14px; }
.comment-modal-form { margin-top: 12px; }
.comment-modal-cancel { margin-top: 12px; }
body.comment-open { overflow: hidden; }

@media (min-width: 480px) {
  .comment-modal { align-items: center; padding: 18px; }
  .comment-modal-card {
    border-radius: 16px;
    padding-bottom: 22px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
  }
}

@media print {
  body.qr-open > *:not(.qr-modal) { display: none !important; }
  .qr-modal, .qr-modal-card { position: static; box-shadow: none; }
  .qr-modal-backdrop, .qr-close, .qr-actions, .qr-hint { display: none !important; }
  .qr-modal-card { color: #000; border: none; background: #fff; max-width: none; }
  .qr-title, .qr-url { color: #000; }
}
.muted { color: var(--muted); font-size: 13.5px; }
.muted a, footer.site a { color: var(--orange-bright); text-decoration: none; }
.policy-box {
  background: rgba(244, 97, 11, .08);
  border-color: rgba(244, 97, 11, .35);
  margin: 6px 0 16px;
}
.policy-box h2 { margin-bottom: 8px; }
.legal-card h3 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 18px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  margin: 18px 0 6px;
}
.legal-card p { margin-bottom: 10px; }
.legal-list { margin: 8px 0 14px 20px; color: var(--ink); }
.legal-list li { margin-bottom: 7px; }
.chip-report {
  border-color: rgba(226, 92, 92, .55);
  color: #ffb3b3;
}
.chip-report:hover, .ev-report:hover { border-color: var(--loss); color: #ffd0d0; }
.section-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  color: var(--muted); margin: 28px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-count { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--muted); }
.pagination { margin: 14px 0 4px; }
.pagination-info { margin: 0 0 10px; text-align: center; font-size: 13px; color: var(--muted); }
.pagination-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
}
.pagination-page,
.pagination-ellipsis {
  min-width: 36px; height: 36px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 14px; font-weight: 600;
}
.pagination-page {
  color: var(--ink); text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.pagination-page:hover { border-color: var(--orange); color: var(--orange-bright); }
.pagination-page.is-current {
  background: var(--orange); border-color: var(--orange); color: var(--orange-ink);
}
.pagination-ellipsis { color: var(--muted); }
.pagination-prev,
.pagination-next { min-width: auto; }
.pagination .is-disabled { opacity: .45; pointer-events: none; }
.sound-toggle {
  flex: none; cursor: pointer;
  width: 32px; height: 32px; padding: 0; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; transition: border-color .15s var(--ease-out), opacity .15s var(--ease-out);
}
.sound-toggle:hover { border-color: var(--orange); }
.sound-toggle.is-off { opacity: .6; }
/* Placé à l'extrémité droite du titre, après le trait de séparation. */
.section-title [data-sound-toggle] { order: 1; margin-left: 10px; display: inline-flex; flex: none; }
.rp-sound-slot { flex: none; display: inline-flex; }
.toast {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  background: var(--orange); color: var(--orange-ink); padding: 11px 20px; border-radius: 99px;
  font-size: 14.5px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  z-index: var(--z-toast); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out);
  max-width: 90vw;
}
.toast.show { opacity: 1; }
.code-input { text-transform: uppercase; letter-spacing: 4px; font-weight: 700; text-align: center; }
footer.site { text-align: center; padding: 30px 0 10px; color: var(--muted); font-size: 12.5px; --apps-carousel-line: var(--line); --apps-carousel-muted: var(--muted); }
footer.site .apps-carousel { max-width: min(920px, 100%); margin-inline: auto; text-align: initial; }
.footer-nav { margin-bottom: 12px; font-size: 13.5px; }
.footer-support {
  margin: 22px auto 0; max-width: 420px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 0 14px;
}
.footer-support-toggle {
  cursor: pointer; list-style: none; padding: 12px 0;
  font-size: 13.5px; font-weight: 600; color: var(--orange-bright);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.footer-support-ic { margin-right: 6px; font-size: 15px; line-height: 1; flex-shrink: 0; }
.footer-support-label { display: flex; align-items: center; min-width: 0; flex: 1; text-align: left; }
.footer-support-body .muted { display: flex; align-items: flex-start; gap: 6px; }
.footer-support-toggle::-webkit-details-marker { display: none; }
.footer-support-toggle::after { content: "▾"; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.footer-support[open] .footer-support-toggle::after { content: "▴"; }
.footer-support-body { padding: 0 0 14px; }
.footer-support-body .muted { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.footer-share-actions { margin-top: 0; }

/* ---------- Pages marketing ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.breadcrumb a { color: var(--orange-bright); text-decoration: none; }
.breadcrumb .bc-sep { margin: 0 4px; color: var(--line); }
.check-list { list-style: none; margin: 6px 0 14px; padding: 0; }
.check-list li { position: relative; padding: 6px 0 6px 28px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.check-list li:last-child { border-bottom: none; }
.check-list li::before { content: "✔"; position: absolute; left: 0; top: 6px; color: var(--win); font-weight: 700; }
.faq-block .faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-block .faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 10px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "＋ "; color: var(--orange-bright); font-weight: 700; }
.faq-item[open] summary::before { content: "－ "; }
.faq-item p { color: var(--muted); padding: 0 0 12px; font-size: 14px; }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.demo-mini { margin-bottom: 0; display: flex; flex-direction: column; }
.demo-mini .muted { margin-top: auto; padding-top: 4px; }
.demo-tag {
  display: inline-block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--orange-bright); font-weight: 700; margin-bottom: 8px;
}
.demo-score { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.demo-score strong { flex: 1 1 0; min-width: 0; line-height: 1.15; overflow-wrap: anywhere; }
.demo-score strong:last-child { text-align: right; }
.demo-score .demo-vs {
  flex: none; white-space: nowrap;
  font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 700; color: var(--orange);
}
.demo-bubble {
  background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px;
}
.demo-bubble-fan { border-left: 3px solid var(--orange); }
.demo-author { color: var(--muted); font-size: 12.5px; }
.demo-photo {
  background: var(--surface-2); border-radius: 10px; height: 64px; display: flex; align-items: center;
  justify-content: center; font-size: 30px; margin-bottom: 8px;
}
.kit-block .kit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kit-block .kit-head h2 { margin: 0; }
.kit-text {
  width: 100%; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 12px; font-size: 14px; font-family: inherit; line-height: 1.5; resize: vertical;
}
@media (max-width: 540px) { .demo-grid { grid-template-columns: 1fr; } }

/* ---------- Page « Pourquoi Myping Livecast » ---------- */
.wrap-pourquoi {
  max-width: min(880px, 100%);
  padding-bottom: clamp(48px, 8vw, 80px);
}
.page-pourquoi .topbar { margin-bottom: 12px; }
.page-pourquoi .wrap-pourquoi { padding-top: 0; }

/* Hero image plein cadre */
.pq-hero {
  position: relative;
  margin-bottom: clamp(40px, 7vw, 72px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.pq-hero-media { position: relative; }
.pq-hero-media img {
  display: block;
  width: 100%;
  height: clamp(260px, 42vw, 420px);
  object-fit: cover;
  object-position: center 35%;
}
.pq-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(22, 19, 16, .15) 0%,
    rgba(22, 19, 16, .55) 45%,
    rgba(22, 19, 16, .92) 78%,
    var(--bg) 100%
  );
}
.pq-hero-body {
  position: relative;
  margin-top: clamp(-140px, -22vw, -200px);
  padding: 0 clamp(18px, 4vw, 36px) clamp(28px, 5vw, 40px);
  text-align: center;
}
.pq-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--orange-bright);
  margin-bottom: 12px;
  text-wrap: balance;
}
.pq-hero h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(30px, 5.8vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 18ch;
  margin: 0 auto;
}
.pq-hero h1 em { color: var(--orange); font-style: normal; }

/* Sections */
.pq-section { margin-bottom: clamp(40px, 7vw, 72px); }
.pq-prose {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 62ch;
}
.pq-prose + .pq-prose { margin-top: 1rem; }
.pq-lead {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(24px, 4.5vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 clamp(20px, 3.5vw, 28px);
  text-wrap: balance;
  max-width: 28ch;
}

/* Liste de moments (bloc unique, pas de cartes isolées) */
.pq-moments {
  padding: clamp(20px, 4vw, 32px) clamp(18px, 3.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pq-moments-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 36px);
  grid-template-columns: 1fr;
}
.pq-moments-grid li {
  position: relative;
  padding-left: 1.15em;
  font-size: clamp(15px, 2.4vw, 16px);
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}
.pq-moments-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange-bright);
}
@media (min-width: 560px) {
  .pq-moments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pq-moments-wide { grid-column: 1 / -1; }
}

/* Narratif + photo */
.pq-narrative {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.5vw, 28px);
}
.pq-narrative-split {
  display: grid;
  gap: clamp(20px, 4vw, 32px);
  align-items: center;
}
@media (min-width: 640px) {
  .pq-narrative-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(24px, 4vw, 40px);
  }
}
.pq-narrative-outro {
  margin: 0;
  max-width: 52ch;
}
.pq-rhythm {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.pq-rhythm li {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(22px, 3.8vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--orange-bright);
}
.pq-figure { margin: 0; }
.pq-figure-narrative img {
  aspect-ratio: 5 / 4;
  object-position: center 30%;
}
.pq-figure img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.pq-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

/* Offre */
.pq-offer-panel {
  padding: clamp(22px, 4vw, 32px) clamp(18px, 3.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pq-offer h2 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(26px, 4.8vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(18px, 3vw, 24px);
  text-wrap: balance;
  max-width: none;
}
.pq-offer-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 28px);
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .pq-offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pq-offer-wide { grid-column: 1 / -1; }
}
.pq-offer-grid li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(15px, 2.3vw, 16px);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.pq-offer-ic {
  flex: none;
  color: var(--orange-bright);
  font-size: 12px;
  line-height: 1;
  transform: translateY(-1px);
}

/* Valeurs */
.pq-values-list {
  list-style: none;
  margin: clamp(20px, 3vw, 28px) 0 0;
  padding: clamp(18px, 3vw, 24px) 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.pq-values-list li {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  padding-left: 1.1em;
  text-indent: -1.1em;
}
.pq-values-list li::before {
  content: "·";
  color: var(--orange-bright);
  font-weight: 700;
  margin-right: .45em;
}

/* Citation */
.pq-quote {
  margin: 0 0 clamp(40px, 7vw, 72px);
  padding: clamp(28px, 5vw, 40px) clamp(20px, 4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.pq-quote::before {
  content: "\201C";
  display: block;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(48px, 8vw, 72px);
  line-height: .8;
  color: var(--orange);
  margin-bottom: 8px;
}
.pq-quote p {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(19px, 3.5vw, 26px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 14px;
  text-wrap: balance;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}
.pq-quote p:last-child { margin-bottom: 0; }

/* Public */
.pq-audience {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
  align-items: center;
}
@media (min-width: 768px) {
  .pq-audience {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 48px);
  }
}
.pq-figure-tall img { aspect-ratio: 4 / 5; object-position: center 20%; }
.pq-audience-body h2 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(26px, 4.8vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(18px, 3vw, 24px);
  text-wrap: balance;
}
.pq-audience-list {
  margin: 0;
  display: grid;
  gap: 0;
}
.pq-audience-list > div {
  display: grid;
  grid-template-columns: minmax(0, 11em) 1fr;
  gap: 8px 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.pq-audience-list > div:last-child { border-bottom: none; padding-bottom: 0; }
.pq-audience-list dt {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.pq-audience-list dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Clôture */
.pq-closing .pq-accent {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(28px, 5.5vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--orange-bright);
  margin: 1.5rem 0;
  text-wrap: balance;
}
.pq-finale {
  text-align: center;
  padding: clamp(32px, 6vw, 48px) clamp(12px, 3vw, 24px) 12px;
  border-top: 1px solid var(--line);
}
.pq-finale p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: .75rem;
  text-wrap: pretty;
}
.pq-finale p:first-child { margin-top: 0; }
.pq-finale-tagline {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(30px, 6.5vw, 44px) !important;
  font-weight: 700;
  line-height: 1.08 !important;
  color: var(--ink) !important;
  margin: 1rem 0 !important;
  text-wrap: balance;
}
.pq-finale-tagline em { color: var(--orange); font-style: normal; }
.pq-finale-outro { font-size: 15px !important; margin-bottom: 0 !important; }
.page-pourquoi .pq-ctas { margin-top: 24px; justify-content: center; }

/* Entrées discrètes */
@media (prefers-reduced-motion: no-preference) {
  .pq-hero,
  .pq-section,
  .pq-quote,
  .pq-finale {
    animation: pq-rise .7s var(--ease-out) both;
  }
  .pq-moments { animation-delay: .06s; }
  .pq-narrative { animation-delay: .1s; }
  .pq-offer { animation-delay: .14s; }
  .pq-values { animation-delay: .18s; }
  .pq-quote { animation-delay: .22s; }
  .pq-audience { animation-delay: .26s; }
  .pq-closing { animation-delay: .3s; }
  .pq-finale { animation-delay: .34s; }
}
@keyframes pq-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pq-hero,
  .pq-section,
  .pq-quote,
  .pq-finale { animation: none; }
}

@media (max-width: 540px) {
  .pq-audience-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .pq-hero-body {
    margin-top: clamp(-100px, -28vw, -140px);
    padding-left: 14px;
    padding-right: 14px;
  }
  .pq-hero-media img { height: clamp(220px, 58vw, 300px); }
  .pq-hero h1 { max-width: none; font-size: clamp(26px, 7.5vw, 34px); }
  .pq-offer h2,
  .pq-audience-body h2 { max-width: none; }
  .pq-quote { padding: 24px 16px; }
  .pq-finale { padding-left: 8px; padding-right: 8px; }
  .page-pourquoi .pq-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .page-pourquoi .pq-ctas .btn { width: 100%; justify-content: center; }
}

@media (min-width: 768px) {
  .page-pourquoi .pq-prose {
    max-width: none;
  }
}

@media (min-width: 541px) and (max-width: 767px) {
  .wrap-pourquoi { padding-left: 20px; padding-right: 20px; }
  .pq-hero-body { padding-left: 24px; padding-right: 24px; }
  .pq-audience-list > div {
    grid-template-columns: minmax(0, 9em) 1fr;
    gap: 6px 10px;
  }
}


/* ---------- Tableau de bord admin (KPI) ---------- */
.kpi-range { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.kpi-range .chip { text-decoration: none; }
.kpi-range .chip.active { border-color: var(--orange); color: var(--orange-bright); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.kpi-card.kpi-struct { background: var(--surface-2); }
.kpi-card .kpi-ic { font-size: 18px; }
.kpi-card .kpi-val { font-family: "Barlow Condensed", sans-serif; font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--orange-bright); }
.kpi-card .kpi-lbl { font-size: 13px; color: var(--muted); }
.kpi-table { width: 100%; border-collapse: collapse; }
.kpi-table td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.kpi-table tr:last-child td { border-bottom: none; }
.kpi-table td a { color: var(--ink); text-decoration: none; font-weight: 600; }
.kpi-table td a:hover { color: var(--orange-bright); }
.kpi-table .kpi-code { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }
.kpi-table .kpi-n { text-align: right; font-family: "Barlow Condensed", sans-serif; font-size: 20px; font-weight: 700; color: var(--orange); white-space: nowrap; }

/* ---------- Page club publique ---------- */
.club-hero { text-align: center; }
.club-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; margin-bottom: 8px; }
.empty-state { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14.5px; }

/* ---------- Avatars (photos de profil) ---------- */
.avatar {
  border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle;
}
img.avatar {
  display: block; width: 36px; height: 36px; max-width: 36px; max-height: 36px;
}
span.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
}
.avatar-initials {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.avatar-sm,
img.avatar.avatar-sm,
span.avatar.avatar-sm { width: 22px; height: 22px; max-width: 22px; max-height: 22px; font-size: 10px; }
.avatar-lg,
img.avatar.avatar-lg,
span.avatar.avatar-lg { width: 96px; height: 96px; max-width: 96px; max-height: 96px; font-size: 34px; }
.topbar-profile { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.topbar-profile .topbar-avatar-wrap,
.topbar-profile img.avatar { flex-shrink: 0; }
.topbar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.avatar-edit {
  position: absolute; right: -4px; bottom: -4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%;
  width: 28px; height: 28px; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.avatar-edit-sm { width: 18px; height: 18px; font-size: 9px; right: -3px; bottom: -3px; }

.avatar-del {
  position: absolute; top: -5px; right: -5px;
  width: 16px; height: 16px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer;
  z-index: 2;
}
.avatar-del:hover { background: #e5484d; border-color: #e5484d; color: #fff; }

.pr-avatar { position: relative; flex: none; display: inline-flex; cursor: pointer; }
.pr-avatar:hover .avatar { outline: 2px solid var(--orange); }

.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-avatar { position: relative; flex: none; cursor: pointer; }
.profile-avatar:hover .avatar { outline: 2px solid var(--orange); }
.profile-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-info strong { font-size: 19px; }
.profile-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .badge-live, #sb-hint, .part-live { animation: none; }
  .flash { animation: none; }
  .btn-point.score-nudge { animation: none; outline: 2px solid var(--orange); outline-offset: 2px; }
  .ev { animation: none; }
  .btn, .btn:active { transition: none; transform: none; }
  button.mode-card:hover { transform: none; }
  .serve-indic.is-serving { animation: none; }
  .pub-card:hover { transform: none; }
  .share-act:active { transform: none; }
  .part-clickable:hover .part-go, .part-selected .part-go { transform: none; }
  .fil-toggle-chevron { transition: none; }
  .auth-loading { transition: none; }
}

/* ---------- Cibles tactiles (écrans tactiles : minimum ~44 px) ---------- */
@media (pointer: coarse) {
  .react-btn { padding: 8px 12px; font-size: 14px; }
  .ev-act { padding: 6px 10px; }
  .chip, .chip-filter, .chips-fold > .chips-fold-toggle { min-height: 42px; }
  .chip-tag { min-height: 38px; }
  .topbar-link { min-height: 40px; }
  .iconbtn { width: 44px; height: 44px; }
  .sound-toggle { width: 40px; height: 40px; }
  .pagination-page, .pagination-ellipsis { min-width: 42px; height: 42px; }
  .qr-close { padding: 10px 12px; }
  .replay-x { padding: 10px 12px; }
  .rp-ctl { width: 46px; height: 44px; }
  .link-btn { padding: 8px 0; }
}

/* ===== RESPONSIVE - TABLETTE (≥768 px) & BUREAU (≥1024 px) ===== */

/* Topbar toujours large dès la tablette */
@media (min-width: 768px) {
  .topbar .wrap {
    max-width: min(1360px, calc(100vw - 48px));
  }
  /* Contenu principal plus large */
  .wrap { max-width: 760px; }
  /* Mode-cards toujours en 3 colonnes */
  .mode-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .wrap { max-width: 960px; }
}

/* ----- Console commentateur (live.php) ----- */
.wrap-live { max-width: min(1100px, calc(100vw - 32px)); }

/* Tiroir « Gérer la rencontre » : regroupe les réglages occasionnels
   (paramètres, composition, invitation, correction de score) pour alléger
   la vue principale. */
.admin-drawer { padding-top: 16px; padding-bottom: 16px; }
.admin-drawer > summary {
  cursor: pointer; list-style: none; user-select: none;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 19px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; justify-content: space-between;
}
.admin-drawer > summary::-webkit-details-marker { display: none; }
.admin-drawer > summary::after { content: "▾"; font-size: 13px; }
.admin-drawer[open] > summary { margin-bottom: 4px; }
.admin-drawer[open] > summary::after { content: "▴"; }
.admin-drawer-body > .admin-item {
  border-top: 1px solid var(--line);
  padding: 14px 0 4px;
}
.admin-drawer-body > .admin-item:first-child {
  border-top: 0; padding-top: 10px;
}
.admin-item > summary {
  cursor: pointer; list-style: none; user-select: none;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.admin-item > summary::-webkit-details-marker { display: none; }
.admin-item > summary::marker { content: none; }
.admin-item[open] > summary { margin-bottom: 12px; }

/* Console commentateur : marge de scroll pour le retour vers les boutons +1. */
@media (max-width: 959px) {
  #serve-pick,
  #card-score {
    position: relative;
    z-index: 6;
    scroll-margin-top: 72px;
    scroll-margin-bottom: 16px;
  }
}

@media (min-width: 960px) {
  .live-layout {
    display: grid;
    /* Contrôles prioritaires ; fil du live en colonne latérale étroite */
    grid-template-columns: minmax(420px, 640px) minmax(280px, 380px);
    gap: 24px;
    align-items: start;
    justify-content: center;
  }
  .live-left {
    min-width: 0;
  }
  .live-right {
    position: sticky;
    top: 10px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .live-right .section-title {
    margin-top: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg);
    padding-bottom: 10px;
  }
  /* La colonne gauche scrolle ; le scoreboard suit le flux */
  .live-layout .scoreboard {
    position: relative;
    top: 0;
    box-shadow: none;
  }
}

/* ----- Vue spectateur (match.php) ----- */
.wrap-match { max-width: min(1360px, calc(100vw - 32px)); }

@media (min-width: 960px) {
  .match-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
  }
  /* Colonne gauche sticky : scoreboard + liste des parties + partage */
  .match-left {
    position: sticky;
    top: 10px;
  }
  .match-right {
    min-width: 0;
  }
  /* Dans match-left sticky, le scoreboard n'a plus besoin d'être
     indépendamment sticky - la colonne entière est fixée */
  .match-layout .scoreboard {
    position: relative;
    top: 0;
    box-shadow: none;
  }
  /* Démo (DEMO24) : même répartition que la console live - colonne
     droite bornée, pas de grande zone vide sur grand écran */
  .match-layout-demo {
    grid-template-columns: minmax(280px, 400px) minmax(280px, 380px);
    gap: 24px;
    justify-content: center;
    max-width: min(1100px, 100%);
    margin-inline: auto;
  }
  .match-layout-demo .match-right {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 10px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .match-layout-demo .match-right footer.site {
    margin-top: auto;
    padding-top: 20px;
  }
  .match-layout-demo .match-right .section-title {
    margin-top: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg);
    padding-bottom: 10px;
  }
}

.hero-demo { margin-top: 12px; }
.hero-demo a { color: var(--ink); text-decoration: none; opacity: .9; font-weight: 600; }
.hero-demo a:hover { color: var(--orange); }

/* Live de démonstration (spectateur) */
.demo-live-nav {
  margin-bottom: 16px;
  padding: 12px 14px;
}
.demo-live-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.demo-live-back {
  color: var(--orange-bright);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}
.demo-live-back:hover { color: var(--orange); }

/* ===== Lives publics sur l'accueil ===== */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.pub-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s var(--ease-out), border-color .15s;
}
.pub-card:hover { transform: translateY(-2px); border-color: var(--orange); }
.pub-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pub-score { font-weight: 700; color: var(--orange); }
.pub-card-title { font-weight: 700; line-height: 1.2; }
.pub-card-sub { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ===== Compteur de spectateurs ===== */
.viewers-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 12px;
}
.viewers-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--loss);
  box-shadow: 0 0 0 0 rgba(226, 92, 92, .6);
  animation: viewerPulse 1.8s infinite;
}
#viewers-count { color: var(--ink); font-weight: 700; }
@keyframes viewerPulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 92, 92, .6); }
  70% { box-shadow: 0 0 0 8px rgba(226, 92, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 92, 92, 0); }
}

/* ===== Indicateur de reconnexion ===== */
.netstatus {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .85rem;
  z-index: var(--z-toast);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

/* ===== Réactions flottantes ===== */
.emoji-float {
  position: fixed;
  transform: translate(-50%, 0);
  font-size: 1.6rem;
  pointer-events: none;
  z-index: var(--z-toast);
  animation: emojiFloat 1.1s var(--ease-out) forwards;
}
@keyframes emojiFloat {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .emoji-float, .viewers-dot { animation: none; }
}

/* Bascule « Voir le fil du live » (page démo) */
.btn-fil-toggle {
  margin: -2px 0 16px; gap: 10px;
}
.fil-toggle-chevron {
  font-size: 14px; line-height: 1;
  transition: transform .2s var(--ease-out);
}
.btn-fil-toggle[aria-expanded="true"] .fil-toggle-chevron { transform: rotate(180deg); }

/* ===== Mode Replay ===== */
.btn-replay {
  margin: -4px 0 16px; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--orange-deep); display: flex; gap: 8px; justify-content: center;
}
.btn-replay[hidden] { display: none !important; }
.btn-replay:hover { background: var(--line); }

.replay {
  background: linear-gradient(180deg, #211c16, #141009);
  border: 1px solid var(--orange-deep); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden; position: relative;
  box-shadow: 0 14px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
}
.replay-stage { padding: 16px 16px 14px; position: relative; overflow: hidden; min-height: 250px; transition: background .3s var(--ease-out); }
.replay.rp-won .replay-stage { background: radial-gradient(circle at 50% 0%, rgba(244,97,11,.22), transparent 70%); }
.rp-setflash { animation: rpSetFlash .9s var(--ease-out); }
@keyframes rpSetFlash {
  0% { background: rgba(244,97,11,.35); }
  100% { background: transparent; }
}
.replay-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.replay-tag {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  color: var(--orange-bright); font-weight: 700; letter-spacing: 2px; font-size: 14px;
  text-transform: uppercase; animation: pulse 1.4s infinite;
}
.replay-context {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.replay-x {
  background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer;
  line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.replay-x:hover { background: var(--surface-2); color: var(--ink); }

.replay-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.rp-side { text-align: center; min-width: 0; }
.rp-player-photo { display: flex; justify-content: center; margin-bottom: 6px; }
.rp-avatar {
  width: 56px; height: 56px; max-width: 56px; max-height: 56px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line); background: var(--surface-2);
}
.rp-name {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600; font-size: 20px; line-height: 1.1; letter-spacing: .5px; text-transform: uppercase;
  overflow-wrap: anywhere;
}
.rp-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; min-height: 14px; }
/* Pastilles de la barre replay retirées (anciennes + nouvelles classes). */
.setdots, .rp-dots, .setdot, .rp-dot, .rp-markers, .rp-mark { display: none !important; }
.rp-big {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  display: flex; align-items: center; gap: 10px;
  font-size: 64px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.rp-big .rp-sep { color: var(--line); font-weight: 400; font-size: 48px; }
.rp-flash { animation: scoreflash .675s var(--ease-out); }
.rp-sets { text-align: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.rp-sets b { color: var(--ink); }
.rp-hint {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-align: center; min-height: 20px; margin-top: 6px;
  font-size: 17px; letter-spacing: 2px; text-transform: uppercase; color: var(--orange-bright);
}
.rp-sound-hint {
  text-align: center; margin-top: 8px; padding: 8px 10px;
  font-size: 13px; line-height: 1.35; color: var(--ink);
  background: rgba(244,97,11,.14); border: 1px dashed var(--orange-deep);
  border-radius: 8px;
}
.rp-final {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-align: center; margin-top: 12px; background: var(--orange); color: var(--orange-ink);
  border-radius: 8px; padding: 9px 10px; font-weight: 700; font-size: 19px;
  letter-spacing: .5px; text-transform: uppercase;
}
/* Bannière « résultat connu » (mode normal du partage) : affichée en haut du
   replay quand le diffuseur a choisi de ne pas garder le suspens. */
.rp-result {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-align: center; margin: -4px 0 12px;
  background: rgba(244,97,11,.12); border: 1px solid var(--orange-deep);
  border-radius: 8px; padding: 7px 10px;
}
.rp-result-main { font-weight: 700; font-size: 17px; letter-spacing: .5px; text-transform: uppercase; color: var(--orange-bright); }
.rp-result-sub { font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* Menu de partage : choix entre mode suspens et mode résultat. */
.rp-sharemenu {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,10,6,.78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  padding: 16px;
}
.rp-sharemenu[hidden] { display: none; }
.rp-sharemenu-box {
  width: min(360px, 100%); display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.6);
}
.rp-sharemenu-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700; font-size: 16px; letter-spacing: 1px; text-transform: uppercase;
  text-align: center; color: var(--ink); margin-bottom: 2px;
}
.rp-sharemenu-opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; cursor: pointer; color: var(--ink); transition: border-color .15s, background .15s;
}
.rp-sharemenu-opt:hover { border-color: var(--orange); background: var(--line); }
.rp-sharemenu-emo { font-size: 24px; flex: none; }
.rp-sharemenu-opt b { display: block; font-size: 15px; }
.rp-sharemenu-opt small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 2px; }
.rp-sharemenu-cancel {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 6px; font-size: 13px; margin-top: 2px;
}
.rp-sharemenu-cancel:hover { color: var(--ink); }

/* Notes sous le score : commentaires, photos et messages des fans. En flux
   normal (la scène s'agrandit pour les contenir) : jamais rognés, jamais
   par-dessus le score. Chaque note remplace la précédente au fil du match. */
.rp-notes { margin-top: 12px; display: flex; justify-content: center; pointer-events: none; }
.rp-note {
  max-width: min(94%, 540px);
  display: inline-flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  background: rgba(20, 16, 11, .82); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-radius: 14px; padding: 9px 13px; font-size: 14.5px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  animation: rpNoteIn .35s var(--ease-out);
}
.rp-note-fan { border-style: dashed; }
.rp-note-set, .rp-note-system { border-color: var(--orange-deep); }
.rp-note-icon { font-size: 15px; flex: none; }
.rp-note-who { font-weight: 700; color: var(--orange-bright); }
.rp-note-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rp-note-photo { width: 100%; border-radius: 8px; margin-top: 4px; display: block; max-height: 38vh; object-fit: contain; }
.rp-note-video { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; padding: 4px 10px; border-radius: 999px; background: var(--orange-deep); color: #fff; font-weight: 700; text-decoration: none; }
@keyframes rpNoteIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.replay-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid var(--line); background: var(--surface);
}
.rp-ctl {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; width: 40px; height: 36px; font-size: 16px; cursor: pointer; flex: none;
}
.rp-ctl:hover { background: var(--line); }
.rp-speed { width: auto; padding: 0 10px; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 600; letter-spacing: 1px; }
.rp-share-txt { width: auto; padding: 0 12px; font-size: 14px; font-weight: 600; }
.rp-progress { flex: 1; position: relative; height: 8px; background: var(--surface-2); border-radius: 20px; cursor: pointer; }
.rp-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--orange); border-radius: 20px; width: 0; }
.rp-markers { position: absolute; inset: 0; }
.rp-mark { position: absolute; top: 50%; width: 4px; height: 4px; border-radius: 50%; transform: translate(-50%, -50%); }
.rp-mark-set { background: var(--orange-bright); width: 6px; height: 6px; }
.rp-mark-talk { background: var(--muted); }
.rp-mark-sys { background: var(--win); }
.rp-time {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 13px; color: var(--muted); letter-spacing: 1px; flex: none; min-width: 64px; text-align: right;
}

/* Plein écran / mode cinéma */
.replay:fullscreen, .replay.replay-cinema {
  border-radius: 0; border: none; margin: 0; height: 100%;
  background: radial-gradient(circle at 50% 20%, #241d15, #0d0a06 75%);
  justify-content: center;
}
.replay.replay-cinema { position: fixed; inset: 0; z-index: var(--z-toast); }
.replay:fullscreen .replay-stage, .replay.replay-cinema .replay-stage { flex: 1; min-height: 0; padding: 6vh 6vw; display: flex; flex-direction: column; justify-content: center; }
.replay:fullscreen .replay-head, .replay.replay-cinema .replay-head { position: absolute; top: 3vh; left: 6vw; right: 6vw; }
.replay:fullscreen .rp-big, .replay.replay-cinema .rp-big { font-size: min(24vw, 180px); }
.replay:fullscreen .rp-big .rp-sep, .replay.replay-cinema .rp-big .rp-sep { font-size: min(17vw, 130px); }
.replay:fullscreen .rp-name, .replay.replay-cinema .rp-name { font-size: min(5vw, 40px); }
.replay:fullscreen .rp-note, .replay.replay-cinema .rp-note { font-size: min(3.4vw, 22px); max-width: min(70%, 620px); }

@media (prefers-reduced-motion: reduce) {
  .replay-tag, .rp-setflash, .rp-flash { animation: none; }
  .rp-note { animation: none; }
}

/* ---------- Contact ---------- */
.contact-hero { margin-bottom: 20px; padding: 22px 20px; }
.contact-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-bright);
}
.contact-hero h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 1.4rem + 2vw, 2.4rem); }
.contact-section { margin-bottom: 28px; }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(18px, 4vw, 32px);
  align-items: start;
}
.contact-aside h2 { margin: 0 0 10px; font-size: 1.35rem; }
.contact-aside .muted { line-height: 1.55; }
.contact-direct { margin-top: 18px; }
.contact-direct a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}
.contact-direct svg { width: 1.15em; height: 1.15em; color: var(--orange); flex: none; }
.contact-form-panel .form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg));
  padding: clamp(16px, 3vw, 24px);
  display: grid;
  gap: 13px;
}
.contact-form-panel .field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.contact-form-panel .field .req { color: var(--orange); }
.contact-form-panel .field .opt { font-weight: 400; color: var(--muted); }
.contact-form-panel .field textarea { min-height: 140px; resize: vertical; }
.contact-form-panel .field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form-panel .form__consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.contact-form-panel .form__consent input { margin-top: 3px; accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.contact-form-panel .form__consent a { color: var(--orange-bright); }
.contact-form-panel .field--turnstile { margin-top: 2px; }
.contact-form-panel .form__turnstile-hint,
.contact-form-panel .form__turnstile-wait {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.contact-form-panel .form__turnstile-wait { color: var(--orange-bright); }
.contact-form-panel .form__consent-wait {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--loss);
  line-height: 1.45;
}
.contact-form-panel .form__submit { margin-top: 4px; display: inline-flex; align-items: center; gap: 8px; }
.contact-form-panel .form__submit:disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.contact-form-panel .alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid;
}
.contact-form-panel .alert--ok {
  background: rgba(87, 217, 138, 0.12);
  border-color: rgba(87, 217, 138, 0.35);
  color: var(--win);
}
.contact-form-panel .alert--err {
  background: rgba(226, 92, 92, 0.12);
  border-color: rgba(226, 92, 92, 0.35);
  color: var(--loss);
}
@media (max-width: 720px) {
  .contact-grid,
  .contact-form-panel .field--row { grid-template-columns: 1fr; }
}

