: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;
  --sky-dark: #4A90B8;
  --sky: #6FB6DE;
  --sky-light: #A8D8EE;
  --silver: #C7CDD4;
  --bronze: #C77F44;
  --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 { display: flex; align-items: center; gap: 6px; 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); }
.topbar nav a .icon { display: none; }
.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; }

.user-menu { position: relative; flex-shrink: 0; order: 4; margin-left: auto; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.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; }
.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); }
.btn-logout .chevron { width: 16px; height: 16px; margin-left: 2px; transition: transform 0.15s ease; }
.user-menu[open] .btn-logout .chevron { transform: rotate(180deg); }

.user-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 16px 32px -12px rgba(4,20,11,0.45); z-index: 50; }
.user-menu-header { display: none; flex-direction: column; gap: 2px; padding: 8px 12px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.user-menu-header .btn-logout-label { color: var(--ink); font-size: 13.5px; font-weight: 700; }
.user-menu-header .btn-logout-role { color: var(--muted); }
.user-menu-logout { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: none; border-radius: 8px; padding: 10px 12px; color: var(--danger); font-weight: 600; font-size: 14px; cursor: pointer; }
.user-menu-logout:hover { background: rgba(179,67,43,0.08); }
.user-menu-logout .icon { color: var(--danger); }

/* 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-secondary { background: #fff; color: var(--pitch-dark); border: 1.5px solid var(--pitch-dark); box-shadow: 0 1px 2px rgba(15,61,36,0.08); }
.btn-secondary:hover { background: var(--pitch-dark); color: #fff; }
.btn-secondary:hover .icon { color: #fff; }

.btn-revoke { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); box-shadow: 0 1px 2px rgba(179,67,43,0.08); }
.btn-revoke:hover { background: var(--danger); color: #fff; }
.btn-revoke:hover .icon { color: #fff; }

.page-hero-with-action { display: flex; flex-direction: column; gap: 12px; }
.page-hero-with-action .page-hero { flex: 1; }
.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-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.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); }

/* Carte "lien de partage en attente" : même gabarit que les cartes utilisateur (largeur, grille), mais
   bandeau bleu ciel léger pour la distinguer d'un compte déjà actif — et pas encore de personne à qui montrer
   des initiales, donc une icône de partage à la place du badge. */
.share-invite-card { cursor: default; }
.share-invite-card .card-crest {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 26px),
    linear-gradient(135deg, var(--sky-light), var(--sky-dark));
}
.share-invite-card .card-badge { border-color: var(--sky-light); color: var(--sky-dark); }

.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); }
/* Suggestion de prolongation d'une saison arrivant à échéance (voir SeasonRenewalHelper). Une saison n'est
   pas recréée chaque année : c'est la même ligne qui est prolongée, d'où un bandeau incitatif plutôt qu'une
   création automatique silencieuse. */
.renewal-banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: rgba(232,179,48,0.12); border: 1px solid var(--gold-dark); border-radius: 14px; }
.renewal-banner .icon { width: 26px; height: 26px; color: var(--gold-dark); flex-shrink: 0; }
.renewal-body { flex-grow: 1; min-width: 0; }
.renewal-title { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.renewal-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

.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); }

/* Pile d'avatars + prénoms sur la carte club (Clubs.razor) : qui joue dans ce club, sans ouvrir la fiche. */
.club-roster { display: flex; align-items: center; gap: 10px; }
.roster-stack { display: flex; flex-shrink: 0; }
.roster-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 10.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); border: 2px solid var(--paper-alt); margin-left: -9px; overflow: hidden; }
.roster-avatar:first-child { margin-left: 0; }
.roster-avatar img { width: 100%; height: 100%; object-fit: cover; }
.roster-avatar.overflow { background: var(--paper); color: var(--muted); font-size: 9.5px; }
.roster-names { font-size: 12px; color: var(--ink); font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.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); }
.admin-star.silver { background: var(--silver); }
.admin-star.bronze { background: var(--bronze); }
.admin-star.bronze .icon { color: #fff; }

.session-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.session-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--silver); flex-shrink: 0; }
.session-status-badge.online .session-status-dot { background: #3FCB78; }

.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; }
.card-actions-row .btn { min-width: 0; padding: 9px 12px; font-size: 12.5px; gap: 6px; }
.card-actions-row .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.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; }

.password-field { position: relative; }
.password-field input { padding-right: 42px; width: 100%; }
.password-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); background: transparent; border: none; cursor: pointer; color: var(--muted); padding: 8px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.password-toggle:hover { background: rgba(30,86,49,0.08); color: var(--ink); }
.password-toggle .icon { width: 17px; height: 17px; }

.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; }
.season-player-line .player-id-name { font-size: 20px; 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); }

/* Réserve l'espace du bouton favori flottant (corner-bottom-left) et trace la ligne au-dessus */
.club-favorite-spacer { margin-top: auto; border-top: 1px solid var(--line); height: 44px; }
.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); }

.btn-season-share { flex: 1; padding: 10px 0; font-size: 14px; }
.btn-season-share .icon { width: 15px; height: 15px; }

.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; }
.current-photo .btn-recrop { margin-left: 8px; }
.preview-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.preview-thumb.round { border-radius: 50%; }

/* Recadrage circulaire d'une photo (PhotoCropper.razor) : cercle de cadrage + zoom, cf. footstats.cropper en JS. */
.photo-cropper-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.photo-cropper-canvas-wrap {
  position: relative;
  width: 220px; height: 220px; max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(0,0,0,0.07) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.07) 75%),
    linear-gradient(45deg, rgba(0,0,0,0.07) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.07) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  touch-action: none;
  cursor: grab;
}
.photo-cropper-canvas-wrap.dragging { cursor: grabbing; }
.photo-cropper-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.photo-cropper-mask {
  position: absolute; inset: 0; margin: 18px;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(15,27,24,0.55);
}
.photo-cropper-ring { position: absolute; inset: 18px; border-radius: 50%; border: 2px solid var(--gold); pointer-events: none; }
.photo-cropper-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.photo-cropper-hint .icon { width: 14px; height: 14px; flex-shrink: 0; }
.photo-cropper-zoom-row { width: 100%; display: flex; align-items: center; gap: 10px; }
.photo-cropper-zoom-row .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.photo-cropper-zoom-row input[type="range"] { flex: 1; accent-color: var(--gold-dark); height: 4px; }
.photo-cropper-actions { display: flex; gap: 10px; width: 100%; }
.photo-cropper-actions .btn { flex: 1; }

/* 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; }
}

/* Carte de démarrage (Home.razor) : remplace le message "Aucune saison enregistrée" tant qu'il
   manque un joueur ou un club, avec un rappel des deux premières étapes de Welcome.razor. */
.onboard-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 14px 28px -20px rgba(15,61,36,0.28); }
.onboard-head { display: flex; align-items: center; gap: 16px; }
.onboard-ball { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); display: flex; align-items: center; justify-content: center; }
.onboard-ball .icon { width: 28px; height: 28px; color: #fff; }
.onboard-title { font-family: var(--font-display); font-size: 24px; color: var(--ink); }
.onboard-desc { font-size: 13.5px; color: var(--muted); }

.onboard-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.onboard-step { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--paper); text-decoration: none; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease; }
.onboard-step:hover { border-color: var(--gold-dark); transform: translateY(-2px); }
.onboard-step-num { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--pitch); color: #fff; font-family: var(--font-display); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.onboard-step-num.done { background: var(--gold); color: var(--pitch-dark); }
.onboard-step-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.onboard-step-title { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.onboard-step-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.onboard-step-arrow { margin-left: auto; color: var(--muted); flex-shrink: 0; align-self: center; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.onboard-foot { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.onboard-foot b { color: var(--ink); }

@media (max-width: 640px) {
  .onboard-card { padding: 20px 18px; }
  .onboard-steps { grid-template-columns: 1fr; }
}

/* Tableau de bord statistiques (Home.razor) : sélecteur joueur/portée, graphiques SVG dessinés à la
   volée (pas de librairie de charts) et classement personnel. */
.dash-select-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-player-picker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; }
.dash-player-picker select { border: none; background: transparent; font-family: var(--font-body); font-weight: 700; font-size: 13px; color: var(--ink); cursor: pointer; }
.dash-player-picker select:focus { outline: none; }
.dash-player-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 11px; flex-shrink: 0; overflow: hidden; }
.dash-player-avatar img { width: 100%; height: 100%; object-fit: cover; }

.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; font-family: var(--font-body); font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg button.active { background: var(--gold); color: var(--pitch-dark); }

.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 12px 26px -18px rgba(15,61,36,0.3); display: flex; flex-direction: column; gap: 14px; }
.dash-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dash-card-title { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.dash-card-sub { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dash-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.dash-chart text { font-family: var(--font-body); }

.record-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.record-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: 0 12px 26px -18px rgba(15,61,36,0.3); }
.record-icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(232,179,48,0.16); }
.record-icon .icon { width: 21px; height: 21px; color: var(--gold-dark); }
.record-icon.pitch { background: rgba(30,86,49,0.1); }
.record-icon.pitch .icon { color: var(--pitch); }
.record-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.record-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.record-value { font-family: var(--font-display); font-size: 19px; color: var(--ink); line-height: 1.15; }
.record-sub { font-size: 12px; color: var(--muted); font-weight: 600; }

@media (max-width: 900px) {
  .dash-grid-2 { grid-template-columns: 1fr; }
  .record-grid { grid-template-columns: 1fr; }
}

.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; }

/* Recherche de club avant création (évite les doublons) */
.club-added-banner { display: flex; align-items: center; gap: 8px; background: rgba(30,86,49,0.08); color: var(--pitch-dark); border: 1px solid rgba(30,86,49,0.2); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.club-added-banner .icon { width: 16px; height: 16px; color: var(--pitch); flex-shrink: 0; }

.club-search-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.club-search-divider::before, .club-search-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.club-search-divider span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }

.club-create-cta { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: rgba(232,179,48,0.08); border: 1.5px dashed var(--gold-dark); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-family: var(--font-body); }
.club-create-cta:hover { background: rgba(232,179,48,0.14); }
.club-create-cta-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--pitch-dark); font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.club-create-cta-text { display: flex; flex-direction: column; gap: 2px; }
.club-create-cta-text strong { font-size: 13.5px; color: var(--pitch-dark); }
.club-create-cta-text span { font-size: 11.5px; color: var(--muted); }

.club-create-warning { background: rgba(179,67,43,0.08); color: var(--danger); border: 1px solid rgba(179,67,43,0.22); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; margin-bottom: 16px; }

.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; }

@media (min-width: 901px) {
  .page-hero-with-action { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .btn-share-compact { flex-shrink: 0; padding: 9px 18px; font-size: 13px; margin-top: 6px; }
}

/* Responsive */
@media (max-width: 900px) {
  .container { padding: 24px 20px; gap: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid.cols-5 { 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; }
  .app-shell { padding-bottom: 76px; }
  .topbar nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    background: var(--pitch-dark);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    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;
  }
  .topbar nav a { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 10.5px; border-radius: 10px; flex: 1; text-align: center; }
  .topbar nav a .icon { display: inline-block; width: 22px; height: 22px; }
  .topbar nav a span { line-height: 1.1; }
  .user-menu-panel { right: 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-head-text .event-cancel-badge,
  .ecm-head-text .status-chip { align-self: flex-end; }
  .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; }

/* Carte fantôme mise en avant (seul élément visible d'une liste vide) */
.ghost-card.emphasized { border-style: solid; border-width: 2px; border-color: var(--gold-dark); background: rgba(232,179,48,0.08); color: var(--ink); box-shadow: 0 16px 34px -18px rgba(232,179,48,0.55); }
.ghost-card.emphasized:hover { background: rgba(232,179,48,0.14); }
.ghost-card.emphasized .ghost-card-icon { background: var(--gold); }
.ghost-card.emphasized .ghost-card-icon .icon { color: var(--pitch-dark); }
.ghost-card.emphasized span:last-child { font-size: 15px; font-weight: 700; color: var(--pitch-dark); }

/* Masque une mention "vide" redondante en mode PC lorsque le bouton "+" suffit */
@media (min-width: 641px) {
  .desktop-hide-note { display: none; }
}

/* 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; }
}

/* Bouton flottant mis en avant (liste vide) : anneau d'onde animé pour attirer l'oeil */
.fab.pulse { animation: fabPulse 1.8s ease-out infinite; }
@keyframes fabPulse {
  0% { box-shadow: 0 12px 26px -8px rgba(15,61,36,0.5), 0 0 0 0 rgba(232,179,48,0.55); }
  70% { box-shadow: 0 12px 26px -8px rgba(15,61,36,0.5), 0 0 0 16px rgba(232,179,48,0); }
  100% { box-shadow: 0 12px 26px -8px rgba(15,61,36,0.5), 0 0 0 0 rgba(232,179,48,0); }
}
@media (prefers-reduced-motion: reduce) {
  .fab.pulse { animation: 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); }

/* Panneau d'erreur fatale (#blazor-error-ui, markup dans App.razor). Blazor se contente de passer l'élément en
   display:block quand une exception non gérée tue le circuit : la page est alors figée, d'où un panneau bloquant
   avec un bouton de rechargement bien visible. Centrage en position absolue (et non en flex) pour survivre au
   display:block imposé par le framework. */
#blazor-error-ui { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(15,27,24,0.55); }
/* Hauteur bornée au viewport, corps défilant : sur un écran court (paysage, petite fenêtre) le titre et le
   bouton de rechargement doivent rester visibles plutôt que de déborder hors de l'écran. */
.errbox { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 40px); max-width: 470px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper-alt); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.35); overflow: hidden; }
.errbox-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.errbox-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(179,67,43,0.12); color: var(--danger); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.errbox-icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.errbox-title { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.02em; color: var(--ink); line-height: 1.1; }
.errbox-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; }
.errbox-message { font-size: 14px; line-height: 1.55; color: #5B584F; margin: 0; }
.errbox-details { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.errbox-details summary { cursor: pointer; padding: 10px 14px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.errbox-details pre { margin: 0; padding: 0 14px 14px; font-size: 11.5px; line-height: 1.5; color: #5B584F; white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.errbox-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; flex-shrink: 0; }

@media (max-width: 640px) {
  /* Même feuille ancrée en bas que les autres boîtes, avec le rechargement en premier sous le pouce. */
  .errbox { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .errbox-actions { flex-direction: column-reverse; padding: 18px 20px 30px; }
  .errbox-actions .btn { width: 100%; padding: 15px 22px; font-size: 15px; border-radius: 11px; }
}

/* Boîte de confirmation FootStats (ConfirmDialog) : remplace le confirm() natif du navigateur. Réutilise
   .modal-backdrop pour le voile, y compris son passage en feuille ancrée en bas sous 640px. */
.confirm-panel { background: var(--paper-alt); border-radius: 18px; width: 100%; max-width: 470px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.35); overflow: hidden; }
.confirm-grip { display: none; justify-content: center; padding-top: 10px; }
.confirm-grip span { width: 38px; height: 4px; border-radius: 999px; background: var(--line); }
.confirm-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.confirm-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.confirm-icon .icon { width: 21px; height: 21px; }
.confirm-icon.tone-danger { background: rgba(179,67,43,0.12); color: var(--danger); }
.confirm-icon.tone-warning { background: rgba(232,179,48,0.2); color: var(--gold-dark); }
.confirm-icon.tone-neutral { background: rgba(30,86,49,0.12); color: var(--pitch); }
.confirm-title { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.02em; color: var(--ink); line-height: 1.1; flex-grow: 1; min-width: 0; }
.confirm-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.confirm-message { font-size: 14px; line-height: 1.55; color: #5B584F; margin: 0; }
.confirm-subject { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.confirm-subject-avatar { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); color: #fff; font-family: var(--font-display); font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.confirm-subject-avatar img { width: 100%; height: 100%; object-fit: cover; }
.confirm-subject-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.confirm-subject-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #96371F; }

@media (max-width: 640px) {
  /* Feuille ancrée en bas : actions empilées pleine largeur, validation en premier (pouce). */
  .confirm-panel { max-width: 100%; border-radius: 18px 18px 0 0; }
  .confirm-grip { display: flex; }
  .confirm-head { padding: 16px 20px 18px; border-bottom: none; }
  .confirm-body { padding: 0 20px; }
  .confirm-actions { flex-direction: column-reverse; padding: 20px 20px 30px; }
  .confirm-actions .btn { width: 100%; padding: 15px 22px; font-size: 15px; border-radius: 11px; }
}

@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: calc(76px + env(safe-area-inset-bottom) + 12px); width: 56px; height: 56px; }
}

/* Calendrier : couleur par type d'événement, réutilisée dans les 3 vues (mois/semaine/agenda)
   et dans le badge de récurrence des entraînements sur la fiche saison. */
.event-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.event-dot.type-tournoi { background: var(--gold-dark); }
.event-dot.type-plateau { background: var(--pitch); }
.event-dot.type-training { background: var(--muted); }

.event-tint.type-tournoi { background: rgba(232,179,48,0.16); color: var(--gold-dark); }
.event-tint.type-plateau { background: rgba(30,86,49,0.12); color: var(--pitch); }
.event-tint.type-training { background: rgba(114,111,102,0.14); color: var(--muted); }

.event-stripe.type-tournoi { background: var(--gold-dark); }
.event-stripe.type-plateau { background: var(--pitch); }
.event-stripe.type-training { background: var(--muted); }

/* Calendrier — vue Mois */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 16px; }
.cal-nav-label { font-family: var(--font-display); font-size: 22px; min-width: 220px; text-align: center; }
.cal-scope { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Bascule Mois/Semaine : entre le mois et "Aujourd'hui" en mobile (ordre naturel ci-dessous), mais sous
   "Aujourd'hui" en PC (voir le média-query desktop plus bas) — jamais sur la même ligne que cal-nav/cal-scope. */
.cal-view-toggle { flex-basis: 100%; display: flex; order: 1; }
.cal-nav { order: 0; }
.cal-scope { order: 2; }

@media (min-width: 901px) {
  /* En PC, nav (mois + flèches) et scope (joueur + Aujourd'hui) tiennent sur la même ligne ;
     la bascule Mois/Semaine passe alors sur sa propre ligne, en dessous. */
  .cal-scope { order: 1; }
  .cal-view-toggle { order: 2; justify-content: flex-start; margin-top: 4px; }
}

.cal-type-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-filter-chip, .cal-filter-chip-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-alt); color: var(--muted); cursor: pointer; font-family: var(--font-body); }
.cal-filter-chip.active { border-color: transparent; }
.cal-filter-chip:not(.active) .event-dot { opacity: 0.45; }
.cal-filter-chip-all.active { background: var(--pitch-dark); color: #fff; border-color: transparent; }

.cal-grid { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper-alt); }
.cal-grid-head { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); background: var(--paper); border-bottom: 1px solid var(--line); }
.cal-grid-head span { padding: 10px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: center; }
.cal-grid-body { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.cal-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 4px; min-height: 92px; cursor: default; }
.cal-cell.other-month { color: var(--muted); background: var(--paper); }
.cal-cell.today { background: rgba(232,179,48,0.08); box-shadow: inset 0 0 0 2px var(--gold); }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-day-num { font-size: 12px; font-weight: 700; }
.cal-cell.today .cal-day-num { color: var(--gold-dark); font-weight: 800; }
.cal-chip { font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 999px; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; cursor: pointer; border: none; text-align: left; width: 100%; font-family: var(--font-body); box-sizing: border-box; }
.cal-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.cal-chip-cat { font-size: 9px; font-weight: 800; opacity: 0.7; flex-shrink: 0; text-transform: uppercase; }
.cal-chip-more { font-size: 11px; font-weight: 700; color: var(--muted); background: none; border: none; cursor: pointer; text-align: left; padding: 0 2px; }

/* Calendrier — vue Semaine */
.week-grid { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper-alt); display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.week-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.week-col:last-child { border-right: none; }
.week-col-head { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--line); background: var(--paper); }
.week-col-head .dow { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.week-col-head .num { font-family: var(--font-display); font-size: 20px; }
.week-col.today .week-col-head { border-bottom: 2px solid var(--gold); background: rgba(232,179,48,0.14); }
.week-col.today .week-col-head .num { color: var(--pitch-dark); }
.week-col.today .week-col-head .dow { color: var(--gold-dark); }
.week-col-body { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 140px; }
.week-item { border-radius: 10px; padding: 8px 10px; border-left: 3px solid var(--muted); background: rgba(114,111,102,0.12); cursor: pointer; text-align: left; font-family: var(--font-body); width: 100%; box-sizing: border-box; }
.week-item-top { display: flex; align-items: center; gap: 6px; }
.week-item .title { font-size: 12px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.week-item .meta { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.week-empty { flex-grow: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #C6C2B4; }

/* Occurrence d'entraînement annulée (motif : annulé / trêve-vacances / joueur malade) — la séance reste
   affichée (jamais masquée), avec titre barré et une couleur selon le motif. */
.event-cancelled .agenda-title,
.event-cancelled .agenda-meta,
.event-cancelled .ecm-title,
.event-cancelled .ecm-place,
.event-cancelled .cal-chip-label,
.event-cancelled .week-item .title,
.event-cancelled .week-item .meta { text-decoration: line-through; text-decoration-thickness: 1.5px; }

.event-cancel-badge { display: inline-flex; align-items: center; margin-top: 4px; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }

/* Ligne agenda (desktop) : le motif d'annulation / le statut de présence se place à droite de la ligne,
   comme dernier élément flex avant le bouton d'action, plutôt que sous le titre. */
.agenda-cancel-badge { margin-top: 0; flex-shrink: 0; }

/* Statut de présence pointé pour une séance d'entraînement passée. */
.status-chip { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.status-chip.present { background: rgba(30,86,49,0.12); color: var(--pitch-dark); }
.status-chip.excused { background: rgba(232,179,48,0.2); color: var(--gold-dark); }
.status-chip.absent { background: rgba(179,67,43,0.12); color: var(--danger); }

/* Sélecteur de présence (modale d'édition rapide d'une séance) */
.attendance-pick { border: 1px solid var(--line); background: var(--paper-alt); border-radius: 999px; padding: 7px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: var(--font-body); color: var(--muted); }
.attendance-pick.present.selected { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.attendance-pick.excused.selected { background: var(--gold); border-color: var(--gold-dark); color: var(--ink); }
.attendance-pick.absent.selected { background: var(--danger); border-color: var(--danger); color: #fff; }

.event-cancelled.reason-annule { background: rgba(196,106,31,0.08); }
.event-cancelled.reason-annule .agenda-stripe,
.event-cancelled.reason-annule .card-stripe,
.event-cancelled.reason-annule.week-item,
.event-cancelled.reason-annule .event-dot { background: #C46A1F; }
.event-cancelled.reason-annule.cal-chip { background: rgba(196,106,31,0.16); }
.event-cancelled.reason-annule .agenda-title,
.event-cancelled.reason-annule .ecm-title,
.event-cancelled.reason-annule .cal-chip-label,
.event-cancelled.reason-annule .week-item .title { color: #8A4A15; }
.event-cancelled.reason-annule .event-cancel-badge { background: rgba(196,106,31,0.22); color: #8A4A15; }

.event-cancelled.reason-treve { background: var(--paper); opacity: 0.6; }
.event-cancelled.reason-treve .agenda-stripe,
.event-cancelled.reason-treve .card-stripe,
.event-cancelled.reason-treve.week-item,
.event-cancelled.reason-treve .event-dot { background: #B4B2A9; }
.event-cancelled.reason-treve.cal-chip { background: #E2DFD3; }
.event-cancelled.reason-treve .event-cancel-badge { background: #D3D1C7; color: #5F5E5A; }

.event-cancelled.reason-malade { background: #EAE8E0; opacity: 0.8; }
.event-cancelled.reason-malade .agenda-stripe,
.event-cancelled.reason-malade .card-stripe,
.event-cancelled.reason-malade.week-item,
.event-cancelled.reason-malade .event-dot { background: #444441; }
.event-cancelled.reason-malade.cal-chip { background: #D3D1C7; }
.event-cancelled.reason-malade .event-cancel-badge { background: #B4B2A9; color: #2C2C2A; }

/* Calendrier — vue Agenda */
/* Regroupement de l'agenda : un bandeau plein pour les mois (repère calendaire fort, avec le nombre
   d'événements), un séparateur à pastille plus discret pour les repères relatifs (aujourd'hui / cette
   semaine / semaine prochaine), et un fil vertical qui relie les pastilles-date d'un même groupe pour que
   l'œil perçoive la continuité — ou la coupure à un changement de mois — sans avoir à relire les titres. */
.agenda-month-band {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 20px 22px 10px; padding: 10px 18px; border-radius: 10px;
  background: linear-gradient(120deg, var(--pitch-light), var(--pitch-dark)); color: #fff;
  box-shadow: 0 8px 16px -10px rgba(15,61,36,0.5);
}
.card > .agenda-month-band:first-child { margin-top: 14px; }
.agenda-month-band .name { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.03em; }
.agenda-month-band .count { font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,0.18); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

.agenda-week-divider { display: flex; align-items: center; gap: 10px; margin: 18px 22px 8px; }
.card > .agenda-week-divider:first-child { margin-top: 14px; }
.agenda-week-divider .line { flex: 1; height: 1px; background: var(--line); }
.agenda-week-divider .pill { font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.agenda-week-divider.rail-today .pill { background: var(--gold); color: var(--pitch-dark); }
.agenda-week-divider.rail-today .line { background: rgba(232,179,48,0.5); }
.agenda-week-divider.rail-thisweek .pill { background: rgba(30,86,49,0.12); color: var(--pitch-dark); border: 1px solid rgba(30,86,49,0.25); }
.agenda-week-divider.rail-nextweek .pill { background: var(--paper-alt); color: var(--muted); border: 1px solid var(--line); }

/* Fil temporel : une ligne fine derrière les pastilles-date d'un même groupe, couverte par leur fond opaque
   (d'où le z-index sur .agenda-date), interrompue quand le groupe ne compte qu'un seul événement. */
.agenda-rail { position: relative; }
.agenda-rail::before { content: ""; position: absolute; left: 48px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.agenda-rail.rail-today::before { background: rgba(232,179,48,0.55); }
.agenda-rail.rail-thisweek::before { background: rgba(30,86,49,0.22); }
.agenda-rail.rail-single::before { display: none; }
@media (max-width: 640px) {
  .agenda-rail::before { display: none; }
}

.agenda-row { display: flex; align-items: center; gap: 18px; padding: 14px 22px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; font-family: var(--font-body); }
.agenda-row:last-child { border-bottom: none; }
.agenda-row:hover { background: rgba(30,86,49,0.04); }
.agenda-date { width: 52px; height: 52px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; }
.agenda-date .day { font-family: var(--font-display); font-size: 20px; color: var(--ink); line-height: 1; }
.agenda-date .month { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.agenda-date.today { background: rgba(232,179,48,0.14); border-color: var(--gold); }
.agenda-date.today .day { color: var(--pitch-dark); }
.agenda-date.today .month { color: var(--gold-dark); }
.agenda-stripe { width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.agenda-title { font-size: 15.5px; font-weight: 700; }
.agenda-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.agenda-empty { text-align: center; padding: 30px 20px; color: var(--muted); font-size: 14px; }
.agenda-club { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-top: 6px; }
.agenda-club-name { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.club-badge-mini { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 9px; color: #fff; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); overflow: hidden; }
.club-badge-mini img { width: 100%; height: 100%; object-fit: cover; }
.club-badge-mini-xs { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 7px; color: #fff; background: linear-gradient(135deg, var(--pitch-light), var(--pitch-dark)); overflow: hidden; }
.club-badge-mini-xs img { width: 100%; height: 100%; object-fit: cover; }

/* Entraînements récurrents (fiche Saison) : sélecteur de jours + carte de règle */
.day-toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.day-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-alt); color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font-body); }
.day-toggle.on { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.training-rule-row { display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }

/* Sélecteur de motif d'annulation d'une séance d'entraînement (modale édition rapide) */
.cancel-reason-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 4px 0 16px; background: var(--paper); }
.cancel-reason-title { font-size: 12.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.cancel-reason-opts { display: flex; flex-direction: column; gap: 8px; }
.cancel-reason-opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--paper-alt); cursor: pointer; text-align: left; width: 100%; font-family: var(--font-body); }
.cancel-reason-opt.selected { border-color: currentColor; box-shadow: 0 0 0 1px currentColor; }
.cancel-reason-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.cancel-reason-opt.selected .cancel-reason-radio { border-color: currentColor; }
.cancel-reason-radio .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0; }
.cancel-reason-opt.selected .cancel-reason-radio .dot { opacity: 1; }
.cancel-reason-sw { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; background: currentColor; }
.cancel-reason-label { font-size: 13.5px; font-weight: 600; color: var(--ink); display: block; }
.cancel-reason-desc { font-size: 11px; color: var(--muted); margin-top: 1px; display: block; }
.cancel-reason-opt.reason-annule { color: #C46A1F; }
.cancel-reason-opt.reason-treve { color: #8A8880; }
.cancel-reason-opt.reason-malade { color: #44413C; }
.cancel-reason-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.training-rule-row:last-child { border-bottom: none; }
.training-days { display: flex; gap: 4px; flex-shrink: 0; }
.training-day-pip { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; }
.training-day-pip.on { background: var(--pitch); color: #fff; }
.training-day-pip.off { background: var(--paper); color: var(--muted); }

@media (max-width: 900px) {
  .cal-nav-label { min-width: 0; }
}

@media (max-width: 640px) {
  .cal-grid-head span { font-size: 9.5px; padding: 6px 2px; }
  .cal-cell { min-height: 78px; padding: 4px; gap: 3px; }
  .cal-chip { font-size: 8.5px; padding: 2px 4px; gap: 2px; }
  .cal-chip-cat { display: none; }
  .club-badge-mini-xs { width: 10px; height: 10px; font-size: 5px; border-radius: 3px; }
  /* Agenda : la ligne desktop (tout sur une seule ligne) déborde en dessous de 640px,
     remplacée par la carte "ticket" event-card-mobile (même style que les tournois de la fiche saison). */
  .agenda-row { display: none; }
  .week-grid { grid-template-columns: 1fr; }
  .week-col { border-right: none; border-bottom: 1px solid var(--line); }
  .week-col:last-child { border-bottom: none; }
  .training-rule-row { flex-wrap: wrap; }
}

/* Bouton "+" unique (fiche Saison) proposant Tournoi/Plateau/Concours/Entraînement : un seul FAB
   plutôt que plusieurs boutons flottants superposés, avec un petit menu qui se déploie au-dessus. */
.event-fab-wrap { position: fixed; right: 28px; bottom: 28px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.event-fab { 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); flex-shrink: 0; }
.event-fab:hover { background: var(--gold-dark); }
.event-fab .icon { width: 28px; height: 28px; color: var(--pitch-dark); stroke-width: 2.4; transition: transform 0.15s ease; }
.event-fab-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.event-fab-menu-item { display: flex; align-items: center; gap: 10px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 999px; padding: 6px 20px 6px 6px; box-shadow: 0 10px 24px -12px rgba(15,61,36,0.4); font-weight: 700; font-size: 13.5px; color: var(--ink); cursor: pointer; font-family: var(--font-body); }
.event-fab-menu-item:hover { border-color: var(--gold-dark); }
.event-fab-menu-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.event-fab-menu-icon.type-tournoi { background: rgba(232,179,48,0.18); color: var(--gold-dark); }
.event-fab-menu-icon.type-plateau { background: rgba(30,86,49,0.12); color: var(--pitch); }
.event-fab-menu-icon.type-training { background: rgba(114,111,102,0.14); color: var(--muted); }

@media (max-width: 640px) {
  .event-fab-wrap { right: 18px; bottom: calc(76px + env(safe-area-inset-bottom) + 12px); }
  .event-fab { width: 56px; height: 56px; }
}
