/* Pied de page */
.site-footer {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 48px var(--page-gutter) 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  gap: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand p {
  margin: 0;
  max-width: 300px;
  font-size: 14px;
  color: var(--muted);
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.age-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--text);
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.footer-col h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.footer-col button,
.footer-col > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  transition: color 0.15s;
}
.footer-col button:hover,
.footer-col > a:hover {
  color: var(--accent-text);
}
.ext {
  width: 14px;
  height: 14px;
}
.footer-help p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.footer-col .help-line {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 6px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.help-line strong {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.1;
}
.help-line small {
  font-size: 12px;
  color: var(--muted);
}
.footer-bottom {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 18px var(--page-gutter) calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
/* Pages d'information (à propos, légal...) */
.page-dialog {
  width: min(720px, calc(100% - 24px));
}
.page-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  line-height: 1.6;
}
.page-content p,
.page-content ul {
  margin: 0;
}
.page-content ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-content h3 {
  margin: 10px 0 0;
  font-size: 16px;
  scroll-margin-top: 12px;
}
.page-content a:not(.button) {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content .button {
  align-self: flex-start;
}
.page-warning {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 600;
}
@media (max-width: 1100px) {
  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-brand,
  .footer-help {
    grid-column: span 3;
  }
}
@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
    padding: 36px 16px 24px;
  }
  .footer-brand,
  .footer-help {
    grid-column: 1/-1;
  }
  .footer-bottom {
    padding-inline: 16px;
    flex-direction: column;
  }
  .page-content {
    font-size: 14px;
  }
}

/* Fenêtres */
dialog {
  width: min(620px, calc(100% - 24px));
  max-height: 88dvh;
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
dialog::backdrop {
  background: rgba(5, 7, 6, 0.6);
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
dialog input {
  width: 100%;
}
#bankroll-dialog {
  max-width: 420px;
}
#bankroll-dialog form {
  display: grid;
  gap: 18px;
}
.confidence-intro {
  color: var(--muted);
  margin: 0;
}
.confidence-intro strong {
  color: var(--text);
}
.confidence-total {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  margin: 16px 0;
}
.confidence-total strong {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  white-space: nowrap;
}
.confidence-total span {
  font-size: 13px;
}
.confidence-factor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 8px 12px;
  align-items: center;
  margin: 16px 0;
}
.confidence-factor > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.confidence-factor small {
  color: var(--muted);
}
.confidence-factor > div:nth-child(2) {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.confidence-factor i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.confidence-factor > strong {
  grid-column: 2;
  grid-row: 1/3;
  text-align: right;
  font-family: var(--display);
  font-size: 20px;
}
.model-warning {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.lexicon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lexicon article {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-2);
}
.lexicon article strong {
  color: var(--accent-text);
}
.lexicon article p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.account-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.account-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-2);
}
.account-profile > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.account-profile small,
.account-profile strong {
  display: block;
}
.account-profile small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-text);
}
.account-profile strong {
  overflow-wrap: anywhere;
}
.signup-custom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.signup-custom-row label {
  padding: 0;
}
.signup-custom-row select {
  min-width: 0;
}
.sync-status {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
}
.sync-status.syncing {
  background: var(--warn-soft);
  color: var(--warn);
}
.sync-status.error,
.account-message.error {
  color: var(--danger);
}
.sync-status.error {
  background: var(--danger-soft);
}
.config-warning {
  padding: 14px;
  border-radius: 14px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
}
.account-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--accent-text);
  font-size: 13px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 20px);
  width: max-content;
  max-width: min(520px, calc(100% - 24px));
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-nav {
  display: none;
}

/* Animations d’entrée et retours visuels */
:root {
  --enter: 0s;
}
@keyframes draw-in {
  from {
    stroke-dashoffset: 170;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes draw-pitch {
  from {
    stroke-dashoffset: 1400;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gauge {
  from {
    stroke-dasharray: 0 400;
  }
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  }
  100% {
    box-shadow: 0 0 0 11px rgba(16, 185, 129, 0);
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
.topbar {
  animation: rise 0.6s ease-out var(--enter) both;
}
.brand-shield {
  stroke-dasharray: 170;
  animation: draw-in 1s ease-out calc(var(--enter) + 0.15s) both;
}
.hero-main {
  position: relative;
  overflow: hidden;
}
.hero-main > :not(.hero-pitch) {
  position: relative;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-main > :nth-child(2) {
  animation-delay: calc(var(--enter) + 0.1s);
}
.hero-main > :nth-child(3) {
  animation-delay: calc(var(--enter) + 0.2s);
}
.hero-main > :nth-child(4) {
  animation-delay: calc(var(--enter) + 0.3s);
}
.hero-main > :nth-child(5) {
  animation-delay: calc(var(--enter) + 0.4s);
}
.hero-pitch {
  position: absolute;
  right: -60px;
  top: 50%;
  width: min(58%, 460px);
  height: auto;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--pitch);
  stroke-width: 1.75;
  stroke-dasharray: 1400;
  animation: draw-pitch 2.4s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--enter) + 0.2s) both;
}
.hero-score {
  animation: pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1.1) calc(var(--enter) + 0.35s) both;
}
.gauge-fill {
  animation: gauge 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--enter) + 0.4s) both;
}
.live-dot {
  animation: ping 1.8s ease-out infinite;
}
.stats-grid,
.workspace,
#bankroll {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--enter) + 0.45s) both;
}
.match-card {
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.match-card:hover {
  border-color: var(--line-strong);
}
.recommended {
  position: relative;
  overflow: hidden;
}
.recommended:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 65%
  );
  transform: translateX(-110%);
  pointer-events: none;
}
.recommended:hover:after {
  transform: translateX(110%);
  transition: transform 0.8s ease;
}
dialog[open] {
  animation: pop 0.25s ease-out;
}

/* Fil des matchs : bandeau collant au-dessus de la liste, colonne à gauche sur grand écran */
.match-rail {
  display: none;
}
.match-strip {
  position: sticky;
  top: 72px;
  z-index: 15;
  margin: 0 0 14px;
  padding: 8px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.match-strip:empty {
  display: none;
}
.match-strip .rail-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.match-strip .rail-track::-webkit-scrollbar {
  display: none;
}
.rail-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.rail-item:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.rail-item.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.rail-item.live .rail-time {
  color: var(--live);
}
.rail-item.live.active .rail-time {
  color: var(--on-accent);
}
.rail-item.done {
  opacity: 0.7;
}
.rail-teams {
  display: flex;
  gap: 2px;
}
.crest.mini {
  width: 22px;
  height: 22px;
}
.crest.mini.no-logo:after {
  font-size: 9px;
}
.rail-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (min-width: 1440px) {
  .workspace {
    grid-template-columns: 150px minmax(0, 1fr) 384px;
  }
  .match-strip {
    display: none;
  }
  .match-rail {
    display: block;
    position: sticky;
    top: var(--header-offset);
    align-self: start;
    max-height: calc(100dvh - var(--header-offset) - 16px);
    overflow-y: auto;
    padding-top: 4px;
  }
  .rail-title {
    margin: 0 0 12px 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-text);
  }
  .match-rail .rail-track {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 20px;
  }
  .match-rail .rail-track:before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
  }
  .rail-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    opacity: 0;
    transition:
      transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.3s;
  }
  .match-rail .rail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 16px;
    border-color: transparent;
    background: transparent;
  }
  .match-rail .rail-item.active {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text);
  }
  .match-rail .rail-item.active .rail-time {
    color: var(--accent-text);
  }
  .match-rail .rail-time {
    font-family: var(--display);
    font-size: 20px;
    line-height: 1;
  }
  .match-rail .crest.mini {
    width: 26px;
    height: 26px;
  }
}

/* Affiche du jour */
.match-card {
  scroll-margin-top: 150px;
}
.match-card.spotlight {
  border: 1.5px solid var(--accent-text);
  background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--surface);
}
.spotlight-tag {
  background: var(--accent);
  color: var(--on-accent);
}
.spotlight .crest {
  width: 84px;
  height: 84px;
}
.spotlight .team strong {
  font-size: 32px;
}
.kickoff.countdown {
  padding: 12px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.kickoff.countdown strong {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  white-space: nowrap;
}

/* Matchs en direct */
.match-card.live {
  border-color: var(--live);
}
.live-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.live-score strong {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--live-soft);
  color: var(--live);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: live-ping 1.4s ease-out infinite;
}
.live-updated {
  color: var(--muted);
  font-size: 10px;
}
.live-error {
  max-width: 130px;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}
@keyframes live-ping {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent);
  }
  100% {
    box-shadow: 0 0 0 9px transparent;
  }
}
.live-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 13px;
}
.live-note span {
  color: var(--live);
  font-weight: 700;
}
.live-text {
  color: var(--live) !important;
}
.match-card.goal {
  animation: goal 1.2s ease-out 2;
}
@keyframes goal {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  30% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 35%, transparent);
  }
}

/* Barre de probabilités 1 / N / 2 */
.prob-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prob-track {
  display: flex;
  gap: 3px;
  height: 8px;
}
.prob-track i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 4px;
}
.p-home {
  background: var(--accent);
}
.p-draw {
  background: var(--line-strong);
}
.p-away {
  background: var(--info);
}
.prob-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Apparition au défilement */
.reveal > .match-card:not(.seen):not(.in-view) {
  opacity: 0;
  transform: translateY(28px);
}
.reveal > .match-card.in-view {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0s) both;
}
.reveal > .match-card.in-view .prob-track i {
  animation: grow 1s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--delay, 0s) + 0.25s) both;
}
@keyframes grow {
  from {
    width: 0;
  }
}

/* BET-140 : une confiance maximale par match, distincte de la value. */
@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.market.has-value {
  border: 2px solid var(--accent-text);
  padding: 9px 11px;
}
.market.highest-confidence {
  border: 2px solid var(--accent-text);
  padding: 9px 11px;
  box-shadow: 0 0 0 1px var(--accent-soft);
}
@supports (background: conic-gradient(from 0deg, black, white)) {
  .market.highest-confidence {
    border-color: transparent;
    background:
      linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
      conic-gradient(
          from var(--angle),
          var(--accent-text) 0 12%,
          var(--line-strong) 28% 65%,
          var(--accent) 80%,
          var(--accent-text) 100%
        )
        border-box;
    animation: spin 3s linear infinite;
  }
}
.market .confidence-highlight {
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.5;
  margin-top: 4px;
}
.market.has-value.selected,
.market.highest-confidence.selected {
  background: var(--accent);
  border-color: var(--accent-text);
  animation: none;
  box-shadow: none;
}
.market.selected:after {
  content: '✓ Choisi';
  font-size: 11px;
  font-weight: 800;
  color: var(--on-accent);
  line-height: 1.5;
}
.market.selected small {
  color: var(--on-accent);
}
@keyframes spin {
  to {
    --angle: 360deg;
  }
}
@media (prefers-reduced-motion: reduce) {
  .market.highest-confidence:not(.selected) {
    animation: none !important;
    background: var(--surface-2);
    border-color: var(--accent-text);
  }
}

/* Cote qui s'envole vers le ticket */
.fly-chip {
  position: fixed;
  z-index: 70;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate3d(-50%, -50%, 0);
}
#total-odds {
  display: inline-block;
}
.bump {
  animation: bump 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes bump {
  40% {
    transform: scale(1.25);
  }
}

/* Grand écran : la colonne combiné reste visible pendant le défilement */
@media (min-width: 1101px) {
  .builder {
    position: sticky;
    top: var(--header-offset);
    max-height: calc(100dvh - var(--header-offset) - 16px);
    overflow-y: auto;
    border-radius: var(--radius);
  }
}

/* Tablette */
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .builder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .builder.tab-hidden {
    display: none;
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-score {
    display: grid;
    grid-template-columns: auto 1fr;
    text-align: left;
    padding: 22px 26px;
  }
  .hero-score .gauge {
    display: none;
  }
  .hero-score .score {
    margin: 0;
  }
  .hero-score > small,
  .hero-score-parts,
  .hero-score u {
    grid-column: 1/-1;
  }
  .hero-score-parts {
    margin-top: 8px;
  }
  .topbar-bankroll {
    display: none;
  }
  .performance-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .builder {
    grid-template-columns: 1fr;
  }
}

/* Téléphone */
@media (max-width: 700px) {
  body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .topbar {
    gap: 10px;
    min-height: 64px;
    padding: 8px 16px;
  }
  .tabs {
    display: none;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .brand-name {
    font-size: 21px;
  }
  .topbar-actions {
    gap: 8px;
  }
  .account-button {
    padding: 0 6px;
  }
  .account-button b {
    display: none;
  }
  main {
    padding: 18px 16px 32px;
    gap: 20px;
  }
  .hero-main {
    padding: 24px;
    gap: 14px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero-copy {
    font-size: 15px;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hero-actions .button {
    padding: 0 10px;
    font-size: 14px;
  }
  .hero-score .score {
    font-size: 52px;
  }
  .section-heading {
    margin-bottom: 14px;
  }
  .section-heading h2 {
    font-size: 30px;
  }
  .heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .date-navigator {
    margin: 0 -16px 10px;
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-type: x proximity;
  }
  .date-chip {
    min-width: 64px;
    background: var(--surface);
    border: 1px solid var(--line);
    scroll-snap-align: start;
  }
  .date-chip.active {
    border-color: var(--accent);
  }
  .filters {
    margin: 0 -16px 14px;
    padding: 0 16px;
  }
  .match-card {
    padding: 18px;
    gap: 16px;
    border-radius: 24px;
  }
  .match-teams {
    gap: 8px;
  }
  .team,
  .team.away {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .team strong {
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
  }
  .crest {
    width: 52px;
    height: 52px;
  }
  .kickoff {
    padding: 8px 12px;
  }
  .kickoff strong {
    font-size: 26px;
  }
  .final-score strong {
    font-size: 42px;
  }
  .markets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .market {
    min-height: 68px;
    padding: 8px 10px;
    border-radius: 14px;
  }
  .market strong {
    font-size: 22px;
  }
  .market > span:first-child {
    font-size: 11px;
  }
  .market .value,
  .market .odd-movement {
    font-size: 9px;
  }
  .spotlight .team strong {
    font-size: 17px;
  }
  .team strong {
    font-size: 13px;
  }
  .match-stats {
    padding: 12px 12px 4px;
  }
  .stat-row {
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
    gap: 8px;
  }
  .fd {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 10px;
  }
  .form-dots {
    gap: 3px;
  }
  .stat-num {
    font-size: 20px;
  }
  dialog.detail-sheet {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }
  .detail-head {
    padding: 18px 16px 10px;
  }
  .detail-tabs {
    padding: 8px 16px;
  }
  .detail-body {
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  }
  .sheet-team-head h2 {
    font-size: 26px;
  }
  .crest.big {
    width: 56px;
    height: 56px;
  }
  .sheet-center strong {
    font-size: 34px;
  }
  .sheet-team {
    font-size: 13px;
  }
  .lineups {
    grid-template-columns: 1fr;
  }
  .detail-tabs {
    gap: 14px;
    padding: 0 16px;
  }
  .comp-kpis {
    grid-template-columns: repeat(2, auto);
  }
  .comp-rank b {
    font-size: 46px;
  }
  .squad-list {
    grid-template-columns: 1fr;
  }
  .player {
    width: 66px;
  }
  .player b {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .player small {
    max-width: 66px;
    font-size: 10px;
  }
  .standings-table .wide {
    display: none;
  }
  .game-list li {
    grid-template-columns: 48px minmax(0, 1fr) auto 28px;
  }
  .game-league {
    display: none;
  }
  .info-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .section-heading .mode-switch {
    width: 100%;
  }
  .mode-switch button {
    flex: 1;
  }
  .standings-body {
    padding: 12px;
  }
  .match-strip {
    top: 64px;
    margin: 0 -16px 12px;
    padding: 8px 16px;
  }
  .spotlight .crest {
    width: 64px;
    height: 64px;
  }
  .kickoff.countdown {
    padding: 8px 10px;
  }
  .kickoff.countdown strong {
    font-size: 24px;
  }
  .live-score strong {
    font-size: 40px;
  }
  #bankroll-chart {
    height: 170px;
  }
  .match-date {
    display: none;
  }
  .match-league {
    letter-spacing: 0.06em;
  }
  .recommended {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    border-radius: 20px;
    padding: 12px;
  }
  .recommended span,
  .recommended small {
    padding: 0 4px;
  }
  .recommended strong {
    margin: 4px 0 0;
    font-size: 14px;
    text-align: center;
  }
  .analysis {
    gap: 8px 16px;
    font-size: 12px;
  }
  .confidence {
    margin-left: 0;
  }
  .stats-grid {
    gap: 8px;
  }
  .stats-grid article {
    padding: 14px;
    border-radius: 20px;
  }
  .stats-grid strong {
    font-size: 24px;
  }
  .stats-grid .stat-main {
    grid-column: 1/-1;
  }
  .stats-grid .stat-main strong {
    font-size: 44px;
  }
  .builder-card,
  .ticket {
    padding: 18px;
  }
  .ticket-stake {
    grid-template-columns: 1fr 1fr;
  }
  .history-wrap {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .history-wrap table,
  .history-wrap tbody {
    display: block;
    min-width: 0;
  }
  .history-wrap thead {
    display: none;
  }
  .history-wrap tbody {
    display: grid;
    gap: 10px;
  }
  .history-wrap tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
  }
  .history-wrap td {
    display: block;
    padding: 2px 0;
    border: 0;
  }
  .history-wrap td:nth-child(1),
  .history-wrap td:nth-child(2) {
    grid-column: 1/-1;
  }
  .history-wrap td:nth-child(n + 3):before {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .history-wrap td:nth-child(3):before {
    content: 'Cote totale';
  }
  .history-wrap td:nth-child(4):before {
    content: 'Mise';
  }
  .history-wrap td:nth-child(5):before {
    content: 'Résultat';
  }
  .history-wrap td:nth-child(6):before {
    content: 'Retour';
  }
  .history-legs {
    min-width: 0;
  }
  .history-leg {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 10px;
    gap: 8px;
  }
  .leg-main small {
    overflow-wrap: anywhere;
  }
  dialog {
    padding: 20px;
    border-radius: 24px;
  }
  .form-grid,
  .lexicon {
    grid-template-columns: 1fr;
  }
  dialog.sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    max-height: 85dvh;
    border-radius: 28px 28px 0 0;
    border-bottom: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  dialog.sheet[open] {
    animation: sheet-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .hero-pitch {
    width: 80%;
    right: -90px;
    opacity: 0.6;
  }
  .mobile-nav {
    position: fixed;
    left: 5px;
    right: 5px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-2) 94%, transparent);
    border: 1px solid var(--line-strong);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .mobile-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }
  .mobile-nav button svg {
    width: 22px;
    height: 22px;
  }
  .mobile-nav button.active {
    background: var(--accent);
    color: var(--on-accent);
  }
  .mobile-nav i {
    position: absolute;
    top: 6px;
    left: calc(50% + 8px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--on-accent);
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
  }
  .mobile-nav button.active i {
    background: var(--on-accent);
    color: var(--accent);
  }
  #toast {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }
  .button,
  .market,
  .recommended,
  .safe-pick,
  .date-chip,
  .filter {
    touch-action: manipulation;
  }
  .community-grid,
  .prediction-insights {
    grid-template-columns: 1fr;
  }
  .profile-card {
    grid-template-columns: 90px 1fr;
    padding: 16px;
  }
  .avatar-3d {
    width: 82px;
    height: 82px;
  }
  .avatar-3d i {
    left: 20px;
  }
  .avatar-3d span {
    right: 20px;
  }
  .avatar-3d.accessory-glasses em {
    left: 12px;
    width: 58px;
  }
  .challenge-list {
    grid-template-columns: 1fr;
  }
  .leader-row {
    grid-template-columns: 24px 34px minmax(0, 1fr) auto;
  }
  .leader-row > :nth-last-child(2),
  .leader-row > :last-child {
    display: none;
  }
  .leaderboard-head {
    align-items: end;
  }
  .player-search input {
    width: 140px;
  }
  .period-switch {
    width: 100%;
    overflow: auto;
  }
  .period-switch button {
    flex: 1;
  }
  .mobile-nav button {
    font-size: 8px;
  }
  .mobile-nav button svg {
    width: 19px;
    height: 19px;
  }
  .prediction-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .prediction-kpi-grid article {
    padding: 15px;
  }
  .prediction-kpi-grid strong {
    font-size: 28px;
  }
  .prediction-performance-row {
    grid-template-columns: minmax(0, 1fr) 70px 42px;
  }
  .prediction-toolbar {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
  }
  .prediction-toolbar .button {
    grid-column: 1/-1;
  }
  .avatar-editor {
    grid-template-columns: 1fr;
  }
  .avatar-stage {
    min-height: 180px;
  }
  .prediction-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .prediction-row > b {
    grid-column: 2;
  }
  .compared-profile {
    padding: 15px;
    gap: 15px;
  }
  .compared-profile h3 {
    font-size: 28px;
  }
}
/* Flèches de défilement : masquées seulement sur écran tactile, où l'on fait glisser du doigt */
@media (max-width: 700px) and (hover: none) {
  .scroll-btn {
    display: none;
  }
}
@media (max-width: 340px) {
  .topbar {
    gap: 6px;
    padding-inline: 12px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .hero-actions {
    grid-template-columns: 1fr;
  }
  .markets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ticket-totals strong {
    font-size: 24px;
  }
}
/* Sur portable, une seconde ligne garde les cinq destinations lisibles. */
@media (min-width: 701px) and (max-width: 1599px) {
  :root {
    --header-offset: 144px;
  }
  .topbar {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px 16px;
    padding-inline: var(--page-gutter);
  }
  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }
  .tabs {
    grid-column: 1/-1;
    grid-row: 2;
    justify-content: center;
    gap: 4px;
  }
  .tab-button,
  .tab-button.active {
    flex: none;
    justify-content: center;
    padding: 0 12px;
    font-size: 12px;
    letter-spacing: 0.02em;
  }
  .tab-button svg {
    width: 18px;
    height: 18px;
  }
  .match-strip {
    top: 124px;
  }
  .section-block,
  .builder {
    scroll-margin-top: var(--header-offset);
  }
}
@media (min-width: 701px) and (max-width: 900px) {
  .account-button b {
    max-width: 92px;
  }
  .tab-button,
  .tab-button.active {
    padding-inline: 8px;
    font-size: 11px;
  }
  .tab-button svg {
    display: none;
  }
}
@media (max-width: 900px) {
  .hero-pitch {
    display: none;
  }
  .hero h1 {
    font-size: clamp(38px, 7vw, 54px);
  }
}
@media (max-width: 767px) {
  .workspace {
    animation: none;
  }
  .hero-actions {
    grid-template-columns: 1fr;
  }
  .hero-actions .button {
    width: 100%;
  }
  .hero h1 {
    font-size: clamp(32px, 10.2vw, 42px);
    overflow-wrap: anywhere;
  }
  .hero-score {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .hero-score .score {
    font-size: 48px;
  }
  .heading-actions {
    grid-template-columns: 1fr;
  }
  .heading-actions .button {
    width: 100%;
  }
  .match-league {
    max-width: 100%;
  }
  .match-league b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .big-match,
  .status-pill {
    flex: none;
  }
  .match-teams {
    grid-template-columns: minmax(0, 1fr) minmax(64px, auto) minmax(0, 1fr);
    gap: 4px;
  }
  .team,
  .team.away {
    width: 100%;
    margin: 0;
    padding: 4px;
  }
  .team strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .crest {
    width: 44px;
    height: 44px;
  }
  .kickoff {
    max-width: 82px;
    padding: 8px;
  }
  .kickoff small {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .kickoff strong {
    font-size: 24px;
  }
  .final-score strong {
    font-size: 36px;
  }
  .live-score strong {
    font-size: 34px;
  }
  .markets {
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  }
  .stat-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
  }
  .stat-label {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .stat-side {
    grid-row: 2;
  }
  .stat-side.away {
    grid-column: 2;
  }
  .stat-bar {
    max-width: none;
  }
  .bookmaker-table,
  .table-box,
  .comparison-table,
  .history-wrap {
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }
  .bookmaker-table th:first-child,
  .bookmaker-table td:first-child,
  .table-box th:first-child,
  .table-box td:first-child {
    box-shadow: 5px 0 10px color-mix(in srgb, var(--bg) 18%, transparent);
  }
  dialog,
  dialog.sheet,
  dialog.detail-sheet {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }
  dialog.detail-sheet {
    padding: 0;
  }
  .modal-head,
  .detail-head {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface);
  }
  .modal-head {
    margin: -20px -16px 16px;
    padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
  }
  .sheet-close {
    top: calc(12px + env(safe-area-inset-top));
  }
  body:before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 48;
    background: rgba(5, 7, 6, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  body.ticket-drawer-open {
    overflow: hidden;
  }
  body.ticket-drawer-open:before {
    opacity: 1;
    pointer-events: auto;
  }
  .builder {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex !important;
    max-height: 88dvh;
    bottom: var(--ticket-viewport-bottom, 0px);
    padding: 56px 12px calc(12px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    background: var(--bg);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
    transform: translateY(105%);
    visibility: hidden;
    transition:
      transform 0.25s ease,
      visibility 0s linear 0.25s;
  }
  .ticket-drawer-open .builder {
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .builder-drawer-close {
    position: absolute;
    top: 8px;
    right: 14px;
    z-index: 2;
    display: grid;
  }
  .builder-card,
  .ticket {
    flex: none;
  }
  .mobile-nav {
    left: max(5px, env(safe-area-inset-left));
    right: max(5px, env(safe-area-inset-right));
  }
  input,
  select {
    max-width: 100%;
  }
  .site-performance > div:first-child,
  .leaderboard-head,
  .compared-profile {
    min-width: 0;
    flex-wrap: wrap;
  }
  .prediction-pagination {
    flex-wrap: wrap;
  }
  .prediction-pagination .button {
    min-width: 0;
    padding-inline: 14px;
  }
  .page-content a {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 390px) {
  .stats-grid,
  .prediction-kpi-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid .stat-main {
    grid-column: auto;
  }
  .mobile-nav button {
    font-size: 7px;
  }
  .mobile-nav {
    gap: 0;
  }
  .profile-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .avatar-3d {
    width: 68px;
    height: 68px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
/* PronoSafe Club (lots 8 à 10) */
.status.void {
  background: var(--surface-3);
  color: var(--muted);
}
.cert-tag {
  color: var(--accent-text);
  font-weight: 800;
}
.cert-tag.legacy {
  color: var(--muted);
  font-weight: 700;
}
.league-toggle {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--ticket-line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}
.league-toggle[hidden] {
  display: none;
}
.league-toggle input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.league-toggle b {
  display: block;
}
.league-toggle small {
  color: var(--ticket-muted);
}
.league-toggle input:disabled + span {
  opacity: 0.7;
}
/* Défi du jour */
.daily-challenge {
  padding: 20px 22px;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-color: var(--accent-text);
}
.daily-challenge[hidden] {
  display: none;
}
.daily-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.daily-head h3 {
  margin: 2px 0 4px;
  font-family: var(--display);
  font-size: 24px;
}
.daily-head small {
  color: var(--muted);
}
.daily-count {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
}
.daily-list {
  display: grid;
  gap: 10px;
}
.daily-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.daily-league {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.daily-teams {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.daily-teams em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}
.daily-odds {
  display: flex;
  gap: 6px;
}
.daily-odd {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.daily-odd span {
  font-size: 11px;
  color: var(--muted);
}
.daily-odd strong {
  font-size: 15px;
}
.daily-odd.selected {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.daily-odd.selected span {
  color: inherit;
}
.daily-odd:disabled {
  cursor: default;
  opacity: 0.65;
}
.daily-odd.selected:disabled {
  opacity: 1;
}
.daily-note,
.daily-result {
  grid-column: 1/-1;
  font-size: 12px;
  color: var(--muted);
}
.daily-result.won {
  color: var(--accent-text);
}
.daily-result.lost {
  color: var(--danger);
}
.daily-row.closed .daily-teams {
  opacity: 0.8;
}
@media (max-width: 700px) {
  .daily-row {
    grid-template-columns: 1fr;
  }
  .daily-odds {
    justify-content: space-between;
  }
  .daily-odd {
    flex: 1;
  }
  .daily-challenge {
    padding: 16px;
  }
}
/* Ma ligue */
.div-badge {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.div-badge i {
  font-style: normal;
  color: var(--accent-text);
}
.div-badge.d-1 {
  border-color: #b87333;
}
.div-badge.d-2 {
  border-color: #9aa5b1;
}
.div-badge.d-3 {
  border-color: #10b981;
}
.div-badge.d-4 {
  border-color: #2fa4a4;
}
.div-badge.d-5 {
  border-color: #7a4dd8;
}
.div-badge.d-6 {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.my-league {
  padding: 20px 22px;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.my-league[hidden] {
  display: none;
}
.league-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.league-head h3 {
  margin: 6px 0 2px;
  font-family: var(--display);
  font-size: 30px;
}
.league-head small {
  color: var(--muted);
}
.league-clock {
  text-align: right;
}
.league-clock strong {
  display: block;
  font-size: 20px;
  font-family: var(--display);
}
.league-note,
.league-race {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 13px;
}
.league-table {
  overflow-x: auto;
  display: grid;
  gap: 4px;
}
.league-row {
  display: grid;
  grid-template-columns: 62px 34px minmax(130px, 1.6fr) 56px 56px 72px 90px 66px;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 13px;
  min-width: 600px;
}
.league-row b {
  font-weight: 700;
  text-align: right;
}
.league-row em {
  font-style: normal;
  font-weight: 800;
}
.league-labels {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.league-row.up {
  box-shadow: inset 3px 0 0 var(--accent);
}
.league-row.down {
  box-shadow: inset 3px 0 0 var(--danger);
}
.league-row.me {
  background: var(--accent-soft);
  outline: 2px solid var(--accent-text);
}
.trend {
  font-size: 11px;
  color: var(--muted);
}
.trend.up {
  color: var(--accent-text);
}
.trend.down {
  color: var(--danger);
}
.league-legend {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.league-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin: 0 4px 0 8px;
}
.league-legend i.up {
  background: var(--accent);
}
.league-legend i.down {
  background: var(--danger);
}
.season-dialog {
  max-width: 420px;
  text-align: center;
  padding: 28px;
}
.season-outcome {
  font-family: var(--display);
  font-size: 54px;
  margin: 6px 0;
}
.season-outcome.PROMU {
  color: var(--accent-text);
}
.season-outcome.RELEGUE {
  color: var(--danger);
}
.season-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}
.season-unlock {
  font-weight: 700;
  color: var(--accent-text);
}
@media (max-width: 700px) {
  .my-league {
    padding: 16px;
  }
  .league-head h3 {
    font-size: 24px;
  }
}
/* Ligues spéciales */
.my-leagues {
  margin: 0 0 18px;
}
.my-leagues[hidden],
.league-catalog[hidden] {
  display: none;
}
.my-leagues h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 22px;
}
.league-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.league-card {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.league-card.general {
  cursor: default;
  border-color: var(--accent-text);
}
.league-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.league-free {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.league-catalog {
  padding: 18px 22px;
  margin: 0 0 18px;
}
.league-catalog-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.league-catalog-head small {
  color: var(--muted);
}
.league-catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px 18px;
}
.league-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.league-line small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.special-dialog {
  max-width: 760px;
  width: calc(100% - 24px);
  padding: 22px;
}
.special-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.special-head h2 {
  margin: 0;
  font-family: var(--display);
}
.special-standings {
  margin: 12px 0;
}
.special-row {
  grid-template-columns: 44px 34px minmax(130px, 1.6fr) 60px 60px 70px;
  min-width: 420px;
}
.special-round {
  font-size: 13px;
  margin: 8px 0;
}
.special-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.special-match.anchor {
  border-color: var(--accent-text);
}
.special-match.closed {
  opacity: 0.7;
}
.special-markets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.special-match small {
  color: var(--muted);
}
.league-list {
  margin: 10px 0 0;
  font-size: 12px;
}
.league-list p {
  margin: 0 0 4px;
  color: var(--ticket-muted);
}
.league-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}
.league-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.league-list li.on small {
  color: var(--accent);
}
.league-list li.off {
  opacity: 0.6;
}
@media (max-width: 700px) {
  .league-catalog {
    padding: 14px;
  }
  .league-catalog-list {
    grid-template-columns: 1fr;
  }
  .league-line {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }
  .league-line .text-button {
    grid-column: 2/-1;
    justify-self: start;
  }
  .special-match {
    grid-template-columns: 1fr;
  }
}
/* Niveaux et trophées */
.level-box {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.level-box[hidden] {
  display: none;
}
.level-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.level-box > div {
  min-width: 0;
  flex: 1;
}
.level-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 800;
}
.level-chip.big {
  min-width: 44px;
  height: 44px;
  font-size: 16px;
}
.level-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 4px;
}
.level-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.badges-panel {
  padding: 18px 22px;
  margin: 0 0 18px;
}
.badges-panel[hidden] {
  display: none;
}
.badges-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.badges-head small {
  color: var(--muted);
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  opacity: 0.6;
}
.badge small {
  color: var(--muted);
  font-size: 11px;
}
.badge em {
  font-style: normal;
  font-size: 11px;
  color: var(--accent-text);
  font-weight: 700;
}
.badge.earned {
  opacity: 1;
  border-style: solid;
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
/* Jetons */
.coin {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
  background: var(--accent);
  box-shadow:
    inset 0 0 0 2px var(--on-accent),
    0 0 0 1px var(--accent-text);
}
.wallet {
  display: flex;
  align-items: center;
  margin-top: 6px;
  font-weight: 700;
  color: var(--text);
}
.wallet em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
  font-size: 11px;
}
.league-piggy {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
}
.season-gains {
  text-align: left;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.season-gains p {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  margin: 6px 0 0;
  font-size: 12px;
}
.season-gains p span:first-child {
  font-weight: 700;
}
.season-gains p span:nth-child(2) {
  grid-column: 1;
  color: var(--muted);
}
.season-gains strong {
  grid-row: 1/3;
  grid-column: 2;
  align-self: center;
  color: var(--accent-text);
}
/* Rejoindre le club */
body.join-open {
  overflow: hidden;
}
.join-view {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(320px, 5fr) minmax(360px, 6fr);
  background: var(--bg);
  overflow: auto;
}
.join-view[hidden] {
  display: none;
}
.join-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  padding: 48px clamp(24px, 5vw, 64px);
  color: #f8fafc;
  background:
    radial-gradient(120% 90% at 20% 0%, #16351f 0%, #0a0c0b 70%),
    repeating-linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0 60px, transparent 60px 120px);
  position: relative;
  overflow: hidden;
}
.join-brand::before {
  content: '';
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 60%;
  border: 2px solid rgba(16, 185, 129, 0.18);
  border-radius: 50%;
}
.join-brand h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
}
.join-lead {
  margin: 0;
  color: #c9d3c6;
  max-width: 42ch;
}
.join-brand .eyebrow {
  color: #10b981;
}
.join-brand small {
  color: #9fb09a;
}
.join-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.join-perks li {
  display: grid;
  gap: 2px;
  padding-left: 14px;
  border-left: 3px solid #10b981;
}
.join-perks b {
  font-size: 15px;
}
.join-perks span {
  font-size: 13px;
  color: #c9d3c6;
}
.join-podium {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
  margin-top: 6px;
}
.join-podium span {
  flex: 0 0 56px;
  display: flex;
  justify-content: center;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(#10b981, #047857);
}
.join-podium i {
  font-style: normal;
  font-weight: 800;
  color: #0a0c0b;
  margin-top: 6px;
}
.join-podium .p1 {
  height: 90px;
}
.join-podium .p2 {
  height: 64px;
  opacity: 0.8;
}
.join-podium .p3 {
  height: 46px;
  opacity: 0.6;
}
.join-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 56px clamp(20px, 5vw, 72px);
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
}
.join-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.join-panel h2 {
  margin: 4px 0 8px;
  font-family: var(--display);
  font-size: 32px;
}
.join-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-3);
}
.join-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.join-tabs button[aria-selected='true'] {
  background: var(--accent);
  color: var(--on-accent);
}
.join-steps {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  display: flex;
  gap: 8px;
}
.join-steps li {
  flex: 1;
  padding-top: 8px;
  border-top: 4px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.join-steps li.current {
  border-color: var(--accent);
  color: var(--text);
}
.join-steps li.done {
  border-color: var(--accent-text);
  color: var(--accent-text);
}
#join-form,
.join-check {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.join-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.join-field input,
.join-search {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  width: 100%;
}
.join-field input:focus,
.join-search:focus {
  outline: 2px solid var(--accent-text);
  outline-offset: 1px;
}
.join-field small {
  font-weight: 400;
  color: var(--muted);
}
.join-error {
  color: var(--danger) !important;
  min-height: 0;
}
.join-error:empty {
  display: none;
}
.join-field .ok {
  color: var(--accent-text);
}
.join-field .ko {
  color: var(--danger);
}
.join-password {
  position: relative;
  display: block;
}
.join-password input {
  padding-right: 84px;
}
.join-password .text-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.join-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 14px;
  font-size: 12px;
  color: var(--muted);
}
.join-meter i {
  display: block;
  width: 96px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--danger) 0 25%,
    var(--warn) 25% 50%,
    #059669 50% 75%,
    var(--accent-text) 75%
  );
  clip-path: inset(0 100% 0 0);
}
.join-meter i.s0 {
  clip-path: inset(0 100% 0 0);
}
.join-meter i.s1 {
  clip-path: inset(0 75% 0 0);
}
.join-meter i.s2 {
  clip-path: inset(0 50% 0 0);
}
.join-meter i.s3 {
  clip-path: inset(0 25% 0 0);
}
.join-meter i.s4 {
  clip-path: inset(0 0 0 0);
}
.join-check-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}
.join-check-line input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.join-banner {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.join-banner.error {
  background: var(--danger-soft);
  color: var(--danger);
}
.join-banner.info {
  background: var(--accent-soft);
}
.join-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.join-sep::before,
.join-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.join-google svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}
#join-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
#join-form legend {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.join-teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}
.join-team {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.join-team.selected {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.join-leagues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.join-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.join-chip span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.join-chip input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.join-chip input:focus-visible + span {
  outline: 2px solid var(--accent-text);
}
.join-styles {
  display: grid;
  gap: 6px;
}
.join-style {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.join-style small {
  display: block;
  color: var(--muted);
}
.join-style input {
  margin-top: 3px;
  accent-color: var(--accent);
}
/* Menu compte */
.account-menu {
  position: fixed;
  top: 68px;
  right: 16px;
  z-index: 150;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.account-menu[hidden] {
  display: none;
}
.menu-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.menu-head > div {
  min-width: 0;
  flex: 1;
}
.menu-head small {
  display: block;
  color: var(--muted);
}
.menu-division {
  display: block;
  margin: 4px 0;
}
.menu-links {
  display: grid;
  margin-top: 6px;
}
.menu-links button {
  padding: 11px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu-links button:hover,
.menu-links button:focus-visible {
  background: var(--surface-3);
}
.menu-links .danger {
  color: var(--danger);
}
.account-menu .sync-status {
  margin: 8px 0 0;
  font-size: 12px;
}
@media (max-width: 900px) {
  .join-view {
    grid-template-columns: 1fr;
  }
  .join-brand {
    padding: 28px 20px;
    gap: 12px;
  }
  .join-podium,
  .join-perks li:nth-child(n + 2) {
    display: none;
  }
  .join-panel {
    padding: 24px 18px 40px;
    justify-content: flex-start;
  }
  .join-brand h2 {
    font-size: 36px;
  }
}
@media (max-width: 700px) {
  .account-menu {
    top: auto;
    right: 8px;
    left: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
  }
  .mobile-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .mobile-nav button {
    font-size: 9px;
  }
}
@media (max-width: 900px) {
  .join-close {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .join-tabs {
    margin-top: 4px;
  }
}
/* Page profil */
.emblem {
  width: 16px;
  height: 16px;
  flex: none;
}
.div-badge .emblem {
  margin-right: 2px;
}
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-header {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.profile-banner {
  height: 96px;
  background:
    linear-gradient(120deg, var(--banner), #0a0c0b 85%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 40px, transparent 40px 80px);
}
.profile-id {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 0 22px 18px;
}
.profile-id .avatar-3d {
  width: 96px;
  height: 96px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  flex: none;
  margin-top: -48px;
}
.profile-title {
  flex: 1;
  min-width: 200px;
  padding-top: 10px;
}
.profile-actions {
  padding-top: 10px;
}
.profile-title h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
}
.profile-title small {
  color: var(--muted);
}
.profile-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px 0;
}
.profile-crest {
  border-radius: 6px;
  background: var(--crest-bg);
  padding: 2px;
}
.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.profile-tabs button {
  padding: 10px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.profile-tabs button[aria-selected='true'] {
  color: var(--text);
  border-color: var(--accent);
}
.profile-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 20px;
}
.overview-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.player-card {
  --card: #9aa5b1;
  position: relative;
  padding: 22px 18px;
  border-radius: 30px 30px 60px 60px/24px 24px 70px 70px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--card) 70%, #0a0c0b), #0a0c0b 78%);
  color: #f8fafc;
  border: 3px solid var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}
.card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card-overall {
  font-family: var(--display);
  font-size: 78px;
  line-height: 0.9;
}
.card-top span {
  font-weight: 800;
  color: var(--card);
  filter: brightness(1.4);
}
.card-top em {
  font-style: normal;
  margin-left: 4px;
}
.card-name {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.player-card small {
  color: #c9d3c6;
}
.card-attrs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 6px;
  margin-top: 14px;
}
.card-attrs span {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #9fb09a;
  font-weight: 700;
}
.card-attrs b {
  font-family: var(--display);
  font-size: 30px;
  color: #f8fafc;
}
.card-actions {
  display: flex;
  margin-top: 10px;
}
.card-actions .button {
  width: 100%;
}
.key-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.key-number {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.key-number small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.key-number strong {
  font-family: var(--display);
  font-size: 28px;
}
.form-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.form-line span {
  display: flex;
  gap: 4px;
}
.radar-box {
  max-width: 420px;
}
.radar {
  width: 100%;
  height: auto;
}
.radar-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.radar-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
}
.season-line {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.season-line li {
  display: grid;
  grid-template-columns: 150px auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.season-line li.up {
  border-left-color: var(--accent);
}
.season-line li.down {
  border-left-color: var(--danger);
}
.season-line li span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.season-line em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}
.public-bets {
  display: grid;
  gap: 8px;
}
.public-bet {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
}
.public-bet small {
  color: var(--muted);
}
.public-bet em {
  align-self: flex-start;
  margin-top: 4px;
}
.avatar-tab {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.avatar-tab .avatar-3d {
  width: 120px;
  height: 120px;
}
.account-settings {
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.settings-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.settings-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.settings-card.danger {
  border-color: var(--danger);
}
.settings-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-row input {
  flex: 1;
  min-width: 180px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.button.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.switch-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
}
.switch-line input {
  margin-top: 4px;
  accent-color: var(--accent);
}
.switch-line small {
  display: block;
  color: var(--muted);
}
.profile-private {
  padding: 30px;
  text-align: center;
}
@media (max-width: 900px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .player-card {
    max-width: 340px;
    margin: 0 auto;
  }
  .season-line li {
    grid-template-columns: 1fr;
  }
  .profile-id {
    padding: 0 16px 16px;
  }
  .profile-title h2 {
    font-size: 28px;
  }
}
/* Ligues privées */
.private-leagues {
  padding: 18px 22px;
  margin: 0 0 18px;
}
.private-leagues[hidden] {
  display: none;
}
.private-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.private-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-3);
  font-size: 20px;
}
.private-emblem.big {
  width: 52px;
  height: 52px;
  font-size: 28px;
}
.private-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.private-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.private-form strong {
  flex-basis: 100%;
  font-size: 13px;
}
.private-form input {
  flex: 1;
  min-width: 120px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.private-form select {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.private-invite {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}
.private-invite b {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border: 1px dashed var(--accent-text);
  border-radius: 10px;
}
.private-season {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}
.private-admin {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.danger-text {
  color: var(--danger);
}
/* Hub communauté */
.community-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.community-tabs button {
  position: relative;
  padding: 11px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.community-tabs button[aria-selected='true'] {
  color: var(--text);
  border-color: var(--accent);
}
.tab-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: 2px;
}
.tab-dot[hidden] {
  display: none;
}
[data-cpanel][hidden] {
  display: none;
}
.general {
  padding: 18px 22px;
}
.general-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 10px;
}
.general-filters label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
.general-filters select,
.general-filters input {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.general-row {
  grid-template-columns: 48px 34px minmax(140px, 1.6fr) 120px 70px 80px;
  min-width: 520px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.general-row:hover {
  background: var(--surface-2);
}
.general-row small {
  color: var(--muted);
}
.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}
.podium {
  padding: 18px 22px;
  margin-bottom: 14px;
}
.podium[hidden] {
  display: none;
}
.podium h3 {
  margin: 2px 0 10px;
  font-family: var(--display);
  font-size: 26px;
}
.podium-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  justify-content: center;
}
.podium-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  max-width: 190px;
  padding: 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.podium-step.p1 {
  padding-top: 30px;
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.podium-step.p2 {
  padding-top: 20px;
}
.podium-step b {
  font-family: var(--display);
  font-size: 28px;
  color: var(--accent-text);
}
.podium-step small {
  color: var(--muted);
}
.mini-avatar.big {
  width: 54px;
  height: 54px;
}
.follows {
  padding: 18px 22px;
}
.follows-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.follows h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.follows h3 small {
  font-weight: 400;
  color: var(--muted);
}
.follow-line {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.follow-line small {
  color: var(--muted);
  margin-left: auto;
}
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.feed li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.feed small {
  color: var(--muted);
  white-space: nowrap;
}
.fame {
  padding: 18px 22px;
}
.fame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.fame h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.fame h3 small {
  font-weight: 400;
  color: var(--muted);
}
.fame-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.fame-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.fame-list small {
  color: var(--muted);
}
@media (max-width: 900px) {
  .follows-grid {
    grid-template-columns: 1fr;
  }
  .general-filters label,
  .general-filters .period-switch {
    flex: 1 1 140px;
  }
  .general,
  .follows,
  .fame,
  .podium {
    padding: 14px;
  }
  .general-row {
    min-width: 460px;
  }
  .league-table {
    overflow-x: auto;
  }
}
.compare-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.compare-row:last-child {
  border-bottom: 0;
}
.compare-head {
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
.compare-row b {
  font-weight: 600;
}
/* Boutique */
.shop-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shop-head h2 {
  margin: 2px 0;
  font-family: var(--display);
  font-size: 38px;
}
.shop-head small {
  color: var(--muted);
}
.shop-page h3 {
  margin: 8px 0 0;
}
.shop-page h3 small {
  font-weight: 400;
  color: var(--muted);
}
.shop-uses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.duel-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.duel-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.shop-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.shop-card strong {
  font-size: 14px;
}
.shop-price {
  font-weight: 800;
  font-family: var(--display);
  font-size: 22px;
}
.shop-price s {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}
.shop-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}
.shop-actions .button {
  flex: 1;
  min-width: 84px;
  padding: 8px 10px;
  font-size: 12px;
}
.rarity-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.weekly-flag {
  font-size: 11px;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  align-self: flex-start;
}
.rarity-common {
  border-color: var(--line-strong);
}
.rarity-rare {
  border-color: #3b82f6;
}
.rarity-epic {
  border-color: #8b5cf6;
}
.rarity-legendary {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b33;
}
.rarity-exclusive {
  border-color: var(--accent-text);
  border-style: dashed;
}
.shop-tabs {
  margin-bottom: 6px;
}
.profile-subtitle {
  display: block;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.04em;
}
.player-card.frame-bronze {
  border-color: #b87333;
  box-shadow: 0 0 0 4px #b8733344;
}
.player-card.frame-silver {
  border-color: #c0c8d0;
  box-shadow: 0 0 0 4px #c0c8d044;
}
.player-card.frame-gold {
  border-color: #f5c542;
  box-shadow:
    0 0 0 4px #f5c54255,
    0 0 24px #f5c54266;
}
.player-card.frame-neon {
  border-color: #10b981;
  box-shadow:
    0 0 0 3px #10b98155,
    0 0 28px #10b98177;
}

/* Studio d'avatar 3D, avatar enregistré et cabine d'essayage (BET-49) */
.avatar-photo {
  overflow: hidden;
  background: var(--surface-2);
}
.avatar-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-photo > i,
.avatar-photo > span,
.avatar-photo > b,
.avatar-photo > em {
  display: none;
}
.mini-avatar.avatar-photo {
  box-shadow: none;
  border: 1px solid var(--line-strong);
}
.avatar-3d.avatar-photo {
  transform: none;
  border-radius: 50%;
  box-shadow: 0 8px 22px #0003;
}
.avatar-3d.avatar-photo:before {
  display: none;
}
.studio {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.studio-stage {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 10px;
}
.studio-canvas {
  position: relative;
  aspect-ratio: 3/4;
  max-height: 72vh;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #0b0e14;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px #0003;
}
.studio-canvas canvas,
.avatar-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  outline-offset: -3px;
}
.avatar-canvas.grabbing {
  cursor: grabbing;
}
.studio-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #c9d3c6;
  font-weight: 600;
  background: radial-gradient(circle at 50% 40%, #1b2433, #0b0e14);
}
.studio-loading:after {
  content: '';
  position: absolute;
  bottom: 34%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #ffffff22;
  border-top-color: var(--accent);
  animation: studio-spin 0.9s linear infinite;
}
@keyframes studio-spin {
  to {
    transform: rotate(360deg);
  }
}
.studio-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.studio-tools .button {
  flex: 1;
  min-height: 44px;
}
.studio-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.studio-off {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  height: 100%;
  align-content: center;
  color: #e2e8f0;
}
.studio-off .avatar-3d {
  width: 150px;
  height: 200px;
  border-radius: 24px;
}
.studio-off .avatar-3d.avatar-photo img {
  object-fit: cover;
}
.studio-off p {
  margin: 0;
}
.studio-disabled .studio-panel {
  opacity: 0.5;
  pointer-events: none;
}
.studio-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.studio-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.studio-tabs button {
  padding: 11px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  min-height: 44px;
}
.studio-tabs button[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.studio-banner {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-text);
  font-size: 14px;
}
.studio-banner[hidden] {
  display: none;
}
.link-button {
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 0 0 6px;
}
.studio-options {
  display: grid;
  gap: 14px;
}
.opt-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.opt-group legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.opt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.12s;
}
.opt:hover {
  border-color: var(--accent-text);
}
.opt:active {
  transform: scale(0.97);
}
.opt.on {
  border-color: var(--accent-text);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent);
}
.opt.dot {
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--c);
  justify-content: center;
  position: relative;
}
.opt.dot.big {
  width: 46px;
  height: 46px;
  background: linear-gradient(145deg, var(--c), var(--c2));
}
.opt.dot.on {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5px var(--accent-text);
}
.opt.dot .lock-tag {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  white-space: nowrap;
}
.opt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  width: 100%;
}
.opt.card {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  text-align: center;
  font-size: 13px;
}
.opt.card img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-3);
}
.lock-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}
.lock-division,
.lock-exclusive {
  color: var(--accent-text);
}
.opt-fields {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}
.opt-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.opt-fields input {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}
.studio-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  padding: 10px 0;
  background: linear-gradient(transparent, var(--bg) 40%);
}
.studio-actions .button {
  min-height: 46px;
  min-width: 130px;
}
.avatar-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0b0e14;
  border: 1px solid var(--line-strong);
  aspect-ratio: 3/4;
  max-height: 480px;
  width: 100%;
}
.avatar-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-hero .hero-actions {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.avatar-hero .hero-actions .button {
  min-height: 40px;
  padding: 0 14px;
  backdrop-filter: blur(8px);
  background: #0b0e14aa;
  color: #fff;
  border-color: #ffffff44;
}
.profile-photo-slot {
  flex: none;
  margin-top: -48px;
}
.profile-id .avatar-photo {
  width: 96px;
  height: 96px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  flex: none;
  margin-top: -48px;
}
.overview-grid.has-hero {
  grid-template-columns: minmax(220px, 300px) minmax(220px, 300px) minmax(0, 1fr);
}
.fitting {
  display: grid;
  gap: 10px;
}
.fitting .studio-canvas {
  aspect-ratio: 4/5;
  max-height: 62vh;
}
.fitting-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 14px;
}
.fitting-bar strong {
  flex: 1;
  min-width: 120px;
}
.fitting-bar .button {
  min-height: 40px;
}
.shop-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.shop-layout .fitting {
  position: sticky;
  top: 76px;
}
.shop-thumb {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-3);
}
@media (max-width: 1100px) {
  .studio,
  .shop-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .overview-grid.has-hero {
    grid-template-columns: 1fr;
  }
  .shop-layout .fitting {
    position: static;
  }
}
@media (max-width: 700px) {
  .studio-stage,
  .shop-layout .fitting {
    position: sticky;
    top: 56px;
    z-index: 4;
    background: var(--bg);
    padding-bottom: 6px;
  }
  .studio-canvas,
  .fitting .studio-canvas {
    aspect-ratio: 1/1;
    max-height: 38vh;
  }
  .studio-hint {
    display: none;
  }
  .studio-tools .button {
    font-size: 13px;
    padding: 0 8px;
  }
  .opt-fields {
    grid-template-columns: 1fr 2fr;
  }
  .studio-actions {
    bottom: 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .studio-loading:after {
    animation: none;
  }
  .opt {
    transition: none;
  }
}
.studio.stacked {
  grid-template-columns: 1fr;
  gap: 12px;
}
.studio.stacked .studio-stage {
  position: static;
}
.studio.stacked .studio-canvas {
  aspect-ratio: 1/1;
  max-height: 34vh;
}
.studio.stacked .studio-hint {
  display: none;
}
.join-studio {
  margin: 8px 0 14px;
}
.avatar-hero canvas {
  position: absolute;
  inset: 0;
}
.avatar-hero .hero-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, var(--accent-soft), var(--surface-2));
}
.avatar-hero .hero-fallback .avatar-3d {
  transform: scale(1.5);
}
.avatar-hero .hero-fallback .avatar-photo {
  transform: none;
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.avatar-hero .hero-actions {
  z-index: 2;
}
.avatar-studio-slot {
  min-height: 320px;
}

/* BET-90 : libellé complet sur les petits écrans. */
.mobile-nav [data-mobile-target='standings'] {
  white-space: normal;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
/* BET-89 : pièce euro vectorielle, montant complet accessible. */
.bankroll-amount {
  display: flex;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
  max-width: 100%;
}
.bankroll-currency {
  display: inline-flex;
  flex: none;
  width: 1.65em;
  height: 1.65em;
  color: var(--accent-text);
}
.bankroll-currency svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bankroll-currency circle {
  fill: currentColor;
  fill-opacity: 0.1;
}
.stat-main .bankroll-currency {
  color: var(--on-accent);
  width: 2.5em;
  height: 2.5em;
}
.stat-main .bankroll-amount strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 6vw, 44px);
}
/* BET-75 : radar et légende des six attributs. */
.radar-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  width: 100%;
  min-width: 0;
}
.radar-title {
  margin: 0;
  font-size: 18px;
}
.radar-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.radar-attributes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}
.radar-attributes > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.radar-attributes dt {
  font-size: 12px;
}
.radar-attributes small {
  color: var(--muted);
  font-size: 10px;
}
.radar-attributes dd {
  margin: 0;
  font-weight: 800;
  color: var(--accent-text);
}
.radar-legend span {
  display: inline-flex;
  align-items: center;
}
.radar-legend span:not(:first-child) i {
  border: 1px dashed currentColor;
}

.radar text {
  stroke: none;
}
/* BET-91 : tableau de bord sans service tiers, thèmes sombre et clair. */
.analytics-dashboard {
  margin: 24px 0;
  padding: clamp(16px, 3vw, 32px);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(
      ellipse at top right,
      color-mix(in srgb, var(--accent) 9%, transparent),
      transparent 65%
    ),
    var(--surface);
}
.analytics-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.analytics-head h3 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0;
}
.analytics-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.analytics-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.analytics-controls select {
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.analytics-note {
  max-width: 85ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.analytics-kpis > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.analytics-kpis small {
  font-size: 11px;
  color: var(--muted);
}
.analytics-kpis strong {
  font-family: var(--display);
  font-size: clamp(22px, 2.5vw, 32px);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.analytics-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.analytics-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 18px;
}
.analytics-card h4 {
  margin: 0;
  font-size: 18px;
}
.analytics-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.analytics-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.analytics-svg text {
  fill: var(--muted);
  font:
    12px Inter,
    sans-serif;
}
.analytics-axis {
  stroke: var(--line-strong);
  stroke-width: 1.5;
}
.analytics-grid {
  stroke: var(--line);
  stroke-dasharray: 3 5;
}
.analytics-line {
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.analytics-area {
  fill: var(--accent);
  fill-opacity: 0.12;
}
.analytics-svg circle,
.chart-gain {
  fill: var(--accent-text);
}
.chart-loss {
  fill: var(--danger);
}
.analytics-svg [tabindex] {
  cursor: pointer;
  stroke: var(--surface);
  stroke-width: 2;
}
.analytics-svg [tabindex]:is(:hover, :focus) {
  stroke: var(--text);
  stroke-width: 3;
  outline: none;
}
.analytics-tooltip {
  display: block;
  margin-top: 16px;
  min-height: 2em;
  font-size: 13px;
  color: var(--accent-text);
}
.analytics-data {
  margin-top: 12px;
  font-size: 12px;
}
.analytics-data summary {
  cursor: pointer;
  color: var(--muted);
}
.analytics-table-wrap {
  overflow: auto;
  margin-top: 12px;
}
.analytics-data table {
  border-collapse: collapse;
  min-width: 620px;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.analytics-data th,
.analytics-data td {
  text-align: right;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.analytics-data th:first-child {
  text-align: left;
}
.analytics-data caption {
  text-align: left;
  padding: 10px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .analytics-grid-cards {
    grid-template-columns: 1fr;
  }
  .analytics-controls {
    width: 100%;
  }
  .analytics-controls label {
    flex: 1;
    min-width: 110px;
  }
  .analytics-controls select {
    width: 100%;
  }
  .analytics-card {
    padding: 12px;
  }
  .analytics-dashboard {
    border-radius: 18px;
  }
  .analytics-svg text {
    font-size: 14px;
  }
}

.analytics-svg text {
  stroke: none;
  font-size: 18px;
}
@media (max-width: 700px) {
  .analytics-svg text {
    font-size: 24px;
  }
}
.analytics-area {
  stroke: none;
}

.analytics-svg .analytics-tick {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 5px;
  stroke-linejoin: round;
}

/* BET-94 : miniature de l’avatar du compte, indépendante du chargement des ligues. */
#account-avatar > .mini-avatar {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  margin: 0;
}
#account-avatar > .avatar-photo {
  overflow: hidden;
}
#account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* BET-80 : présentation du joueur, commune au studio et à la boutique. */
.fitting {
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 16px 50px #0002;
  overflow: hidden;
}
.fitting-heading h3 {
  font-size: 28px;
  margin: 4px 0;
}
.fitting-heading p,
.fitting-hint {
  font-size: 12px;
  color: var(--muted);
}
.fitting-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fitting-tools .button {
  min-height: 40px;
  flex: 1;
  padding: 0 10px;
  font-size: 12px;
}
.fitting-tools [aria-pressed='true'] {
  border-color: var(--accent-text);
  color: var(--accent-text);
}
.fitting .studio-canvas {
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 30%, #334266, #101522);
}
.fitting-fallback {
  display: block;
  width: 100%;
  height: 250px;
}
.fitting-fallback img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 700px) {
  .shop-layout .fitting {
    position: relative;
    top: auto;
    z-index: auto;
    padding: 12px;
  }
  .fitting-heading p,
  .fitting-hint {
    display: none;
  }
  .fitting-heading h3 {
    font-size: 22px;
  }
  .fitting .studio-canvas {
    max-height: 45vh;
  }
}

.shop-thumb.shop-object {
  object-fit: contain;
  height: 116px;
  padding: 8px;
  background: radial-gradient(ellipse at top, var(--surface-3), var(--surface-2));
}

.notification-channel {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}
.notification-channel label {
  min-width: 120px;
}
.notification-channel span {
  font-size: 12px;
  color: var(--muted);
}
.notification-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.notification-fields label {
  display: grid;
  gap: 6px;
}
.notification-fields textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px;
}
[data-unsubscribe] {
  margin-top: 24px;
}

/* BET-110 : lecture immédiate, y compris avant IntersectionObserver. */
.match-card,
.match-list.reveal .match-card {
  opacity: 1 !important;
  transform: none !important;
  animation-delay: 0s !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.match-secondary {
  padding: 12px;
}
.match-secondary summary {
  cursor: pointer;
  min-height: 24px;
  color: var(--accent-text);
}
.match-card strong {
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  padding: 12px;
  background: var(--panel, #fff);
  color: var(--accent-text);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}
.discovery {
  padding: 16px;
  margin-bottom: 16px;
}
.discovery summary {
  cursor: pointer;
  min-height: 24px;
}

.help-inline {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-text);
  font-weight: 700;
}
.lexicon article:focus {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}

/* BET-110 : le texte et les actions utiles sont utilisables au premier rendu. */
.hero-main > :not(.hero-pitch) {
  animation: none !important;
}
.hero-pitch {
  animation: none;
  pointer-events: none;
}
@media (max-width: 700px) {
  .hero-main {
    padding: 22px;
  }
  .hero h1 {
    font-size: clamp(30px, 8vw, 42px);
  }
  .hero-copy {
    margin: 0;
  }
  .hero-actions {
    grid-template-columns: 1fr 1fr;
  }
  .hero-actions #quick-combo {
    grid-column: 1/-1;
    min-height: 36px;
  }
  .hero-main .section-subtitle {
    margin: 0;
  }
  .discovery {
    margin-bottom: 0;
  }
}

/* BET-108 : contraste des favoris, zones tactiles et navigation compacte. */
.favorite-filter,
.favorite-toggle.active {
  color: var(--accent-text);
}
.team-favorite.active {
  color: #674e00;
}
.match-favorites {
  display: flex;
  justify-content: space-between;
}
.match-favorites .team-favorite {
  position: static;
  min-width: 32px;
  min-height: 32px;
}
.team strong {
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.match-card .confidence-button {
  min-height: 32px;
}
@media (max-width: 700px) {
  .mobile-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-radius: 24px;
  }
  .mobile-nav button {
    min-width: 0;
    min-height: 52px;
    font-size: 10px;
    line-height: 1.15;
  }
  .mobile-nav button svg {
    width: 19px;
    height: 19px;
  }
  .hero-main .hero-pitch {
    display: none;
  }
}
/* Les textes d’état et la navigation ne disparaissent pas pendant une animation. */
.topbar,
.hero-score {
  animation: none !important;
}
.hero-score-parts em {
  opacity: 1;
  color: var(--on-accent);
}
.stats-grid,
.workspace,
#bankroll {
  animation: none !important;
}
/* BET-114 : surfaces et espacements partagés, sans modifier les cartes interactives de l’avatar. */
.card:not(.opt),
.match-card,
.ticket,
.analytics-dashboard,
.fitting {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-main,
.builder-card,
.ticket,
.chart-card,
.capital-log,
.standings-body,
.prediction-insights > article,
.site-performance,
.analytics-card {
  padding: var(--panel-padding);
}
#predictions > details.card,
#boutique > .card {
  padding: var(--panel-padding);
  margin-bottom: 16px;
}
.performance-grid > .league-card {
  display: block;
  padding: var(--panel-padding);
  border-radius: var(--radius);
}
.prediction-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 700px) {
  :root {
    --header-offset: 80px;
  }
  .mobile-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-radius: 24px;
  }
  .mobile-nav button {
    min-width: 0;
    min-height: 52px;
    padding: 4px 2px;
    font-size: 9px;
    line-height: 1.2;
  }
  .hero-actions .button {
    white-space: normal;
    height: auto;
    padding-block: 10px;
  }
  .notification-fields {
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  }
  .prediction-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 390px) {
  .prediction-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1600px) {
  .topbar {
    gap: 16px;
  }
  .tab-button {
    padding-inline: 10px;
    font-size: 12px;
    letter-spacing: 0.02em;
  }
}

/* BET-120 : quatre destinations avec des noms toujours visibles. */
@media (min-width: 1101px) {
  :root {
    --header-offset: 92px;
  }
  .topbar {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
  }
  .topbar > .brand,
  .topbar > .tabs,
  .topbar > .topbar-actions {
    grid-row: 1;
    align-self: center;
  }
  .topbar > .brand {
    grid-column: 1;
  }
  .topbar > .tabs {
    grid-column: 2;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 2px;
  }
  .topbar > .topbar-actions {
    grid-column: 3;
  }
  .tabs .tab-button {
    flex: none;
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    letter-spacing: 0;
    gap: 6px;
  }
  .tabs .tab-button svg {
    display: block;
    width: 17px;
    height: 17px;
  }
  .match-strip {
    top: 72px;
  }
}
@media (min-width: 1101px) and (max-width: 1399px) {
  .topbar {
    gap: 8px;
  }
  .tabs .tab-button {
    padding-inline: 5px;
    font-size: 11px;
    gap: 4px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .account-button {
    padding-right: 10px;
  }
  .account-button b {
    max-width: 90px;
  }
  .topbar-bankroll {
    min-width: 114px;
    padding-inline: 8px;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .topbar > .tabs {
    gap: 4px;
    flex-wrap: nowrap;
  }
  .tabs .tab-button {
    flex: none;
    width: auto;
    padding: 0 10px;
    font-size: 12px;
    letter-spacing: 0;
  }
  .tabs .tab-button svg {
    display: block;
    width: 17px;
    height: 17px;
  }
}

/* BET-115 : comparer des familles de marchés sans assimiler leurs probabilités. */
.match-analysis {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.analysis-intro {
  display: grid;
  gap: 4px;
}
.analysis-intro small,
.analysis-note {
  color: var(--muted);
  font-size: 12px;
}
.analysis-note {
  margin: 0;
}
.analysis-families {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.analysis-families article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.analysis-families article > small {
  color: var(--muted);
  font-size: 11px;
}
.analysis-families strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.analysis-families b {
  font-family: var(--display);
  font-size: 28px;
  color: var(--accent-text);
}
.analysis-families span {
  font-size: 11px;
  color: var(--muted);
}
.analysis-families .button {
  margin-top: auto;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: normal;
}
.match-analysis .recommended {
  width: 100%;
  text-align: left;
}
@media (max-width: 700px) {
  .analysis-families {
    grid-template-columns: minmax(0, 1fr);
  }
  .analysis-families article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .analysis-families article > small:first-child {
    grid-column: 1/-1;
  }
  .analysis-families b {
    grid-column: 2;
    grid-row: 2;
  }
  .analysis-families span {
    grid-column: 1/-1;
  }
  .analysis-families .button {
    grid-column: 1/-1;
    justify-self: start;
  }
}

/* BET-117 : fermeture visible pendant la lecture des fenêtres longues. */
dialog .modal-head,
dialog .dialog-tools {
  position: sticky;
  top: -26px;
  z-index: 6;
  background: var(--surface);
  margin: -26px -26px 20px;
  padding: 20px 26px 12px;
  border-bottom: 1px solid var(--line);
}
dialog .dialog-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
dialog .modal-head .icon-button,
dialog .dialog-tools .icon-button {
  flex: none;
  min-width: 44px;
  min-height: 44px;
}
.detail-head {
  padding-right: 76px;
}
@media (max-width: 700px) {
  dialog .modal-head,
  dialog .dialog-tools {
    top: -20px;
    margin: -20px -16px 16px;
    padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
  }
  .detail-head {
    padding-right: 72px;
  }
}

/* Navigation secondaire et lecture progressive des pages. */
.section-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: var(--header-offset);
}
.section-navigation[hidden] {
  display: none;
}
.section-navigation button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.section-navigation button:hover {
  background: var(--surface-2);
  color: var(--text);
}
.section-navigation button.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.section-navigation [data-open-ticket] {
  margin-left: auto;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.section-navigation span {
  color: var(--accent-text);
}
.section-details {
  margin: 16px 0;
  padding: var(--panel-padding);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section-details > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-text);
}
.section-details[open] > summary {
  margin-bottom: 16px;
}
.section-details .performance-grid {
  margin: 0;
}
.section-details .analytics-dashboard {
  padding: 0;
}
.club-section-description {
  margin: 0 0 20px;
}
.community-tabs {
  flex-wrap: wrap;
}
.community-tabs button {
  white-space: normal;
}
#bankroll > .stats-grid {
  margin-bottom: 20px;
}
@media (max-width: 700px) {
  .mobile-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .section-navigation {
    gap: 4px;
    margin: 16px 0;
    padding: 6px;
  }
  .section-navigation button {
    padding: 8px;
    font-size: 12px;
  }
  .section-navigation [data-open-ticket] {
    margin-left: 0;
  }
  .community-tabs {
    gap: 6px;
  }
  .community-tabs button {
    flex: 1 1 130px;
    text-align: center;
  }
}
/* BET-124 : préférences d’alertes, mêmes consentements et actions. */
.notification-settings {
  max-width: 960px;
  margin: auto;
  display: grid;
  gap: 20px;
}
.notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.notification-heading h2 {
  font-size: 30px;
  margin: 4px 0 8px;
}
.notification-heading p {
  color: var(--muted);
}
.notification-status {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-size: 13px;
  white-space: nowrap;
}
.notification-status.on {
  color: var(--accent-text);
  border-color: var(--accent-text);
}
.notification-settings form {
  display: grid;
  gap: 22px;
}
.notification-section {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}
.notification-section legend {
  padding: 0 8px;
  font-weight: 700;
}
.notification-help {
  margin-bottom: 20px;
}
.notification-help summary,
.notification-advanced summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.notification-section p {
  color: var(--muted);
  line-height: 1.6;
}
.notification-section .switch-line {
  padding: 12px 0;
  min-height: 48px;
}
.notification-settings .notification-channel {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-strong);
}
.notification-channel small {
  grid-column: 1/-1;
  color: var(--muted);
}
.notification-channel label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notification-save {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: 14px;
}
.notification-save p {
  margin: 0;
  color: var(--accent-text);
}
.notification-settings button {
  min-height: 44px;
}
.notification-settings [data-unsubscribe] {
  margin-top: 24px;
}
.notification-settings input:focus-visible,
.notification-settings textarea:focus-visible,
.notification-settings summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}
.notification-settings .notification-fields {
  gap: 18px;
}
.notification-settings [data-notification-feedback]:empty {
  display: none;
}
@media (max-width: 600px) {
  .notification-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .notification-section {
    padding: 16px 12px;
  }
  .notification-settings .notification-channel {
    grid-template-columns: 1fr auto;
  }
  .notification-save {
    align-items: stretch;
    flex-direction: column;
  }
  .notification-settings .notification-fields {
    grid-template-columns: 1fr;
  }
  .notification-status {
    white-space: normal;
  }
}
.notification-settings .notification-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.notification-fields [data-import-favorites] {
  grid-column: 1/-1;
  justify-self: start;
  align-self: start;
}
.notification-channel [data-test-channel] {
  grid-column: 4;
  grid-row: 1;
}
.notification-channel small {
  grid-row: 2;
}
.notification-settings textarea,
.notification-settings input {
  max-width: 100%;
  box-sizing: border-box;
}
.notification-section > label:not(.switch-line) {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  justify-items: start;
}
@media (max-width: 600px) {
  .notification-settings .notification-fields {
    grid-template-columns: 1fr;
  }
  .notification-channel [data-test-channel] {
    grid-column: 2;
    grid-row: 2;
  }
  .notification-channel small {
    grid-column: 1/-1;
    grid-row: 3;
  }
}

/* BET-133 : même tableau dans tous les classements du Club. */
.club-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 16px;
}
.club-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 650px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.club-table th,
.club-table td {
  padding: 12px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.club-table thead th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.club-table th:nth-child(2) {
  text-align: left;
  min-width: 180px;
}
.club-table td:first-child {
  font-weight: 800;
  text-align: left;
}
.club-player {
  display: flex;
  align-items: center;
  gap: 10px;
}
.club-player small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
.club-table .me {
  background: var(--accent-soft);
}
.club-table .up td:first-child {
  box-shadow: inset 3px 0 var(--accent);
}
.club-table .down td:first-child {
  box-shadow: inset 3px 0 var(--danger);
}
.club-table-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

/* BET-134 : sélecteurs communs à toutes les pages, y compris les formulaires différés. */
:root select {
  appearance: none;
  min-height: 46px;
  height: auto;
  max-width: 100%;
  min-width: 0;
  padding: 11px 42px 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23929b90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px;
  background-position: right 14px center;
  box-shadow: 0 1px 2px #0000000a;
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    background-color 0.16s;
  color-scheme: dark;
}
:root.light select {
  color-scheme: light;
}
:root select:not(:disabled):hover {
  border-color: var(--accent-text);
  background-color: var(--surface-2);
}
:root select:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-color: var(--accent-text);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
:root select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
:root select option,
:root select optgroup {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}
:root select optgroup {
  font-weight: 800;
}
:root select:is([multiple], [size]:not([size='1'])) {
  padding: 8px;
  background-image: none;
}
/* Le menu personnalisable reste un vrai select : clavier, labels et événements natifs. */
@supports (appearance: base-select) {
  @media (hover: hover) and (pointer: fine) {
    :root select:not([multiple]):not([size]),
    :root select[size='1'] {
      appearance: base-select;
      background-image: none;
      padding-right: 14px;
      gap: 20px;
      align-items: center;
    }
    :root select::picker(select) {
      appearance: base-select;
      border: 1px solid var(--line-strong);
      border-radius: 16px;
      padding: 6px;
      margin-block: 6px;
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 16px 40px #00000030;
      max-height: min(360px, 60dvh);
      overflow: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--line-strong) transparent;
    }
    :root select::picker-icon {
      content: '';
      width: 7px;
      height: 7px;
      flex-shrink: 0;
      margin-inline: 4px 2px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(45deg);
      color: var(--muted);
      transition: rotate 0.16s;
    }
    :root select:open {
      border-color: var(--accent-text);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    :root select:open::picker-icon {
      rotate: 180deg;
    }
    :root select option {
      min-height: 42px;
      padding: 10px 12px;
      border-radius: 10px;
      gap: 12px;
      font-size: 14px;
      line-height: 1.4;
      white-space: normal;
      overflow-wrap: anywhere;
      cursor: pointer;
    }
    :root select option:not(:disabled):is(:hover, :focus) {
      background: var(--surface-2);
      outline: 0;
    }
    :root select option:checked {
      background: var(--accent-soft);
      color: var(--accent-text);
      font-weight: 750;
    }
    :root select option::checkmark {
      color: var(--accent-text);
    }
    :root select option:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    :root select optgroup {
      padding: 6px;
      font-size: 12px;
      color: var(--muted);
    }
  }
}
@media (max-width: 700px) {
  :root select {
    font-size: 16px;
    min-height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root select,
  :root select::picker-icon {
    transition: none;
  }
}
@media (forced-colors: active) {
  :root select {
    appearance: auto;
    background-image: none;
    border: 1px solid ButtonText;
    box-shadow: none;
  }
  :root select:focus-visible {
    outline: 2px solid Highlight;
  }
}

.model-page-heading,
.model-filter-title,
.model-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.model-page-heading {
  margin-bottom: 22px;
}
.model-page-heading h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 40px);
  text-transform: uppercase;
  margin: 4px 0 0;
}
.model-page-heading .eyebrow {
  font-size: 10px;
}
.model-filter-panel {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  margin-bottom: 18px;
}
.model-filter-title > strong {
  font-size: 13px;
}
.model-period-shortcuts {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.model-period-shortcuts button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
}
.model-period-shortcuts button[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
}
.model-period-shortcuts button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
#predictions .prediction-toolbar {
  margin: 14px 0 8px;
  padding: 0;
  background: transparent;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}
#predictions .prediction-toolbar label {
  font-size: 11px;
  gap: 6px;
}
.model-scope-note {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.model-spotlight {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 32px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 85% 0, #40571870, transparent 65%),
    linear-gradient(120deg, #0b1120, #101b2b);
  color: #f8fafc;
  padding: clamp(24px, 4vw, 56px);
  isolation: isolate;
}
.model-spotlight:before {
  content: '';
  position: absolute;
  width: 540px;
  height: 540px;
  border: 1px solid #10b98118;
  border-radius: 50%;
  right: -130px;
  top: -130px;
  box-shadow:
    0 0 0 65px #10b98106,
    0 0 0 130px #10b98104;
  z-index: -1;
  pointer-events: none;
}
.model-story .eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.model-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 5px #10b98112;
}
.model-story h2 {
  font-family: var(--display);
  font-size: clamp(52px, 5.5vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 26px 0 22px;
}
.model-story h2 > span {
  color: #38bdf8;
  background: linear-gradient(90deg, #38bdf8, #10b981);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.model-intro {
  font-size: 15px;
  line-height: 1.8;
  max-width: 47ch;
  color: #94a3b8;
  margin-bottom: 22px;
}
.model-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.model-tags > span {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #10b98126;
  background: #10b98108;
  color: #cbd5e1;
}
.model-story .button.primary {
  background: #10b981;
  color: #042f2e;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  gap: 24px;
  min-height: 46px;
}
.model-disclaimer {
  font-size: 10px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 55ch;
  margin: 15px 0 0;
}
.model-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}
.model-success > .eyebrow {
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: 0.2em;
}
.model-ring {
  width: clamp(210px, 23vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#10b981 var(--success), #ffffff10 0);
  padding: 9px;
  box-shadow: 0 0 60px #10b9810a;
  margin: 20px 0 24px;
  transform: rotate(-90deg);
}
.model-ring > div {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111827;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(90deg);
}
.model-ring strong {
  font-family: var(--display);
  font-size: clamp(72px, 9vw, 120px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.model-ring strong small {
  font-size: 0.34em;
  margin-left: 5px;
  color: #10b981;
}
.model-ring > div > span {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
}
.model-result-counts {
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: #94a3b8;
}
.model-result-counts > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.model-result-counts b {
  color: #f8fafc;
  font-size: 17px;
}
.result-key {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}
.result-key.won {
  background: #10b981;
}
.result-key.lost {
  background: #f43f5e;
}
.model-success > p:last-child {
  font-size: 10px;
  color: #94a3b8;
  max-width: 30ch;
  line-height: 1.6;
  margin-top: 14px;
}
.model-filter-alert {
  padding: 14px 18px;
  border: 1px solid var(--warn);
  border-radius: 12px;
  font-size: 13px;
  color: var(--warn);
  background: var(--warn-soft);
}
.model-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 16px;
  margin: 18px 0 32px;
}
.model-evidence-grid > .card {
  margin: 0;
  padding: 26px;
  min-width: 0;
  border-radius: 22px;
}
.model-trajectory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.model-evidence-grid h3 {
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 32px);
  margin: 6px 0;
}
.model-evidence-grid .eyebrow {
  font-size: 10px;
}
.model-profit-tag {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--accent-text);
  text-align: right;
}
.model-profit-tag small {
  display: block;
  font:
    10px Inter,
    sans-serif;
  color: var(--muted);
  margin-top: 4px;
}
.model-trajectory.is-negative .model-profit-tag {
  color: var(--danger);
}
.model-curve {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 22px;
  overflow: visible;
  color: var(--accent-text);
}
.model-trajectory.is-negative .model-curve {
  color: var(--danger);
}
.model-curve text {
  font:
    11px Inter,
    sans-serif;
  fill: var(--muted);
}
.model-grid-line {
  stroke: var(--line);
  stroke-dasharray: 3 6;
}
.model-zero {
  stroke: var(--muted);
  stroke-opacity: 0.5;
  stroke-dasharray: 5 5;
}
.model-chart-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 0;
  flex-wrap: wrap;
}
.model-chart-caption > span:last-child {
  font-weight: 700;
  color: var(--text);
}
.model-curve-data {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 12px;
}
.model-curve-data summary {
  color: var(--muted);
  cursor: pointer;
}
.model-data-scroll {
  overflow: auto;
  max-height: 260px;
  margin-top: 12px;
}
.model-data-scroll table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.model-data-scroll th,
.model-data-scroll td {
  padding: 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.model-data-scroll th:first-child {
  text-align: left;
}
.model-data-scroll caption {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  padding: 8px;
}
.model-chart-empty {
  min-height: 210px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}
.model-form > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  max-width: 38ch;
}
.model-form-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  margin: 22px 0;
}
.model-form-result {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 800;
  cursor: help;
}
.model-form-result.lost {
  background: var(--danger-soft);
  color: var(--danger);
}
.model-form-result:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.model-result-tip {
  display: none;
  position: absolute;
  z-index: 3;
  bottom: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 600;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.model-result-tip small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.model-form-result:is(:hover, :focus-visible) .model-result-tip {
  display: block;
}
.model-form-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.model-form-summary > strong {
  font-family: var(--display);
  font-size: 52px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.model-form-summary strong > span {
  font-size: 26px;
  color: var(--muted);
}
.model-form-summary > span {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.model-form > a {
  font-size: 12px;
  color: var(--accent-text);
}
.model-section-title {
  margin: 0 0 14px;
}
.model-section-title h3 {
  font-family: var(--display);
  font-size: 30px;
}
.model-section-title > span {
  font-size: 11px;
  color: var(--muted);
}
.model-method {
  padding: 18px 22px;
  margin: 18px 0;
}
.model-method summary {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.model-method p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
#model-journal {
  scroll-margin-top: 110px;
  margin-top: 24px;
  border-radius: 22px;
}
#model-journal h3 {
  font-family: var(--display);
  font-size: 32px;
  margin-top: 6px;
}
#model-journal > .archive-note {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
#model-journal .prediction-row {
  padding: 16px 10px;
  align-items: center;
  border-radius: 8px;
}
#model-journal .prediction-row:hover {
  background: var(--surface-2);
}
#model-journal .prediction-row > b {
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--accent-soft);
}
#model-journal .prediction-row.lost > b {
  background: var(--danger-soft);
}
@media (max-width: 900px) {
  .model-spotlight {
    gap: 20px;
    padding: 30px;
  }
  .model-story h2 {
    font-size: 56px;
  }
  .model-evidence-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .model-evidence-grid > .card {
    padding: 20px;
  }
  .model-form-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 240px;
  }
  .model-trajectory > header {
    align-items: flex-start;
  }
  .model-profit-tag {
    font-size: 24px;
  }
}
@media (max-width: 700px) {
  .model-page-heading {
    gap: 10px;
  }
  .model-page-heading .audit-badge {
    font-size: 9px;
  }
  .model-filter-panel {
    padding: 16px;
  }
  .model-filter-title {
    gap: 12px;
  }
  .model-period-shortcuts {
    width: 100%;
  }
  .model-period-shortcuts button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    min-height: 40px;
  }
  #predictions .prediction-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .model-spotlight {
    grid-template-columns: 1fr;
    padding: 26px;
    border-radius: 22px;
    gap: 30px;
  }
  .model-story h2 {
    font-size: clamp(40px, 12vw, 64px);
    margin-top: 22px;
  }
  .model-intro {
    font-size: 13px;
  }
  .model-tags {
    gap: 5px;
  }
  .model-tags > span {
    font-size: 9px;
    padding: 6px 8px;
  }
  .model-success {
    border-top: 1px solid #10b98122;
    padding-top: 24px;
  }
  .model-ring {
    width: 220px;
    margin: 16px 0;
  }
  .model-ring strong {
    font-size: 90px;
  }
  .model-evidence-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 26px;
  }
  .model-evidence-grid > .card {
    padding: 20px;
  }
  .model-form-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    max-width: none;
  }
  .model-form-summary {
    margin-bottom: 12px;
  }
  .model-section-title h3 {
    font-size: 28px;
  }
  .model-result-tip {
    width: 150px;
  }
  .model-form-result:nth-child(10n + 1) .model-result-tip,
  .model-form-result:nth-child(10n + 2) .model-result-tip,
  .model-form-result:nth-child(10n + 3) .model-result-tip,
  .model-form-result:nth-child(10n + 4) .model-result-tip {
    left: 0;
    right: auto;
  }
  .model-chart-caption {
    font-size: 9px;
  }
  .model-trajectory > header {
    gap: 8px;
  }
  .model-evidence-grid h3 {
    font-size: 25px;
  }
  .model-profit-tag {
    font-size: 23px;
  }
  #model-journal .prediction-row {
    gap: 8px;
    padding: 14px 2px;
  }
  .model-method {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .model-curve > .viz-line {
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
    animation: model-curve-in 1.2s ease forwards;
  }
  @keyframes model-curve-in {
    to {
      stroke-dashoffset: 0;
    }
  }
}

.model-story {
  min-width: 0;
}
.model-curve {
  stroke: none;
}
.model-curve text {
  stroke: none;
}
.model-more-filters {
  margin-top: 14px;
}
.model-more-filters > summary {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.model-more-filters[open] > summary {
  color: var(--accent-text);
}
.model-form-result:nth-child(10n + 1) .model-result-tip,
.model-form-result:nth-child(10n + 2) .model-result-tip,
.model-form-result:nth-child(10n + 3) .model-result-tip,
.model-form-result:nth-child(10n + 4) .model-result-tip {
  left: 0;
  right: auto;
}
@media (max-width: 700px) {
  .model-curve text {
    font-size: 20px;
  }
  .model-curve {
    min-height: 170px;
  }
  .model-story h2 > span {
    overflow-wrap: anywhere;
  }
  .model-intro {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .model-success {
    order: -1;
    border-top: 0;
    padding-top: 0;
    border-bottom: 1px solid #10b98122;
    padding-bottom: 24px;
  }
  .model-story h2 {
    font-size: clamp(38px, 11vw, 60px);
  }
  .model-story .eyebrow {
    font-size: 9px;
  }
}

/* BET-136 : argent engagé, potentiel et résultat officiel séparés. */
.personal-history {
  display: grid;
  gap: 16px;
}
.personal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.personal-filters label {
  display: grid;
  gap: 6px;
  flex: 1 1 160px;
  font-size: 13px;
}
.personal-filters input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
}
.personal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
}
.personal-summary > div {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.personal-summary dt {
  color: var(--muted);
  font-size: 12px;
}
.personal-summary dd {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.personal-tickets {
  display: grid;
  gap: 20px;
}
.personal-ticket {
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
.personal-ticket > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  flex-wrap: wrap;
}
.personal-ticket h3 {
  margin: 8px 0;
  font-size: 22px;
}
.personal-ticket h3 span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.personal-ticket small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.personal-ticket .status {
  white-space: normal;
  line-height: 1.5;
}
.ticket-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  margin: 16px 0;
}
.ticket-figures dt {
  font-size: 12px;
  color: var(--muted);
}
.ticket-figures dd {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 800;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.ticket-progress {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.personal-legs {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 8px;
  counter-reset: leg;
}
.personal-leg {
  counter-increment: leg;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.personal-leg strong {
  overflow-wrap: anywhere;
}
.personal-leg strong:before {
  content: counter(leg) '. ';
  color: var(--muted);
}
.personal-leg p {
  font-size: 13px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.personal-ticket .bet-details > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  color: var(--accent-text);
  font-size: 13px;
}
.personal-ticket .bet-details p,
.system-breakdown {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.system-breakdown li {
  padding-block: 6px;
}
.personal-ticket.void {
  border-style: dashed;
}
@media (max-width: 700px) {
  .personal-ticket {
    padding: 16px;
  }
  .ticket-figures {
    gap: 8px;
  }
  .ticket-figures dd {
    font-size: 19px;
  }
  .personal-leg {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
  .personal-leg > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .personal-filters label:last-of-type {
    flex-basis: 100%;
  }
  .personal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .personal-summary > div {
    padding: 12px;
  }
  .personal-summary dd {
    font-size: 20px;
  }
}

/* BET-137 : le match et le choix avant les analyses. */
.match-filter-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}
.match-filter-context p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.match-filter-context button {
  min-height: 44px;
}
.selection-feedback {
  margin: 8px 0;
  padding: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}
.selection-feedback[hidden] {
  display: none;
}
.match-analysis-disclosure > .match-analysis {
  padding-top: 12px;
}
.match-secondary > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}
@media (max-width: 700px) {
  #matches .section-heading {
    gap: 12px;
  }
  .match-card {
    padding: 16px;
    gap: 14px;
  }
  .match-head {
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  .match-league {
    min-width: 0;
    flex-wrap: wrap;
  }
  .match-league b {
    overflow-wrap: anywhere;
  }
  .match-teams {
    grid-template-columns: minmax(0, 1fr) minmax(72px, auto) minmax(0, 1fr);
    gap: 8px;
  }
  .match-teams .team {
    min-width: 0;
    min-height: 44px;
  }
  .match-teams .team strong {
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .match-teams .crest {
    width: 36px;
    height: 36px;
  }
  .match-teams .countdown strong {
    font-size: 19px;
  }
  .match-teams .kickoff small {
    font-size: 10px;
  }
  .match-teams .live-badge {
    white-space: normal;
    font-size: 10px;
  }
  .market {
    min-height: 92px;
    padding: 10px 6px;
  }
  .market > span:first-child {
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .team-favorite,
  .favorite-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  .filters .filter,
  .date-navigator button,
  .details-button,
  .confidence-button {
    min-height: 44px;
  }
  .match-card .analysis {
    gap: 8px;
    flex-wrap: wrap;
  }
  .match-filter-context {
    gap: 4px;
  }
  .builder {
    overscroll-behavior: contain;
    scroll-padding-block: 56px 24px;
  }
  .mobile-nav [data-mobile-target='builder'] {
    color: var(--accent-text);
    box-shadow: inset 0 0 0 1px var(--line-strong);
  }
  #matches {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
  .market.selected {
    outline: 2px solid var(--accent-text);
    outline-offset: -2px;
  }
  .market.selected:after {
    color: var(--on-accent);
  }
}

/* BET-138 : règles communes aux parcours et aux modules chargés à la demande. */
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}
:where(input, textarea) {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px;
  max-width: 100%;
  box-sizing: border-box;
}
:where(button, input, select, textarea):disabled {
  cursor: not-allowed;
}
:where(button) {
  touch-action: manipulation;
}
:where(.button, .icon-button, .text-button, .period-switch button, .community-tabs button) {
  min-height: 44px;
}
:where(.icon-button) {
  min-width: 44px;
}
:where(.status, .status-pill, .cert-tag) {
  line-height: 1.5;
  max-width: 100%;
}
:where(.empty) {
  padding: 24px 16px;
  line-height: 1.7;
  text-align: center;
  overflow-wrap: anywhere;
}
:where(.section-subtitle, .archive-note, .muted) {
  line-height: 1.65;
}
:where(dialog) {
  overscroll-behavior: contain;
  scroll-padding-block: 80px 24px;
}
:where(dialog input, dialog textarea, dialog select) {
  scroll-margin-block: 80px 24px;
}
:where(.section-heading, .modal-head) > * {
  min-width: 0;
}
:where(.section-heading h2, .modal-head h2, .profile-heading h2) {
  overflow-wrap: anywhere;
}
:where(.stats-grid strong, .prediction-kpi-grid strong, .ticket-totals strong, .bankroll-amount) {
  font-variant-numeric: tabular-nums;
}
:where(.button, .text-button) {
  white-space: normal;
  text-align: center;
}
:where(.button) {
  line-height: 1.4;
}
@media (max-width: 700px) {
  :where(input, textarea) {
    font-size: 16px;
    min-height: 48px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .section-heading > .button {
    max-width: 100%;
  }
  .mobile-nav button {
    font-size: 10px;
    line-height: 1.25;
  }
  .heading-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  :where(.button, .status, .market.selected) {
    border: 1px solid ButtonText;
  }
  :where(button, a, input, select, textarea, summary):focus-visible {
    outline-color: Highlight;
  }
}

/* BET-54 : le texte d’un défi fermé reste lisible, son état est explicite. */
.daily-row.closed .daily-teams {
  opacity: 1;
}
.daily-odd {
  min-height: 44px;
}
.daily-row[aria-busy='true'] .daily-note:last-child {
  color: var(--accent-text);
}

/* BET-139 : un accès explicite aux équipes, puis deux lectures complémentaires. */
.match-resources {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.match-resource-heading.analysis {
  border: 0;
  padding: 0;
  margin: 0;
}
.match-stats-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  min-height: 64px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  color: var(--accent-text);
}
.match-stats-button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.match-stats-button small {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}
.match-stats-button svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.match-resource-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.match-resource-panels > .match-secondary {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.match-resource-panels > .match-secondary:only-child,
.match-resource-panels > .match-secondary[open] {
  grid-column: 1/-1;
}
.match-resource-panels > .match-secondary > summary {
  min-height: 44px;
  padding: 10px 12px;
  line-height: 1.5;
  font-size: 12px;
  font-weight: 650;
}
.match-resource-panels > .match-secondary[open] {
  padding: 0 12px 12px;
}
.match-resource-panels > .match-secondary[open] > summary {
  margin-inline: -12px;
}
.match-resource-panels .confidence-button {
  display: block;
  margin: 0 0 12px;
  text-align: left;
  line-height: 1.5;
  padding: 8px 0;
  min-height: 44px;
}
.match-resource-panels .match-analysis {
  padding-top: 0;
}
.match-resource-panels .bookmaker-unavailable {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .match-resource-panels {
    grid-template-columns: minmax(0, 1fr);
  }
  .match-resources {
    gap: 8px;
    padding-top: 12px;
  }
  .match-stats-button {
    padding: 12px;
  }
  .match-resource-panels > .match-secondary > summary {
    font-size: 13px;
  }
}

/* BET-141 : pronostic, cote et confiance avant les métadonnées. */
.market-grid-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
  container-type: inline-size;
}
.market-grid-wrap .markets {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.market-grid-wrap .market {
  display: grid;
  grid-template-rows: minmax(38px, auto) auto minmax(49px, auto) auto;
  align-content: start;
  align-items: start;
  gap: 8px;
  padding: 12px;
  min-width: 0;
  min-height: 0;
}
.market-grid-wrap .market:is(.has-value, .highest-confidence) {
  padding: 11px;
}
.market-grid-wrap .market > .market-label {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}
.market-numbers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.market-price {
  display: grid;
  gap: 3px;
}
.market-price > small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}
.market-grid-wrap .market-price > strong {
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.market-confidence {
  display: grid;
  gap: 3px;
  text-align: right;
}
.market-confidence > b {
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  color: var(--accent-text);
}
.market-confidence > b > span {
  font-size: 12px;
}
.market-confidence > small {
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
}
.market-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 49px;
  align-items: flex-start;
  align-content: flex-start;
}
.market-grid-wrap .market .confidence-highlight,
.market-grid-wrap .market .market-value {
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 750;
}
.market-grid-wrap .market .market-value {
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 3px 5px;
}
.market-meta {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  width: 100%;
  align-self: end;
}
.market-grid-wrap .market-meta .value {
  font-size: 10px;
  letter-spacing: 0;
}
.market-meta > small {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
.market-meta > .offer-date.stale,
.market-meta > .offer-date.unknown {
  font-weight: 650;
  color: var(--text);
}
.market-grid-wrap .market.selected .market-confidence > b,
.market-grid-wrap .market.selected .market-label,
.market-grid-wrap .market.selected small {
  color: var(--on-accent);
}
.market-grid-wrap .market.selected .market-meta {
  border-color: color-mix(in srgb, var(--on-accent) 25%, transparent);
}
.market-grid-wrap .market.selected .confidence-highlight,
.market-grid-wrap .market.selected .market-value {
  background: color-mix(in srgb, var(--on-accent) 10%, transparent);
  color: var(--on-accent);
  border-color: color-mix(in srgb, var(--on-accent) 30%, transparent);
}
.market-source-details.match-secondary {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.market-source-details > summary {
  font-size: 12px;
  min-height: 44px;
  align-content: center;
  color: var(--muted);
}
.market-source-details > p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 12px;
}
.market-source-details > ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.market-source-details li {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.market-source-details li > span {
  color: var(--muted);
}
@media (max-width: 700px) {
  .market-grid-wrap .markets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .market-grid-wrap .market {
    gap: 10px;
    padding: 12px 10px;
  }
  .market-grid-wrap .market:is(.has-value, .highest-confidence) {
    padding: 11px 9px;
  }
  .market-grid-wrap .market-price > strong {
    font-size: 30px;
  }
  .market-confidence > b {
    font-size: 21px;
  }
  .market-grid-wrap .market > .market-label {
    font-size: 13px;
  }
  .market-grid-wrap .market-badges {
    min-height: 49px;
  }
}

@container (max-width:660px) {
  .market-grid-wrap .markets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@container (max-width:430px) {
  .market-grid-wrap .markets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* BET-178 : badge contenu, grille explicite et filigrane décoratif. */
section.club-ranking {
  padding: clamp(14px, 3vw, 24px);
}
.special-head {
  flex-wrap: wrap;
  isolation: isolate;
}
.special-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.special-head .competition-badge {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  max-width: 32px;
  overflow: hidden;
  contain: size layout;
}
.special-head .competition-badge img {
  display: block;
  width: 32px;
  height: 32px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.grid-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: auto;
}
.grid-entry small {
  font-size: 12px;
  color: var(--muted);
}
.grid-guide {
  margin: 20px 0 12px;
  padding: 18px;
  border: 1px solid var(--accent-text);
  border-radius: 16px;
  background: var(--accent-soft);
}
.grid-guide h3 {
  margin: 6px 0;
}
.grid-guide ol {
  padding-left: 20px;
  margin: 10px 0 0;
  line-height: 1.7;
  font-size: 14px;
}
.special-pick-status {
  grid-column: 1/-1;
  font-size: 12px;
}
.special-match[aria-busy='true'] {
  border-color: var(--accent-text);
}
.league-ranking-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 16px;
  margin-top: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.league-ranking-surface > *:not(.league-watermark) {
  position: relative;
  z-index: 1;
}
.league-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;
  opacity: 0.06;
  overflow: hidden;
}
.league-watermark img {
  width: min(70%, 280px);
  height: 280px;
  max-height: 85%;
  object-fit: contain;
}
.league-ranking-surface .club-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}
@media (max-width: 700px) {
  .grid-entry {
    margin-left: 0;
    width: 100%;
  }
  .grid-entry .button {
    width: 100%;
    min-height: 48px;
  }
  .special-dialog {
    padding: 16px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  .special-head h2 {
    font-size: 24px;
  }
  .special-markets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .special-markets .daily-odd {
    min-width: 0;
    min-height: 48px;
    padding: 8px 4px;
  }
  .grid-guide,
  .league-ranking-surface {
    padding: 12px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .league-ranking-surface {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.special-dialog .dialog-tools {
  top: -22px;
  margin: -22px -22px 12px;
  padding: 16px 22px 12px;
}
@media (max-width: 700px) {
  .special-dialog .dialog-tools {
    top: -16px;
    margin: -16px -16px 12px;
    padding: 12px 16px;
  }
}

/* BET-144 : un rendez-vous quotidien, lisible dans les deux thèmes. */
.daily-settings {
  max-width: 820px;
  margin: 0 auto;
}
.daily-settings .notification-heading {
  margin-bottom: 28px;
}
.daily-settings .notification-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 8px 0 12px;
}
.daily-mail-card {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.daily-mail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.daily-mail-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent);
  color: #042f2e;
  font-size: 30px;
}
.daily-mail-card h3 {
  font-size: 26px;
  margin: 0 0 12px;
}
.daily-mail-intro {
  font-size: 17px;
  line-height: 1.7;
  max-width: 58ch;
}
.daily-mail-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0;
}
.daily-mail-summary span {
  flex: 1;
  min-width: 145px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--accent-text);
  font-size: 12px;
}
.daily-mail-summary b {
  color: var(--text);
  font-size: 14px;
}
.daily-consent {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin-top: 26px;
  align-items: flex-start;
}
.daily-consent input {
  flex-shrink: 0;
  margin-top: 5px;
  width: 20px;
  height: 20px;
  accent-color: var(--accent-text);
}
.daily-consent small {
  display: block;
  margin-top: 8px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
}
.daily-schedule {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.daily-schedule label {
  display: grid;
  gap: 12px;
  font-weight: 600;
}
.daily-schedule input {
  font-size: 22px;
  min-height: 52px;
  max-width: 100%;
}
.daily-schedule p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0;
}
.daily-mail-card .notification-save {
  margin-top: 28px;
  align-items: flex-end;
}
.daily-mail-card [data-notification-feedback] {
  color: var(--accent-text);
  line-height: 1.6;
}
.daily-mail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.daily-mail-card button {
  min-height: 44px;
}
.daily-address {
  color: var(--accent-text);
  font-size: 13px;
}
.daily-associate {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
@media (max-width: 600px) {
  .daily-mail-summary {
    gap: 8px;
  }
  .daily-mail-summary span {
    min-width: 0;
    padding: 12px;
    font-size: 11px;
  }
  .daily-mail-summary b {
    font-size: 12px;
  }
  .daily-schedule {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }
  .daily-mail-card .notification-save {
    align-items: stretch;
    flex-direction: column;
  }
  .daily-mail-card .notification-save button {
    width: 100%;
  }
  .daily-mail-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* BET-142 : le choix et le tableau forment un seul panneau. */
.club-ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.club-ranking-heading h3 {
  margin: 0;
}
.club-ranking-heading label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.club-ranking-heading select {
  min-width: 220px;
  max-width: 100%;
}
.club-ranking > .card,
.club-ranking > #club-general > .card {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}
.club-ranking .league-head {
  margin-top: 0;
}
@media (max-width: 700px) {
  .club-ranking-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .club-ranking-heading select {
    width: 100%;
    min-width: 0;
  }
}
/* BET-145 */
.profile-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.profile-connections .button {
  min-height: 44px;
}
.connections-panel ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}
.connections-panel a {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-text);
  overflow-wrap: anywhere;
}
.connections-panel .settings-row {
  align-items: center;
  justify-content: space-between;
}
/* BET-148 : trophées et radar dans la vue d'ensemble. */
.overview-grid.has-hero {
  grid-template-columns: minmax(160px, 0.7fr) minmax(190px, 0.8fr) minmax(300px, 1.5fr);
  gap: 16px;
  align-items: start;
}
.overview-trophies .settings-row {
  justify-content: space-between;
  align-items: center;
}
.overview-trophies .badge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.overview-trophies .badge {
  padding: 10px;
  min-width: 0;
}
.overview-side .radar-box {
  max-width: none;
}
.overview-side .radar {
  display: block;
  max-width: 260px;
  margin: auto;
}
.overview-card {
  min-width: 0;
}
.overview-trophies h3 {
  margin: 0;
}
.overview-trophies .button {
  min-height: 40px;
}
.overview-grid .avatar-hero {
  max-height: 370px;
}
@media (max-width: 1100px) {
  .overview-grid.has-hero {
    grid-template-columns: minmax(150px, 0.7fr) minmax(190px, 1fr);
  }
  .overview-side {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .overview-trophies {
    grid-column: 1/-1;
  }
  .overview-side .radar-box {
    grid-column: 2;
    grid-row: 2/5;
  }
  .overview-grid .avatar-hero {
    max-height: 280px;
  }
}
/* BET-149 : un centre de contrôle personnel, lisible dans les deux thèmes. */
.account-settings {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.account-intro {
  grid-column: 1/-1;
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 100% 0, var(--accent-soft), transparent 65%), var(--surface);
}
.account-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--accent-text);
}
.account-intro h3 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  margin: 14px 0;
}
.account-intro p,
.account-group-title p {
  color: var(--muted);
  margin: 6px 0;
  font-size: 13px;
}
.account-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.account-status span {
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}
.account-group {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.account-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
}
.account-group-title > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--accent-text);
  font-weight: 800;
}
.account-group-title h3 {
  margin: 0;
  font-size: 18px;
}
.account-settings .settings-card {
  padding: 20px;
  border-radius: 18px;
}
.account-settings .settings-row {
  margin-top: 14px;
}
.account-settings .settings-row input {
  min-width: 0;
  width: 100%;
  flex-basis: 200px;
}
.account-settings .settings-row button {
  min-height: 44px;
}
.account-settings .switch-line {
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  cursor: pointer;
}
.account-settings .switch-line input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.account-settings .switch-line small {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 5px;
}
.account-danger {
  padding: 16px;
  border: 1px solid var(--danger);
  border-radius: 22px;
}
.account-danger .account-group-title > span {
  color: var(--danger);
  border-color: var(--danger);
}
.account-danger .settings-card {
  border: 0;
  background: var(--surface-2);
}
.settings-feedback {
  grid-column: 1/-1;
  margin: 0;
  color: var(--accent-text);
  font-size: 14px;
}
.settings-feedback.failed {
  color: var(--danger);
}
.account-settings :is(input, button, summary):focus-visible,
.profile-connections button:focus-visible,
.connections-panel a:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 4px;
}
@media (max-width: 760px) {
  .account-settings {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .account-intro {
    padding: 22px;
  }
  .account-status {
    flex-direction: column;
    align-items: flex-start;
  }
  .account-settings .settings-row {
    flex-direction: column;
  }
  .account-settings .settings-row input {
    flex-basis: auto;
  }
  .account-settings .settings-row button {
    width: 100%;
  }
  .account-danger {
    padding: 10px;
  }
  .account-settings .settings-card {
    padding: 16px;
  }
}
@media (max-width: 600px) {
  .overview-grid.has-hero {
    grid-template-columns: 1fr;
  }
  .overview-grid .avatar-hero {
    max-height: 220px;
    max-width: 220px;
    margin: auto;
  }
  .overview-side {
    display: flex;
    grid-column: auto;
    order: -1;
  }
  .overview-card {
    max-width: 300px;
    width: 100%;
    margin: auto;
  }
  .overview-trophies {
    order: -1;
  }
  .overview-grid .overview-side {
    gap: 10px;
  }
  .overview-trophies .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1101px) {
  .overview-grid.has-hero {
    grid-template-columns: minmax(140px, 0.6fr) minmax(180px, 0.75fr) minmax(480px, 2.2fr);
  }
  .overview-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
    gap: 12px;
    align-items: start;
  }
  .overview-side .radar-box {
    grid-column: 2;
    grid-row: 1/5;
  }
  .overview-trophies {
    grid-column: 1;
  }
  .overview-side .key-numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-side .radar {
    max-width: 230px;
  }
  .overview-trophies .badge-grid {
    grid-template-columns: 1fr;
  }
}

/* BET-157 : familles secondaires compactes, état natif accessible. */
.market-categories {
  display: grid;
  gap: 8px;
  margin: 4px 0 12px;
}
.market-categories:empty {
  display: none;
}
.market-category.match-secondary {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  min-width: 0;
}
.market-category > summary {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  min-height: 44px;
}
.market-category > summary > span {
  float: right;
  color: var(--muted);
  font-size: 12px;
}
.market-category[open] > summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  background: var(--accent-soft);
}
.market-category > .markets {
  padding: 0 8px 8px;
}
.market-category > summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
/* BET-158 : résumé court et métadonnées à la demande. */
.section-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.section-meta #match-count {
  font-weight: 700;
  color: var(--text);
}
.data-details {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.data-details > summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  width: fit-content;
}
.data-details[open] {
  padding-bottom: 8px;
}
.data-details .data-source {
  max-width: 72ch;
  font-size: 12px;
  line-height: 1.65;
  margin: 4px 0;
}
.data-details > summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
/* BET-159 : parcours de composition et récapitulatif. */
.builder-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.builder-tabs button {
  flex: 1;
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.builder-tabs [aria-selected='true'] {
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow);
}
.builder-tabs button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
.builder > [role='tabpanel'][hidden] {
  display: none !important;
}

.builder-card.card,
.ticket {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  gap: 12px;
}
#ticket-controls:not([hidden]),
#ticket-empty:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#ticket-empty > .button {
  align-self: flex-start;
}
.builder-card h2 {
  font-size: 26px;
  text-transform: none;
  line-height: 1.15;
}
.builder-card > .muted,
#ticket-controls > .muted {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.builder-controls {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  gap: 16px;
}
.builder-controls select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
.builder-controls .range-label span {
  font-size: 13px;
}
.builder-controls output {
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  font-size: 20px;
}
.composer-feedback {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--accent-text);
}
.composer-help {
  font-size: 12px;
  color: var(--muted);
}
.composer-help summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
}
.composer-help p {
  line-height: 1.6;
  margin: 6px 0;
}
.safe-pick {
  align-items: start;
  gap: 10px;
}
.safe-pick > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.suggestion-values {
  display: grid;
  gap: 5px;
  text-align: right;
  flex: none;
  font-size: 12px;
}
.suggestion-values small {
  font-size: 10px;
}
.suggestion-values em {
  font-style: normal;
  font-size: 10px;
  color: var(--accent-text);
}
.ticket-head h3 {
  font-size: 25px;
  text-transform: none;
}
.ticket-head small,
.ticket-step {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.ticket-step {
  margin: 8px 0 2px;
}
.bet-mode {
  border-radius: var(--radius-sm);
}
.bet-mode button {
  border-radius: 8px;
  min-height: 44px;
}
.ticket-price {
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 12px;
}
.ticket-price small {
  font-size: 10px;
  max-width: 100px;
  color: var(--muted);
}
.ticket-row {
  padding: 12px;
  gap: 8px;
}
.ticket-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ticket-row > div > strong {
  font-size: 13px;
  line-height: 1.5;
}
.ticket-row .remove {
  width: 44px;
  height: 44px;
}
.ticket-summary {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.ticket-totals .total-main {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--muted);
}
.ticket-totals .total-main strong {
  color: var(--accent-text);
}
.ticket-stake > span {
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.ticket-stake strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ticket #stake {
  font-size: 20px;
  min-height: 48px;
}
.builder button:focus-visible,
.builder summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
@media (min-width: 1101px) {
  .builder {
    position: sticky;
    top: 96px;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 4px;
    align-self: start;
  }
}
@media (max-width: 400px) {
  .suggestion-values {
    flex: 1;
    min-width: 90px;
  }
  .safe-pick {
    flex-wrap: wrap;
  }
  .ticket-price {
    max-width: 90px;
  }
  .ticket-row {
    padding: 10px 8px;
  }
  .control-pair {
    gap: 8px;
  }
}

/* BET-160 : indicateurs accessibles en permanence dans la fiche match. */
.match-indicators {
  min-width: 0;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.match-indicators > h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--accent-text);
}

/* BET-161 : une lecture progressive, du match aux choix détaillés. */
.match-card,
.match-card.spotlight {
  padding: 0;
  gap: 20px;
  overflow: hidden;
  background: var(--surface);
  border-color: var(--line-strong);
}
.match-card > .market-grid-wrap,
.match-card > .match-resources,
.match-card > .match-overview,
.match-card > .live-note,
.match-card > .past-prediction,
.match-card > .selection-feedback {
  margin-inline: 22px;
}
.match-hero {
  position: relative;
  isolation: isolate;
  padding: 20px 24px 34px;
  background: #0b1c31 url('./match-stadium.svg') center 60% / cover;
  color: #fff;
}
.match-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #06112455, #06112422 50%, #06112477);
}
.match-hero .match-head {
  position: relative;
  z-index: 1;
}
.match-hero .match-league,
.match-hero .match-date {
  color: #e2e7ed;
}
.match-hero .match-league b {
  color: #fff;
}
.match-hero .match-favorites {
  margin-top: 6px;
}
.match-hero .team-favorite {
  background: #0b1b30b8;
  border-color: #ffffff60;
  color: #fff;
}
.match-hero .team-favorite.active {
  background: var(--accent);
  color: var(--on-accent);
}
.match-hero .match-teams {
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) minmax(0, 1fr);
  margin-top: -24px;
}
.match-hero .team {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  color: #fff;
}
.match-hero .team strong {
  font-family: inherit;
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1.1;
  text-align: center;
  text-transform: none;
  text-shadow: 0 2px 8px #0008;
}
.match-hero .crest {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 4px 8px #0006);
}
.match-hero .kickoff,
.match-hero .kickoff.countdown {
  padding: 10px 14px;
  background: #09172c90;
  border: 1px solid #ffffff40;
  border-radius: 16px;
}
.match-hero .kickoff small {
  color: #e2e7ed;
}
.match-hero .kickoff strong,
.match-hero .kickoff.countdown strong {
  color: #10b981;
  font-size: clamp(24px, 3.4vw, 40px);
}
.match-hero .final-score small,
.match-hero .live-updated {
  color: #e2e7ed;
}
.match-overview {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
}
.match-overview:empty {
  display: none;
}
.match-overview > .match-outcome:only-child {
  grid-column: 1/-1;
}
.match-card .match-selection {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 10px 18px;
  padding: 20px;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(
    125deg,
    var(--surface),
    var(--accent-soft) 58%,
    color-mix(in srgb, var(--accent) 60%, var(--surface))
  );
  color: var(--text);
  min-width: 0;
}
.match-selection .selection-eyebrow {
  grid-column: 1/-1;
  color: var(--accent-text);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.match-card .match-selection .selection-title {
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.12;
  padding: 0;
  margin: 0;
  border-radius: 0;
  align-self: center;
  text-align: left;
}
.match-selection > small {
  grid-column: 1;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.match-selection .selection-price {
  grid-column: 2;
  grid-row: 2/4;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-width: 88px;
  align-self: center;
  background: #111b22;
  color: #fff;
  padding: 14px;
  border-radius: 16px;
  letter-spacing: 0;
}
.match-selection .selection-price small {
  color: #e2e7ed;
  font-size: 10px;
}
.selection-price b {
  font-size: 36px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.match-card .match-selection.selected {
  outline: 2px solid var(--accent-text);
  outline-offset: -3px;
}
.match-selection.selected:after {
  content: '✓ Choisi';
  font-size: 12px;
  font-weight: 750;
  color: var(--accent-text);
}
.match-outcome {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  justify-content: center;
  gap: 18px;
}
.match-outcome h3,
.predictions-heading h3 {
  margin: 0;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.match-outcome .prob-legend {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 8px;
  text-align: center;
  font-size: 12px;
}
.match-outcome .prob-legend span {
  display: grid;
  gap: 6px;
  align-content: start;
  overflow-wrap: anywhere;
}
.match-outcome .prob-legend b {
  color: var(--text);
  font-size: 26px;
  white-space: nowrap;
}
.match-outcome .prob-track {
  order: 2;
  height: 14px;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
}
.match-outcome .prob-track i {
  border-radius: 0;
}
.predictions-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.predictions-heading .analysis-note {
  font-size: 13px;
}
.market-grid-wrap {
  gap: 10px;
}
.market-grid-wrap .featured-markets {
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}
.market-grid-wrap .featured-markets > .market:first-child {
  grid-row: 1/3;
}
.market-grid-wrap .market {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  text-align: left;
  box-shadow: 0 2px 5px #00000008;
}
.market-grid-wrap .market:is(.highest-confidence, .has-value) {
  padding: 14px;
  animation: none;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}
.market-grid-wrap .market.highest-confidence {
  border-color: var(--accent-text);
  background: linear-gradient(130deg, var(--surface), var(--accent-soft));
}
.market-grid-wrap .market > .market-label {
  font-size: 15px;
  line-height: 1.25;
}
.market-grid-wrap .market-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.market-grid-wrap .market-price > strong {
  font-family: inherit;
  font-size: 23px;
  font-weight: 800;
}
.market-confidence {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 5px;
}
.market-confidence > small {
  font-size: 10px;
}
.market-confidence > small br {
  display: none;
}
.market-confidence > b {
  font-size: 20px;
}
.market-grid-wrap .market-badges {
  min-height: 0;
  gap: 4px;
}
.market-badges:empty {
  display: none;
}
.market-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 0;
  border: 0;
  margin-top: auto;
}
.market-grid-wrap .market-meta .value,
.market-meta > small {
  font-size: 10px;
}
.confidence-track {
  display: block;
  height: 7px;
  background: var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.confidence-track i {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.confidence-ribbon {
  display: block;
  margin: -14px -14px 4px;
  padding: 10px 12px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 17px 17px 0 0;
  font-weight: 800;
  font-size: 12px;
}
.featured-markets > .market:first-child .market-label {
  font-size: 24px;
  margin-block: 6px;
}
.featured-markets > .market:first-child .market-numbers {
  margin-block: 8px;
}
.featured-markets > .market:first-child .market-price {
  display: grid;
  gap: 6px;
}
.featured-markets > .market:first-child .market-price > strong {
  font-size: 38px;
}
.featured-markets > .market:first-child .market-confidence {
  display: grid;
  gap: 6px;
}
.featured-markets > .market:first-child .market-confidence > b {
  font-size: 32px;
}
.featured-markets > .market:first-child .confidence-track {
  height: 10px;
}
.market-grid-wrap .market.selected {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent-text);
}
.market.selected .confidence-track {
  background: #15241133;
}
.market.selected .confidence-track i {
  background: var(--on-accent);
}
.market-categories {
  grid-template-columns: 1fr 1fr;
  margin: 4px 0 0;
}
.market-category[open] {
  grid-column: 1/-1;
}
.market-grid-wrap .market-category .markets {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.match-resources {
  padding-top: 0;
  border-top: 0;
  gap: 14px;
  margin-bottom: 20px;
}
.match-indicators {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-2);
}
.match-stats-title {
  font-family: inherit;
  text-transform: none;
  letter-spacing: -0.03em;
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  text-align: left;
}
.stats-team-names {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.stats-team-names > span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.stats-team-names > span:last-child {
  text-align: right;
  flex-direction: row-reverse;
}
.stats-team-names .crest {
  width: 38px;
  height: 38px;
  flex: none;
}
@container (max-width:570px) {
  .market-grid-wrap .featured-markets {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .market-grid-wrap .featured-markets > .market:first-child {
    grid-column: 1/-1;
    grid-row: auto;
  }
  .featured-markets > .market:first-child .market-numbers {
    margin: 0;
  }
  .featured-markets > .market:first-child .market-price {
    display: flex;
  }
  .featured-markets > .market:first-child .market-confidence {
    display: flex;
    flex-direction: row-reverse;
  }
  .featured-markets > .market:first-child .market-label {
    font-size: 22px;
  }
  .market-grid-wrap .market-numbers {
    flex-wrap: wrap;
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .match-card,
  .match-card.spotlight {
    gap: 16px;
    padding: 0;
  }
  .match-card > .market-grid-wrap,
  .match-card > .match-resources,
  .match-card > .match-overview,
  .match-card > .live-note,
  .match-card > .past-prediction,
  .match-card > .selection-feedback {
    margin-inline: 12px;
  }
  .match-hero {
    padding: 16px 12px 26px;
  }
  .match-hero .match-teams {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) minmax(90px, auto) minmax(0, 1fr);
    margin-top: -14px;
  }
  .match-hero .team strong {
    font-size: 15px;
    line-height: 1.2;
  }
  .match-hero .crest {
    width: 48px;
    height: 48px;
  }
  .match-hero .kickoff,
  .match-hero .kickoff.countdown {
    padding: 9px 6px;
  }
  .match-hero .kickoff strong,
  .match-hero .kickoff.countdown strong {
    font-size: 23px;
  }
  .match-hero .kickoff small {
    font-size: 9px;
  }
  .match-overview {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .match-card .match-selection {
    padding: 16px;
    gap: 10px 12px;
  }
  .match-selection .selection-price {
    min-width: 75px;
    padding: 12px;
  }
  .selection-price b {
    font-size: 30px;
  }
  .match-outcome {
    padding: 16px;
    gap: 12px;
  }
  .match-outcome h3,
  .predictions-heading h3 {
    font-size: 20px;
  }
  .match-outcome .prob-legend b {
    font-size: 24px;
  }
  .market-grid-wrap .market,
  .market-grid-wrap .market:is(.has-value, .highest-confidence) {
    padding: 12px;
    gap: 9px;
  }
  .confidence-ribbon {
    margin: -12px -12px 0;
  }
  .market-grid-wrap .market > .market-label {
    font-size: 14px;
  }
  .market-grid-wrap .market-price > strong {
    font-size: 23px;
  }
  .market-categories {
    grid-template-columns: 1fr;
  }
  .match-indicators {
    padding: 12px;
  }
  .match-stats-title {
    font-size: 21px;
  }
  .stats-team-names > span {
    font-size: 12px;
  }
  .stats-team-names .crest {
    width: 30px;
    height: 30px;
  }
  .match-hero .final-score strong,
  .match-hero .live-score strong {
    font-size: 30px;
  }
}
.market-grid-wrap .market-numbers {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.market-grid-wrap .market-price {
  flex-shrink: 0;
}
.market-grid-wrap .market-price > strong,
.market-confidence > b {
  white-space: nowrap;
}
.market-confidence > small {
  max-width: 62px;
  line-height: 1.35;
}
.market-confidence {
  margin-left: auto;
}
.match-hero .kickoff small {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.4;
}
.match-hero .team strong {
  word-break: normal;
  overflow-wrap: normal;
}
.match-outcome .prob-legend span {
  grid-template-rows: minmax(34px, auto) auto;
  align-items: start;
}
.match-outcome .prob-legend b {
  align-self: end;
}
@media (max-width: 370px) {
  .match-hero .match-teams {
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
    gap: 4px;
  }
  .match-hero .team strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .match-hero .kickoff.countdown strong {
    font-size: 21px;
  }
  .match-hero .kickoff small {
    font-size: 8px;
  }
  .market-grid-wrap .market-confidence > small {
    font-size: 9px;
  }
  .market-confidence > b {
    font-size: 20px;
  }
  .featured-markets > .market:first-child .market-price > strong {
    font-size: 32px;
  }
  .featured-markets > .market:first-child .market-confidence > b {
    font-size: 28px;
  }
}

/* BET-162 : photo locale décorative, le stade générique reste derrière. */
.match-hero:has(.stadium-placeholder) {
  min-height: 340px;
  padding: 116px 24px 28px;
  background: #0b1c31;
}
.match-hero:has(.stadium-placeholder):before {
  background: linear-gradient(180deg, #06112442 0, #0611248f 38%, #061124ed 100%);
}
.match-hero:has(.stadium-placeholder) .match-teams {
  margin-top: 10px;
}
.match-stadium-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  opacity: 0;
  pointer-events: none;
}
.stadium-ready .match-stadium-photo {
  opacity: 1;
}
.stadium-name {
  display: none;
  position: absolute;
  top: 14px;
  left: 14px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 5px 8px;
  border-radius: 6px;
  background: #061124d9;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.stadium-name:hover,
.stadium-name:focus-visible {
  color: #fff;
  text-decoration: underline;
}
.stadium-ready .stadium-name {
  display: block;
}
.market-grid-wrap .market > .confidence-ribbon {
  color: var(--on-accent);
}

.stadium-placeholder {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(145deg, #132b4a, #245958 70%, #64748b);
}
.stadium-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.stadium-placeholder-name {
  position: absolute;
  top: 14px;
  left: 14px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 5px 8px;
  border-radius: 6px;
  background: #061124e8;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.stadium-placeholder-name small {
  display: block;
  font-size: 10px;
  color: #e2e7ed;
}
.stadium-ready .stadium-placeholder,
.stadium-ready .stadium-placeholder-name {
  visibility: hidden;
}
@media (max-width: 700px) {
  .match-hero:has(.stadium-placeholder) {
    min-height: 300px;
    padding: 88px 12px 22px;
  }
  .match-hero:has(.stadium-placeholder) .match-teams {
    margin-top: 8px;
  }
  .match-stadium-photo,
  .stadium-placeholder img {
    object-position: center 50%;
  }
  .stadium-name,
  .stadium-placeholder-name {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
}

/* BET-163 : personnalisation de la carte joueur (fond, police du numéro, effet brillant). La carte garde ses couleurs propres dans les deux thèmes. */
.player-card.cardbg-pitch {
  background:
    repeating-linear-gradient(180deg, #ffffff0f 0 18px, #0000 18px 36px),
    linear-gradient(155deg, #1f6b35, #0b2a16 80%);
}
.player-card.cardbg-night {
  background:
    radial-gradient(circle at 20% 18%, #f8fafccc 0 1px, #0000 2px),
    radial-gradient(circle at 72% 30%, #f8fafcaa 0 1px, #0000 2px),
    radial-gradient(circle at 40% 62%, #f8fafc99 0 1px, #0000 2px),
    radial-gradient(circle at 85% 78%, #f8fafcbb 0 1px, #0000 2px),
    linear-gradient(160deg, #1b2350, #05070f 82%);
}
.player-card.cardbg-carbon {
  background:
    repeating-linear-gradient(45deg, #ffffff0d 0 4px, #0000 4px 9px),
    linear-gradient(155deg, #2a2d31, #0d0e10 80%);
}
.player-card.cardbg-aurora {
  background: linear-gradient(180deg, #0f3d4a, #1f8a70 45%, #5b2a86 75%, #0a0c0b);
}
.player-card.cardfont-classic .card-overall {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
}
.player-card.cardfont-stencil .card-overall {
  font-family: 'Stencil', 'Arial Black', Impact, sans-serif;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.player-card.cardfont-retro .card-overall {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
}
.player-card.cardshine-gloss,
.player-card.cardshine-holo {
  overflow: hidden;
  isolation: isolate;
}
.player-card.cardshine-gloss::after,
.player-card.cardshine-holo::after {
  content: '';
  position: absolute;
  inset: -40% -60%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(115deg, #fff0 40%, #ffffff38 50%, #fff0 60%);
  transform: translateX(-60%);
  animation: card-shine 4.5s ease-in-out infinite;
}
.player-card.cardshine-holo::after {
  background: linear-gradient(
    115deg,
    #ff5ec400 20%,
    #ff5ec433 35%,
    #5ee7ff38 48%,
    #10b98133 60%,
    #a46bff00 75%
  );
  mix-blend-mode: screen;
}
@keyframes card-shine {
  0%,
  30% {
    transform: translateX(-60%);
  }
  70%,
  100% {
    transform: translateX(60%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .player-card.cardshine-gloss::after,
  .player-card.cardshine-holo::after {
    display: none;
    animation: none;
  }
}
.shop-card .player-card.card-preview {
  height: 116px;
  padding: 12px 10px;
  border-radius: 18px 18px 34px 34px/14px 14px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: none;
}
.shop-card .player-card.card-preview .card-overall {
  font-size: 52px;
}
.shop-card .player-card.card-preview small {
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* BET-163 : célébration d'un prono gagné (onglet Matchs) et effets de victoire en surimpression, sans bloquer l'interface. */
.victory-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 70;
  pointer-events: none;
}
.victory-pop {
  position: fixed;
  left: 50%;
  top: calc(var(--header-offset) + 12px);
  z-index: 71;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 12px 12px 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent-text);
  box-shadow: 0 18px 40px #0005;
  transform: translateX(-50%);
  animation: victory-in 0.35s ease-out;
}
.victory-avatar .avatar-3d {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  animation: victory-jump 0.7s ease-in-out 3;
}
.victory-avatar .avatar-3d b {
  font-size: 22px;
}
.victory-avatar .avatar-3d i,
.victory-avatar .avatar-3d span {
  width: 8px;
  height: 8px;
  top: 18px;
}
.victory-avatar .avatar-3d i {
  left: 16px;
}
.victory-avatar .avatar-3d span {
  right: 16px;
}
.victory-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.victory-text strong {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  color: var(--accent-text);
  text-transform: uppercase;
}
.victory-text small {
  color: var(--muted);
}
@keyframes victory-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
@keyframes victory-jump {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-18px) scale(1.04);
  }
  60% {
    transform: translateY(-14px);
  }
}
@media (max-width: 700px) {
  .victory-pop {
    top: calc(12px + env(safe-area-inset-top));
    gap: 10px;
  }
  .victory-avatar .avatar-3d {
    width: 52px;
    height: 52px;
  }
  .victory-text strong {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .victory-pop,
  .victory-avatar .avatar-3d {
    animation: none;
  }
}
/* BET-168 : cockpit et pagination de l’historique certifié. */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 16px;
  margin-block: 20px;
}
.dashboard-charts .card {
  padding: 20px;
  min-width: 0;
}
.dashboard-charts p {
  font-size: 0.85rem;
  color: var(--muted);
}
.dashboard-charts svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--text);
}
.dashboard-charts details {
  font-size: 0.85rem;
  max-height: 260px;
  overflow: auto;
}
.dashboard-charts li {
  overflow-wrap: anywhere;
}
.status-distribution {
  list-style: none;
  padding: 0;
}
.status-distribution li {
  display: grid;
  gap: 6px;
  margin-block: 14px;
}
.status-distribution meter {
  width: 100%;
  accent-color: var(--accent);
}
.history-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-block: 24px;
}
.history-pagination button {
  min-height: 44px;
  min-width: 44px;
}
.history-pagination [aria-current='page'] {
  border-color: var(--accent-text);
  color: var(--accent-text);
}
#history-body {
  min-height: 160px;
}
#bankroll[aria-busy='true'] #history-body {
  opacity: 0.55;
  pointer-events: none;
}
.ticket-figures {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

/* BET-169 : la confirmation est annoncée par du texte, sans dépendre de la couleur. */
.club-table caption {
  text-align: left;
  font-weight: 800;
  padding: 14px 10px;
  color: var(--text);
}
.club-table .provisional td:first-child {
  font-size: 0.75rem;
}
.club-table-scroll + .club-table-scroll {
  margin-top: 22px;
}

.daily-selection {
  padding: 20px;
  margin-block: 20px;
}
.daily-selection h3 {
  margin: 8px 0;
}
.daily-selection .safe-pick {
  width: 100%;
  text-align: left;
}
.daily-selection .analysis-note {
  line-height: 1.6;
}
/* BET-174 */
.ranking-criteria {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
.club-table th[aria-sort] {
  color: var(--accent-text);
}
.club-table th[aria-sort]:after {
  content: ' ↓';
}
.club-table tbody tr:nth-child(even) {
  background: var(--surface-2);
}
.club-table th,
.club-table td {
  font-variant-numeric: tabular-nums;
}
.tab-button[data-tab='community'] {
  white-space: normal;
}
@media (max-width: 700px) {
  .mobile-nav [data-mobile-target='community'] {
    font-size: 10px;
    line-height: 1.2;
  }
}
/* BET-173 : quatre repères, deux graphiques et détails à la demande. */
.personal-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.personal-summary > div:first-child {
  border-color: var(--accent-text);
}
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-charts .card {
  min-width: 0;
  padding: 20px;
}
.dashboard-charts h3 {
  margin-top: 0;
}
.dashboard-charts p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.dashboard-charts svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--muted);
  font-size: 13px;
}
.dashboard-charts details summary,
.dashboard-accounting > summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  color: var(--accent-text);
}
.dashboard-distribution {
  grid-column: 1/-1;
}
.dashboard-accounting .personal-summary {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.dashboard-accounting .personal-summary > div:first-child {
  border-color: var(--line);
}
@media (max-width: 700px) {
  .personal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-charts {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-charts .card {
    padding: 14px;
  }
}
@media (max-width: 700px) {
  .dashboard-charts svg text {
    font-size: 24px;
  }
}

/* BET-177 : contenu mobile lisible et commandes accessibles au pouce. */
@media (max-width: 700px) {
  button,
  input,
  select,
  textarea,
  summary {
    touch-action: manipulation;
  }
  .button,
  .text-button,
  .icon-button,
  .favorite-toggle,
  .sheet-arrow,
  .sheet-close,
  .details-button,
  .profile-tabs button,
  .community-tabs button,
  .period-switch button,
  .detail-tabs button,
  .studio-tabs button,
  .date-chip {
    min-height: 44px;
  }
  .icon-button,
  .favorite-toggle,
  .sheet-arrow,
  .sheet-close {
    min-width: 44px;
  }
  input:not([type='checkbox']):not([type='radio']),
  select,
  textarea {
    font-size: 16px;
    max-width: 100%;
    min-width: 0;
  }
  .community-tabs,
  .profile-tabs {
    flex-wrap: wrap;
    overflow: visible;
    gap: 4px;
  }
  .community-tabs button,
  .profile-tabs button {
    flex: 1 1 auto;
    white-space: normal;
    padding: 10px;
  }
  .special-head > div,
  .daily-head > div,
  .club-player > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .special-markets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .special-markets .daily-odd {
    min-width: 0;
    padding: 8px 4px;
    overflow-wrap: anywhere;
  }
  .special-dialog {
    padding: 16px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .special-dialog .dialog-tools {
    top: -16px;
    margin: -16px -16px 12px;
    padding: 12px 16px;
  }
  .special-dialog h2 {
    font-size: 24px;
    overflow-wrap: anywhere;
  }
  .daily-teams strong {
    overflow-wrap: anywhere;
  }
  .daily-odds > * {
    min-width: 0;
    flex: 1;
  }
  .club-arena select {
    width: 100%;
  }
  .club-arena > *,
  .community-panel > *,
  .profile-panel > * {
    min-width: 0;
  }
  .league-cards,
  .two-cols,
  .squad-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .analytics-kpis,
  .prediction-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .radar-box,
  canvas,
  svg.radar {
    max-width: 100%;
  }
  .history-legs {
    min-width: 0;
  }
  .private-invite {
    flex-wrap: wrap;
  }
  .mobile-nav button {
    font-size: 10px;
  }
  .club-table-scroll {
    overflow: visible;
  }
  .club-table {
    min-width: 0;
    display: block;
  }
  .club-table caption {
    display: block;
  }
  .club-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .club-table tbody {
    display: grid;
    gap: 12px;
  }
  .club-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
  .club-table th[scope='row'] {
    grid-column: 1/-1;
    grid-row: 1;
    min-width: 0;
    padding: 0;
    text-align: left;
  }
  .club-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .club-table td:first-child {
    grid-column: 1/-1;
    box-shadow: none;
    padding-top: 0;
  }
  .club-table td:before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    text-align: left;
  }
  .club-table .club-player {
    gap: 8px;
  }
  .club-player .text-button {
    text-align: left;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 380px) {
  .hero-actions,
  .heading-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-main {
    padding: 20px;
  }
  .stats-grid {
    gap: 8px;
  }
  .stats-grid article {
    padding: 14px;
  }
  .stats-grid strong {
    font-size: 26px;
  }
  .topbar {
    gap: 6px;
    padding-inline: 12px;
  }
  .brand-name {
    font-size: 18px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .mobile-nav {
    left: 0;
    right: 0;
    padding: 3px;
    gap: 0;
  }
  .mobile-nav button {
    font-size: 10px;
  }
}

/* BET-180 : chiffres HTML à taille native, hors du redimensionnement SVG. */
.dashboard-charts .chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.dashboard-charts svg {
  height: 200px;
}
.dashboard-charts .chart-total {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* BET-346 : trois destinations principales, classement dans Matchs. */
@media (max-width: 767px) {
  .topbar > .tabs {
    display: none;
  }
  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 0;
    right: 0;
    bottom: 0;
    gap: 4px;
    padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom))
      max(4px, env(safe-area-inset-left));
    border-radius: 20px 20px 0 0;
    background: var(--surface-2);
    z-index: 45;
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 4px;
    min-width: 44px;
    min-height: 56px;
    padding: 6px 2px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .mobile-nav button svg {
    width: 22px;
    height: 22px;
  }
  .mobile-nav button.active {
    background: var(--accent);
    color: var(--on-accent);
  }
  main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  #toast {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
}
@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

/* BET-182 : lecture verticale de la carte, sans nouveau calcul métier. */
.selection-ev,
.selection-action {
  font-size: 13px;
  line-height: 1.5;
  grid-column: 1/-1;
  overflow-wrap: anywhere;
}
.selection-action {
  font-weight: 750;
  color: var(--accent-text);
}
.match-loading {
  display: grid;
  gap: 12px;
  color: var(--muted);
}
.match-skeleton {
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(110deg, var(--surface), var(--surface-2), var(--surface));
  pointer-events: none;
}
@media (max-width: 1023px) {
  #matches,
  .match-list,
  .match-list > .match-card,
  .match-card > * {
    min-width: 0;
    max-width: 100%;
  }
  .match-list {
    gap: 16px;
  }
  .match-card,
  .match-card.spotlight {
    width: 100%;
    padding: 16px;
    gap: 12px;
  }
  .match-card > .market-grid-wrap,
  .match-card > .match-resources,
  .match-card > .match-overview,
  .match-card > .live-note,
  .match-card > .past-prediction,
  .match-card > .selection-feedback {
    margin-inline: 0;
  }
  .match-card .match-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .match-card .match-hero {
    border-radius: 16px;
    padding: 16px 12px 24px;
  }
  .match-card .team {
    min-width: 0;
    max-width: 100%;
  }
  .match-card .team strong {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  .match-card .match-selection {
    padding: 16px;
    gap: 8px 12px;
  }
  .match-card .match-selection .selection-title {
    font-size: 20px;
    overflow-wrap: anywhere;
  }
  .match-card .match-selection .selection-price {
    min-width: 0;
    padding: 12px;
  }
  .match-card .selection-price b {
    font-size: 28px;
  }
  .market-grid-wrap .featured-markets {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .market-grid-wrap .featured-markets > .market:first-child {
    grid-column: auto;
    grid-row: auto;
  }
}
@media (max-width: 767px) {
  .match-card .market-grid-wrap .featured-markets > .market:nth-child(n + 5) {
    display: none;
  }
  .match-card .market-grid-wrap .market .market-meta {
    display: none;
  }
  #matches {
    padding-inline: 0;
  }
  .workspace {
    margin-inline: 0;
  }
  main {
    padding-inline: 16px;
  }
}

/* BET-184 : boîtes tactiles réelles, sans zone cliquable superposée. */
:root {
  --touch-target: 44px;
}
@media (max-width: 767px) {
  body :is(button, summary, a[href], input[type='range']) {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    touch-action: manipulation;
  }
  body a[href] {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  body summary {
    align-content: center;
    overflow-wrap: anywhere;
  }
  .match-card .team-favorite,
  .help-inline,
  .scroll-btn {
    width: var(--touch-target);
    height: var(--touch-target);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    flex-shrink: 0;
  }
  .topbar-actions,
  .match-favorites,
  .heading-actions {
    gap: 8px;
  }
  .mobile-nav {
    gap: 8px;
  }
  .mobile-nav button {
    min-height: 56px;
  }
  .scroller {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .scroller > .date-navigator,
  .scroller > .filters {
    min-width: 0;
    flex: 1;
  }
  .scroller > .scroll-btn {
    position: static;
    margin: 0;
    display: none;
    opacity: 1;
    flex: none;
  }
  .scroller.can-prev > .scroll-btn.prev,
  .scroller.can-next > .scroll-btn.next {
    display: grid;
  }
  .scroller > .scroll-btn:hover {
    transform: none;
  }
  label:has(input[type='checkbox']),
  label:has(input[type='radio']) {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    align-items: center;
    cursor: pointer;
  }
  .footer-col {
    gap: 8px;
  }
  .filter-wrap {
    gap: 8px;
  }
  .filter-wrap .favorite-toggle {
    position: static;
    flex: none;
  }
  .filter-wrap .filter {
    padding-right: 16px;
  }
  body :is(button, a[href], summary, input, select, textarea):focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 3px;
  }
  body button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }
}
@media (max-width: 767px) and (hover: none) {
  .scroller > .scroll-btn {
    display: none !important;
  }
}
@media (max-width: 767px) {
  .hero-actions #quick-combo {
    min-height: var(--touch-target);
  }
  body button {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* BET-185 : montants rapides, sans soumission ni ouverture du clavier. */
.stake-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 12px;
}
.stake-controls button,
.stake-unit-form button {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}
.stake-controls button:hover:not(:disabled) {
  border-color: var(--accent-text);
  color: var(--accent-text);
}
.stake-controls button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.stake-feedback {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0;
}
.stake-feedback:empty {
  display: none;
}
.stake-unit-settings {
  font-size: 13px;
  line-height: 1.6;
  margin-block: 12px;
}
.stake-unit-settings > summary {
  min-height: 44px;
  cursor: pointer;
  align-content: center;
  color: var(--accent-text);
}
.stake-unit-settings label {
  display: block;
}
.stake-unit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.stake-unit-form input {
  min-width: 0;
  flex: 1 1 100px;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
}
.stake-unit-form button {
  flex: 1 1 130px;
}
@media (max-width: 767px) {
  body .mobile-nav button {
    min-height: 56px;
  }
}

/* BET-186 : grille et ticket partagent la zone utile hors gouttière. */
@media (min-width: 1024px) {
  .workspace {
    grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
    gap: 24px;
  }
  .workspace > .match-rail {
    display: none;
  }
  .workspace .match-strip {
    display: block;
    position: static;
  }
  .workspace > .builder {
    position: sticky;
    top: var(--header-offset);
    display: flex;
    flex-direction: column;
    align-self: start;
    max-height: calc(100dvh - var(--header-offset) - 16px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-padding-block: 12px;
    scrollbar-gutter: stable;
    border-radius: var(--radius);
  }
  .builder > .builder-card,
  .builder > .ticket {
    flex: none;
    min-width: 0;
    padding: 16px;
  }
  .builder .ticket-stake {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .builder .ticket-stake > label {
    grid-column: 1/-1;
  }
  .builder .ticket-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .builder .ticket-totals > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .builder .safe-pick {
    flex-wrap: wrap;
  }
  .builder .suggestion-values {
    min-width: 0;
    text-align: left;
    flex: 1 1 100%;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace > .builder {
    position: static;
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow: visible;
  }
}

/* BET-187 : aides courtes au survol, clavier et toucher. */
.metric-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--accent-text);
  font: inherit;
  font-size: 13px;
  white-space: normal;
}
.metric-help:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}
.metric-tooltip {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 100;
  width: max-content;
  max-width: min(230px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px #0004;
  overflow-wrap: anywhere;
}
.metric-tooltip[hidden] {
  display: none;
}
/* BET-189 : trois indicateurs cohérents issus du même bilan serveur. */
.bankroll-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.bankroll-kpis > div {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.bankroll-kpis dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.bankroll-kpis dd {
  margin: 12px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.bankroll-kpis .kpi-loading {
  grid-column: 1/-1;
  font-size: 14px;
  color: var(--muted);
}
.kpi-loading span {
  display: block;
  height: 48px;
  margin-top: 12px;
  background: var(--surface-2);
  border-radius: 12px;
}
.kpi-conventions > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  color: var(--accent-text);
}
.kpi-conventions p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
@media (max-width: 767px) {
  .bankroll-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
  .bankroll-kpis > div {
    padding: 16px;
  }
  .bankroll-kpis dd {
    font-size: 28px;
  }
}

.bankroll-kpis .kpi-message,
.bankroll-kpis .kpi-loading {
  grid-column: 1/-1;
}
.bankroll-kpis .kpi-message dd {
  font-size: 14px;
  line-height: 1.6;
}

/* BET-192 : détails locaux par match, avertissement toujours visible. */
@media (prefers-reduced-motion: no-preference) {
  .match-resources:not([hidden]) {
    animation: match-resource-appear 0.12s ease-out;
  }
  @keyframes match-resource-appear {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

/* BET-191 : catégories de présentation validées, en plus de l’EV numérique. */
:root {
  --opportunity-strong: #b5f5cc;
  --opportunity-strong-bg: #10351f;
  --opportunity-watch: #7dd3fc;
  --opportunity-watch-bg: #3b260c;
}
:root.light {
  --opportunity-strong: #166534;
  --opportunity-strong-bg: #dcfce7;
  --opportunity-watch: #8a3f00;
  --opportunity-watch-bg: #e0f2fe;
}
.market .opportunity-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}
.market .opportunity-badge.strong {
  color: var(--opportunity-strong);
  background: var(--opportunity-strong-bg);
}
.market .opportunity-badge.watch {
  color: var(--opportunity-watch);
  background: var(--opportunity-watch-bg);
}
.market-grid-wrap .market .market-value {
  color: var(--text);
  background: transparent;
  font-size: 12px;
}
.market .opportunity-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

/* BET-197 : marchés principaux toujours ouverts sur le match du jour. */
.spotlight-market-group {
  min-width: 0;
  margin: 12px 0;
}
.spotlight-market-group .market {
  min-height: 44px;
  min-width: 0;
}
.spotlight-market-group .markets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 700px) {
  .spotlight-market-group .markets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* BET-201 : forme sous les noms, accessible sans ouvrir les statistiques. */
.team-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.team-group > .team {
  width: 100%;
}
.team-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  min-width: 110px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
.team-form .fd {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  font-size: 10px;
  border-radius: 5px;
}
.team-form:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* BET-223 : coupon flottant, au-dessus de la navigation mobile. */
.mobile-coupon {
  display: none;
}
@media (max-width: 767px) {
  .mobile-coupon:not([hidden]) {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 46;
    min-width: 72px;
    min-height: 72px;
    max-width: calc(100vw - 32px);
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 36px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 18px;
    box-shadow: 0 6px 24px #0003;
    cursor: pointer;
    touch-action: manipulation;
  }
  .mobile-coupon:active {
    transform: scale(0.94);
  }
  .mobile-coupon:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 4px;
  }
  .coupon-label {
    font-size: 10px;
    font-weight: 600;
  }
  .coupon-count {
    position: absolute;
    top: -6px;
    right: -4px;
    display: grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 5px;
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: var(--on-accent);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
  }
  body.has-mobile-coupon main {
    padding-bottom: calc(168px + env(safe-area-inset-bottom));
  }
  body.has-mobile-coupon #toast {
    bottom: calc(164px + env(safe-area-inset-bottom));
  }
  .ticket-drawer-open .mobile-coupon {
    visibility: hidden;
  }
}

/* BET-210 : les flèches restent présentes sur écran tactile. */
@media (max-width: 767px) {
  .date-scroller {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }
  .date-scroller > .scroll-btn {
    display: grid !important;
    position: static;
    margin: 0;
    opacity: 1;
    pointer-events: auto;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .date-scroller > .scroll-btn:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
  }
  .date-scroller .date-navigator {
    flex: 1;
    min-width: 0;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 40%;
  }
  .date-scroller .date-chip {
    scroll-snap-align: center;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.stake-controls [data-stake-percent] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 44px;
}
.stake-controls [data-stake-percent] small {
  font-size: 11px;
}
.stake-controls [aria-pressed='true'] {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

/* BET-213 : score et accès aux statistiques regroupés au centre. */
.match-hero .match-center-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: color-mix(in srgb, var(--accent) 12%, #09172c);
  border: 1px solid #ffffff60;
  transition:
    transform 0.12s,
    background 0.12s;
}
.match-center-stats svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.match-center-stats:active {
  transform: scale(0.95);
  background: #152d42;
}
@media (prefers-reduced-motion: reduce) {
  .match-center-stats {
    transition: none;
  }
}

.match-hero {
  padding: 14px 18px 18px;
}
.match-hero .match-teams {
  margin-top: 0;
  gap: 12px;
  align-items: center;
}
.match-center {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}
.match-center-stats {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #ffffff60;
  border-radius: 999px;
  background: #09172cc9;
  color: #fff;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.match-center-stats:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.match-hero .crest img {
  object-fit: contain;
}
@media (max-width: 767px) {
  .match-hero {
    padding: 12px;
  }
  .match-hero .match-teams {
    margin-top: 0;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .match-center-stats {
    font-size: 11px;
    padding: 6px 8px;
  }
  .match-hero .team {
    gap: 6px;
  }
  .match-hero .crest {
    width: 44px;
    height: 44px;
  }
  .match-hero .team strong {
    font-size: 14px;
  }
  .match-hero .kickoff {
    padding: 6px;
  }
  .match-hero .kickoff strong {
    font-size: 24px;
  }
}

/* BET-214 : chiffres permanents dans un bloc compact. */
.match-card .match-resources {
  gap: 6px;
  margin-bottom: 10px;
}
.match-card .match-indicators {
  padding: 10px 12px;
  border-radius: 12px;
}
.match-card .match-stats {
  padding: 0;
}
.match-card .match-stats-title {
  font-size: 16px;
  margin: 0 0 6px;
  letter-spacing: 0;
}
.match-card .stats-team-names {
  gap: 8px;
  margin-bottom: 4px;
}
.match-card .stats-team-names > span {
  font-size: 12px;
  gap: 6px;
}
.match-card .stats-team-names .crest {
  width: 24px;
  height: 24px;
}
.match-card .stat-row {
  padding: 5px 0;
  gap: 8px;
}
.match-card .stat-num {
  font-size: 18px;
}
.match-card .stat-label {
  font-size: 11px;
}
.match-card .stat-label small {
  font-size: 10px;
}
.match-card .stat-bar {
  height: 4px;
}
.match-card .form-dots {
  gap: 3px;
}
.match-card .fd {
  width: 18px;
  height: 18px;
  font-size: 10px;
}
.match-card .stat-note {
  font-size: 10px;
  margin: 5px 0;
  line-height: 1.4;
}
.match-indicators > .bookmaker-comparison {
  margin: 6px 0 0;
}
.match-indicators > .bookmaker-comparison > summary {
  min-height: 44px;
  align-content: center;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
}
@media (max-width: 767px) {
  .match-card .stat-row {
    grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
  }
  .match-card .stat-label {
    grid-column: 2;
    grid-row: auto;
  }
  .match-card .stat-side {
    grid-row: auto;
  }
  .match-card .stat-side.away {
    grid-column: 3;
  }
  .match-card .stat-na {
    grid-column: 1/-1;
  }
  .match-card .match-indicators {
    padding: 8px;
  }
}

/* BET-216 : cartes sans panneau explicatif répétitif. */
.personal-ticket {
  padding-bottom: 12px;
}
.personal-ticket > .personal-legs {
  margin-bottom: 0;
}
.system-details {
  margin-top: 8px;
}
.system-details > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}

/* BET-219 : chaque élément du bandeau mobile reste dans sa zone. */
@media (max-width: 767px) {
  .match-hero:has(.stadium-placeholder) {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 16px 12px;
  }
  .match-hero:has(.stadium-placeholder):before {
    background: linear-gradient(180deg, #061124b3, #061124d9);
  }
  .match-hero .match-head {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }
  .match-hero .match-league {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .match-hero .match-league b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
  }
  .match-hero .match-date {
    display: none;
  }
  .match-hero .match-head > .big-match,
  .match-hero .match-head > .status-pill {
    flex: none;
    font-size: 9px;
    padding: 5px 7px;
    white-space: nowrap;
  }
  .match-hero .match-favorites {
    margin: 0;
  }
  .match-hero:has(.stadium-placeholder) .match-teams {
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
    gap: 6px;
    margin: 0;
    align-items: start;
  }
  .match-hero .team {
    min-width: 0;
    width: 100%;
    padding: 0;
    gap: 8px;
  }
  .match-hero .team strong {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    line-height: 1.4;
  }
  .match-hero .team-form {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    gap: 2px;
  }
  .match-hero .team-form .fd {
    width: 14px;
    height: 18px;
    flex-basis: 14px;
    font-size: 9px;
  }
  .match-center > * {
    max-width: 100%;
  }
  .match-hero .kickoff,
  .match-hero .kickoff.countdown {
    width: 100%;
    max-width: 100%;
    padding: 8px 4px;
  }
  .match-hero .kickoff.countdown strong {
    font-size: 18px;
  }
  .match-hero .live-badge {
    white-space: normal;
    text-align: center;
  }
  .match-hero .live-updated,
  .match-hero .final-score small {
    font-size: 9px;
    text-align: center;
  }
  .match-hero .match-center-stats {
    margin-top: 6px;
    min-height: 44px;
    width: 100%;
    padding: 8px 4px;
    font-size: 11px;
  }
  .match-hero .stadium-placeholder-name {
    display: none;
  }
  .match-hero .stadium-name {
    position: static;
    order: 1;
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    font-size: 10px;
  }
}

/* BET-222 : proposition dans le flux, sans recouvrir navigation ou coupon. */
.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.install-banner > img {
  flex: none;
  border-radius: 12px;
}
.install-banner-copy {
  flex: 1;
  min-width: 0;
}
.install-banner-copy strong {
  font-size: 15px;
}
.install-banner p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.install-banner > .icon-button {
  flex: none;
}
.install-guide {
  width: min(520px, calc(100% - 24px));
  height: fit-content;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.install-guide .modal-head {
  position: static;
  top: auto;
  margin: 0 0 16px;
  padding: 0 0 12px;
}
.install-guide h2 {
  font-size: 26px;
}
.install-guide > p {
  color: var(--muted);
  line-height: 1.5;
}
.install-steps {
  list-style: none;
  counter-reset: install;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 12px;
}
.install-steps li {
  counter-increment: install;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.install-step-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
}
.install-step-icon:before {
  content: counter(install);
  position: absolute;
  top: -8px;
  left: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 800;
}
.install-step-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.install-steps strong {
  font-size: 14px;
}
.install-steps p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.install-guide-note {
  font-size: 12px;
}
[data-install-app][hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .install-banner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }
  .install-banner-copy {
    flex-basis: calc(100% - 60px);
  }
  .install-banner > [data-install-app] {
    flex: 1;
    min-width: 0;
  }
  .install-guide {
    padding: 18px;
  }
  .install-guide h2 {
    font-size: 23px;
  }
  .install-steps li {
    padding: 12px;
  }
}
/* BET-225 : découverte tactile en trois étapes. */
.onboarding header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.onboarding-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.onboarding-track::-webkit-scrollbar {
  display: none;
}
.onboarding-track article {
  flex: 0 0 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  padding: 16px;
  text-align: center;
  min-width: 0;
}
.onboarding-track article > span {
  font-size: 36px;
  color: var(--accent-text);
}
.onboarding-track h2 {
  font-size: 22px;
}
.onboarding-dots {
  display: flex;
  justify-content: center;
}
.onboarding-dots button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  position: relative;
}
.onboarding-dots button:after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  left: 18px;
  top: 18px;
  background: var(--muted);
  border-radius: 50%;
}
.onboarding-dots button[aria-pressed='true']:after {
  background: var(--accent-text);
  transform: scale(1.4);
}
/* BET-226 : choix directs, sans ouverture du sélecteur système. */
.chip-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.chip-field > strong {
  font-size: 12px;
  color: var(--muted);
}
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 3px;
}
.filter-chips::-webkit-scrollbar {
  display: none;
}
.filter-chip {
  flex: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 14px;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}
.filter-chip[aria-pressed='true'] {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.prediction-toolbar .chip-field {
  grid-column: 1/-1;
}
.personal-filters:has(.chip-field) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.filters {
  scrollbar-width: none;
}
.filters::-webkit-scrollbar {
  display: none;
}
/* BET-228 : la tendance filtrée partage la place du KPI sur téléphone. */
.kpi-sparkline {
  display: none;
}
@media (max-width: 767px) {
  .bankroll-kpis dd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
  .bankroll-kpis .kpi-sparkline {
    display: block;
    width: 100px;
    height: 40px;
    max-height: 40px;
    flex: none;
  }
  #personal-charts .dashboard-charts > article {
    display: none;
  }
}
/* BET-230 : confirmation uniquement après réponse positive du serveur. */
#place-bet.bet-loading:before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  animation: bet-spinner 0.7s linear infinite;
}
#place-bet.bet-confirmed {
  background: #237744;
  color: #fff;
  opacity: 1;
}
@keyframes bet-spinner {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  #place-bet.bet-loading:before {
    animation: none;
  }
}
/* BET-231 : signal discret, avec une alternative pour les lecteurs d’écran. */
[data-tab],
[data-ctab] {
  position: relative;
}
.attention-dot {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 8px;
  height: 8px;
  max-width: 8px;
  max-height: 8px;
  border-radius: 50%;
  background: var(--danger);
  pointer-events: none;
}
.attention-dot[hidden] {
  display: none;
}
/* BET-232 : aperçu prêt avant le clic qui ouvre le partage natif. */
.ticket-share-dialog {
  width: min(560px, 94vw);
  max-height: 90dvh;
  overflow: auto;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.ticket-share-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}
.ticket-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.bet-success {
  padding: 16px;
  margin-bottom: 16px;
}
/* BET-233 : les écrans vides proposent une action utile. */
.ticket-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 32px 12px;
  text-align: center;
}
.ticket-empty svg {
  width: 96px;
  height: 96px;
  color: var(--muted);
  opacity: 0.4;
}
.ticket-empty h4 {
  margin: 0;
  font-size: 18px;
}
.ticket-empty p {
  margin: 0;
  max-width: 28ch;
  line-height: 1.6;
  color: var(--muted);
  font-size: 13px;
}

.guided-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 24px 12px;
  color: var(--muted);
}
.guided-empty svg {
  width: 80px;
  height: 64px;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 2;
  opacity: 0.8;
}
.guided-empty p {
  max-width: 420px;
  margin: 0;
  line-height: 1.6;
}
.guided-empty .button {
  white-space: normal;
  min-height: 44px;
}
/* BET-234 : tiroir global sur mobile, colonne conservée sur ordinateur. */
.ticket-backdrop,
.ticket-drag-handle {
  display: none;
}
@media (max-width: 767px) {
  body:before {
    pointer-events: none !important;
    display: none !important;
  }
  .ticket-backdrop {
    position: fixed;
    inset: 0;
    z-index: 48;
    background: rgba(5, 7, 6, 0.65);
  }
  .ticket-drawer-open .ticket-backdrop {
    display: block;
  }
  body > .builder {
    display: flex !important;
    max-height: var(--ticket-viewport-height, 85dvh);
    box-sizing: border-box;
    overscroll-behavior: contain;
  }
  .ticket-drag-handle {
    display: block;
    position: absolute;
    top: 3px;
    left: calc(50% - 35px);
    width: 70px;
    height: 40px;
    touch-action: none;
    border: 0;
    background: transparent;
  }
  .ticket-drag-handle span {
    display: block;
    margin: auto;
    width: 38px;
    height: 5px;
    background: var(--muted);
    border-radius: 8px;
  }
  #ticket-items {
    max-height: 32dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .builder {
    transition:
      transform 0.25s ease,
      visibility 0s linear 0.25s;
  }
  .ticket-drawer-open .builder {
    transition-delay: 0s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .builder {
    transition: none !important;
  }
}

/* BET-249 : guide explicite, disponible aussi après masquage de l’accueil. */
.tutorial-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
}
.tutorial-dialog::backdrop {
  background: #0009;
}
.tutorial-dialog p {
  line-height: 1.65;
}
.tutorial-dialog form {
  text-align: right;
}
.tutorial-dialog .switch-line {
  margin: 20px 0;
}
.tutorial-dialog .hero-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  #toast {
    transition: none;
  }
}

.shared-ticket-notice {
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid var(--accent-text);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.shared-ticket-notice p {
  margin: 0;
}
.shared-ticket-notice ul {
  padding-left: 18px;
  margin: 8px 0 0;
}
.ticket-share-link {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ticket-share-link input {
  flex: 1;
  min-width: 0;
  width: 100%;
  font-size: 13px;
}
.ticket-share-dialog {
  max-width: min(560px, calc(100vw - 24px));
}

/* BET-263 : accès direct au ticket dès le premier écran. */
.hero-main .hero-cta {
  align-self: flex-start;
  position: relative;
  z-index: 1;
  min-height: 48px;
  white-space: normal;
  text-align: center;
}
@media (max-width: 767px) {
  .hero-main .hero-cta {
    width: 100%;
  }
  .hero-main {
    gap: 12px;
  }
}

/* BET-279 à BET-285 : l'accueil mobile mène directement au calendrier. */
@media (max-width: 700px) {
  main {
    gap: 10px;
    padding-top: 10px;
  }
  main > .hero {
    order: 1;
  }
  main > #match-navigation {
    order: 2;
  }
  main > .workspace,
  main > #standings {
    order: 3;
  }
  main > #discovery {
    order: 4;
  }
  main > .home-performance {
    order: 5;
  }
  .hero {
    display: block;
  }
  .hero-main {
    min-height: 0;
    padding: 10px 12px;
    gap: 6px;
    border-radius: 16px;
  }
  .hero-main .hero-pitch,
  .hero-main > .eyebrow,
  .hero-main > .section-subtitle,
  .hero-main > .hero-actions,
  .hero-score {
    display: none;
  }
  .hero h1 {
    font-size: 22px;
    line-height: 1.05;
    text-transform: none;
    letter-spacing: -0.02em;
  }
  .hero-copy {
    font-size: 10px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-main .hero-cta {
    position: absolute;
    right: 28px;
    top: 78px;
    width: auto;
    min-height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }
  #match-navigation:not([hidden]) {
    display: flex;
  }
  .workspace {
    display: block;
  }
  #matches {
    display: flex;
    flex-direction: column;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
  #matches > .section-heading {
    order: 1;
    margin: 0 0 4px;
  }
  #matches > .section-heading .eyebrow,
  #matches > .section-heading h2,
  #matches > .section-heading .section-meta {
    display: none;
  }
  #matches > .date-scroller {
    order: 2;
    margin: 0 0 4px;
  }
  #matches > .scroller:not(.date-scroller) {
    order: 3;
    margin: 0 0 4px;
  }
  #matches > .match-filter-context {
    order: 4;
    margin: 0;
    min-height: 0;
  }
  #matches > #match-strip {
    order: 5;
    display: none;
  }
  #matches > #match-list {
    order: 8;
  }
  #matches > #conseils-du-jour,
  #matches > #daily-selection {
    order: 6;
    margin-top: 12px;
  }
  #matches > #daily-challenge {
    order: 7;
    margin-top: 12px;
  }
  .date-navigator {
    padding: 3px;
    border-radius: 14px;
  }
  .date-chip {
    min-width: 60px;
    min-height: 42px;
    padding: 4px 8px;
  }
  .date-chip strong {
    font-size: 9px;
  }
  .date-chip span {
    font-size: 14px;
  }
  .filters {
    gap: 5px;
  }
  .filter {
    min-height: 38px;
    padding-block: 0;
    font-size: 11px;
  }
  .filter em {
    display: none;
  }
  .match-filter-context {
    font-size: 10px;
  }
  .match-filter-context .text-button {
    min-height: 32px;
    font-size: 10px;
  }
  .match-list {
    gap: 10px;
  }
  .match-card,
  .match-card.spotlight {
    padding: 8px;
    gap: 7px;
    border-radius: 16px;
  }
  .match-card .match-hero,
  .match-hero:has(.stadium-placeholder) {
    min-height: 0;
    padding: 8px;
    border-radius: 12px;
    background: #0b1c31;
  }
  .match-card .match-favorites,
  .match-card .team-form,
  .match-card .match-center-stats {
    display: none;
  }
  .match-card .match-stadium-photo,
  .match-card .stadium-placeholder {
    display: block;
  }
  .match-card .match-hero:before {
    background: linear-gradient(180deg, #06112499, #061124e6);
  }
  .match-card .stadium-name {
    top: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
    padding: 2px 5px;
    font-size: 8px;
    opacity: 0.78;
  }
  .match-card .match-head {
    margin-bottom: 4px;
  }
  .match-card .match-league b {
    font-size: 9px;
  }
  .match-card .match-teams {
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    gap: 4px;
  }
  .match-card .match-hero .crest {
    width: 34px;
    height: 34px;
  }
  .match-card .match-hero .team {
    gap: 3px;
  }
  .match-card .match-hero .team strong {
    font-size: 11px;
  }
  .match-card .match-hero .kickoff {
    padding: 3px;
  }
  .match-card .match-hero .kickoff strong {
    font-size: 18px;
  }
  /* BET-322 : les cotes et le conseil restent visibles sur téléphone. */
  .match-card .match-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .match-card .recommended {
    padding: 16px;
    border-radius: 16px;
  }
  .match-card .match-selection {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 10px 12px;
    border-color: var(--accent-text);
    background: linear-gradient(135deg, var(--surface), var(--accent-soft));
  }
  .match-card .match-selection .selection-title {
    font-size: 20px;
    line-height: 1.25;
  }
  .match-card .match-selection .selection-price {
    padding: 14px 8px;
    background: var(--accent);
    color: var(--on-accent);
  }
  .match-card .match-selection .selection-price small {
    color: var(--on-accent);
    font-size: 9px;
  }
  .match-card .selection-price b {
    font-size: 30px;
    white-space: nowrap;
    letter-spacing: -0.04em;
  }
  .match-card .match-selection .selection-price {
    min-width: 82px;
    white-space: nowrap;
    justify-self: end;
  }
  .match-card .match-outcome {
    padding: 12px;
    border-radius: 14px;
  }
  .match-card .match-outcome h3 {
    font-size: 14px;
  }
  .match-card .match-outcome .prob-legend {
    font-size: 10px;
  }
  .match-card .match-outcome .prob-legend b {
    font-size: 20px;
  }
  .match-card .match-outcome .prob-track {
    height: 6px;
  }
  .match-card .selection-action {
    padding-top: 10px;
    border-top: 1px solid var(--line-strong);
  }
  .match-card .match-resources {
    display: grid;
  }
  .match-card .market-grid-wrap .predictions-heading {
    display: block;
    margin: 10px 2px;
  }
  .match-card .market-grid-wrap .predictions-heading h3 {
    font-size: 16px;
  }
  .match-card .market-grid-wrap .featured-markets,
  .match-card .market-category > .markets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .match-card .market-grid-wrap .featured-markets > .market {
    display: flex;
    grid-column: auto;
    grid-row: auto;
  }
  .match-card .market-grid-wrap .featured-markets > .market:nth-child(n + 5) {
    display: none;
  }
  .match-card .market-grid-wrap .market {
    min-width: 0;
    min-height: 132px;
    padding: 12px 10px;
    gap: 8px;
    border-radius: 14px;
  }
  .match-card .market-grid-wrap .market-label {
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .match-card .market-grid-wrap .market .market-numbers {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
  }
  .match-card .market-grid-wrap .market .market-price > strong {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
  }
  .match-card .market-grid-wrap .market .market-price small,
  .match-card .market-grid-wrap .market .market-confidence small {
    font-size: 9px;
  }
  .match-card .market-grid-wrap .market .market-meta {
    display: none;
  }
  .match-card .market-grid-wrap .market-categories {
    display: grid;
    margin-top: 10px;
  }
  .match-card .market-grid-wrap .market > .market-label {
    font-size: 12px;
    margin: 0;
    min-height: 34px;
  }
  .match-card .market-grid-wrap .market > .confidence-ribbon {
    display: none;
  }
  .match-card .market-grid-wrap .market .market-numbers {
    margin: 0;
    align-items: end;
  }
  .match-card .market-grid-wrap .market .market-price {
    display: grid;
    gap: 2px;
  }
  .match-card .market-grid-wrap .market .market-confidence {
    display: grid;
    gap: 2px;
    text-align: right;
  }
  .match-card .market-grid-wrap .market .market-confidence > b {
    font-size: 18px;
  }
  .match-card .market-grid-wrap .market .confidence-track {
    height: 4px;
  }
  .match-card .market-grid-wrap .market .market-badges {
    font-size: 10px;
  }
  .match-card .market-grid-wrap .market .market-badges .value {
    font-size: 10px;
  }
}

.home-performance {
  padding: 20px;
  margin-block: 16px;
}
.home-performance dl {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.home-performance dt {
  color: var(--muted);
}
.home-performance dd {
  margin: 4px 0;
  font-size: 24px;
  font-weight: 800;
}
.home-performance .muted {
  font-size: 12px;
}

/* BET-266 : trois étapes visibles sans défilement horizontal. */
.discovery-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 16px 0;
  counter-reset: step;
}
.discovery-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  counter-increment: step;
}
.discovery-steps li:before {
  content: counter(step);
  color: var(--muted);
  font-size: 12px;
}
.discovery-steps li > span {
  font-size: 28px;
  color: var(--accent-text);
}
.discovery-steps strong {
  font-size: 14px;
}
@media (max-width: 600px) {
  .discovery-steps {
    gap: 6px;
  }
  .discovery-steps li {
    flex-direction: column;
    padding: 8px 4px;
    text-align: center;
    gap: 6px;
  }
  .discovery-steps strong {
    font-size: 12px;
  }
}

.inbox-button {
  position: relative;
  flex-shrink: 0;
}
.inbox-button b:empty {
  display: none;
}
.inbox-button b {
  position: absolute;
  top: -3px;
  right: -4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  min-width: 16px;
  border-radius: 12px;
}
.inbox-list {
  list-style: none;
  padding: 0;
  max-height: 55dvh;
  overflow: auto;
}
.inbox-list li {
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.inbox-list .unread {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}
.inbox-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  height: auto;
  gap: 6px;
  width: 100%;
}
.inbox-list .inbox-empty,
.inbox-list time {
  font-size: 12px;
  color: var(--muted);
}
#inbox-dialog {
  width: min(520px, calc(100vw - 24px));
  box-sizing: border-box;
}
#open-inbox[hidden] {
  display: none;
}
@media (max-width: 359px) {
  .topbar:has(#open-inbox:not([hidden])) .brand-mark {
    display: none;
  }
}
/* BET-271 : le signe et le texte restent lisibles sans perception des couleurs. */
.opportunity {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem;
  font-size: 0.85rem;
}
.opportunity small {
  width: 100%;
  color: var(--muted);
}
.opportunity meter {
  vertical-align: middle;
  width: 6rem;
}
.ev-positive {
  color: var(--accent-text);
}
.ev-negative {
  color: var(--danger);
}
.ev-neutral {
  color: var(--muted);
}

.match-explanation {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.match-explanation small {
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.match-explanation p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

[data-invitation-email] {
  display: grid;
  gap: 14px;
  margin-block: 18px;
}
[data-invitation-email] label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
[data-invitation-email] input[type='email'] {
  width: 100%;
  min-width: 0;
}
[data-invitation-email] input[type='checkbox'] {
  width: 22px;
  flex: 0 0 22px;
}
.daily-share {
  margin-top: 18px;
}
.daily-share small,
.model-comparison small,
.private-invite small {
  display: block;
  width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Choix du thème dans le menu du profil. */
#theme-dialog {
  width: min(420px, calc(100% - 24px));
  height: fit-content;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 24px 0 18px;
  border: 0;
}
#theme-dialog .theme-option {
  position: relative;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
}
#theme-dialog .theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.theme-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 88px;
  border: 2px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-2);
}
.theme-option:hover .theme-card {
  border-color: var(--muted);
}
.theme-option input:checked + .theme-card {
  border-color: var(--accent-text);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.theme-option input:focus-visible + .theme-card {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}
.theme-hint {
  font-size: 12px;
  line-height: 1.6;
}

.theme-options legend {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.neutral-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.neutral-avatar::before,
.neutral-avatar::after {
  content: none;
}

/* BET-345 : explication accessible et comparaison sur petit écran. */
.match-explanation {
  min-width: 0;
}
.match-explanation > summary {
  min-height: 44px;
  cursor: pointer;
  padding: 12px;
}
.fair-odds table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fair-odds th,
.fair-odds td {
  padding: 8px 4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.fair-odds caption {
  color: var(--muted);
  text-align: left;
  margin-bottom: 8px;
}

/* BET-351 : identité sportive et chiffres stables. */
body {
  font-variant-numeric: tabular-nums;
}
.card,
.match-card,
.builder-card {
  border-radius: 14px;
}
.button,
.icon-button,
.market,
.match-selection,
.stake-controls button {
  border-radius: 10px;
}

/* BET-352 : navigation à une main, en-tête sur une seule ligne. */
@media (max-width: 767px) {
  :root {
    --header-offset: 56px;
  }
  body .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    min-height: 56px;
    padding: 6px 12px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
  }
  body .topbar .brand {
    flex: 0 1 auto;
    min-width: 0;
  }
  body .topbar .brand-mark {
    display: block;
    width: 28px;
    height: 32px;
  }
  body .topbar .brand-name {
    display: none;
  }
  body .topbar-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
  }
  body .topbar-bankroll {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  body .topbar-bankroll > small,
  body .bankroll-currency,
  body #account-label,
  body #open-help,
  body #open-inbox {
    display: none;
  }
  body .topbar-bankroll strong {
    font-size: 14px;
    white-space: nowrap;
  }
  body .topbar .account-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 4px;
  }
  body .mobile-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
  }
  body .mobile-nav button {
    font-size: 11px;
    border-radius: 10px;
  }
  body main {
    padding-top: 68px;
  }
  body main > .hero,
  body #discovery {
    display: none;
  }
}

/* BET-353 : les trois issues restent à portée du pouce. */
.match-result-picks {
  display: none;
}
.match-other-markets {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.match-other-markets > summary {
  cursor: pointer;
  color: var(--muted);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.match-other-markets > .recommended {
  margin-bottom: 12px;
}
@media (max-width: 767px) {
  body .match-card {
    padding: 12px;
    gap: 8px;
    border-radius: 14px;
  }
  body .match-card .match-hero {
    background: var(--surface);
    padding: 0;
    color: var(--text);
  }
  body .match-card .match-hero::before,
  body .match-card .match-stadium-photo,
  body .match-card .stadium-placeholder,
  body .match-card .stadium-name {
    display: none;
  }
  body .match-card .match-hero .team,
  body .match-card .match-hero .team strong {
    color: var(--text);
    text-shadow: none;
  }
  body .match-card .match-overview > .recommended,
  body .match-card .match-overview > .prob-bar,
  body .match-card .match-preview {
    display: none;
  }
  body .match-card .match-teams {
    grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  }
  body .match-card .match-league b {
    font-size: 11px;
  }
  .match-result-picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .result-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 64px;
    padding: 8px 4px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-2);
    cursor: pointer;
  }
  .result-pick strong {
    font-size: 17px;
  }
  .result-pick small {
    font-size: 11px;
    color: var(--muted);
    overflow-wrap: anywhere;
  }
  .result-pick:disabled strong {
    font-size: 11px;
  }
  .result-pick.selected {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
  }
  .result-pick.selected small {
    color: var(--on-accent);
  }
  body .date-navigator,
  body .filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  body .date-navigator > *,
  body .filters > * {
    flex: 0 0 auto;
  }
  body .filter-wrap {
    flex-wrap: nowrap;
  }
  body .filter,
  body .date-navigator button {
    white-space: nowrap;
    border-radius: 999px;
  }
  body .match-other-markets .match-selection {
    display: grid;
  }
}
@media (max-width: 767px) {
  /* Les suggestions détaillées suivent le calendrier, pour voir les matchs au premier écran. */
  body #matches {
    display: flex;
    flex-direction: column;
  }
  body #matches > #match-list {
    order: 6;
  }
  body #matches > #daily-selection {
    order: 8;
  }
  body .match-card .team strong {
    font-size: 12px;
    line-height: 1.3;
  }
  body .match-card .match-overview:has(> :only-child:not(.recommended)) {
    gap: 0;
  }
}
.value-bet-badge {
  padding: 4px 7px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.mobile-advice {
  display: none;
}
@media (max-width: 767px) {
  body .match-card .match-overview {
    display: none;
  }
  body .match-card .match-hero .team strong {
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
  }
  .mobile-advice {
    display: block;
  }
  body .match-card .match-head {
    flex-wrap: wrap;
    gap: 6px;
  }
}
/* BET-354 : résumé du ticket toujours accessible au-dessus des onglets. */
@media (max-width: 767px) {
  body .mobile-coupon:not([hidden]) {
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    min-height: 56px;
    min-width: 0;
    border-radius: 14px;
    padding: 10px 12px;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
  }
  body .mobile-coupon .coupon-count {
    position: static;
    display: block;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 12px;
  }
  body .mobile-coupon .coupon-label {
    border: 1px solid currentColor;
    border-radius: 10px;
    padding: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  body .mobile-coupon:active {
    transform: scale(0.99);
  }
}

/* BET-355 : défilement tactile sans barre ni rognage du premier filtre. */
body .date-navigator,
body .filters {
  scrollbar-width: none;
}
body .date-navigator::-webkit-scrollbar,
body .filters::-webkit-scrollbar {
  display: none;
}
@media (max-width: 767px) {
  body .scroller > .filters {
    justify-content: flex-start;
    margin-inline: 0;
    padding-inline: 4px;
    mask-image: none;
    -webkit-mask-image: none;
  }
  body .scroller > .scroll-btn {
    display: none;
  }
}

/* BET-356 : les explications restent contenues à toute largeur. */
.fair-odds,
.match-indicators {
  min-width: 0;
  max-width: 100%;
}
.fair-odds table {
  table-layout: fixed;
}
.fair-odds caption,
.value-bet-badge,
.data-basis {
  white-space: normal;
  overflow-wrap: anywhere;
}
.value-bet-badge {
  min-width: 0;
  max-width: 100%;
}
.match-explanation .fair-odds table {
  min-width: 0;
  width: 100%;
}

/* BET-357 : sélection principale visible, marchés secondaires repliés. */
.match-other-markets > summary {
  gap: 8px;
}
.match-other-markets[open] > summary > span {
  transform: rotate(180deg);
}
@media (max-width: 767px) {
  body .match-card .match-overview {
    display: grid;
  }
  body .match-card .match-overview > .prob-bar,
  body .match-card .match-overview > .opportunity {
    display: none;
  }
  body .match-card .match-overview > .recommended {
    display: grid;
  }
}

/* BET-358 : bandeau photo compact, commun aux thèmes clair et sombre. */
body .match-card .match-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 130px;
  min-height: 130px;
  padding: 8px 12px 20px;
  overflow: hidden;
  border-radius: 12px;
  background: #090d16;
  color: #fff;
}
body .match-card .match-hero::before {
  display: block;
  background: linear-gradient(180deg, rgba(17, 28, 22, 0.45) 0%, rgba(17, 28, 22, 0.92) 100%);
}
body .match-card .match-stadium-photo,
body .match-card .stadium-placeholder {
  display: block;
}
body .match-card .match-hero .match-head {
  flex-wrap: nowrap;
  gap: 4px;
  min-height: 20px;
  margin: 0;
}
body .match-card .match-hero .match-league {
  flex: 1;
  min-width: 0;
  gap: 4px;
}
body .match-card .match-hero .match-league b {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body .match-card .match-hero .match-date,
body .match-card .match-hero .match-favorites,
body .match-card .match-hero .team-form {
  display: none;
}
body .match-card .match-hero .match-head > .big-match,
body .match-card .match-hero .match-head > .status-pill {
  font-size: 9px;
  line-height: 12px;
  padding: 3px 5px;
  max-width: 36%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body .match-card .match-hero .match-teams {
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 0;
  margin: 0;
  flex: 1;
}
body .match-card .match-hero .team {
  padding: 0;
  gap: 3px;
  min-width: 0;
}
body .match-card .match-hero .team,
body .match-card .match-hero .team strong,
body .match-card .match-hero .match-league b,
body .match-card .match-hero .kickoff strong,
body .match-card .match-hero .kickoff small {
  color: #fff;
  text-shadow: 0 1px 3px #000;
}
body .match-card .match-hero .team strong {
  font-size: 12px;
  line-height: 14px;
  white-space: normal !important;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
body .match-card .match-hero .crest {
  width: 30px;
  height: 30px;
}
body .match-card .match-hero .kickoff {
  padding: 3px;
  border-radius: 8px;
}
body .match-card .match-hero .kickoff strong {
  font-size: 18px;
}
body .match-card .match-hero .kickoff small {
  font-size: 9px;
}
body .match-card .match-hero .match-center-stats {
  min-height: 24px;
  padding: 2px;
  margin-top: 2px;
  font-size: 9px;
}
body .match-card .match-hero .stadium-name,
body .match-card .match-hero .stadium-placeholder-name {
  display: block;
  position: absolute;
  inset: auto 6px 3px auto;
  max-width: calc(100% - 12px);
  width: auto;
  padding: 1px 4px;
  font-size: 8px;
  line-height: 12px;
  color: #fff;
  background: #090d16e6;
  text-decoration: none;
}
body .match-card .match-hero:not(.stadium-ready) .stadium-name {
  display: none;
}
@media (max-width: 767px) {
  body .match-card .match-hero {
    height: 115px;
    min-height: 115px;
    padding: 6px 8px 18px;
  }
  body .match-card .match-hero .match-teams {
    grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
  }
  body .match-card .match-hero .team strong {
    font-size: 11px;
    line-height: 13px;
  }
}
body .match-card .match-hero .stadium-name,
body .match-card .match-hero .stadium-placeholder-name {
  top: auto;
  left: auto;
  right: 6px;
  bottom: 2px;
  display: block;
  min-height: 0;
  height: auto;
  padding: 1px 4px;
  font-size: 8px;
  line-height: 10px;
  max-width: calc(100% - 12px);
}
body .match-card .match-hero:not(.stadium-ready) .stadium-name {
  display: none;
}

/* BET-359 : blasons lisibles sur le bandeau photo de 120 px. */
body .match-card .match-hero {
  height: 120px;
  min-height: 120px;
  padding-block: 6px 16px;
}
body .match-card .match-hero .team {
  flex-direction: column;
}
body .match-card .match-hero .crest {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
body .match-card .match-hero .crest img {
  width: 36px;
  height: 36px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
body .match-card .match-hero .crest.no-logo::after {
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 3px #000;
}

/* BET-360 : accès direct aux statistiques depuis la barre du bandeau. */
body .match-card .match-hero {
  height: 125px;
  min-height: 125px;
  padding-block: 2px 8px;
  gap: 2px;
}
body .match-card .match-hero .crest {
  background: rgba(255, 255, 255, 0.15);
}
body .match-card .match-hero .match-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto;
  height: 44px;
  min-height: 44px;
  gap: 5px;
  margin: 0;
}
body .match-card .match-hero .match-head-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}
body .match-card .match-hero .match-head-badges > * {
  min-width: 0;
  max-width: 100%;
  font-size: 8px;
  line-height: 10px;
  padding: 3px 4px;
}
body .match-card .match-hero .match-head-badges > .big-match {
  max-width: 42%;
}
.match-header-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #ffffffb3;
  border-radius: 999px;
  background: #090d16e6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.match-header-stats svg {
  width: 14px;
  height: 14px;
}
.match-header-stats:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.match-header-stats:hover {
  background: #090d16;
}
.match-header-stats .stats-short {
  display: none;
}
.match-explanation {
  scroll-margin-top: calc(var(--header-offset, 64px) + 12px);
}
@media (max-width: 767px) {
  .match-header-stats .stats-long {
    display: none;
  }
  .match-header-stats .stats-short {
    display: inline;
  }
}
body .match-card .match-hero .stadium-name,
body .match-card .match-hero .stadium-placeholder-name {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: 88px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  body .match-card .match-hero .stadium-name,
  body .match-card .match-hero .stadium-placeholder-name {
    max-width: 62px;
  }
}
/* BET-361 : afficher les prix observés même lorsque le modèle est indisponible. */
.match-result-picks.quotes-only {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.match-result-picks.quotes-only .result-pick {
  min-width: 0;
  padding: 8px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#league-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#league-dialog .league-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#league-dialog .league-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#league-dialog .league-actions button {
  flex: 1 1 auto;
  min-height: 44px;
}

.match-card .match-resources,
.match-card .match-indicators,
.match-card .bookmaker-comparison {
  min-inline-size: 0;
}

.bookmaker-comparison .bookmaker-table {
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.match-card .match-follow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.match-card .match-follow-actions .team-favorite {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  width: auto;
  height: auto;
  padding-inline: 10px;
  background: var(--surface-2);
  color: var(--text);
  text-align: start;
}
.match-card .match-follow-actions .team-favorite.active {
  color: var(--accent-text);
}
