:root {
  color-scheme: dark; /* sélecteurs de date, listes déroulantes et barres de défilement natifs en sombre */
  --bg: #05070d;
  --surface: #11141f;
  --surface-2: #171b2c;
  --text: #f4f6fb;
  --muted: #8d95ab;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #39e07a;
  --accent-dark: #1ea85a;
  --accent-ink: #04150a;
  --gold: #f0c363;
  --gold-ink: #241a04;
  --purple: #9b6bff;
  --live: #ff4f64;
  --font-display: "Rajdhani", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% -10%, rgba(57, 224, 122, 0.14), transparent 45%),
    radial-gradient(circle at 100% 10%, rgba(155, 107, 255, 0.10), transparent 40%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2px; }

/* --- barre du haut : allégée (logo + notifications), la navigation vit en bas --- */
.topbar { padding: 16px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.topbar nav { display: flex; gap: 14px; align-items: center; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.bell { position: relative; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; padding: 8px; min-width: 44px; min-height: 44px; justify-content: center; }
.bell svg { width: 22px; height: 22px; }
.bell .count { position: absolute; top: 2px; right: 2px; background: var(--live); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.65rem; padding: 1px 5px; border-radius: 999px; }

/* --- barre de navigation basse : 5 destinations, toujours visible --- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 10, 18, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.bottomnav a, .bottomnav button {
  background: none; border: 0; color: var(--muted); text-decoration: none; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 44px; min-height: 44px; justify-content: center; cursor: pointer;
}
.bottomnav svg { width: 21px; height: 21px; }
.bottomnav span { font-family: var(--font-display); font-weight: 600; font-size: 0.65rem; }
.bottomnav .active { color: var(--accent); }
.bottomnav .active span { font-weight: 700; }

.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.flash { background: var(--surface); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 10px; }
.form > div, .form .field-group { margin-bottom: 14px; }
.form label { display: block; margin-bottom: 4px; font-weight: 600; }
.form input:not([type=file]), .form textarea, .form select {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; font-size: 1rem; min-height: 44px; font-family: inherit;
}
.form .helptext, .form small { color: var(--muted); display: block; font-size: 0.85rem; }
.form .errorlist { color: #ff8a80; margin: 4px 0; padding-left: 18px; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  font-family: var(--font-display); border: 0; border-radius: 999px; padding: 13px 22px;
  font-size: 1rem; text-decoration: none; cursor: pointer; letter-spacing: 0.2px;
}
details.card summary { cursor: pointer; font-weight: 600; }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
/* Plusieurs boutons côte à côte : séparés partout, l'un sous l'autre et pleine largeur sur téléphone. */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { text-align: center; }
@media (max-width: 480px) { .btn-row .btn { flex: 1 1 100%; } }
.or-sep { text-align: center; color: var(--muted); margin: 14px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; min-height: 44px; }
.check input { width: auto !important; min-height: 0 !important; }
.form input[type=text], .form textarea { margin-bottom: 4px; }
.bubble { padding: 10px 14px; border-radius: 14px; max-width: 90%; margin: 8px 0; }
.bubble.user { background: var(--accent); color: var(--accent-ink); margin-left: auto; }
.bubble.assistant { background: var(--surface); }
.card ul, ul { padding-left: 20px; }
.roles { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.chip { white-space: nowrap; background: var(--surface); color: var(--text); text-decoration: none; padding: 10px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; border: 1px solid var(--border); }
.chip.active { background: var(--accent); color: var(--accent-ink); font-weight: 700; border-color: transparent; }
article.card, section.card { margin-bottom: 12px; }
#manual input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 1rem; min-height: 44px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.filters { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 12px 0; }
.filters input[type=search], .filters button { grid-column: 1 / -1; }
.filters input, .filters select, .filters button {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; font-size: 1rem; min-height: 44px; font-family: inherit;
}
.filters button { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-family: var(--font-display); border: 0; }
.card-link { display: block; color: inherit; text-decoration: none; }
.container > a.card-link { margin-bottom: 12px; }
.rating { color: var(--accent) !important; font-weight: 700; }
.pager { display: flex; justify-content: space-between; margin-top: 16px; }
.stats { width: 100%; border-collapse: collapse; }
.stats th, .stats td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: right; }
.stats th:first-child, .stats td:first-child { text-align: left; }
.brand { color: var(--text); font-weight: 700; font-family: var(--font-display); font-size: 1.4rem; text-decoration: none; letter-spacing: 0.3px; }
.brand span { color: var(--accent); }

.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
/* Filet de sécurité : un mot plus long que sa boîte (pseudo en adresse e-mail, nom d'équipe sans espace) passe à la ligne au lieu de
   faire déborder la page. N'agit que s'il y aurait débordement ; les cas particuliers (grilles, tableaux) ont leur propre règle. */
main { overflow-wrap: break-word; }

/* --- bannière héro : dégradé sombre + halo, comme les écrans d'accueil de jeux mobiles --- */
.hero {
  border-radius: 20px; padding: 26px 22px; margin-top: 8px;
  background: linear-gradient(135deg, #122a1d 0%, #0d1f16 55%, #0a1712 100%);
  border: 1px solid rgba(57, 224, 122, 0.25);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(57, 224, 122, 0.35), transparent 70%);
}
.hero > * { position: relative; }
.hero h1 { font-size: 1.9rem; line-height: 1.15; margin: 8px 0 12px; }
.hero p { color: var(--muted); margin: 0 0 16px; }

.badge {
  display: inline-block;
  background: rgba(57, 224, 122, 0.15);
  color: var(--accent) !important;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.live { background: rgba(255, 79, 100, 0.15); color: var(--live) !important; }
.badge.gold { background: rgba(240, 195, 99, 0.15); color: var(--gold) !important; }
.badge.neutral { background: rgba(255, 255, 255, 0.08); color: var(--muted) !important; }

/* --- lignes de liste façon jeu mobile : vignette icône, titre, méta, badge à droite --- */
.row-card { display: flex; align-items: center; gap: 12px; }
.row-card .tile {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2a3550, var(--surface-2)); color: #9fb0ff;
}
.row-card .tile.green { background: linear-gradient(160deg, #1c3324, var(--surface-2)); color: var(--accent); }
.row-card .tile.gold { background: linear-gradient(160deg, #3a2f14, var(--surface-2)); color: var(--gold); }
.row-card .tile svg { width: 20px; height: 20px; }
.row-card .body { flex-grow: 1; min-width: 0; }
.row-card .body h2 { margin: 0 0 2px; font-size: 1.02rem; }
.row-card .body p { margin: 0; font-size: 0.82rem; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); border-radius: 999px; }

/* --- en-tête de page de détail : titre + pastilles d'information --- */
.page-head { margin: 4px 0 14px; }
.page-head h1 { margin: 6px 0 10px; }
.page-head .pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 0.9rem; min-height: 32px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--gold); }
.coin { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.coin::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); display: inline-block; }

.cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); }

/* --- cartes « palier » (offres, packs) : bordure dégradée façon carte de rareté --- */
.tier-card { border-radius: 18px; padding: 1px; }
.tier-card > .tier-card-inner { background: var(--surface-2); border-radius: 17px; padding: 16px; }
.tier-card.tier-free { background: linear-gradient(155deg, rgba(255,255,255,0.25), rgba(255,255,255,0.03)); }
.tier-card.tier-gold { background: linear-gradient(155deg, var(--gold), rgba(240,195,99,0.1)); }
.tier-card.tier-purple { background: linear-gradient(155deg, var(--purple), rgba(155,107,255,0.1)); }

.footer { padding: 24px 16px 90px; text-align: center; color: var(--muted); font-size: 0.72rem; line-height: 1.4; opacity: 0.85; }
.footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.6rem; }
}

.bracket { display: block; padding-bottom: 8px; }
.bracket-round { margin-bottom: 14px; }
.bracket-round h3 { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.bracket-match { margin-bottom: 10px; padding: 10px; }
.bracket-match p { margin: 2px 0; }
.sponsor-banner { text-align: center; }
.sponsor-logo { max-height: 80px; max-width: 100%; border-radius: 8px; margin-bottom: 8px; }

/* --- cartes joueur, façon jeu : grosse note, poste, nom --- */
.cards.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.player-card { display: block; color: inherit; text-decoration: none; }
.player-card .tier-card-inner { padding: 12px; height: 100%; display: flex; flex-direction: column; gap: 2px; }
.player-card .rate { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--accent); }
.player-card.tier-gold .rate { color: var(--gold); }
.player-card .pos { font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.6px; color: var(--muted); text-transform: uppercase; }
.player-card h2 { margin: 6px 0 0; font-size: 0.98rem; overflow-wrap: anywhere; }
.player-card .meta { font-size: 0.75rem; color: var(--muted); margin: 0; overflow-wrap: anywhere; }

.player-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
/* Le bloc du nom passe à la ligne sous l'illustration et la note quand la place manque, au lieu de déborder du cadre. */
.player-hero .hero-text { flex: 1 1 200px; min-width: 0; }
.player-hero h1, .player-hero p { overflow-wrap: anywhere; }
.player-hero .badge { white-space: normal; max-width: 100%; overflow-wrap: anywhere; line-height: 1.35; }
.player-hero .big-rate { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; line-height: 1; color: var(--gold); }
.player-hero .sub { font-size: 0.8rem; color: var(--muted); }

/* --- lignes de statistiques avec jauge --- */
.stat-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--border); align-items: center; }
.stat-row .label { font-size: 0.9rem; }
.stat-row .vals { font-family: var(--font-display); font-weight: 700; text-align: right; }
.stat-row .vals .base { color: var(--muted); font-weight: 600; margin-right: 8px; }
.stat-row .meter { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stat-row .meter > span { display: block; height: 100%; max-width: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); border-radius: 999px; }

/* --- petites icônes dans les boutons --- */
.btn .ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

/* --- sections d'un rapport --- */
.report-section { margin-top: 22px; }
.report-section > h2 { font-size: 0.85rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.xi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.xi-grid .slot { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.xi-grid .slot strong { display: block; font-size: 0.92rem; }
.xi-grid .slot span { font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; color: var(--accent); letter-spacing: 0.5px; }

/* --- formulaires : sélecteurs de fichier, cases à cocher, bouton principal pleine largeur --- */
.form input[type=file] {
  width: 100%; background: var(--surface); color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 14px; padding: 14px;
  font-family: inherit; font-size: 0.9rem; margin-bottom: 6px;
}
.form input[type=file]::file-selector-button {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 9px 16px; margin-right: 12px; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.form input[type=checkbox], .form input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.form.wide button[type=submit].btn { width: 100%; margin-top: 6px; }
.form textarea { min-height: 96px; resize: vertical; }
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-card > h1 { margin-bottom: 4px; }
.auth-card .intro { margin: 0 0 14px; font-size: 0.85rem; opacity: 0.8; }
.form .helptext, .form .helptext li { color: var(--muted); font-size: 0.8rem; }
.form .helptext ul { margin: 4px 0 0; padding-left: 18px; }

/* --- notifications : pastille non lue --- */
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex-shrink: 0; box-shadow: 0 0 8px rgba(57, 224, 122, 0.6); }
.unread-dot.read { background: transparent; box-shadow: none; border: 1px solid var(--border); }

/* --- pages de gestion : rangées d'actions et formulaires en pile --- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.actions form { margin: 0; }
.form.stack { display: grid; gap: 10px; margin-top: 10px; }
.form.stack > * { margin: 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Un pseudo très long (adresse e-mail, nom sans espace) passe à la ligne au lieu de pousser les boutons hors de l'écran */
.list-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.container > div.card, .report-section > div.card { margin-bottom: 10px; }
.card p + p, .card ul + p, .card p + ul { margin-top: 8px; }

/* --- grands écrans : contenu centré comme le reste, navigation en haut, cartes joueur sur 4 colonnes --- */
@media (min-width: 900px) {
  .topbar { padding-inline: max(16px, calc((100vw - 960px) / 2 + 16px)); }
  /* la navigation quitte le bas de l'écran et s'installe au centre de la barre du haut */
  .topbar {
    position: sticky; top: 0; z-index: 30; min-height: 68px; box-sizing: border-box;
    background: rgba(7, 10, 18, 0.92); backdrop-filter: blur(10px);
  }
  .bottomnav {
    top: 0; bottom: auto; left: 50%; right: auto; width: auto; height: 68px; transform: translateX(-50%);
    z-index: 31; padding: 0; gap: 2px; justify-content: center;
    background: none; backdrop-filter: none; border: 0;
  }
  .bottomnav a { flex-direction: row; gap: 8px; padding: 0 12px; height: 40px; min-height: 40px; border-radius: 10px; }
  .bottomnav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
  .bottomnav a.active { background: rgba(57, 224, 122, 0.1); }
  .bottomnav svg { width: 18px; height: 18px; }
  .bottomnav span { font-size: 0.9rem; }
  .footer { padding-bottom: 32px; }
  html { scroll-padding-top: 84px; }  /* les liens d'ancre (CGU) ne passent pas sous la barre collée */
  .cards.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- familles visuelles des types de carte : couleur de bordure, de note et d'icône --- */
.tier-card.tier-standard { background: linear-gradient(155deg, rgba(255,255,255,0.25), rgba(255,255,255,0.03)); }
.tier-card.tier-epic { background: linear-gradient(155deg, var(--purple), rgba(155,107,255,0.1)); }
.tier-card.tier-bigtime, .tier-card.tier-special { background: linear-gradient(155deg, var(--gold), rgba(240,195,99,0.1)); }
.tier-card.tier-showtime { background: linear-gradient(155deg, #35d0ff, rgba(53,208,255,0.1)); }
.ct-icon { width: 14px; height: 14px; vertical-align: -2px; }
.ct-standard { color: var(--muted); }
.ct-epic { color: var(--purple); }
.ct-bigtime, .ct-special { color: var(--gold); }
.ct-showtime { color: #35d0ff; }
.player-card.tier-standard .rate { color: var(--accent); }
.player-card.tier-epic .rate { color: var(--purple); }
.player-card.tier-bigtime .rate, .player-card.tier-special .rate { color: var(--gold); }
.player-card.tier-showtime .rate { color: #35d0ff; }
.big-rate.ct-standard { color: var(--accent); }
.badge.ct-badge { background: rgba(255,255,255,0.08); }

/* --- ouverture d'un pack : la boîte tremble, un flash, puis les cartes arrivent une à une --- */
.pack-box { display: block; width: 100%; border: 0; cursor: pointer; font: inherit; color: inherit; margin-top: 12px; }
.pack-box .tier-card-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center; }
.pack-box small { color: var(--muted); }
.pack-box.opening { animation: pack-shake 0.65s ease-in-out, pack-flash 0.65s ease-in forwards; }
.pack-stage.opened .pack-box { display: none; }
.js .pack-stage:not(.opened) .reveal-cards { display: none; }
.pack-stage.opened .reveal-cards > * { animation: card-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; animation-delay: calc(var(--i, 0) * 130ms); }
@keyframes pack-shake {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-3deg) scale(1.02); }
  35% { transform: rotate(3deg) scale(1.03); }
  55% { transform: rotate(-3deg) scale(1.05); }
  75% { transform: rotate(2deg) scale(1.06); }
}
@keyframes pack-flash { from { box-shadow: 0 0 0 rgba(240,195,99,0); } to { box-shadow: 0 0 70px rgba(240,195,99,0.95); } }
@keyframes card-in { from { opacity: 0; transform: translateY(26px) scale(0.85) rotate(-4deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pack-box.opening, .pack-stage.opened .reveal-cards > * { animation: none; }
}

/* --- robustesse mobile : tableaux larges défilables, éléments de grille qui peuvent rétrécir --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
.compact-table { font-size: 0.8rem; min-width: 560px; }
.compact-table td, .compact-table th { white-space: nowrap; }
.filters > * { min-width: 0; }
.filters select { text-overflow: ellipsis; }

/* Listes à puces sobres (garanties de paiement) */
.card .checklist, .checklist { list-style: none; margin: 8px 0 0; padding-left: 0; }
.checklist li { font-size: 0.88rem; padding: 8px 0; border-top: 1px solid var(--border); }
.checklist li:first-child { border-top: 0; }
.checklist strong { color: var(--text); }

/* --- bandeau « installer l'application » : sous la barre du haut, téléphone seulement --- */
.install-banner { display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding: 12px 12px 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.install-banner[hidden] { display: none; }
.install-banner > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.install-banner .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.install-banner .txt strong { color: var(--text); font-family: var(--font-display); font-size: 0.95rem; }
.install-banner .btn { padding: 10px 16px; white-space: nowrap; }
.install-close { flex: none; width: 44px; height: 44px; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
@media (min-width: 900px) { .install-banner { display: none; } }

/* --- rappel du délai de déclaration des scores : en haut des pages tournoi, ligue et match --- */
.deadline-note { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 12px; }
.deadline-note > svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--gold); }
.deadline-note strong { color: var(--text); font-family: var(--font-display); font-size: 1rem; }
.deadline-note p { margin: 4px 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.deadline-note p.mine { color: var(--text); font-size: 0.88rem; }
.deadline-note p.mine a { margin-left: 4px; }

/* --- page d'accueil --- */
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 0.75rem; letter-spacing: 1.5px; color: var(--accent); text-transform: uppercase; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0 !important; }
.chips li { font-size: 0.78rem; color: var(--muted); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); padding: 4px 10px; border-radius: 999px; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.stat-strip .card { text-align: center; padding: 12px 8px; }
.stat-strip .stat-value { font-size: 1.5rem; color: var(--accent); }
.alert-card { margin-top: 14px; border-color: rgba(240, 195, 99, 0.45); }
.home-section { margin-top: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 1.25rem; }
.section-head a { color: var(--accent); font-size: 0.85rem; text-decoration: none; }
.home-section .card + .card, .home-section a.card + a.card { margin-top: 10px; }
.prize-line { margin-top: 10px !important; font-size: 0.85rem; color: var(--text) !important; }
.prize-line span { color: var(--gold); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 1px; margin-right: 6px; }
.steps { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 10px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; }
.step-n { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; background: linear-gradient(160deg, var(--accent), var(--accent-dark)); color: var(--accent-ink); }
.feature-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.feature .tile { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); margin-bottom: 10px; }
.feature .tile svg { width: 20px; height: 20px; }
.feature .tile.green { background: linear-gradient(160deg, #1c3324, var(--surface-2)); color: var(--accent); }
.feature .tile.gold { background: linear-gradient(160deg, #3a2f14, var(--surface-2)); color: var(--gold); }
.feature p { font-size: 0.88rem; }
.trust { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 10px; }
.trust li { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: 0.9rem; }
.trust strong { color: var(--text); }
.plan-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.plan-price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--text) !important; margin: 2px 0 6px !important; }
.plan-grid p { font-size: 0.88rem; }
.tier-card-inner h2 { margin: 0 0 4px; }
.tier-card-inner p { color: var(--muted); margin: 0; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; min-height: 44px; }
.faq details p { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; }
.cta-band { margin-top: 28px; text-align: center; border-radius: 20px; padding: 26px 18px; border: 1px solid rgba(57, 224, 122, 0.3); background: linear-gradient(160deg, rgba(57, 224, 122, 0.14), rgba(155, 107, 255, 0.08)); }
.cta-band h2 { margin: 0 0 4px; font-size: 1.4rem; }
.cta-band p { color: var(--muted); margin: 0 0 14px; }
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
}

/* --- chiffres clés de la gestion --- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.kpi { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--accent); }
.kpi:first-child strong { color: var(--gold); font-size: 2.4rem; }
.kpi span { font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- comparaison de deux cartes --- */
.cmp-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.cmp-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.cmp-card .card-art-large { width: 72px; }
.cmp-rate { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--gold); }
.cmp-name { color: var(--text); overflow-wrap: anywhere; line-height: 1.2; }
.cmp-sub { font-size: 0.74rem; color: var(--muted); overflow-wrap: anywhere; }
.cmp-change { font-size: 0.8rem; margin-top: 2px; }
.cmp-empty { color: var(--muted); font-weight: 700; }
.cmp-modes { display: flex; gap: 8px; margin: 14px 0 6px; }
.cmp-score { font-size: 0.9rem; color: var(--muted); margin: 6px 0 10px; overflow-wrap: anywhere; }
.cmp-score .win { color: var(--accent); font-weight: 700; }
.cmp-table { padding-top: 4px; padding-bottom: 4px; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-label { text-align: center; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.cmp-val { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-align: center; color: var(--text); }
.cmp-val.win { color: var(--accent); }
.cmp-verdict { margin-top: 18px; }
.cmp-pick { font-size: 1.05rem; color: var(--text); }
.cmp-pick strong { color: var(--accent); }
.cmp-strengths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; font-size: 0.86rem; overflow-wrap: anywhere; }
.cmp-strengths ul { margin: 4px 0 0; padding-left: 16px; color: var(--muted); }
.cmp-choice { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.cmp-choice span { font-size: 0.82rem; color: var(--muted); }

/* --- illustrations de cartes --- */
.player-card .card-art { float: right; width: 56px; height: auto; border-radius: 6px; margin-left: 10px; object-fit: cover; }
.card-art-large { width: 110px; height: auto; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--border); }

.profile-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; background: rgba(240, 195, 99, 0.12); border: 1px solid rgba(240, 195, 99, 0.4); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 0.88rem; color: var(--text); }
.profile-banner a { color: var(--gold); font-weight: 700; text-decoration: none; white-space: nowrap; }

.staff-link { margin-left: auto; margin-right: 6px; font-size: 0.8rem; font-weight: 700; color: var(--gold) !important; border: 1px solid rgba(240, 195, 99, 0.45); background: rgba(240, 195, 99, 0.1); padding: 5px 11px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.gestion-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; background: rgba(155, 107, 255, 0.12); border: 1px solid rgba(155, 107, 255, 0.4); border-radius: 12px; padding: 9px 14px; margin: 0 0 12px; font-size: 0.85rem; }
.gestion-bar span { color: var(--muted); flex: 1 1 200px; }
.gestion-bar a { color: var(--purple); font-weight: 700; text-decoration: none; white-space: nowrap; }

.advice-box { background: rgba(57, 224, 122, 0.08); border: 1px solid rgba(57, 224, 122, 0.35); border-radius: 12px; padding: 10px 14px; margin: 8px 0 12px; }
.advice-box p { color: var(--text); margin: 0 0 6px; }
.card.recommended { border-color: rgba(57, 224, 122, 0.55); }

/* Bouton « Rejoindre la communauté » : vert WhatsApp */
.community-card { border-color: rgba(37, 211, 102, 0.45); margin-top: 14px; }
.community-btn { background: #25d366; color: #05140b; }

/* Bouton flottant « Communauté » : visible dès l'arrivée, avant même la connexion, au-dessus de la barre du bas */
.community-fab {
  position: fixed; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 19;
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 10px 12px;
  background: #25d366; color: #05140b; border-radius: 999px; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.community-fab svg { width: 22px; height: 22px; }

/* Un match : les deux joueurs face à face, l'un à gauche, l'autre à droite, les matchs empilés de haut en bas */
.vs-card { padding: 12px; margin-bottom: 10px; }
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.vs-side { overflow-wrap: anywhere; line-height: 1.25; }
.vs-side strong { color: var(--text); }
.vs-right { text-align: right; }
.vs-mid { font-family: var(--font-display); font-weight: 700; color: var(--muted); font-size: 0.85rem; letter-spacing: 1px; text-align: center; }
.vs-score { color: var(--accent); font-size: 1.15rem; }
.vs-foot { margin: 8px 0 0; font-size: 0.82rem; text-align: center; }
.vs-title { margin: 14px 0 4px; font-size: 0.95rem; }
.vs-round { margin: 8px 0 4px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.team { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.match-time .vs-line { margin-bottom: 6px; overflow-wrap: anywhere; }

/* Partage WhatsApp d'un tournoi */
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { background: #25d366; color: #06210f; font-weight: 700; border: 0; }

/* Saisie / correction d'un score par l'organisateur */
.result-line { display: grid; grid-template-columns: minmax(0, 1fr) 5rem; align-items: center; gap: 8px 12px; margin: 6px 0; }
.result-line strong, .result-line .muted { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.result-line input[type="number"] { width: 100%; text-align: center; border: 1px solid var(--border, #2a3140); }

/* Guide d'installation de l'application */
.install-guide { max-width: 420px; width: calc(100% - 32px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.install-guide::backdrop { background: rgba(0, 0, 0, 0.7); }
.install-guide h2 { margin-top: 0; }
.install-guide ol { padding-left: 1.2rem; line-height: 1.55; }
.install-guide li { margin-bottom: 8px; }
.install-guide form { margin-top: 12px; }

/* Compte à rebours des inscriptions */
.countdown-card { border-color: var(--gold); }
.countdown { margin: 8px 0 0; font-size: 1rem; }
.countdown-value { font-family: var(--font-display); font-size: 1.35rem; color: var(--gold); font-variant-numeric: tabular-nums; }

.vs-pens { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

/* Badge « compte vérifié » */
.verified { display: inline-flex; vertical-align: -0.12em; margin-left: 0.28em; color: var(--accent); font-size: 0.95em; line-height: 1; }
.verified svg { display: block; }
.badge.verified-pill { background: rgba(57, 224, 122, 0.14); color: var(--accent) !important; }
.verified-text { color: var(--accent); font-weight: 600; }

/* Repêché pour la phase finale (poules) */
tr.wildcard td:first-child::after { content: " (repêché)"; color: var(--gold); font-size: 0.75em; }

/* Marketplace : photos des annonces */
.listing-thumb { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.listing-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.listing-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-2); border-radius: 12px; display: block; }  /* la capture entière, jamais rognée */
.photo-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 8px; }
.photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* Poules : chacun voit sa poule */
.group-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.group-chip { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 700; text-decoration: none; }
.group-chip.mine { background: rgba(57, 224, 122, 0.16); border-color: var(--accent); color: var(--accent); }
.my-group { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.my-group-card { border-color: var(--accent); }
tr.me td:first-child { font-weight: 800; color: var(--accent); }

/* Classement ELO et preuve du tirage : la colonne du nom prend la place restante (alignée à gauche, passe à la ligne), les colonnes de chiffres gardent leur largeur */
.stats.board { table-layout: fixed; }
.stats.board th, .stats.board td { padding: 8px 4px; }
.stats.board th:first-child, .stats.board td:first-child { width: 2.2rem; }
.stats.board th:nth-child(2), .stats.board td:nth-child(2) { text-align: left; overflow-wrap: anywhere; line-height: 1.25; }
.stats.board th:nth-child(n+3), .stats.board td:nth-child(n+3) { width: 4.4rem; }
.stats.board.draw th:nth-child(3), .stats.board.draw td:nth-child(3) { width: 7rem; }
.stats.board.draw td:nth-child(3) code { font-size: 0.8rem; overflow-wrap: normal; }

/* Classements : un pseudo ou un nom d'équipe trop long passe à la ligne au lieu de faire déborder le tableau (petit écran) */
.stats.fit { table-layout: fixed; }
.stats.fit th, .stats.fit td { padding: 8px 3px; }
.stats.fit th:not(:first-child), .stats.fit td:not(:first-child) { width: 2.1rem; }
.stats.fit th:last-child, .stats.fit td:last-child { width: 2.6rem; }
.stats.fit td:first-child { overflow-wrap: anywhere; word-break: break-word; line-height: 1.25; }
.stats.fit td:first-child .team { display: block; }

/* Classement des ligues : garder la colonne joueur lisible avec le rang ajouté, même sur mobile. */
.stats.league-standings { table-layout: fixed; }
.stats.league-standings th, .stats.league-standings td { padding: 8px 2px; font-size: 0.86rem; }
.stats.league-standings th:first-child, .stats.league-standings td:first-child { width: 2.5rem; text-align: center; }
.stats.league-standings th:nth-child(2), .stats.league-standings td:nth-child(2) { text-align: left; overflow-wrap: anywhere; word-break: break-word; line-height: 1.25; }
.stats.league-standings th:nth-child(n+3):not(:last-child), .stats.league-standings td:nth-child(n+3):not(:last-child) { width: 1.85rem; }
.stats.league-standings th:last-child, .stats.league-standings td:last-child { width: 2.3rem; }
.stats.league-standings td:nth-child(2) .team { display: block; }

/* Montées et descentes : couleurs cohérentes entre les réglages et le résumé des divisions. */
.division-rule-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.division-rule { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.division-rule label { display: block; margin-bottom: 6px; color: var(--text); font-weight: 700; }
.division-rule.promotion-rule { border-color: rgba(57, 224, 122, 0.42); background: rgba(57, 224, 122, 0.07); }
.division-rule.promotion-rule label, .division-rule.promotion-rule input { color: var(--accent); }
.division-rule.relegation-rule { border-color: rgba(255, 79, 100, 0.42); background: rgba(255, 79, 100, 0.07); }
.division-rule.relegation-rule label, .division-rule.relegation-rule input { color: var(--live); }
.movement-count { display: inline-flex; align-items: center; margin: 2px 2px 2px 0; padding: 2px 8px; border-radius: 999px; font-weight: 800; font-size: 0.82rem; white-space: nowrap; }
.promotion-count { color: var(--accent); background: rgba(57, 224, 122, 0.12); }
.relegation-count { color: var(--live); background: rgba(255, 79, 100, 0.12); }
.division-list li { margin: 7px 0; }
.stats.league-standings tr.standings-promotion td { background: rgba(57, 224, 122, 0.08); }
.stats.league-standings tr.standings-promotion td:first-child { color: var(--accent); font-weight: 900; }
.stats.league-standings tr.standings-relegation td { background: rgba(255, 79, 100, 0.08); }
.stats.league-standings tr.standings-relegation td:first-child { color: var(--live); font-weight: 900; }
.standings-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* Un pseudo très long (sans espace) ne doit jamais élargir la page : les titres passent à la ligne n'importe où */
h1, h2, h3, .page-head h1 { overflow-wrap: anywhere; }

/* Vainqueur d'un tournoi : bandeau sur la page, ligne sur la carte de la liste ; sections de la liste */
.champion-card { margin-bottom: 12px; text-align: center; }
.champion-kicker { color: var(--gold); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; margin: 0; }
.champion-name { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); margin: 4px 0 0; overflow-wrap: anywhere; line-height: 1.2; }
.champion-line { margin: 6px 0 0; font-size: 0.9rem; color: var(--gold); overflow-wrap: anywhere; }
.champion-line strong { color: var(--text); }
.list-section { margin: 18px 0 8px; font-size: 1.05rem; }

/* Marketplace : étapes d'achat, case des conditions, bouton WhatsApp */
.buy-steps { margin: 0 0 12px; padding-left: 20px; color: var(--muted); line-height: 1.5; }
.buy-steps li { margin-bottom: 4px; }
.buy-steps strong { color: var(--text); }
.terms-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.terms-check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent); }
.whatsapp-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; background: #25d366; color: #052e14; font-weight: 800; text-align: center; }
.buy-form .btn { width: 100%; }

/* Marketplace : suppression d'une annonce par son vendeur */
.btn.danger { background: transparent; color: var(--live); border: 1px solid var(--live); }
.btn.small { padding: 8px 16px; font-size: 0.9rem; }
.listing-delete { margin: 4px 0 16px; }
.listing-owned > .card-link { margin-bottom: 8px; }

/* Message d'un modérateur à un joueur (tout en haut des pages, jusqu'à échéance, « C'est fait » ou retrait) */
.user-banner { background: rgba(57, 224, 122, 0.10); border: 1px solid rgba(57, 224, 122, 0.45); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.user-banner p { margin: 0 0 10px; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.user-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-banner-actions form { margin: 0; }
.user-banner-actions .btn { padding: 9px 18px; font-size: 0.92rem; text-align: center; }
