/* Charte EquitaStats : tenue de concours. Bleu nuit (veste), sauge, lilas poudré et champagne (flots) sur un
   fond perle. Les noms de variables désignent un rôle ; ne jamais mettre de couleur en dur dans un composant. */
:root {
  --navy-dark: #1A2440;
  --navy: #26345A;
  --navy-light: #3B4A72;
  --navy-lighter: #56648C;
  --champagne: #C7A266;
  --champagne-dark: #A5803F;
  --champagne-light: #F4EBDA;
  --sage-dark: #48695A;
  --sage: #6F8E79;
  --sage-light: #DCE6DF;
  --lilas-dark: #6E5FA0;
  --lilas: #9C8EC2;
  --lilas-light: #ECE8F5;
  --ink: #232838;
  --paper: #F5F4F8;
  --paper-alt: #FFFFFF;
  --line: #E3E1EA;
  --muted: #6D7184;
  --danger: #B5523B;
  --system-dark: #2B3A55;
  --system: #3E5279;
  --system-light: #5A729E;
  --sky-dark: #4A90B8;
  --sky: #6FB6DE;
  --sky-light: #A8D8EE;
  --silver: #C7CDD4;
  --bronze: #C77F44;
  --font-display: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, 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); font-weight: 400; letter-spacing: 0.01em; margin: 0; text-wrap: balance; }

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

.app-shell {
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(156,142,194,0.12), transparent 70%),
    radial-gradient(600px 280px at 0% 25%, rgba(111,142,121,0.09), transparent 70%),
    var(--paper);
}

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

/* Barre du haut : claire, finie par un double passepoil bleu nuit + champagne comme la bordure d'un tapis de selle. */
.topbar {
  background: var(--paper-alt);
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 72px;
  gap: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; pointer-events: none;
  background: linear-gradient(var(--navy) 0 3px, var(--paper-alt) 3px 4px, var(--champagne) 4px 5px);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; order: 1; }
.topbar-brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--champagne-light); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--champagne-light); flex-shrink: 0; }
.topbar-brand-mark .icon { width: 22px; height: 22px; stroke-width: 2; }
.brand-name { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.02em; line-height: 1; color: var(--navy-dark); white-space: nowrap; }
.brand-name em { font-family: var(--font-script); font-style: normal; color: var(--champagne-dark); font-size: 26px; margin-left: 1px; }

.topbar nav { display: flex; gap: 2px; flex-grow: 1; order: 2; justify-content: center; min-width: 0; }
.topbar nav a { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 700; font-size: 13.5px; padding: 9px 12px; border-radius: 12px; white-space: nowrap; }
.topbar nav a .icon { width: 16px; height: 16px; color: var(--lilas); }
.topbar nav a:hover { color: var(--navy-dark); background: var(--paper); }
.topbar nav a.active { color: #fff; background: var(--navy); }
.topbar nav a.active .icon { color: var(--champagne); }
/* Utilisateurs (gestion des accès et des partages) : bouton lilas à part, à droite de la navigation en PC. */
.topbar nav a.nav-users { margin-left: auto; color: var(--navy); background: var(--lilas-light); border-radius: 999px; padding: 8px 14px; }
.topbar nav a.nav-users .icon { color: var(--lilas-dark); }
.topbar nav a.nav-users.active { color: #fff; background: var(--lilas-dark); }
.topbar nav a.nav-users.active .icon { color: #fff; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--lilas-light); color: var(--navy-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 14px; flex-shrink: 0; }

/* Accès "Statistiques" du bandeau mobile : caché en PC, où la page a déjà son lien dans .topbar nav
   (voir .nav-desktop-only et la media query mobile plus bas pour l'inverse). */
.topbar-stats-link { display: none; order: 3; }

/* Icônes Notifications/Réglages du bandeau, toujours visibles en PC comme en mobile, juste avant l'avatar. */
.topbar-icons { display: flex; align-items: center; gap: 8px; order: 4; }
.topbar-icon-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--navy); flex-shrink: 0; }
.topbar-icon-btn:hover { background: var(--lilas-light); }
.topbar-icon-btn.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.topbar-icon-btn .icon { width: 17px; height: 17px; }

.user-menu { position: relative; flex-shrink: 0; order: 5; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
/* Déclencheur réduit à l'avatar + chevron : nom et rôle vivent dans le panneau (user-menu-header). */
.btn-logout { display: flex; align-items: center; gap: 4px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px 3px 3px; color: var(--muted); }
.btn-logout:hover { background: var(--paper); }
.btn-logout .avatar { width: 30px; height: 30px; font-size: 12px; }
.btn-logout .chevron { width: 16px; height: 16px; transition: transform 0.15s ease; }
.user-menu[open] .btn-logout .chevron { transform: rotate(180deg); }

.user-menu-panel { position: absolute; top: calc(100% + 12px); right: 0; width: 250px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: 0 20px 40px -14px rgba(16,22,40,0.4); z-index: 50; }
.user-menu-header { display: flex; align-items: center; gap: 12px; padding: 8px 8px 14px; }
.user-menu-header .avatar { width: 44px; height: 44px; font-size: 17px; }
.user-menu-header-id { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.btn-logout-label { font-size: 14.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; width: fit-content; margin-top: 2px; }
.role-pill .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.role-pill.role-superadmin { background: rgba(43,58,85,0.14); color: var(--system-dark); }
.role-pill.role-admin { background: var(--champagne-light); color: var(--champagne-dark); }
.role-pill.role-user { background: var(--sage-light); color: var(--sage-dark); }
.role-pill.role-consultant { background: var(--lilas-light); color: var(--lilas-dark); }

.user-menu-divider { height: 1px; background: var(--line); margin: 2px 4px 6px; }
.user-menu-logout { display: flex; align-items: center; gap: 11px; width: 100%; background: transparent; border: none; border-radius: 10px; padding: 9px 8px; color: var(--danger); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.user-menu-logout:hover { background: rgba(181,82,59,0.08); }
.user-menu-logout-icon { width: 30px; height: 30px; border-radius: 50%; background: rgba(181,82,59,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-menu-logout-icon .icon { color: var(--danger); width: 15px; height: 15px; }

/* Variante neutre de .user-menu-logout pour les entrées du menu compte qui ne sont pas des actions destructives. */
.user-menu-item { display: flex; align-items: center; gap: 11px; width: 100%; background: transparent; border: none; border-radius: 10px; padding: 9px 8px; color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.user-menu-item:hover { background: var(--paper); }
.user-menu-item-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-menu-item-icon .icon { color: var(--ink); width: 15px; height: 15px; }

/* Buttons */
.btn { font-family: var(--font-body); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 11px 22px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:focus-visible { outline: 2px solid var(--lilas); outline-offset: 2px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-secondary { background: #fff; color: var(--navy-dark); border: 1.5px solid var(--navy); box-shadow: 0 1px 2px rgba(26,36,64,0.08); }
.btn-secondary:hover { background: var(--navy); 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(181,82,59,0.08); }
.btn-revoke:hover { background: var(--danger); color: #fff; }
.btn-revoke:hover .icon { color: #fff; }

/* Bouton "Partager" (carte saison, Utilisateurs) : sauge plein, l'action à forte valeur sur la carte. */
.btn-secondary.btn-share-green { background: var(--sage-light); color: var(--sage-dark); border-color: var(--sage-light); box-shadow: none; }
.btn-secondary.btn-share-green .icon { color: var(--sage-dark); }
.btn-secondary.btn-share-green:hover { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn-secondary.btn-share-green: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: var(--paper-alt); color: var(--navy-dark); border-color: var(--line); }
.btn-outline:hover { background: var(--paper); }
.btn-danger-outline { background: transparent; color: var(--danger); border: 1px solid rgba(181,82,59,0.35); font-size: 13px; padding: 7px 14px; border-radius: 999px; }
.btn-danger-outline:hover { background: rgba(181,82,59,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(181,82,59,0.09); color: var(--danger); border: 1px solid rgba(181,82,59,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(26,36,64,0.3); }
.stat-tile .icon { width: 20px; height: 20px; color: var(--navy); margin-bottom: 2px; }
.stat-tile .num { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--navy-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, .rider-grid, .stable-grid, .user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }

.season-card, .rider-card, .stable-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(26,36,64,0.28);
}
.season-card, .rider-card, .stable-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),
    var(--lilas);
}
.user-card .card-badge { border-color: var(--lilas-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: #3B4A72; }
.relationship-chip.homme .icon { color: #3B4A72; }
.relationship-chip.femme { color: #6E5FA0; }
.relationship-chip.femme .icon { color: #6E5FA0; }
.relationship-chip.neutre { color: var(--champagne-dark); }
.relationship-chip.neutre .icon { color: var(--champagne-dark); }
.relationship-chip.admin-role { background: rgba(199,162,102,0.95); color: var(--navy-dark); }
.relationship-chip.admin-role .icon { color: var(--navy-dark); fill: currentColor; stroke: none; }
.relationship-chip.inline-chip { position: static; box-shadow: none; flex-shrink: 0; border: 1.5px solid currentColor; }

.relationship-chip.stable-favorite {
  background: var(--champagne-light);
  color: var(--navy-dark);
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85), 0 6px 16px -4px rgba(199,162,102,0.7);
}
.relationship-chip.stable-favorite .icon { color: var(--navy-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. */
.rider-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  max-height: 260px;
  overflow-y: auto;
}
.rider-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;
}
.rider-picker-row:last-child { border-bottom: none; }
.rider-picker-row:hover { background: var(--paper-alt); }
.rider-picker-row.checked { background: rgba(199,162,102,0.10); }
.rider-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(--navy-light), var(--navy-dark));
  overflow: hidden;
}
.rider-picker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rider-picker-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rider-picker-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rider-picker-role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.rider-picker-check { flex-shrink: 0; }
.rider-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(--navy-light), var(--navy-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(--navy-dark);
  border: 3px solid var(--champagne); position: relative; z-index: 1; overflow: hidden; flex-shrink: 0;
}
.card-badge img { width: 100%; height: 100%; object-fit: cover; }

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

/* Avatar en médaillon débordant sur le bandeau (carte saison/joueur/club) : sibling du bandeau et du corps de
   carte, positionné à cheval sur les deux — pas d'overflow à changer, il reste dans les bornes de la carte. */
.card-avatar-medal {
  position: absolute; left: 18px; top: 66px; z-index: 2; box-sizing: border-box;
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--paper-alt); box-shadow: 0 0 0 2px var(--champagne), 0 6px 14px -4px rgba(16,22,40,0.35);
  background: var(--champagne-light); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; overflow: hidden;
}
.card-avatar-medal img { width: 100%; height: 100%; object-fit: cover; }
.card-avatar-medal.shield { border-radius: 16px; }
.card-body-medal { padding-top: 56px; }
.stable-card .card-body-medal { padding-top: 62px; }

/* Nom (saison/joueur/club) affiché dans le bandeau plutôt que dans le corps de la carte : absolu pour ne pas
   perturber le centrage flex existant du bandeau (partagé avec les cartes utilisateur/invitation), contraint à
   gauche du ballon "en vedette" qui reste en haut à droite. */
.crest-title {
  position: absolute; left: 16px; right: 52px; top: 14px; z-index: 1;
  font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em; color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Pastille catégorie (U9, U13, Seniors...) : même palette que le pill générique, juste une forme ronde pour
   se distinguer visuellement du reste des tags de la carte. */
.category-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 40px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: rgba(38,52,90,0.1); color: var(--navy-dark);
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.03em;
}

.jersey-badge { flex-shrink: 0; }
.position-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.position-badge .icon { width: 15px; height: 15px; color: var(--navy); flex-shrink: 0; }

/* Carte "en vedette" (saison la plus récente, joueur actif, club préféré) */
.season-card.featured, .rider-card.featured, .stable-card.featured { box-shadow: 0 22px 44px -20px rgba(26,36,64,0.4); }
.season-card.featured .card-crest, .rider-card.featured .card-crest, .stable-card.featured .card-crest { background: radial-gradient(260px 160px at 20% 0%, rgba(199,162,102,0.35) 0%, rgba(199,162,102,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(--navy-light), var(--navy-dark)); }
.season-card.featured .card-badge, .rider-card.featured .card-badge, .stable-card.featured .card-badge { animation: heroPulse 2.6s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(199,162,102,0.22); }
.season-card.featured .mini-ball, .rider-card.featured .mini-ball, .stable-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; position: relative; overflow: hidden; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.card-title { font-family: var(--font-display); font-size: 22px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rider-card .card-title-row, .rider-card .card-line, .rider-card .presence-row, .rider-card .card-actions-row { position: relative; z-index: 1; }
.presence-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; position: relative; z-index: 1; }
.presence-ring text { font-family: var(--font-body); }
.presence-label-col { display: flex; flex-direction: column; gap: 1px; }
.presence-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.presence-sub { font-size: 11px; color: var(--muted); }

/* Carte saison enrichie (accueil) : statistiques de jeu + prochain rendez-vous avec pointage rapide. */
.card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 2px; }
.card-stat-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.card-stat-tile .num { font-family: var(--font-display); font-size: 19px; line-height: 1; color: var(--navy-dark); }
.card-stat-tile .num.gold { color: var(--champagne-dark); }
.card-stat-tile .lab { font-size: 8.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; text-align: center; }

.card-next-event { display: flex; align-items: center; gap: 9px; background: rgba(38,52,90,0.07); border: 1px solid rgba(38,52,90,0.14); border-radius: 11px; padding: 9px 11px; }
.card-next-event-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-next-event-ic .icon { width: 15px; height: 15px; color: #fff; }
.card-next-event-title { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-next-event-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-attendance-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -2px; }
.card-attendance-row .attendance-pick { padding: 6px 10px; font-size: 11px; }

.card-form-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-form-label { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.card-form-dots { display: flex; gap: 5px; }
.card-form-dot { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; color: #fff; background: var(--muted); }
.card-form-dot.scored { background: var(--champagne-dark); }

.card-goal-progress { display: flex; flex-direction: column; gap: 4px; }
.card-goal-progress-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); }
.card-goal-bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.card-goal-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--champagne), var(--champagne-dark)); }
.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(--navy); flex-shrink: 0; }
.card-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stable-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.stable-timeline { flex-wrap: wrap; }
.card-line.stable-timeline .icon { width: 12px; height: 12px; color: var(--champagne-dark); flex-shrink: 0; }
.stable-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; }
.stable-timeline-chip.past { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(109,113,132,0.5); }
.stable-timeline-chip.current { color: var(--navy-dark); border-color: var(--champagne-dark); background: rgba(199,162,102,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(199,162,102,0.12); border: 1px solid var(--champagne-dark); border-radius: 14px; }
.renewal-banner .icon { width: 26px; height: 26px; color: var(--champagne-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; }

.stable-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; }
.stable-timeline-banner .icon { width: 13px; height: 13px; color: var(--champagne-dark); flex-shrink: 0; }
.stable-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 (Stables.razor) : qui joue dans ce club, sans ouvrir la fiche. */
.stable-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(--navy-light), var(--navy-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(--champagne);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.35);
}
.admin-star .icon { width: 15px; height: 15px; color: var(--navy-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(38,52,90,0.12); color: var(--navy); }
.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(--champagne); 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; }

/* Suivi live (voir @media max-width:640px plus bas) : mobile uniquement, donc cachés en desktop par défaut,
   comme .match-card-mobile ci-dessus. */
.mcm-live-panel { display: none; }

.rider-id-badge { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rider-id-name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
/* Carte saison : nom, club et objectif séparés par le même vide visuel (l'objectif compense le petit vide sous le texte du club). */
.season-card .card-body { gap: 10px; }
.season-card .card-goal-progress { margin-top: 2px; }
.card-actions-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 4px; }
.rider-card .card-actions-row, .season-card .card-actions-row, .stable-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; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 11px; border-radius: 999px; background: rgba(38,52,90,0.1); color: var(--navy-dark); }
.pill-gold { background: rgba(199,162,102,0.18); color: var(--champagne-dark); }

/* Statut de compte sur les cartes utilisateur */
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; background: rgba(38,52,90,0.1); color: var(--navy-dark); }
.status-pill .status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-pill.pending { background: rgba(199,162,102,0.18); color: var(--champagne-dark); }
.status-pill.warn { background: rgba(196,90,40,0.14); color: var(--danger); }
.status-pill.off { background: var(--paper-alt); color: var(--muted); }

/* 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(--champagne); 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(38,52,90,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(--champagne-dark); background: rgba(199,162,102,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 .rider-id-name { font-family: var(--font-body); font-size: 22px; font-weight: 700; }
.season-rider-line .rider-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(--navy-dark);
  opacity: 0.06;
  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 { font-family: var(--font-script); font-size: 27px; line-height: 1; color: var(--lilas); margin-bottom: 4px; }
.page-hero-title { font-size: 46px; line-height: 1.05; color: var(--navy-dark); }
.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 { --navy-dark: var(--system-dark); --lilas: var(--system-light); }
@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(26,36,64,0.3); }
.page-hero-stat .num { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--navy-dark); }
.page-hero-stat.gold .num { color: var(--champagne-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(--champagne); color: var(--navy-dark); }
.team-rank-badge.team-2 { background: #B8C0C8; color: var(--navy-dark); }
.team-rank-badge.team-3 { background: #CD7F32; }
.team-rank-badge.team-4 { background: var(--navy); }
.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(--navy); 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; }
.season-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.season-head-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-width: 0; }
.season-head-edit { flex-shrink: 0; }
.season-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.season-topbar .btn-share-compact { margin-top: 0; }
.manage-trainings-mobile { display: none; }
.season-current-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.season-current-head > :first-child { min-width: 0; }
.season-current-head > .btn { flex-shrink: 0; }
.score-row.row-career { grid-template-columns: 1fr auto auto; gap: 12px; }
.row-career-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-chevron { color: var(--muted); justify-self: center; align-self: center; }
.season-match-card { display: none; }
.result-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; display: inline-block; }
.result-tag.win { background: rgba(38,52,90,0.14); color: var(--navy); }
.result-tag.draw { background: rgba(165,128,63,0.16); color: var(--champagne-dark); }
.result-tag.loss { background: rgba(181,82,59,0.12); color: var(--danger); }
.row-clickable:hover { background: rgba(38,52,90,0.04); }

.btn-edit-outline { background: transparent; color: var(--navy-dark); border: 1px solid var(--line); font-size: 13px; padding: 7px 14px; border-radius: 7px; }
.btn-edit-outline:hover { background: rgba(38,52,90,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(--navy-dark); flex-shrink: 0; }
.icon-action:hover { background: rgba(38,52,90,0.08); }
.icon-action .icon { width: 16px; height: 16px; }
.icon-action.delete { color: var(--danger); border-color: rgba(181,82,59,0.3); }
.icon-action.delete:hover { background: rgba(181,82,59,0.08); }
.icon-action.favorited { color: var(--navy-dark); border-color: var(--champagne-dark); background: var(--champagne); }
.icon-action.favorited:hover { background: var(--champagne-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 */
.stable-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: 9px 0; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; font-size: 13px; cursor: pointer; background: var(--paper-alt); color: var(--navy); font-family: var(--font-body); }
.btn-season-end .icon { color: var(--navy); width: 15px; height: 15px; }
.btn-season-end:hover { background: var(--paper); }

.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. equitastats.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(20,24,40,0.55);
}
.photo-cropper-ring { position: absolute; inset: 18px; border-radius: 50%; border: 2px solid var(--champagne); 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(--champagne-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(--sage); }
.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(38,52,90,0.08); overflow: hidden; }
.team-bar-fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--navy-light)); border-radius: 999px; }

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

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

.number-badge { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); 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-grid-3 { display: grid; grid-template-columns: 1fr 0.7fr 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(--navy); }
.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(--champagne-dark); }

.settings-hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; display: flex; align-items: flex-start; gap: 6px; }
.settings-hint .icon { width: 14px; height: 14px; color: var(--champagne-dark); flex-shrink: 0; margin-top: 1px; }
.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(--champagne-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(109,113,132,0.4); text-underline-offset: 3px; }
.btn-text:hover { color: var(--ink); }

@media (max-width: 900px) {
  .settings-grid-3 { grid-template-columns: 1fr; }
}

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

/* Ligne "catégorie d'âge" (Reglages.razor) : contenu (pastille + bornes) et actions (réordonner/modifier/
   supprimer) forment chacun leur propre groupe qui se réarrange par retour à la ligne (flex-wrap), plutôt que
   d'empiler chaque bouton un par un comme le ferait .settings-inline-row en mobile — illisible avec 4 boutons. */
.age-category-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.age-category-row:last-child { border-bottom: none; }
.age-category-info { display: flex; align-items: center; gap: 10px; flex-grow: 1; min-width: 220px; }
.age-category-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }

/* Notifications.razor : deux blocs (push/email) côte à côte en PC, empilés en mobile. */
.notif-channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.notif-channel-card { display: flex; flex-direction: column; gap: 16px; }
.notif-channel-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.03em; }
.notif-channel-title .icon { width: 15px; height: 15px; color: var(--muted); }

@media (max-width: 900px) {
  .notif-channel-grid { grid-template-columns: 1fr; }
}

/* 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(26,36,64,0.28); cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.welcome-step:hover { border-color: var(--champagne-dark); transform: translateY(-2px); }
.welcome-step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); 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(199,162,102,0.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.welcome-step-icon .icon { width: 20px; height: 20px; color: var(--champagne-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(--champagne-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(26,36,64,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(--navy-light), var(--navy-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(--champagne-dark); transform: translateY(-2px); }
.onboard-step-num { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--navy); color: #fff; font-family: var(--font-display); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.onboard-step-num.done { background: var(--champagne); color: var(--navy-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-rider-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-rider-picker select { border: none; background: transparent; font-family: var(--font-body); font-weight: 700; font-size: 13px; color: var(--ink); cursor: pointer; }
.dash-rider-picker select:focus { outline: none; }
.dash-rider-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-light), var(--navy-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-rider-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(--navy); color: #fff; }

.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(26,36,64,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(26,36,64,0.3); }
.record-icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(199,162,102,0.16); }
.record-icon .icon { width: 21px; height: 21px; color: var(--champagne-dark); }
.record-icon.pitch { background: rgba(38,52,90,0.1); }
.record-icon.pitch .icon { color: var(--navy); }
.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; }

/* Blocs pliables de la page Statistiques. */
.stat-group-toolbar { display: flex; justify-content: flex-end; margin-bottom: -6px; }
.stat-group-toggle-all { background: none; border: none; color: var(--muted); font-family: var(--font-body); font-weight: 600; font-size: 12px; padding: 4px 6px; cursor: pointer; }
.stat-group-toggle-all:hover { color: var(--navy-dark); text-decoration: underline; }
.stat-group-head { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; cursor: pointer; text-align: left; color: var(--ink); font-family: var(--font-body); }
.stat-group-head:hover { border-color: var(--navy-light); }
.stat-group-icon { color: var(--champagne-dark); flex-shrink: 0; }
.stat-group-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em; line-height: 1; }
.stat-group-summary { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; text-align: right; }
.stat-group-chevron { color: var(--muted); flex-shrink: 0; margin-left: auto; transition: transform 0.15s; }
.stat-group-summary + .stat-group-chevron { margin-left: 0; }
.stat-group-chevron.closed { transform: rotate(-90deg); }
.stat-group-body { padding-top: 14px; display: flex; flex-direction: column; gap: 16px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* Rendement par équipe : une carte par numéro d'équipe jouée cette saison. */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.team-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.team-card.main { background: var(--paper-alt); border-color: var(--navy-light); box-shadow: 0 0 0 1px var(--navy-light); }
.team-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.team-card-name { font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--navy-dark); }
.team-card-meta { font-size: 11.5px; color: var(--muted); font-weight: 600; text-align: right; }
.team-stat { margin-top: 9px; }
.team-stat-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.team-stat-label b { font-family: var(--font-display); font-size: 19px; color: var(--ink); letter-spacing: 0; font-weight: 400; text-transform: none; }
.team-stat-bar { height: 9px; border-radius: 5px; background: var(--paper-alt); border: 1px solid var(--line); overflow: hidden; }
.team-card.main .team-stat-bar { background: var(--paper); }
.team-stat-bar i { display: block; height: 100%; border-radius: 5px; }
.team-stat-bar i.gold { background: var(--champagne); }
.team-stat-bar i.light { background: var(--navy-light); }
.team-stat-bar i.pitch { background: var(--navy); }
.team-stat-bar i.dark { background: var(--navy-dark); }
.team-card-warn { margin-top: 10px; font-size: 11px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.team-card-warn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--champagne); flex-shrink: 0; }

/* Forme récente : frise des derniers matchs de l'équipe + contribution du joueur. */
.rf-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.rf-match { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; min-width: 0; }
.rf-match.latest { background: var(--paper-alt); border-color: var(--navy-light); box-shadow: 0 0 0 1px var(--navy-light); }
.rf-badge { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 4px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 19px; color: #fff; }
.rf-badge.win { background: var(--navy); }
.rf-badge.draw { background: var(--champagne-dark); }
.rf-badge.loss { background: var(--danger); }
.rf-score { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.rf-opp { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.rf-team { font-size: 10px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.rf-contrib { min-height: 20px; margin-top: 6px; font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.rf-contrib b, .rf-legend b { display: inline-flex; align-items: center; justify-content: center; height: 18px; line-height: 1; padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 700; text-align: center; white-space: nowrap; }
.rf-contrib b.goal, .rf-legend b.goal { background: var(--champagne); color: var(--navy-dark); }
.rf-contrib b.assist, .rf-legend b.assist { background: rgba(38,52,90,0.14); color: var(--navy); }
.rf-legend b.team { background: none; padding: 0; color: var(--navy); text-transform: uppercase; letter-spacing: 0.05em; }
.rf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rf-legend b { margin-right: 6px; }
.rf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rf-kpi { background: var(--paper); border-radius: 12px; padding: 10px 14px; }
.rf-kpi .n { font-family: var(--font-display); font-size: 22px; line-height: 1.1; color: var(--navy-dark); }
.rf-kpi .l { font-size: 11px; color: var(--muted); font-weight: 600; }

@media (max-width: 900px) {
  .dash-grid-2 { grid-template-columns: 1fr; }
  .record-grid { grid-template-columns: 1fr; }
  .stat-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rf-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stat-group-summary { display: none; }
}

.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(199,162,102,0.55); }
.file-picker.dragging .file-picker-zone { border-color: var(--champagne-dark); background: rgba(199,162,102,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(--navy);
}
.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) */
.stable-added-banner { display: flex; align-items: center; gap: 8px; background: rgba(38,52,90,0.08); color: var(--navy-dark); border: 1px solid rgba(38,52,90,0.2); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.stable-added-banner .icon { width: 16px; height: 16px; color: var(--navy); flex-shrink: 0; }

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

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

.stable-create-warning { background: rgba(181,82,59,0.08); color: var(--danger); border: 1px solid rgba(181,82,59,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(199,162,102,0.22) 0%, rgba(199,162,102,0) 60%),
    radial-gradient(360px 300px at 15% 8%, rgba(199,162,102,0.22) 0%, rgba(199,162,102,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%, #3B4A72 0%, #26345A 46%, #141B33 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 equitastatsFloat { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

.hero-ball { position: absolute; z-index: 1; animation: equitastatsFloat 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(199,162,102,0.35) 0%, rgba(199,162,102,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(--champagne); }
.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(199,162,102,0.4); box-shadow: 0 30px 70px -20px rgba(16,22,40,0.55); }
.login-card-handle { display: none; }
.login-version { text-align: center; font-size: 11px; color: var(--muted); opacity: 0.7; letter-spacing: 0.02em; }

@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(199,162,102,0.22) 0%, rgba(199,162,102,0) 60%),
      radial-gradient(360px 300px at 15% 8%, rgba(199,162,102,0.22) 0%, rgba(199,162,102,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%, #3B4A72 0%, #26345A 46%, #141B33 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(199,162,102,0.28) 0%, rgba(199,162,102,0) 70%),
      radial-gradient(420px 340px at 95% 0%, rgba(199,162,102,0.22) 0%, rgba(199,162,102,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%, #3B4A72 0%, #26345A 42%, #141B33 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(199,162,102,0.4);
    backdrop-filter: blur(16px);
    box-shadow: 0 -18px 44px -18px rgba(16,22,40,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: 60px; padding: 0 12px; gap: 8px; }
  .topbar-brand { flex: 1; min-width: 0; gap: 8px; }
  .topbar-brand-mark { width: 30px; height: 30px; box-shadow: 0 0 0 2px var(--champagne-light); }
  .topbar-brand-mark .icon { width: 18px; height: 18px; }
  .brand-name { font-size: 17px; }
  .brand-name em { font-size: 20px; }
  .topbar-icon-btn, .btn-logout .avatar { width: 30px; height: 30px; }
  .btn-logout { padding: 2px; border: none; }
  .btn-logout .chevron { display: none; }
  .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(--paper-alt);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px -14px rgba(26,36,64,0.35);
    z-index: 30;
  }
  .topbar nav a { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 10px; border-radius: 12px; flex: 1; text-align: center; min-width: 0; }
  .topbar nav a .icon { display: inline-block; width: 22px; height: 22px; color: var(--muted); }
  .topbar nav a span { line-height: 1.1; }
  .topbar nav a.active { background: transparent; color: var(--navy); }
  .topbar nav a.active .icon { color: var(--champagne-dark); }
  .topbar nav a.nav-users, .topbar nav a.nav-users.active { margin-left: 0; background: transparent; padding: 6px 2px; border-radius: 12px; }
  .topbar nav a.nav-users { color: var(--muted); }
  .topbar nav a.nav-users.active { color: var(--navy); }
  .topbar nav a.nav-users .icon { color: var(--muted); }
  .topbar nav a.nav-users.active .icon { color: var(--champagne-dark); }
  /* La barre du bas (nav ci-dessus, repositionnée en fixed) reste à 5 entrées : Statistiques n'y apparaît
     pas, elle vit dans son propre bouton du bandeau du haut (topbar-stats-link ci-dessous) pour ne pas
     surcharger une barre déjà pleine. */
  .topbar nav a.nav-desktop-only { display: none; }
  .topbar-stats-link { display: flex; align-items: center; gap: 5px; background: var(--lilas-light); border-radius: 999px; padding: 6px 10px; color: var(--navy); font-weight: 800; font-size: 12px; flex-shrink: 0; }
  .topbar-stats-link .icon { width: 14px; height: 14px; color: var(--lilas-dark); }
  .topbar-stats-link.active { background: var(--navy); color: #fff; }
  .topbar-stats-link.active .icon { color: var(--champagne); }
  .user-menu-panel { right: 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 28px; }
  .season-grid, .rider-grid, .stable-grid, .user-grid { grid-template-columns: 1fr; gap: 14px; }
  .card-crest { height: 80px; }
  .card-badge { width: 46px; height: 46px; font-size: 15px; }
  .card-avatar-medal { width: 56px; height: 56px; font-size: 18px; top: 44px; }
  .card-body-medal { padding-top: 40px; }
  .stable-card .card-body-medal { padding-top: 44px; }
  .crest-title { font-size: 17px; top: 12px; }
  .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(26,36,64,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; }

  /* Parcours (fiche joueur) : garde la disposition du desktop, contenu à gauche et chevron centré à droite. */
  .score-row.row-career:not(.head) { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title chev" "pills chev"; align-items: center; gap: 8px 12px; padding: 14px 16px; }
  .score-row.row-career:not(.head) .row-title { grid-area: title; order: 0; font: inherit; color: inherit; padding: 0; border-bottom: none; }
  .row-career .row-career-pills { grid-area: pills; justify-content: flex-start; }
  .row-career .row-career-chevron { grid-area: chev; align-self: center; }

  /* Fiche saison : le bouton d'édition reste en haut à droite au lieu de passer sous l'en-tête. */
  .season-head { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
  .manage-trainings-desktop { display: none; }
  .manage-trainings-mobile { display: inline-flex; width: 100%; justify-content: center; margin-top: 12px; }
  .season-head-main { flex: 1; }

  /* Matchs d'une saison passée : le tableau laisse place à des cartes compactes (liseré de résultat, score, stats, chevron). */
  .season-matches .score-row:not(.head) { display: none; }
  .card:has(> .season-matches) { background: transparent; border: none; border-radius: 0; box-shadow: none; }
  .season-matches { padding: 0 !important; display: flex; flex-direction: column; gap: 10px; }
  .season-match-card { display: block; position: relative; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 14px 40px 14px 18px; box-shadow: 0 6px 16px -12px rgba(26,36,64,0.25); overflow: hidden; cursor: pointer; }
  .smc-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--muted); }
  .smc-stripe.win { background: var(--navy); }
  .smc-stripe.draw { background: var(--champagne-dark); }
  .smc-stripe.loss { background: var(--danger); }
  .smc-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
  .smc-event { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .smc-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
  .smc-left { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
  .smc-vs { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
  .smc-opponent { font-family: var(--font-display); font-size: 24px; line-height: 1.1; letter-spacing: 0.01em; color: var(--ink); }
  .smc-left .result-tag { margin-top: 5px; }
  .smc-score { font-family: var(--font-display); font-size: 38px; line-height: 1; white-space: nowrap; color: var(--ink); }
  .smc-score .sep { color: var(--muted); margin: 0 4px; }
  .smc-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
  .smc-kpi { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; }
  .smc-kpi .icon { width: 15px; height: 15px; color: var(--champagne-dark); }
  .smc-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
}

/* 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(26,36,64,0.35);
  }

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

  /* Carte évènement */
  .event-card-mobile { position: relative; cursor: pointer; }
  .event-card-mobile.today { background: rgba(199,162,102,0.1); box-shadow: 0 10px 22px -14px rgba(26,36,64,0.35), inset 3px 0 0 var(--champagne); }
  .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(--navy); }
  .ecm-stable-logo { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
  .ecm-stable-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(--navy-light), var(--navy-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(--navy-dark); }
  .ecm-stat.gold .num { color: var(--champagne-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(38,52,90,0.14); color: var(--navy); }
  .mcm-result-tag.draw { background: rgba(165,128,63,0.16); color: var(--champagne-dark); }
  .mcm-result-tag.loss { background: rgba(181,82,59,0.12); color: var(--danger); }
  .mcm-result-tag.live { display: inline-flex; align-items: center; gap: 5px; background: var(--danger); color: #fff; }
  .mcm-result-tag.live .live-dot { background: #fff; }
  .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(--champagne-dark); stroke: none; fill: currentColor; }
  .mcm-kpi .icon.assist { color: var(--navy); 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(38,52,90,0.10); color: var(--navy); }
  .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; }

  /* Suivi live d'un match (mobile uniquement — voir CLAUDE.md) : bloc "Événement en cours" sur l'accueil et
     panneau de contrôle sur la fiche match. Les deux vivent dans des blocs cachés par défaut et révélés ici,
     comme .match-card-mobile plus haut, pour que la fonctionnalité n'existe jamais en PC. */

  .mcm-live-panel {
    display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px;
  }
  .mcm-live-chrono {
    display: flex; align-items: center; justify-content: space-between; background: var(--navy-dark); color: #fff;
    border-radius: 11px; padding: 9px 13px; font-family: var(--font-display); font-size: 18px;
  }
  .mcm-live-chrono .live-label { color: var(--champagne); }

  .mcm-onfield-row { display: flex; align-items: center; justify-content: space-between; }
  .mcm-onfield-status { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
  .mcm-onfield-status.on { color: var(--navy); }
  .mcm-onfield-status.off { color: var(--muted); }
  .mcm-onfield-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

  .mcm-live-row { display: flex; gap: 8px; }
  .live-btn {
    flex: 1; text-align: center; padding: 11px; border-radius: 11px; font-weight: 800; font-size: 13px;
    border: none; cursor: pointer; font-family: var(--font-body); display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .live-btn-start { background: var(--champagne); color: var(--navy-dark); }
  .live-btn-goal { background: var(--champagne); color: var(--navy-dark); }
  .live-btn-assist { background: rgba(199,162,102,0.14); border: 1.5px solid var(--champagne-dark); color: var(--champagne-dark); }
  .live-btn-teamgoal { background: rgba(38,52,90,0.08); border: 1.5px solid var(--navy); color: var(--navy); }
  .live-btn-opponent { background: #fff; border: 1px solid var(--line); color: var(--muted); }
  .live-btn-out { background: #fff; border: 1.5px solid var(--danger); color: var(--danger); }
  .live-btn-in { background: rgba(109,113,132,0.1); color: var(--muted); }
  .live-btn-undo { background: none; border: none; color: var(--muted); font-size: 12px; padding: 4px; }
  .live-btn-stop { background: #fff; border: 1.5px solid var(--danger); color: var(--danger); }
  .live-btn-whatsapp { background: #25D366; color: #fff; }
  .live-btn:disabled { opacity: 0.45; cursor: default; }

  .mcm-live-counts { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--champagne-dark); }

  .live-family-row {
    display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  }
  .live-family-row.selected { background: rgba(199,162,102,0.1); border-color: var(--champagne); }
  .live-family-check {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  }
  .live-family-row.selected .live-family-check { background: var(--champagne); border-color: var(--champagne-dark); color: var(--navy-dark); }
  .live-family-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--navy-dark); color: #fff; display: flex;
    align-items: center; justify-content: center; font-family: var(--font-display); font-size: 12px; flex-shrink: 0;
  }
}

/* Pastille "en direct" : globale (pas dans la media query mobile ci-dessus) car réutilisée par la page famille
   /suivi/{token}, qui peut être ouverte depuis un PC (WhatsApp Web). */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; animation: live-pulse 1.6s infinite; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(181,82,59,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(181,82,59,0); }
  100% { box-shadow: 0 0 0 0 rgba(181,82,59,0); }
}

/* Page famille "suivi en direct" (/suivi/{token}, sans connexion) : peut être ouverte depuis un PC (WhatsApp Web),
   donc pas cachée en desktop contrairement au panneau de contrôle ci-dessus. */
.guest-badge {
  padding: 5px 11px; border-radius: 20px; background: var(--lilas-light); border: 1px solid var(--lilas);
  color: var(--lilas-dark); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
}
.guest-expiry-banner {
  border-bottom: 1px solid var(--sky-light); background: rgba(111,182,222,0.16); padding: 9px 16px;
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--sky-dark);
}
.guest-expiry-banner.ended { background: rgba(109,113,132,0.12); border-color: var(--line); color: var(--muted); }
.guest-scoreboard {
  background: linear-gradient(115deg, var(--sage), var(--sage-dark)); border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px; color: #fff; box-shadow: 0 14px 30px -16px rgba(26,36,64,0.55);
}
.guest-score { text-align: center; font-family: var(--font-display); font-size: 38px; letter-spacing: 0.02em; }
.guest-score.win { color: var(--navy); }
.guest-score.loss { color: var(--danger); }
.guest-score.draw { color: var(--muted); }
.guest-result-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.guest-result-badge.win { background: rgba(38,52,90,0.12); color: var(--navy); }
.guest-result-badge.loss { background: rgba(181,82,59,0.12); color: var(--danger); }
.guest-result-badge.draw { background: rgba(109,113,132,0.12); color: var(--muted); }
.guest-timeline-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.guest-timeline-row:last-child { border-bottom: none; }
.guest-timeline-row.highlight { background: rgba(199,162,102,0.08); border-radius: 8px; }
.guest-timeline-minute { font-family: var(--font-display); font-size: 14px; width: 32px; flex-shrink: 0; }

/* 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(--champagne); color: var(--ink); background: rgba(199,162,102,0.06); }
.ghost-card-icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(38,52,90,0.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ghost-card-icon .icon { width: 22px; height: 22px; color: var(--navy); stroke-width: 2.4; }
.ghost-card:hover .ghost-card-icon { background: rgba(199,162,102,0.16); }
.ghost-card:hover .ghost-card-icon .icon { color: var(--champagne-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(--champagne-dark); background: rgba(199,162,102,0.08); color: var(--ink); box-shadow: 0 16px 34px -18px rgba(199,162,102,0.55); }
.ghost-card.emphasized:hover { background: rgba(199,162,102,0.14); }
.ghost-card.emphasized .ghost-card-icon { background: var(--champagne); }
.ghost-card.emphasized .ghost-card-icon .icon { color: var(--navy-dark); }
.ghost-card.emphasized span:last-child { font-size: 15px; font-weight: 700; color: var(--navy-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(--navy);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 26px -8px rgba(26,36,64,0.55), 0 0 0 4px var(--champagne-light);
  z-index: 40;
}
.fab:hover { background: var(--navy-dark); }
.fab .icon { width: 28px; height: 28px; color: #fff; 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(26,36,64,0.5), 0 0 0 4px rgba(199,162,102,0.6); }
  70% { box-shadow: 0 12px 26px -8px rgba(26,36,64,0.5), 0 0 0 16px rgba(199,162,102,0); }
  100% { box-shadow: 0 12px 26px -8px rgba(26,36,64,0.5), 0 0 0 0 rgba(199,162,102,0); }
}
@media (prefers-reduced-motion: reduce) {
  .fab.pulse { animation: none; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,24,40, 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: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.modal-header-title .rider-id-badge { flex-basis: 100%; }
.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(38,52,90,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(20,24,40,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(181,82,59,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: #4E5266; 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: #4E5266; 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 EquitaStats (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(181,82,59,0.12); color: var(--danger); }
.confirm-icon.tone-warning { background: rgba(199,162,102,0.2); color: var(--champagne-dark); }
.confirm-icon.tone-neutral { background: rgba(38,52,90,0.12); color: var(--navy); }
.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: #4E5266; 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(--navy-light), var(--navy-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-concours { background: var(--lilas-dark); }
.event-dot.type-stage { background: var(--champagne-dark); }
.event-dot.type-training { background: var(--sage); }

.event-tint.type-concours { background: var(--lilas-light); color: var(--lilas-dark); }
.event-tint.type-stage { background: var(--champagne-light); color: var(--champagne-dark); }
.event-tint.type-training { background: var(--sage-light); color: var(--sage-dark); }

/* Liseré signalant une présence excusée/absente sur l'occurrence — présent et non pointé restent sans
   marquage, pour ne faire ressortir que les cas à traiter. En inset : n'affecte pas la mise en page. */
.cal-chip.attendance-excused, .week-item.attendance-excused { box-shadow: 0 0 0 1.5px var(--champagne-dark) inset; }
.cal-chip.attendance-absent, .week-item.attendance-absent { box-shadow: 0 0 0 1.5px var(--danger) inset; }

.event-stripe.type-concours { background: var(--lilas-dark); }
.event-stripe.type-stage { background: var(--champagne-dark); }
.event-stripe.type-training { background: var(--sage); }

/* 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(--navy-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(199,162,102,0.08); box-shadow: inset 0 0 0 2px var(--champagne); }
.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(--champagne-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(--champagne); background: rgba(199,162,102,0.14); }
.week-col.today .week-col-head .num { color: var(--navy-dark); }
.week-col.today .week-col-head .dow { color: var(--champagne-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(109,113,132,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: #C3C1CE; }

/* 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,
.week-item.event-cancelled .title,
.week-item.event-cancelled .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; }

/* Pastilles du calendrier (mois/semaine) uniquement : fond plein une fois annulées (voir plus bas), donc
   texte blanc pour rester lisible — sauf la catégorie, qui reste noire quel que soit le motif. Ne touche
   pas agenda-title/ecm-title (fond clair de la liste agenda / carte mobile, texte sombre déjà lisible).
   .week-item porte la classe .event-cancelled sur lui-même (pas un ancêtre séparé) : le sélecteur doit
   donc les combiner sur un même élément, pas les enchaîner en descendants. */
.event-cancelled .cal-chip-label,
.week-item.event-cancelled .title,
.week-item.event-cancelled .meta { color: #fff; }
.event-cancelled .cal-chip-cat { color: var(--ink); opacity: 1; }

/* 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: var(--sage-light); color: var(--sage-dark); }
.status-chip.excused { background: rgba(199,162,102,0.2); color: var(--champagne-dark); }
.status-chip.absent { background: rgba(181,82,59,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(--sage); border-color: var(--sage); color: #fff; }
.attendance-pick.excused.selected { background: var(--champagne-light); border-color: var(--champagne); color: var(--champagne-dark); }
.attendance-pick.absent.selected { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Présence inline sur un tournoi/plateau dans l'agenda (liste de la fiche saison) : remplace le badge de statut
   utilisé pour un entraînement, puisque le clic sur l'événement ouvre directement sa fiche (création de matchs)
   plutôt qu'une modale de pointage. */
.agenda-attendance-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.agenda-attendance-row .attendance-pick { padding: 5px 11px; font-size: 11.5px; }

/* Widget "Prochain événement" (fiche saison) : raccourci pour pointer la présence au prochain entraînement
   sans ouvrir l'agenda. Même logique de pointage pour un tournoi/plateau (voir Competition.AttendanceStatus). */
.next-event-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.next-event-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.next-event-relative { font-size: 11.5px; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.next-event-title { font-family: var(--font-display); font-size: 21px; color: var(--ink); letter-spacing: 0.01em; }
.next-event-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.next-event-line .icon { color: var(--muted); }
.next-event-divider { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 12px; }
.next-event-attendance-row { display: flex; gap: 8px; flex-wrap: wrap; }
.next-event-empty { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.next-event-empty .icon { width: 22px; height: 22px; opacity: 0.6; flex-shrink: 0; }

.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: #C46A1F; }
.event-cancelled.reason-annule .agenda-title,
.event-cancelled.reason-annule .ecm-title { color: #8A4A15; }
.event-cancelled.reason-annule .event-cancel-badge { background: #C46A1F; color: #fff; }

.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: #B7B5C3; }
.event-cancelled.reason-treve.cal-chip { background: #B7B5C3; }
.event-cancelled.reason-treve .event-cancel-badge { background: #B7B5C3; color: #fff; }

.event-cancelled.reason-malade { background: #ECEBF1; 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: #4A4A5A; }
.event-cancelled.reason-malade.cal-chip { background: #4A4A5A; }
.event-cancelled.reason-malade .event-cancel-badge { background: #4A4A5A; color: #fff; }

/* 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(--navy-light), var(--navy-dark)); color: #fff;
  box-shadow: 0 8px 16px -10px rgba(26,36,64,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(--champagne); color: var(--navy-dark); }
.agenda-week-divider.rail-today .line { background: rgba(199,162,102,0.5); }
.agenda-week-divider.rail-thisweek .pill { background: rgba(38,52,90,0.12); color: var(--navy-dark); border: 1px solid rgba(38,52,90,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(199,162,102,0.55); }
.agenda-rail.rail-thisweek::before { background: rgba(38,52,90,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(38,52,90,0.04); }
.agenda-row.today { background: rgba(199,162,102,0.1); box-shadow: inset 3px 0 0 var(--champagne); }
.agenda-row.today:hover { background: rgba(199,162,102,0.16); }
.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(199,162,102,0.14); border-color: var(--champagne); }
.agenda-date.today .day { color: var(--navy-dark); }
.agenda-date.today .month { color: var(--champagne-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-stable { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-top: 6px; }
.agenda-stable-name { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.stable-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(--navy-light), var(--navy-dark)); overflow: hidden; }
.stable-badge-mini img { width: 100%; height: 100%; object-fit: cover; }
.stable-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(--navy-light), var(--navy-dark)); overflow: hidden; }
.stable-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(--sage); border-color: var(--sage); color: #fff; }
.training-rule-row { display: flex; flex-direction: column; gap: 7px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.training-rule-line1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.training-rule-line2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.training-rule-line3 { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.training-rule-line3 .icon { width: 13px; height: 13px; flex-shrink: 0; }

/* 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: #8C8A9A; }
.cancel-reason-opt.reason-malade { color: #4A4A5A; }
.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(--sage); 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; }
  .cal-chip.attendance-excused { box-shadow: 0 0 0 1px var(--champagne-dark) inset; }
  .cal-chip.attendance-absent { box-shadow: 0 0 0 1px var(--danger) inset; }
  .stable-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; }
}

/* 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(--navy); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 12px 26px -8px rgba(26,36,64,0.55), 0 0 0 4px var(--champagne-light); flex-shrink: 0; }
.event-fab:hover { background: var(--navy-dark); }
.event-fab .icon { width: 28px; height: 28px; color: #fff; 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(26,36,64,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(--champagne-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-concours { background: var(--lilas-light); color: var(--lilas-dark); }
.event-fab-menu-icon.type-stage { background: var(--champagne-light); color: var(--champagne-dark); }
.event-fab-menu-icon.type-training { background: var(--sage-light); color: var(--sage-dark); }
.event-fab-menu-label { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.event-fab-menu-sub { font-size: 11px; font-weight: 600; 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; }
}

/* Saisie début/fin de saison (SeasonMonthRange) */
.month-range { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.month-range-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.month-range-chip { border: 1px solid var(--line); background: var(--paper-alt); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 600; font-family: var(--font-body); }
.month-range-chip:hover { border-color: var(--navy); }
.month-range-row { display: grid; grid-template-columns: 3fr 2fr; gap: 8px; }
.month-range .field select.is-invalid { border-color: var(--danger); }
.month-range-note { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.month-range-note.month-range-error { color: var(--danger); font-weight: 600; }

.break-banner { margin-bottom: 16px; }
.btn-break { background: rgba(199,162,102,0.16); color: var(--navy-dark); border-color: var(--champagne-dark); }
.btn-break .icon { color: var(--champagne-dark); }
.btn-break:hover { background: var(--champagne); border-color: var(--champagne-dark); color: var(--navy-dark); }
.btn-break:hover .icon { color: var(--navy-dark); }

/* "Gérer les entraînements" : vert terrain plein. */
.btn-trainings { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-trainings .icon { color: #fff; }
.btn-trainings:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }

/* Bandeau "Concours en cours" de l'accueil (PC et mobile) : sauge, résultats des épreuves déjà courues en
   pastilles. Un seul bandeau par concours du jour, masquable avec "Concours terminé". */
.home-live-banner {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px 22px; flex-wrap: wrap;
  border-radius: 20px; padding: 20px 24px; color: #fff; cursor: pointer;
  background: linear-gradient(115deg, var(--sage) 0%, var(--sage-dark) 100%);
  box-shadow: 0 16px 32px -20px rgba(72,105,90,0.8);
}
.home-live-banner::before { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 26px solid rgba(255,255,255,0.08); pointer-events: none; }
.home-live-banner .live-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; }
.home-live-banner .live-label .live-dot { background: #fff; animation: live-pulse-white 1.8s infinite; }
@keyframes live-pulse-white { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); } 70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.home-live-banner .live-body { flex: 1; min-width: 220px; position: relative; }
.home-live-banner .live-title { font-family: var(--font-display); font-size: 25px; margin: 4px 0 2px; line-height: 1.15; }
.home-live-banner .live-meta { opacity: 0.9; font-size: 13.5px; }
.home-live-results { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.home-live-chip { background: rgba(255,255,255,0.16); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; line-height: 1.35; }
.home-live-chip b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 400; }
.home-live-actions { display: flex; gap: 8px; align-items: center; position: relative; flex-wrap: wrap; }
.home-live-open { background: #fff; color: var(--sage-dark); border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 13px; border: none; cursor: pointer; font-family: var(--font-body); }
.home-live-dismiss { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.35); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font-body); }
@media (prefers-reduced-motion: reduce) { .home-live-banner .live-label .live-dot, .live-dot { animation: none; } }
@media (max-width: 640px) {
  .home-live-banner { padding: 16px; border-radius: 16px; }
  .home-live-banner .live-title { font-size: 20px; }
  .home-live-actions { width: 100%; justify-content: space-between; }
}

/* Écriture manuscrite (sur-titres de page) : la touche douce de la charte, toujours en lilas. */
.script-eyebrow { font-family: var(--font-script); font-size: 26px; color: var(--lilas); line-height: 1; }

/* Carte saison (accueil) : bandeau bleu nuit rayé (lilas pour le dressage), médaillon champagne, monture et
   niveau sous le nom, puis trois chiffres choisis selon la discipline. */
.card-crest { height: 82px; }
.season-card .card-crest, .rider-card .card-crest, .stable-card .card-crest {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 8px, transparent 8px 16px),
    var(--navy);
}
.season-card.tone-lilas .card-crest {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 8px, transparent 8px 16px),
    var(--lilas);
}
.season-card.featured .card-crest, .rider-card.featured .card-crest, .stable-card.featured .card-crest {
  background:
    radial-gradient(260px 140px at 85% -20%, rgba(199,162,102,0.28), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 8px, transparent 8px 16px),
    var(--navy);
}
.season-card.featured.tone-lilas .card-crest {
  background:
    radial-gradient(260px 140px at 85% -20%, rgba(255,255,255,0.22), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 8px, transparent 8px 16px),
    var(--lilas);
}
.card-avatar-medal { top: 48px; width: 66px; height: 66px; }
.card-body-medal { padding-top: 44px; }
.crest-title { right: 110px; font-size: 18px; letter-spacing: 0.04em; text-shadow: none; }
.crest-tag { position: absolute; top: 14px; right: 14px; z-index: 1; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: rgba(255,255,255,0.16); color: var(--champagne-light); max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-card.tone-lilas .crest-tag { color: #fff; background: rgba(255,255,255,0.2); }
.season-card-rider { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.season-card .card-title { font-size: 21px; color: var(--navy-dark); white-space: normal; line-height: 1.15; }
.card-horse-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 3px; min-width: 0; }
.card-horse-line .icon { width: 14px; height: 14px; color: var(--champagne-dark); flex-shrink: 0; }
.card-horse-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-horse-line b { color: var(--ink); font-weight: 700; }
.level-badge { font-size: 11.5px; font-weight: 800; letter-spacing: 0.03em; color: var(--navy); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; white-space: nowrap; flex-shrink: 0; }
.card-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--paper); border-radius: 14px; padding: 10px 4px; text-align: center; }
.card-minis div { min-width: 0; }
.card-minis div + div { border-left: 1px solid var(--line); }
.card-minis b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--navy-dark); font-variant-numeric: tabular-nums; line-height: 1.1; }
.card-minis span { font-size: 11px; color: var(--muted); font-weight: 700; }
.card-goal-bar { background: var(--lilas-light); }
.card-goal-bar-fill { background: linear-gradient(90deg, var(--lilas), var(--champagne)); }
.card-line { color: var(--ink); }

.stable-chip { width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 10.5px; color: #fff; flex-shrink: 0; overflow: hidden; background: var(--sage); }
.stable-chip img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.stable-chip.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }

/* Prochain événement (accueil) : deux cartes côte à côte en PC. */
.next-event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 14px; }
.next-event-grid .next-event-card { margin-top: 0; border-radius: 18px; }
.next-event-card.clickable { cursor: pointer; }
.next-event-card.clickable:hover { border-color: var(--lilas); }
.next-event-entries { display: flex; flex-direction: column; gap: 6px; border-top-style: dashed; }
.next-event-entry { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.next-event-attendance-row { border-top-style: dashed; }
.next-event-attendance-row .attendance-pick { flex: 1; min-width: 80px; }
@media (max-width: 640px) {
  .next-event-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .card-crest { height: 70px; }
  .card-avatar-medal { top: 40px; width: 56px; height: 56px; font-size: 18px; }
  .card-body-medal { padding-top: 38px; }
  .card-minis b { font-size: 19px; }
}

/* Montures d'un cavalier (carte cavalier, fiche cavalier) */
.horse-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.horse-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--navy); background: var(--champagne-light); border-radius: 999px; padding: 3px 10px 3px 7px; }
.horse-chip .icon { width: 13px; height: 13px; color: var(--champagne-dark); }
a.horse-chip:hover { background: var(--champagne); color: #fff; }
a.horse-chip:hover .icon { color: #fff; }

/* Montures (fiche cavalier) : une carte par cheval/poney, photo ronde ou fer à cheval. */
.horse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 12px 16px 18px; }
.horse-grid > .empty-note { grid-column: 1 / -1; }
.horse-card { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; min-width: 0; }
.horse-card:hover { border-color: var(--champagne); }
.horse-card.inactive { opacity: 0.65; }
.horse-card-photo { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; background: var(--champagne-light); color: var(--champagne-dark); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0 0 2px var(--paper-alt), 0 0 0 3px var(--champagne); }
.horse-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.horse-card-photo .icon { width: 26px; height: 26px; }
.horse-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.horse-card-name { font-family: var(--font-display); font-size: 19px; color: var(--navy-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.horse-card-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.horse-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.horse-card-tags .pill { font-size: 10px; padding: 3px 8px; }
.horse-card-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* Fiche concours : présence + partage, puis une carte "billet" par épreuve (liseré coloré selon le résultat). */
.competition-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.competition-attendance { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.competition-attendance-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 2px; }
.live-pill { background: rgba(181,82,59,0.1); color: var(--danger); }
.stat-tile .num-sub { font-size: 0.6em; color: var(--muted); }

.entry-list { display: flex; flex-direction: column; gap: 12px; }
.entry-card { display: flex; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 22px -18px rgba(26,36,64,0.45); }
.entry-stripe { width: 6px; flex-shrink: 0; background: var(--line); }
.entry-stripe.placed { background: var(--champagne); }
.entry-stripe.clear { background: var(--sage); }
.entry-stripe.finished { background: var(--lilas); }
.entry-stripe.eliminated { background: var(--danger); }
.entry-stripe.planned { background: var(--line); }
.entry-stripe.withdrawn { background: var(--muted); }
.entry-body { flex: 1; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.entry-top { display: flex; align-items: center; gap: 14px; }
.entry-time { flex-shrink: 0; width: 52px; text-align: center; font-family: var(--font-display); font-size: 17px; color: var(--muted); }
.entry-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.entry-name { font-family: var(--font-display); font-size: 20px; color: var(--navy-dark); line-height: 1.15; overflow-wrap: anywhere; }
.entry-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.entry-status { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.entry-status.placed { background: var(--champagne-light); color: var(--champagne-dark); }
.entry-status.clear { background: var(--sage-light); color: var(--sage-dark); }
.entry-status.finished { background: var(--lilas-light); color: var(--lilas-dark); }
.entry-status.eliminated { background: rgba(181,82,59,0.1); color: var(--danger); }
.entry-result { flex-shrink: 0; display: flex; align-items: center; gap: 10px; text-align: right; }
.entry-rank { font-family: var(--font-display); font-size: 24px; color: var(--navy-dark); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-score { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rosette { width: 38px; height: 38px; border-radius: 50%; background: var(--champagne-light); display: flex; align-items: center; justify-content: center; }
.rosette svg { width: 24px; height: 24px; fill: var(--champagne); stroke: var(--champagne-dark); stroke-width: 1.4; stroke-linejoin: round; }
.entry-note { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--muted); font-style: italic; }
.entry-note .icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.entry-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.entry-actions .btn { margin-right: auto; }

/* Résultat d'une épreuve (modale) : encadré perle, propre au statut "Terminée". */
.result-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.placed-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.placed-toggle b { display: block; font-size: 13.5px; color: var(--ink); }
.placed-toggle small { display: block; font-size: 11.5px; color: var(--muted); }

@media (max-width: 640px) {
  .entry-top { flex-wrap: wrap; gap: 10px; }
  .entry-time { width: auto; text-align: left; order: -1; font-size: 14px; }
  .entry-head { flex-basis: calc(100% - 120px); }
  .entry-rank { font-size: 21px; }
  .competition-actions .btn { width: 100%; }
}

/* Partage du suivi en direct (fiche concours) : disponible en PC comme en mobile. */
.live-btn { flex: 1; text-align: center; padding: 12px; border-radius: 999px; font-weight: 800; font-size: 13.5px; border: none; cursor: pointer; font-family: var(--font-body); display: flex; align-items: center; justify-content: center; gap: 6px; }
.live-btn-whatsapp { background: #25D366; color: #fff; }
.live-btn:disabled { opacity: 0.45; cursor: default; }
.live-family-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; }
.live-family-row.selected { background: var(--champagne-light); border-color: var(--champagne); }
.live-family-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.live-family-row.selected .live-family-check { background: var(--navy); border-color: var(--navy); color: #fff; }
.live-family-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--lilas-light); color: var(--navy-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 12px; flex-shrink: 0; }

/* Cours annulé faute de monture : lilas, pour le distinguer d'un cavalier malade (gris foncé). */
.event-cancelled.reason-cheval { background: var(--lilas-light); opacity: 0.85; }
.event-cancelled.reason-cheval .agenda-stripe,
.event-cancelled.reason-cheval .card-stripe,
.event-cancelled.reason-cheval.week-item,
.event-cancelled.reason-cheval .event-dot { background: var(--lilas-dark); }
.event-cancelled.reason-cheval.cal-chip { background: var(--lilas-dark); }
.event-cancelled.reason-cheval .event-cancel-badge { background: var(--lilas-dark); color: #fff; }
.cancel-reason-opt.reason-cheval { color: var(--lilas-dark); }

/* Statistiques : frise "Forme récente" (une pastille par épreuve) et listes à barres horizontales. */
.rf-match { text-decoration: none; color: inherit; }
.rf-match:hover { border-color: var(--lilas); }
.rf-badge { font-size: 14px; font-family: var(--font-body); font-weight: 800; }
.rf-badge.placed { background: var(--champagne); }
.rf-badge.clear { background: var(--sage); }
.rf-badge.finished { background: var(--lilas); }
.rf-badge.eliminated { background: var(--danger); }
.rf-team { color: var(--champagne-dark); text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.rf-key { color: #fff; }
.rf-key.placed { background: var(--champagne); }
.rf-key.clear { background: var(--sage); }
.rf-key.finished { background: var(--lilas); }
.rf-key.eliminated { background: var(--danger); }

.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 5px; }
.bar-row-label { font-weight: 700; font-size: 13.5px; color: var(--ink); min-width: 0; }
.bar-row-label a { color: var(--navy); }
.bar-row-label a:hover { text-decoration: underline; }
.bar-row-label small { display: block; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.bar-row-top b { font-family: var(--font-display); font-weight: 400; font-size: 19px; color: var(--navy-dark); font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; border-radius: 5px; background: var(--paper); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 4px; background: var(--champagne); }
.bar-track.lilas i { background: var(--lilas); }

.record-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
a.record-card { text-decoration: none; color: inherit; }
a.record-card[href]:hover { border-color: var(--champagne); }
.record-icon { background: var(--champagne-light); }
.record-icon.lilas { background: var(--lilas-light); }
.record-icon.lilas .icon { color: var(--lilas-dark); }
.record-icon.sage { background: var(--sage-light); }
.record-icon.sage .icon { color: var(--sage-dark); }

/* Titre de connexion : "Equita" en Marcellus, "Stats" en écriture manuscrite champagne. */
.login-title em { font-family: var(--font-script); font-style: normal; color: var(--champagne); font-size: 1.1em; margin-left: 2px; }
.login-title { font-weight: 400; }

/* Paire d'actions côte à côte dans une modale (ex. "Plus tard" / "Autoriser") : le bouton principal ne prend
   pas toute la largeur comme dans un formulaire. */
.modal-body .modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-body .modal-actions .btn { white-space: nowrap; margin-top: 0; }
.modal-body .modal-actions .btn-primary { width: auto; }
@media (max-width: 640px) {
  .modal-body .modal-actions { flex-direction: column-reverse; }
  .modal-body .modal-actions .btn, .modal-body .modal-actions .btn-primary { width: 100%; }
}
