:root {
  --pitch-dark: #0F3D24;
  --pitch: #1E5631;
  --pitch-light: #2F7A4A;
  --pitch-lighter: #3F9463;
  --gold: #E8B330;
  --gold-dark: #C4941F;
  --ink: #141B18;
  --paper: #F6F4EC;
  --paper-alt: #FFFFFF;
  --line: #E2DFD3;
  --muted: #726F66;
  --danger: #B3432B;
  --system-dark: #2B3A55;
  --system: #3E5279;
  --system-light: #5A729E;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Work Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }
body { font-family: var(--font-body); color: var(--ink); background: var(--paper); }

a { text-decoration: none; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.02em; margin: 0; }

button, input, select { font-family: var(--font-body); }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }

.container { padding: 36px 48px; display: flex; flex-direction: column; gap: 28px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* Top navigation */
.topbar {
  background:
    radial-gradient(420px 200px at 12% -40%, rgba(242,193,78,0.20) 0%, rgba(242,193,78,0) 70%),
    radial-gradient(420px 200px at 88% -40%, rgba(242,193,78,0.16) 0%, rgba(242,193,78,0) 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 34px),
    var(--pitch-dark);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 72px;
  gap: 28px;
  flex-shrink: 0;
  position: relative;
}
.topbar nav { display: flex; gap: 4px; flex-grow: 1; order: 2; }
.topbar nav a { color: rgba(255,255,255,0.68); font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 8px; }
.topbar nav a.active { color: var(--pitch-dark); background: var(--gold); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--pitch-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 15px; flex-shrink: 0; }

.nav-toggle-checkbox { display: none; }
.nav-toggle-btn { display: none; order: 0; width: 38px; height: 38px; border-radius: 8px; align-items: center; justify-content: center; color: rgba(255,255,255,0.9); cursor: pointer; }
.nav-toggle-btn:hover { background: rgba(255,255,255,0.08); }

.logout-form { flex-shrink: 0; order: 4; margin-left: auto; }
.btn-logout { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; padding: 4px 16px 4px 4px; color: rgba(255,255,255,0.92); font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-logout:hover { background: rgba(255,255,255,0.08); }
.btn-logout .avatar { width: 30px; height: 30px; font-size: 12px; }
.btn-logout-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.btn-logout-role { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,0.55); }

/* Buttons */
.btn { font-family: var(--font-body); font-weight: 600; font-size: 14px; border-radius: 9px; padding: 11px 22px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--gold); color: var(--pitch-dark); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.92); border-color: rgba(255,255,255,0.32); }
.btn-outline { background: transparent; color: var(--pitch-dark); border-color: var(--line); }
.btn-outline:hover { background: rgba(30,86,49,0.06); }
.btn-danger-outline { background: transparent; color: var(--danger); border: 1px solid rgba(179,67,43,0.35); font-size: 13px; padding: 7px 14px; border-radius: 7px; }
.btn-danger-outline:hover { background: rgba(179,67,43,0.06); }
.btn-block { width: 100%; }

/* Cards */
.card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; }
.card-pad { padding: 26px 28px; }

.alert { border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.alert-danger { background: rgba(179,67,43,0.09); color: var(--danger); border: 1px solid rgba(179,67,43,0.25); }

/* Stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-tile { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 14px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; box-shadow: 0 10px 24px -14px rgba(15,61,36,0.3); }
.stat-tile .icon { width: 20px; height: 20px; color: var(--pitch); margin-bottom: 2px; }
.stat-tile .num { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--pitch-dark); }
.stat-tile .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; }

/* Cartes d'entité unifiées (saisons, joueurs, clubs, utilisateurs) */
.season-grid, .player-grid, .club-grid, .user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }

.season-card, .player-card, .club-card, .user-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-alt);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 14px 28px -18px rgba(15,61,36,0.28);
}
.season-card, .player-card, .club-card, .user-card { cursor: pointer; text-align: left; padding: 0; }

/* Carte utilisateur : même gabarit que joueurs/clubs/saisons, mais bandeau "système" (bleu ardoise)
   plutôt que le vert terrain, pour marquer que cette page gère des comptes et pas de l'exploitation. */
.user-card .card-crest {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 26px),
    linear-gradient(135deg, var(--system-light), var(--system-dark));
}
.user-card .card-badge { border-color: var(--system-light); }

.relationship-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.35);
}
.relationship-chip .icon { width: 15px; height: 15px; flex-shrink: 0; }
.relationship-chip.homme { color: #1D4ED8; }
.relationship-chip.homme .icon { color: #1D4ED8; }
.relationship-chip.femme { color: #BE185D; }
.relationship-chip.femme .icon { color: #BE185D; }
.relationship-chip.neutre { color: var(--gold-dark); }
.relationship-chip.neutre .icon { color: var(--gold-dark); }
.relationship-chip.admin-role { background: rgba(232,179,48,0.95); color: var(--pitch-dark); }
.relationship-chip.admin-role .icon { color: var(--pitch-dark); fill: currentColor; stroke: none; }
.relationship-chip.inline-chip { position: static; box-shadow: none; flex-shrink: 0; border: 1.5px solid currentColor; }

.relationship-chip.club-favorite {
  background: #FFD400;
  color: var(--pitch-dark);
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85), 0 6px 16px -4px rgba(255,212,0,0.85);
}
.relationship-chip.club-favorite .icon { color: var(--pitch-dark); fill: currentColor; stroke: none; }

.family-list { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; }
.family-list-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.family-list-item .relationship-chip { position: static; box-shadow: none; }

/* Sélecteur "Enfants concernés" (formulaires Nouvel/Modifier utilisateur) : une liste de lignes plutôt qu'un empilement de checkboxes brutes. */
.player-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  max-height: 260px;
  overflow-y: auto;
}
.player-picker-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.player-picker-row:last-child { border-bottom: none; }
.player-picker-row:hover { background: var(--paper-alt); }
.player-picker-row.checked { background: rgba(232,179,48,0.10); }
.player-picker-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark));
  overflow: hidden;
}
.player-picker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.player-picker-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.player-picker-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-picker-role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.player-picker-check { flex-shrink: 0; }
.player-picker-empty { padding: 16px 12px; font-size: 13px; color: var(--muted); text-align: center; }

.card-crest {
  height: 106px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 26px),
    linear-gradient(135deg, var(--pitch-light), var(--pitch-dark));
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.card-badge {
  width: 58px; height: 58px; border-radius: 50%; background: var(--paper-alt);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 19px; color: var(--pitch-dark);
  border: 3px solid var(--gold); position: relative; z-index: 1; overflow: hidden; flex-shrink: 0;
}
.card-badge img { width: 100%; height: 100%; object-fit: cover; }

.club-card .card-crest, .player-card .card-crest, .season-card .card-crest, .user-card .card-crest { flex-direction: column; gap: 6px; }
.club-acronym-caption { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: rgba(255,255,255,0.75); }

/* Carte "en vedette" (saison la plus récente, joueur actif, club préféré) */
.season-card.featured, .player-card.featured, .club-card.featured { box-shadow: 0 22px 44px -20px rgba(15,61,36,0.4); }
.season-card.featured .card-crest, .player-card.featured .card-crest, .club-card.featured .card-crest { background: radial-gradient(260px 160px at 20% 0%, rgba(232,179,48,0.35) 0%, rgba(232,179,48,0) 70%), repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 26px), repeating-linear-gradient(-45deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 26px), linear-gradient(150deg, var(--pitch-light), var(--pitch-dark)); }
.season-card.featured .card-badge, .player-card.featured .card-badge, .club-card.featured .card-badge { animation: heroPulse 2.6s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(232,179,48,0.22); }
.season-card.featured .mini-ball, .player-card.featured .mini-ball, .club-card.featured .mini-ball { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; opacity: 0.4; animation: heroPulse 3.2s ease-in-out infinite; }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.card-line { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-line .icon { width: 15px; height: 15px; color: var(--pitch); flex-shrink: 0; }
.card-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-logo-mini { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; flex-shrink: 0; background: #fff; }
.card-tags-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-line.club-timeline { flex-wrap: wrap; }
.card-line.club-timeline .icon { width: 12px; height: 12px; color: var(--gold-dark); flex-shrink: 0; }
.club-timeline-chip { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); white-space: nowrap; }
.club-timeline-chip.past { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(114,111,102,0.5); }
.club-timeline-chip.current { color: var(--pitch-dark); border-color: var(--gold-dark); background: rgba(232,179,48,0.14); }
.club-timeline-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 12px; margin-top: 16px; }
.club-timeline-banner .icon { width: 13px; height: 13px; color: var(--gold-dark); flex-shrink: 0; }
.club-timeline-banner-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

.admin-star {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.35);
}
.admin-star .icon { width: 15px; height: 15px; color: var(--pitch-dark); }

.captain-star-cell { display: flex; align-items: center; justify-content: center; }
.match-note-icon { width: 14px; height: 14px; color: var(--muted); margin-left: 6px; vertical-align: -2px; cursor: help; }

.starter-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.starter-chip.yes { background: rgba(30,86,49,0.12); color: var(--pitch); }
.starter-chip.no { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.full-match-cell { display: flex; align-items: center; justify-content: center; }
.full-match-cell .icon { width: 17px; height: 17px; }

.matches-table .score-row > span,
.matches-table .score-row > div { text-align: center; justify-content: center; }
.matches-table .score-row .row-title { justify-content: center; }
.matches-table .score-row .row-actions { justify-content: center; }
.matches-table .score-row > span:nth-child(3) { text-align: left; justify-content: flex-start; }

.events-table .score-row > span:nth-child(1),
.events-table .score-row > span:nth-child(4),
.events-table .score-row > span:nth-child(6),
.events-table .score-row > span:nth-child(7) { text-align: center; }
.events-table .score-row .team-cell { display: flex; justify-content: center; }
svg.captain-star { width: 20px; height: 20px; flex-shrink: 0; fill: var(--gold); stroke: none; }

/* Cartes match/évènement dédiées au mobile (voir @media max-width:640px) : cachées en desktop,
   où les tableaux .matches-table/.events-table ci-dessus restent la présentation de référence. */
.match-card-mobile, .event-card-mobile { display: none; }

.player-id-badge { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.player-id-name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.position-icon { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid var(--line); color: var(--pitch); }
.position-icon .icon { width: 16px; height: 16px; }
.card-actions-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 4px; }
.player-card .card-actions-row, .season-card .card-actions-row, .club-card .card-actions-row, .user-card .card-actions-row { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }

.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 11px; border-radius: 999px; background: rgba(30,86,49,0.1); color: var(--pitch-dark); }
.pill-gold { background: rgba(232,179,48,0.18); color: var(--gold-dark); }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select { font-family: var(--font-body); font-size: 14px; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper-alt); color: var(--ink); width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.form-row { display: grid; gap: 16px; align-items: end; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr auto; }

/* Connexion via un fournisseur externe (Google, Microsoft) */
.oauth-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: var(--font-body); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-oauth:hover { border-color: var(--gold-dark); background: rgba(232,179,48,0.06); }
.oauth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-row.cols-4 { grid-template-columns: 1.4fr 1fr 1fr auto; }
.form-row.cols-5 { grid-template-columns: 0.9fr 1.2fr 0.8fr 0.8fr 0.8fr auto; }

.inline-add { display: flex; gap: 10px; }
.inline-add .field { flex-grow: 1; }

/* Section heading */
.section-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em; color: var(--ink); display: flex; align-items: center; gap: 10px; }

/* Sections pliables (ex: clubs "Préféré" / "Disponible") */
.collapsible summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px; }
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary .chevron { color: var(--muted); transition: transform 0.2s ease; flex-shrink: 0; }
.collapsible[open] > summary .chevron { transform: rotate(180deg); }
.page-title { font-size: 34px; color: var(--ink); }
.page-title-sep { font-family: var(--font-body); font-size: 22px; color: var(--muted); font-weight: 400; }
.page-title .player-id-name { font-family: var(--font-body); font-size: 22px; font-weight: 700; }

/* Page hero (en-tête "wahou" des pages de liste) */
@keyframes heroPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.page-hero { position: relative; overflow: hidden; padding-top: 6px; }
.page-hero-watermark {
  position: absolute;
  right: -110px;
  bottom: -140px;
  width: 340px;
  height: 340px;
  color: var(--pitch-dark);
  opacity: 0.05;
  pointer-events: none;
}
.page-hero-row { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.page-hero-eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); animation: heroPulse 2.4s ease-in-out infinite; }
.page-hero-eyebrow span:not(.dot) { color: var(--gold-dark); font-weight: 700; font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; }
.page-hero-title { font-size: 56px; line-height: 0.92; color: var(--ink); }
.page-hero-subtitle { font-size: 15px; color: var(--muted); margin-top: 8px; font-weight: 500; }
.page-hero-stats { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
/* Bandeau "système" (gestion des comptes) : bleu ardoise au lieu du vert/or "terrain". */
.page-hero-system { --pitch-dark: var(--system-dark); --gold: var(--system-light); --gold-dark: var(--system); }
@media (min-width: 641px) {
  .page-hero-stats { min-width: 254px; }
}
.page-hero-stat { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 14px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 10px 24px -14px rgba(15,61,36,0.3); }
.page-hero-stat .num { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--pitch-dark); }
.page-hero-stat.gold .num { color: var(--gold-dark); }
.page-hero-stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; margin-top: 4px; }

/* Table / list rows styled like a scoreboard */
.score-table { display: flex; flex-direction: column; }
.score-row { display: grid; grid-template-columns: 48px 1.4fr 1fr 0.9fr 0.7fr 0.7fr 76px; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; position: relative; }

.team-cell { display: flex; align-items: center; justify-content: center; }

.team-rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.team-rank-badge.team-1 { background: var(--gold); color: var(--pitch-dark); }
.team-rank-badge.team-2 { background: #B8C0C8; color: var(--pitch-dark); }
.team-rank-badge.team-3 { background: #CD7F32; }
.team-rank-badge.team-4 { background: var(--pitch); }
.team-rank-badge.team-5 { background: var(--muted); }
.score-row.head { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.score-row:last-child { border-bottom: none; }
.score-table-wrap { overflow-x: auto; }
.team-chip { width: 32px; height: 32px; border-radius: 8px; background: var(--pitch); color: #fff; font-family: var(--font-display); font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row-clickable { cursor: pointer; }
.row-clickable:hover { background: rgba(30,86,49,0.04); }

.btn-edit-outline { background: transparent; color: var(--pitch-dark); border: 1px solid var(--line); font-size: 13px; padding: 7px 14px; border-radius: 7px; }
.btn-edit-outline:hover { background: rgba(30,86,49,0.06); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }

.icon-action { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--paper-alt); cursor: pointer; color: var(--pitch-dark); flex-shrink: 0; }
.icon-action:hover { background: rgba(30,86,49,0.08); }
.icon-action .icon { width: 16px; height: 16px; }
.icon-action.delete { color: var(--danger); border-color: rgba(179,67,43,0.3); }
.icon-action.delete:hover { background: rgba(179,67,43,0.08); }
.icon-action.favorited { color: var(--pitch-dark); border-color: var(--gold-dark); background: var(--gold); }
.icon-action.favorited:hover { background: var(--gold-dark); }
.icon-action.corner-bottom-left { position: absolute; bottom: 10px; left: 10px; z-index: 3; box-shadow: 0 4px 10px -4px rgba(0,0,0,0.35); }
.icon-action.transfer { color: var(--muted); margin-right: auto; width: auto; gap: 6px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.icon-action.transfer:hover { background: var(--paper); color: var(--ink); }

.btn-season-end { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0; border-radius: 9px; border: none; font-weight: 700; font-size: 14px; cursor: pointer; background: linear-gradient(135deg, #E4572E, #C0392B); color: #fff; }
.btn-season-end .icon { color: #fff; }
.btn-season-end:hover { filter: brightness(1.08); }
.btn-season-end.is-archived { background: var(--paper); color: var(--pitch-dark); border: 1px solid var(--line); }
.btn-season-end.is-archived .icon { color: var(--pitch-dark); }

.current-photo { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.current-photo .btn-danger-outline { margin-left: auto; }
.preview-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }

/* Interrupteur style iOS */
.ios-toggle-group { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.ios-toggle-group span:not(.toggle-switch) { font-size: 13px; font-weight: 600; color: var(--muted); transition: color .15s; }
.ios-toggle-group span.active { color: var(--ink); }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background-color .15s; }
.toggle-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.toggle-switch input:checked + .toggle-slider { background: var(--pitch); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Team distribution bars */
.team-bar-row { display: grid; grid-template-columns: 90px 1fr 50px; align-items: center; gap: 14px; }
.team-bar-track { height: 12px; border-radius: 999px; background: rgba(30,86,49,0.08); overflow: hidden; }
.team-bar-fill { height: 100%; background: linear-gradient(90deg, var(--pitch), var(--pitch-light)); border-radius: 999px; }

.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.player-avatar-lg { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; border: 3px solid var(--gold); flex-shrink: 0; }
.player-avatar-lg-placeholder { width: 96px; height: 96px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); color: #fff; font-family: var(--font-display); font-size: 30px; border: 3px solid var(--gold); flex-shrink: 0; }

.number-badge { width: 40px; height: 40px; border-radius: 10px; background: var(--pitch); color: #fff; font-family: var(--font-display); font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Réglages (Settings.razor) : en-têtes de carte, onglets et actions compactes */
.settings-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.settings-icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(90,114,158,0.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.settings-icon .icon { width: 16px; height: 16px; color: var(--system-dark); }
.section-sub { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

.settings-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-actions-end { display: flex; justify-content: flex-end; }
.settings-divider { border-top: 1px solid var(--line); margin: 22px 0 18px; }
.settings-subheading { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.settings-inline-row { display: flex; gap: 10px; align-items: flex-end; }
.settings-status-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.settings-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.settings-status-dot.ok { background: var(--pitch); }
.settings-status-dot.ko { background: var(--danger); }

.settings-tabbar { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.settings-tab { padding: 9px 1px 11px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.settings-tab.active { color: var(--ink); border-color: var(--gold-dark); }

.settings-hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.settings-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.settings-chip { font-family: monospace; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.settings-chip:hover { border-color: var(--gold-dark); color: var(--ink); }
.settings-actions-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }

.btn-sm { font-size: 13.5px; padding: 9px 18px; border-radius: 8px; }
.btn-text { background: transparent; border: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 9px 4px; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(114,111,102,0.4); text-underline-offset: 3px; }
.btn-text:hover { color: var(--ink); }

@media (max-width: 640px) {
  .settings-grid-2 { grid-template-columns: 1fr; }
  .settings-inline-row { flex-direction: column; align-items: stretch; }
}

/* Bienvenue (Welcome.razor) : checklist de premiers pas après création de compte */
.welcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.welcome-step { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; gap: 16px; align-items: flex-start; box-shadow: 0 14px 28px -20px rgba(15,61,36,0.28); cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.welcome-step:hover { border-color: var(--gold-dark); transform: translateY(-2px); }
.welcome-step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--pitch); color: #fff; font-family: var(--font-display); font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.welcome-step-icon { width: 40px; height: 40px; border-radius: 11px; background: rgba(232,179,48,0.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.welcome-step-icon .icon { width: 20px; height: 20px; color: var(--gold-dark); }
.welcome-step-body { min-width: 0; }
.welcome-step-title { font-family: var(--font-display); font-size: 19px; margin: 0 0 4px; color: var(--ink); }
.welcome-step-desc { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.welcome-step-arrow { margin-left: auto; color: var(--muted); flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.welcome-skip { margin-top: 26px; text-align: center; font-size: 13px; color: var(--muted); }
.welcome-skip a { color: var(--gold-dark); font-weight: 700; }

@media (max-width: 640px) {
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-step { padding: 16px; }
}

.file-input { font-size: 13px; }

/* Sélecteur de fichier glisser/déposer + bouton Parcourir (photos joueurs, logos clubs). */
.file-picker-zone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: var(--paper-alt);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-picker-zone:hover { border-color: rgba(232,179,48,0.55); }
.file-picker.dragging .file-picker-zone { border-color: var(--gold-dark); background: rgba(232,179,48,0.10); }
.file-picker-zone.has-file { border-color: rgba(90,140,90,0.5); }
.file-picker-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-picker-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid var(--line); color: var(--pitch);
}
.file-picker-zone.has-file .file-picker-icon { color: #3a7a4a; }
.file-picker-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex-grow: 1; }
.file-picker-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.file-picker-hint { font-size: 12px; color: var(--muted); }
.file-picker-browse { flex-shrink: 0; background: var(--paper); border: 1px solid var(--line); font-size: 13px; padding: 8px 16px; pointer-events: none; }
@media (max-width: 640px) {
  .file-picker-hint { display: none; }
}

.muted { color: var(--muted); }
.empty-note { color: var(--muted); font-size: 14px; padding: 8px 2px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Login — fond "terrain" plein écran unique (option C) : le même dégradé couvre les deux
   panneaux, la carte devient un panneau "papier" opaque qui flotte sur un halo doré. */
.login-shell {
  min-height: 100vh;
  display: flex;
  background:
    radial-gradient(900px 700px at 68% 50%, rgba(232,179,48,0.22) 0%, rgba(232,179,48,0) 60%),
    radial-gradient(360px 300px at 15% 8%, rgba(242,193,78,0.22) 0%, rgba(242,193,78,0) 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
    radial-gradient(1400px 1000px at 24% 10%, #1c5a35 0%, #0c331d 46%, #03110a 100%);
  box-shadow: inset 0 0 200px 80px rgba(0,0,0,0.45);
}
.login-pitch {
  flex: 2 1 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 48px 44px;
  overflow: hidden;
  color: #fff;
}

@keyframes footstatsFloat { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

.hero-ball { position: absolute; z-index: 1; animation: footstatsFloat 4.5s ease-in-out infinite; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5)); }

/* Lueur ambiante animée derrière le titre, pour l'effet "wahou" */
@keyframes loginGlowPulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 0.95; transform: scale(1.08); } }
.login-glow {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(232,179,48,0.35) 0%, rgba(232,179,48,0) 70%);
  transform: translateY(-50%);
  animation: loginGlowPulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes loginFadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.login-eyebrow, .login-titleblock, .login-card { animation: loginFadeUp 0.7s cubic-bezier(.16,.84,.44,1) both; }
.login-eyebrow { animation-delay: 0.05s; }
.login-titleblock { animation-delay: 0.15s; }
.login-card { animation-delay: 0.25s; }

.login-eyebrow { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-eyebrow span { font-weight: 700; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.login-titleblock { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; }
.login-title { font-family: var(--font-display); font-size: 76px; line-height: 0.92; letter-spacing: 0.01em; margin: 0; text-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.login-subtitle { font-size: 15px; color: rgba(255,255,255,0.8); max-width: 360px; line-height: 1.5; font-weight: 500; }

.login-form-side { flex: 1 1 0%; display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 380px; padding: 30px 34px; display: flex; flex-direction: column; gap: 13px; border-color: rgba(232,179,48,0.4); box-shadow: 0 30px 70px -20px rgba(3,17,10,0.55); }
.login-card-handle { display: none; }

/* Responsive */
@media (max-width: 900px) {
  .container { padding: 24px 20px; gap: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero-title { font-size: 38px; }
  .page-hero-watermark { width: 220px; height: 220px; right: -70px; bottom: -90px; }
  .page-hero-stat { padding: 10px 16px; }
  .page-hero-stat .num { font-size: 24px; }
  .stat-tile { padding: 10px 16px; }
  .stat-tile .num { font-size: 24px; }
  .form-row.cols-3, .form-row.cols-4, .form-row.cols-5 { grid-template-columns: 1fr; }
  .season-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .login-shell { flex-direction: column; }
  .login-pitch { width: 100%; padding: 32px 24px; }
  .login-form-side { padding: 28px 20px; }
  .login-pitch .hero-ball { width: 110px !important; height: 110px !important; top: -10px !important; right: -20px !important; opacity: 0.4; z-index: 0; }
  .login-pitch .hero-ball svg { width: 100% !important; height: 100% !important; }
  .login-pitch > div { position: relative; z-index: 1; }
}

/* Login mobile : une seule "page" sans scroll, carte en bottom-sheet vitré sur le fond terrain. */
@media (max-width: 640px) {
  /* Même fond terrain plein écran (option C) qu'en desktop, derrière la carte vitrée :
     seul le fond change, aucune dimension/hauteur du bottom-sheet déjà validé n'est touchée. */
  .login-shell {
    height: 100dvh; min-height: 100dvh; max-height: 100dvh; overflow: hidden;
    background:
      radial-gradient(900px 700px at 68% 50%, rgba(232,179,48,0.22) 0%, rgba(232,179,48,0) 60%),
      radial-gradient(360px 300px at 15% 8%, rgba(242,193,78,0.22) 0%, rgba(242,193,78,0) 70%),
      repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
      repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
      radial-gradient(1400px 1000px at 24% 10%, #1c5a35 0%, #0c331d 46%, #03110a 100%);
    box-shadow: inset 0 0 200px 80px rgba(0,0,0,0.45);
  }
  .login-pitch {
    flex: 0 0 auto;
    width: 100%;
    height: 40dvh;
    min-height: 220px;
    padding: 22px 22px 0;
    gap: 10px;
    justify-content: center;
    background:
      radial-gradient(360px 300px at 15% 8%, rgba(242,193,78,0.28) 0%, rgba(242,193,78,0) 70%),
      radial-gradient(420px 340px at 95% 0%, rgba(242,193,78,0.22) 0%, rgba(242,193,78,0) 70%),
      repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
      repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 40px),
      radial-gradient(1000px 700px at 80% 15%, #1c5a35 0%, #0c331d 42%, #04140b 82%);
    box-shadow: inset 0 0 160px 60px rgba(0,0,0,0.45);
  }
  .login-pitch .hero-ball { width: 88px !important; height: 88px !important; top: -4px !important; right: -12px !important; opacity: 0.5; }
  .login-glow { width: 220px; height: 220px; left: -20px; }
  .login-title { font-size: 46px; }
  .login-subtitle { display: none; }

  .login-form-side {
    flex: 1 1 auto;
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    z-index: 1;
    min-height: 0;
  }
  .login-card {
    width: 100%;
    max-width: none;
    max-height: 100%;
    overflow-y: auto;
    border-radius: 26px 26px 0 0;
    padding: 16px 24px 18px;
    gap: 10px;
    background: rgba(255,255,255,0.92);
    border-color: rgba(232,179,48,0.4);
    backdrop-filter: blur(16px);
    box-shadow: 0 -18px 44px -18px rgba(4,20,11,0.35);
  }
  .login-card-handle { display: block; width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 0 auto 4px; }
  .login-card h1 { font-size: 21px; }
}

@media (max-width: 640px) {
  .topbar { height: 64px; padding: 0 14px; gap: 10px; }
  .nav-toggle-btn { display: flex; width: 52px; height: 52px; }
  .nav-toggle-btn .icon { width: 28px; height: 28px; }
  .topbar nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--pitch-dark);
    padding: 10px 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 20px -8px rgba(0,0,0,0.35);
    z-index: 30;
  }
  .nav-toggle-checkbox:checked ~ nav { display: flex; }
  .topbar nav a { padding: 12px 14px; }
  .btn-logout-text { display: none; }
  .btn-logout { border: none; padding: 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 28px; }
  .season-grid, .player-grid, .club-grid, .user-grid { grid-template-columns: 1fr; gap: 14px; }
  .card-crest { height: 80px; }
  .card-badge { width: 46px; height: 46px; font-size: 15px; }
  .card-title { font-size: 18px; }
  .card-body { padding: 14px 16px 16px; gap: 6px; }

  /* Scoreboard rows become stacked cards on mobile */
  .score-row.head { display: none; }
  .score-table-wrap { padding: 10px !important; display: flex; flex-direction: column; gap: 10px; }
  .score-row:not(.head) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    grid-template-columns: none;
    border: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 18px;
    background: var(--paper-alt);
    box-shadow: 0 6px 16px -12px rgba(15,61,36,0.25);
  }
  .score-row:not(.head) .row-title {
    font-family: var(--font-display);
    font-size: 21px;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--ink);
    order: -2;
    padding-bottom: 8px;
    padding-right: 40px;
    border-bottom: 1px solid var(--line);
  }
  .score-row:not(.head) > [data-label] {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ink);
  }
  .score-row:not(.head) > [data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
  }
  .score-row:not(.head) .team-chip { order: -1; align-self: flex-start; }
  .score-row:not(.head) .team-cell { position: absolute; top: 12px; right: 12px; z-index: 1; }
  .score-row:not(.head) .team-cell .team-rank-badge { width: 30px; height: 30px; font-size: 14px; }
  .score-row:not(.head) > button { align-self: flex-end; order: 99; }
  .score-row:not(.head) .row-actions { align-self: flex-end; order: 99; gap: 10px; }
  .score-row:not(.head) .row-actions .icon-action { width: 40px; height: 40px; }
  .score-row:not(.head) .row-actions .icon-action .icon { width: 18px; height: 18px; }
}

/* Cartes match / évènement (mobile) : remplacent les tableaux score-row par une carte "billet"
   dédiée, avec les infos clés (score, statut, club) mises en avant plutôt qu'empilées label/valeur. */
@media (max-width: 640px) {
  .matches-table .score-row:not(.head),
  .events-table .score-row:not(.head) { display: none; }

  /* Pages match et évènements : les cartes reposent directement sur la page plutôt que dans un bloc "carte" englobant. */
  .card:has(> .matches-table), .card:has(> .events-table) { background: transparent; border: none; border-radius: 0; box-shadow: none; }
  .matches-table, .events-table { padding: 0 !important; }

  .match-card-mobile, .event-card-mobile {
    display: flex;
    align-items: stretch;
    background: var(--paper-alt);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 22px -14px rgba(15,61,36,0.35);
  }

  .card-stripe { width: 6px; flex-shrink: 0; }
  .card-stripe.gold { background: var(--gold); }
  .card-stripe.pitch { background: var(--pitch); }
  .card-stripe.win { background: var(--pitch); }
  .card-stripe.draw { background: var(--gold-dark); }
  .card-stripe.loss { background: var(--danger); }

  /* Carte évènement */
  .event-card-mobile { position: relative; cursor: pointer; }
  .ecm-body { flex-grow: 1; min-width: 0; padding: 14px 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
  .ecm-top { display: flex; align-items: center; gap: 12px; }
  .ecm-date { flex-shrink: 0; width: 46px; text-align: center; }
  .ecm-date .day { font-family: var(--font-display); font-size: 24px; line-height: 1; color: var(--ink); }
  .ecm-date .month { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
  .ecm-head-text { min-width: 0; flex-grow: 1; display: flex; flex-direction: column; gap: 3px; }
  .ecm-head-text .pill { align-self: flex-start; }
  .ecm-title { font-family: var(--font-display); font-size: 19px; line-height: 1.1; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ecm-place { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
  .ecm-place .icon { width: 12px; height: 12px; color: var(--pitch); }
  .ecm-club-logo { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
  .ecm-club-logo-placeholder { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); color: #fff; font-family: var(--font-display); font-size: 13px; text-transform: uppercase; }
  .ecm-bottom { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
  .ecm-stat { display: flex; align-items: baseline; gap: 5px; }
  .ecm-stat .num { font-family: var(--font-display); font-size: 20px; color: var(--pitch-dark); }
  .ecm-stat.gold .num { color: var(--gold-dark); }
  .ecm-stat .lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
  .ecm-team { margin-left: auto; }
  .ecm-chevron { color: var(--muted); flex-shrink: 0; }
  .ecm-actions { display: flex; gap: 8px; justify-content: flex-end; }

  /* Carte match */
  .mcm-body { flex-grow: 1; min-width: 0; padding: 14px 14px 14px 12px; display: flex; flex-direction: column; gap: 12px; }
  .mcm-top { display: flex; align-items: flex-start; gap: 12px; }
  .mcm-head-text { min-width: 0; flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
  .mcm-vs { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
  .mcm-opponent { font-family: var(--font-display); font-size: 21px; line-height: 1.05; color: var(--ink); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mcm-opponent .captain-star { flex-shrink: 0; }
  .mcm-result-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; display: inline-block; align-self: flex-start; margin-top: 2px; }
  .mcm-result-tag.win { background: rgba(30,86,49,0.14); color: var(--pitch); }
  .mcm-result-tag.draw { background: rgba(196,148,31,0.16); color: var(--gold-dark); }
  .mcm-result-tag.loss { background: rgba(179,67,43,0.12); color: var(--danger); }
  .mcm-score { flex-shrink: 0; display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
  .mcm-score .sep { font-size: 16px; color: var(--muted); }

  .mcm-strip { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: wrap; }
  .mcm-kpi { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink); }
  .mcm-kpi .icon { width: 14px; height: 14px; color: var(--gold-dark); stroke: none; fill: currentColor; }
  .mcm-kpi .icon.assist { color: var(--pitch); stroke: currentColor; fill: none; }
  .mcm-flags { display: flex; gap: 6px; margin-left: auto; }
  .mcm-flag { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--paper); color: var(--muted); flex-shrink: 0; }
  .mcm-flag.on { background: rgba(30,86,49,0.10); color: var(--pitch); }
  .mcm-flag .icon { width: 13px; height: 13px; }

  .mcm-note { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--muted); font-style: italic; }
  .mcm-note .icon { width: 13px; height: 13px; margin-top: 2px; flex-shrink: 0; }

  .mcm-actions { display: flex; gap: 8px; justify-content: flex-end; }
}

/* Carte fantôme "+ Nouveau..." (déclencheur de création, en fin de liste) */
.ghost-card {
  border-radius: 18px;
  border: 2px dashed var(--line);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  width: 100%;
  padding: 24px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.ghost-card:hover { border-color: var(--gold); color: var(--ink); background: rgba(232,179,48,0.06); }
.ghost-card-icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(30,86,49,0.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ghost-card-icon .icon { width: 22px; height: 22px; color: var(--pitch); stroke-width: 2.4; }
.ghost-card:hover .ghost-card-icon { background: rgba(232,179,48,0.16); }
.ghost-card:hover .ghost-card-icon .icon { color: var(--gold-dark); }

.ghost-card.compact { min-height: 0; flex-direction: row; max-width: 280px; padding: 14px 20px; border-radius: 14px; }
.ghost-card.compact .ghost-card-icon { width: 36px; height: 36px; }
.ghost-card.compact .ghost-card-icon .icon { width: 17px; height: 17px; }

/* Bouton rond flottant (toujours en mode mobile ; en mode PC seulement quand il n'y a pas de carte fantôme) */
.fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 26px -8px rgba(15,61,36,0.5);
  z-index: 40;
}
.fab:hover { background: var(--gold-dark); }
.fab .icon { width: 28px; height: 28px; color: var(--pitch-dark); stroke-width: 2.4; }

@media (min-width: 641px) {
  .fab.fab-mobile-only { display: none; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 24, 0.55);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-panel {
  background: var(--paper-alt);
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.35);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-header-title { display: flex; flex-direction: column; gap: 6px; }
.modal-body { padding: 24px; }
.modal-body .form-row { grid-template-columns: 1fr; }
.modal-body .btn-primary { width: 100%; margin-top: 6px; }
.modal-body .inline-add { flex-direction: column; }
.icon-btn { background: transparent; border: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; display: flex; }
.icon-btn:hover { background: rgba(30,86,49,0.08); }

@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-panel { max-width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .ghost-card { display: none; }
  .fab { right: 18px; bottom: 18px; width: 56px; height: 56px; }
}
