/* Les P'tits Bleus : Coach. Monde « Le Vestiaire ».
   Bleu roi en aplats francs, maille pique, flocage Anton, maillots sur pateres. */

@font-face {
  font-family: 'Anton';
  src: url('/fonts/anton.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bleu: #1D50D8;
  --bleu-nuit: #123795;
  --bleu-chip: rgba(255, 255, 255, .16);
  --bleu-texte-2: #C9D6F8;      /* secondaire sur fond bleu : teinte, jamais gris */
  --encre: #0E1B3D;
  --encre-2: #51618A;           /* secondaire sur fond clair, teinte navy */
  --fond: #EDF0F7;
  --blanc: #FFFFFF;
  --ligne: #D9DFEC;
  --gris-doux: #E3E8F2;
  --maillot-absent: #B7C0D4;
  --rouge: #D8341F;
  --ambre-fond: #FFF1D6;
  --ambre-texte: #7A5200;
  --ambre-barre: #E9A200;
  --vert: #157F3D;
  --ombre: 0 6px 18px rgba(14, 27, 61, .12);
  --ombre-basse: 0 2px 8px rgba(14, 27, 61, .08);
  --rayon: 14px;
  --vh: 100vh;
  --safe-haut: env(safe-area-inset-top, 0px);
  --safe-bas: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--fond);
  color: var(--encre);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--gris-doux); padding: 1px 4px; border-radius: 4px; }
.floc {
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .96;
}

/* ---------- Structure : colonne pleine hauteur, nav en bas (lecon PWA iOS) ---------- */
#app { height: var(--vh); display: flex; flex-direction: column; }
.vue { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; position: relative; }

.tabs {
  flex: none;
  display: flex;
  background: var(--blanc);
  border-top: 1px solid var(--ligne);
  padding: 6px 4px calc(6px + var(--safe-bas));
}
.tab {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 2px;
  color: var(--encre-2);
  font-size: .68rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform .12s ease-out, color .18s;
}
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
.tab.actif { color: var(--bleu); }
.tab.actif::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--bleu);
}
.tab:active { transform: scale(.92); }

/* ---------- Entete bleue ---------- */
.entete {
  background: var(--bleu);
  color: var(--blanc);
  padding: calc(14px + var(--safe-haut)) 20px 20px;
  border-radius: 0 0 22px 22px;
  box-shadow: var(--ombre);
  position: relative;
  z-index: 2;
  flex: none;
}
.entete .date-ligne {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bleu-texte-2);
  display: flex; align-items: center; gap: 8px; min-height: 30px;
}
.entete h1 { font-size: 3.1rem; margin-top: 4px; }
.entete h1.titre-club { font-size: 2.4rem; }
.entete h1.titre-seance { font-size: 1.9rem; line-height: 1.06; margin-top: 8px; }
.entete .sous-titre { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bleu-chip); color: var(--blanc);
  border-radius: 999px; padding: 5px 12px;
  font-size: .82rem; font-weight: 600;
}
.chip.blanc { background: var(--blanc); color: var(--bleu); }
.chip.rouge { background: var(--rouge); color: var(--blanc); }
.chip.plein { background: var(--bleu); color: var(--blanc); }
.chip.gris { background: var(--gris-doux); color: var(--encre-2); }
.chip.sur-nuit { background: rgba(255, 255, 255, .18); color: var(--blanc); }

/* Boutons d'action de l'entete : toujours en haut a droite, jamais superposes */
.entete-actions {
  position: absolute; right: 16px; top: calc(12px + var(--safe-haut));
  display: flex; gap: 8px; z-index: 3;
}
.action-entete {
  position: relative;
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bleu-chip);
}
.action-entete svg { width: 22px; height: 22px; stroke: var(--blanc); fill: none; }
.pastille-notif {
  position: absolute; top: 6px; right: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ambre-barre); border: 2px solid var(--bleu);
}
.bouton-retour {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 0 6px -8px; padding: 11px 14px 11px 8px; min-height: 44px;
  border-radius: 999px;
  color: var(--bleu-texte-2);
  font-size: .84rem; font-weight: 700;
}
.bouton-retour svg { width: 18px; height: 18px; stroke: currentColor; fill: none; transform: rotate(180deg); }
.bouton-retour:active { background: var(--bleu-chip); }

/* Navigation de date : fleches, libelle, retour a aujourd'hui */
.entete .date-ligne .fleche-prec,
.entete .date-ligne .fleche-suiv {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--bleu-chip);
}
.date-ligne .fleche-prec svg, .date-ligne .fleche-suiv svg { width: 18px; height: 18px; stroke: var(--blanc); fill: none; }
.date-ligne .fleche-prec svg { transform: rotate(180deg); }
.date-ligne .fleche-prec:disabled, .date-ligne .fleche-suiv:disabled { opacity: .3; }
.date-libelle { flex: 1; text-align: center; letter-spacing: .08em; }
.chip-auj {
  flex: none; background: var(--blanc); color: var(--bleu);
  border-radius: 999px; padding: 8px 12px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}

/* ---------- Carte du haut (accueil) ---------- */
.hero {
  background: var(--blanc); color: var(--encre);
  border-radius: 18px;
  padding: 16px 16px 8px;
  box-shadow: var(--ombre);
  margin-top: 14px;
}
.hero-surtitre { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bleu); }
.hero-titre { font-size: 1.45rem; margin-top: 6px; }
.hero-sous { color: var(--encre-2); font-size: .85rem; font-weight: 600; margin-top: 4px; }
.hero-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: calc(100% + 32px); margin: 12px -16px 0;
  padding: 13px 16px;
  border-top: 1px solid var(--ligne);
  color: var(--bleu); font-weight: 800; font-size: .95rem;
}
.hero-cta svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.hero-cta:active { background: #F2F5FC; }

/* ---------- Contenu ---------- */
.contenu { flex: 1; padding: 18px 16px 24px; }
.contenu-calendrier { flex: none; padding-top: 0; }
.fond-maille {
  background-image: linear-gradient(rgba(237, 240, 247, .82), rgba(237, 240, 247, .82)), url('/assets/texture-maille.webp');
  background-size: auto, 240px;
}

.section-titre {
  font-size: 1.15rem; letter-spacing: .02em;
  margin: 26px 0 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.section-titre:first-child { margin-top: 4px; }
.section-titre .lien,
.compte-minutes {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: .78rem; font-weight: 700; color: var(--encre-2);
  text-transform: none; letter-spacing: 0;
}
.section-titre .lien { color: var(--bleu); }
.etiquette-groupe { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-2); margin: 4px 0 8px; }

/* ---------- Tuiles de reperes ---------- */
/* minmax(0, 1fr) et pas 1fr : sinon un libellé long élargit sa colonne et la
   bande déborde de l'écran. */
.bande-reperes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi {
  background: var(--blanc); border-radius: 12px;
  padding: 10px 8px; text-align: center;
  box-shadow: var(--ombre-basse);
  min-width: 0;
}
.kpi-valeur { font-size: 1.45rem; color: var(--encre); }
.kpi-unite { font-size: .78rem; margin-left: 1px; }
.kpi-libelle { font-size: .64rem; font-weight: 700; color: var(--encre-2); margin-top: 3px; line-height: 1.2; }
.kpi.ton-alerte { background: var(--ambre-fond); }
.kpi.ton-alerte .kpi-valeur, .kpi.ton-alerte .kpi-libelle { color: var(--ambre-texte); }
.kpi.ton-rouge .kpi-valeur { color: var(--rouge); }
.kpi.ton-vert .kpi-valeur { color: var(--vert); }

/* ---------- Maillots ---------- */
.grille-maillots {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px 4px; padding-top: 2px;
}
.aide-appel { font-size: .78rem; font-weight: 600; color: var(--encre-2); text-align: center; margin-bottom: 6px; }
.maillot-cell {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 2px 2px 10px;
  border-radius: 12px;
  min-height: 44px;
}
.maillot-cell:active .maillot-svg { transform: scale(.94); }
.porte { position: relative; display: block; width: 74px; }
.patere { width: 74px; height: 22px; display: block; --c-trait: #8E99B3; }
.maillot-svg {
  width: 74px; height: 68px; display: block;
  margin-top: -7px;
  transform-origin: 50% 2%;
  transition: transform .15s ease-out;
  filter: drop-shadow(0 3px 4px rgba(14, 27, 61, .18));
}
.maillot-svg { --m-corps: var(--bleu); --m-trait: var(--bleu-nuit); --m-detail: var(--blanc); }
/* Le flocage doit tenir dans le torse : un numero a deux chiffres ne peut pas
   s'afficher a la taille d'un chiffre seul (le 99 debordait). */
.maillot-num {
  position: absolute; top: 36px; left: 0; right: 0;
  text-align: center; color: var(--blanc);
  font-size: 1.5rem; pointer-events: none;
}
.maillot-num.n2 { font-size: 1.15rem; top: 39px; letter-spacing: -.01em; }
.maillot-num.initiales { font-size: 1rem; top: 40px; letter-spacing: .02em; }
.maillot-nom {
  margin-top: 5px; font-size: .78rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--encre);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Etats */
.maillot-cell.present .maillot-svg { transform: rotate(-4deg); }
.maillot-cell.present.anime .maillot-svg { animation: balancement .8s ease-out; }
.maillot-cell.absent .maillot-svg { filter: none; }
.maillot-cell.absent .maillot-svg { --m-corps: #E8ECF4; --m-trait: var(--maillot-absent); --m-detail: var(--maillot-absent); }
.maillot-cell.absent .maillot-num { color: var(--maillot-absent); }
.maillot-cell.absent .maillot-nom { color: var(--encre-2); }
.maillot-cell.nonpointe .maillot-svg { filter: none; opacity: .85; }
.maillot-cell.nonpointe .maillot-svg { --m-corps: var(--blanc); --m-trait: var(--maillot-absent); --m-detail: var(--maillot-absent); --m-dash: 5 3; }
.maillot-cell.nonpointe .maillot-num { color: var(--maillot-absent); }
.badge-blesse {
  position: absolute; top: 14px; right: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rouge); border: 2px solid var(--blanc);
  display: grid; place-items: center;
  z-index: 2;
}
.badge-blesse svg { width: 12px; height: 12px; fill: var(--blanc); }
@keyframes balancement {
  0% { transform: rotate(9deg); }
  30% { transform: rotate(-8deg); }
  60% { transform: rotate(2deg); }
  100% { transform: rotate(-4deg); }
}

/* Rail horizontal de mini maillots (ecran Seance) */
.rail-etat { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2px; }
.rail-etat .rail-libelle { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-2); }
.rail-etat .lien { font-size: .82rem; font-weight: 700; color: var(--bleu); padding: 11px 0 11px 14px; min-height: 44px; }
.rail-appel { display: flex; gap: 2px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; }
.rail-appel .maillot-cell { flex: none; width: 60px; }
.rail-appel .porte { width: 52px; }
.rail-appel .patere { width: 52px; height: 16px; }
.rail-appel .maillot-svg { width: 52px; height: 48px; margin-top: -5px; }
.rail-appel .maillot-num { top: 26px; font-size: 1.05rem; }
.rail-appel .maillot-num.n2 { top: 28px; font-size: .82rem; }
.rail-appel .maillot-num.initiales { top: 29px; font-size: .72rem; }
.rail-appel .maillot-nom { font-size: .62rem; }
.rail-appel .badge-blesse { width: 16px; height: 16px; top: 10px; right: 0; }
.rail-appel .badge-blesse svg { width: 9px; height: 9px; }

/* ---------- Barre d'action, hors de la zone qui defile ---------- */
/* Avant, la barre etait en absolute DANS le conteneur scrollable : elle se
   posait au bas du contenu et recouvrait les blocs. Elle vit maintenant entre
   la vue et la barre d'onglets : elle ne peut plus rien masquer. */
.barre-action { flex: none; }
.barre-action:empty { display: none; }
.barre-cta {
  padding: 12px 16px;
  background: var(--fond);
  box-shadow: 0 -10px 18px -10px rgba(14, 27, 61, .22);
}
.bouton-plein {
  width: 100%;
  background: var(--bleu); color: var(--blanc);
  border-radius: 999px;
  padding: 15px 18px;
  font-family: 'Anton', sans-serif; text-transform: uppercase; letter-spacing: .05em;
  font-size: 1.05rem;
  box-shadow: var(--ombre);
  transition: transform .12s ease-out, background .2s;
}
.bouton-plein:active { transform: scale(.97); }
.bouton-plein.valide { background: var(--vert); }
.bouton-plein:disabled { background: var(--maillot-absent); box-shadow: none; }
.bouton-contour {
  width: 100%;
  border: 2px solid var(--bleu); color: var(--bleu);
  border-radius: 999px; padding: 12px 18px;
  font-family: 'Anton', sans-serif; text-transform: uppercase; letter-spacing: .05em;
  font-size: .95rem;
}
.bouton-contour:active { background: #E9EFFC; }
.actions-seance { margin-top: 18px; gap: 10px; }

/* ---------- Listes (effectif, matchs) ---------- */
.ligne-carte {
  display: flex; align-items: center; gap: 12px;
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--ombre-basse);
  width: 100%; text-align: left;
}
.ligne-carte:active { transform: scale(.985); }
.ligne-carte.retire { opacity: .55; }
.mini-maillot { position: relative; flex: none; width: 46px; height: 42px; display: block; }
.mini-maillot svg { width: 46px; height: 42px; display: block; }
.mini-maillot { --m-corps: var(--bleu); --m-trait: var(--bleu-nuit); --m-detail: var(--blanc); }
.mini-maillot.equipe2, .mini-maillot.adverse { --m-corps: var(--blanc); --m-trait: var(--bleu); --m-detail: var(--bleu); }
.mini-maillot.equipe2 .mini-num, .mini-maillot.adverse .mini-num { color: var(--bleu); }
.mini-maillot.adverse { --m-corps: #E8ECF4; --m-trait: var(--encre-2); --m-detail: var(--encre-2); }
.mini-maillot.adverse .mini-num { color: var(--encre-2); }
.mini-num {
  position: absolute; top: 13px; left: 0; right: 0; text-align: center;
  color: var(--blanc); font-size: .95rem; pointer-events: none;
}
.mini-num.n2 { font-size: .72rem; top: 15px; }
.mini-num.initiales { font-size: .66rem; top: 15px; }
.ligne-infos { flex: 1; min-width: 0; }
.ligne-nom { font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ligne-sous { font-size: .8rem; color: var(--encre-2); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ligne-droite { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 42%; }
.ligne-droite .chip { font-size: .74rem; padding: 4px 9px; text-align: center; }
.ligne-carte > .chev { flex: none; width: 18px; height: 18px; stroke: var(--maillot-absent); fill: none; }
.bouton-crayon {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: #EEF2FA;
}
.bouton-crayon svg { width: 18px; height: 18px; stroke: var(--bleu); fill: none; }
.bouton-crayon:active { background: #DCE5FA; }
.bouton-crayon.grand { width: 44px; height: 44px; margin-left: auto; }

.badge-poste {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  background: #E3EAFB; color: var(--bleu-nuit);
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
}
.badge-poste.secondaire { background: transparent; border: 1px solid var(--ligne); color: var(--encre-2); }
.badge-equipe2 { background: var(--encre); color: var(--blanc); }
.badge-blessure-txt { color: var(--rouge); font-weight: 700; font-size: .78rem; }

.barre-assiduite { width: 66px; height: 6px; border-radius: 3px; background: var(--gris-doux); overflow: hidden; }
.barre-assiduite i { display: block; height: 100%; border-radius: 3px; background: var(--bleu); }
.barre-assiduite.faible i { background: var(--ambre-barre); }
.stat-petite { font-size: .72rem; color: var(--encre-2); font-weight: 600; white-space: nowrap; }

.ligne-carte.choisie { box-shadow: inset 0 0 0 2px var(--bleu), var(--ombre-basse); }
.ligne-carte.banc { opacity: .72; }
.etoile-mini { width: 15px; height: 15px; vertical-align: -3px; --e-fond: var(--bleu); --e-etoile: #FFFFFF; --e-couture: transparent; }

.score { font-family: 'Anton', sans-serif; font-size: 1.15rem; letter-spacing: .02em; }
.score.issue-V { color: var(--vert); }
.score.issue-D { color: var(--rouge); }
.score.issue-N { color: var(--encre-2); }

/* ---------- Alertes ---------- */
.alerte {
  display: flex; align-items: center; gap: 10px;
  background: var(--ambre-fond);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
  color: var(--ambre-texte);
  font-size: .88rem; font-weight: 600;
  width: 100%; text-align: left;
}
.alerte svg { flex: none; width: 20px; height: 20px; stroke: var(--ambre-texte); fill: none; }
.alerte span { flex: 1; min-width: 0; }
.alerte.info { background: #E7EDFB; color: var(--bleu-nuit); }
.alerte.info svg { stroke: var(--bleu-nuit); }
.alerte.rouge { background: #FDE8E4; color: #8C2314; }
.alerte.rouge svg { stroke: none; fill: #8C2314; }
.alerte .chev { flex: none; width: 16px; height: 16px; margin-left: auto; stroke: currentColor; }

/* ---------- Casiers (accueil) ---------- */
.grille-casiers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; perspective: 900px; }
.casier {
  position: relative;
  min-height: 152px;
  border-radius: 16px;
  color: var(--encre);
}
.casier.bleu { color: var(--blanc); }
.casier .casier-interieur {
  position: absolute; inset: 3px;
  border-radius: 13px;
  background: linear-gradient(180deg, #0B1530, #16264F);
}
.casier .porte3d {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 26px 12px 34px;
  transform-origin: 6% 50%;
  transition: transform .3s cubic-bezier(.3, .8, .3, 1);
  filter: drop-shadow(0 3px 8px rgba(14, 27, 61, .14));
}
.casier.ouvert .porte3d { transform: rotateY(-24deg); }
.casier .porte-fond { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* La plaque numerotee doit tomber pile dans le rectindice grave de la porte :
   le gabarit SVG place la plaque de y=11 a y=29 sur 160, soit 6,875 % a 18,125 %. */
.casier .plaque {
  position: absolute; left: 50%; top: 6.875%; height: 11.25%;
  transform: translateX(-50%);
  display: grid; place-items: center;
  font-size: .64rem; font-weight: 800; letter-spacing: .08em; line-height: 1;
  color: var(--encre-2); z-index: 1;
}
.casier.bleu .plaque { color: var(--bleu-texte-2); }
.casier svg.pictol { width: 34px; height: 34px; stroke: var(--bleu); fill: none; margin-top: 6px; z-index: 1; }
.casier.bleu svg.pictol { stroke: var(--blanc); }
.casier .casier-nom { font-size: .95rem; text-align: center; letter-spacing: .03em; line-height: 1.05; z-index: 1; }

/* ---------- Timeline de seance ---------- */
.objectif-seance { font-size: .95rem; line-height: 1.4; color: var(--encre); margin-bottom: 16px; }
.timeline { position: relative; }
.bloc-seance {
  display: flex; align-items: stretch; gap: 0;
  text-align: left;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-basse);
  margin-bottom: 10px;
  overflow: hidden;
  width: 100%;
}
.bloc-duree {
  flex: none; width: 62px;
  background: var(--bleu); color: var(--blanc);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.bloc-duree b { font-family: 'Anton', sans-serif; font-weight: 400; font-size: 1.3rem; line-height: 1; }
.bloc-duree i { font-style: normal; font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.bloc-seance.type-echauffement .bloc-duree { background: var(--bleu-nuit); }
.bloc-seance.type-opposition .bloc-duree { background: var(--encre); }
.bloc-seance.type-combinaisons .bloc-duree { background: var(--bleu-nuit); }
.bloc-corps { flex: 1; padding: 11px 12px 12px 14px; min-width: 0; }
.bloc-etiquette { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); margin-bottom: 3px; }
.bloc-seance.type-opposition .bloc-etiquette { color: var(--encre); }
.bloc-nom { display: block; font-size: 1rem; letter-spacing: .02em; }
.bloc-detail { display: block; font-size: .82rem; color: var(--encre-2); margin-top: 3px; }
.bloc-actions { flex: none; display: flex; align-items: center; padding-right: 10px; }
.bouton-swap {
  width: 44px; height: 44px; border-radius: 50%;
  background: #EDF1F9; display: grid; place-items: center; flex: none;
}
.bouton-swap svg { width: 20px; height: 20px; stroke: var(--bleu); fill: none; }

/* ---------- Fiches d'exercice ---------- */
.rang-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.puce { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--gris-doux); color: var(--encre-2); font-size: .74rem; font-weight: 700; }
.etape { display: flex; gap: 10px; align-items: flex-start; background: var(--blanc); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; font-size: .9rem; line-height: 1.4; box-shadow: var(--ombre-basse); }
.etape-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #E3EAFB; color: var(--bleu-nuit); font-size: .74rem; font-weight: 800; display: grid; place-items: center; }
.note-coach { background: #E7EDFB; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; font-size: .86rem; color: var(--bleu-nuit); line-height: 1.4; }
.note-coach strong { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
.note-coach.reussi { background: #E4F3EA; color: #10552B; margin-top: 14px; }
.schema-terrain { width: 100%; background: #F6F8FC; border-radius: 12px; border: 1px solid var(--ligne); margin-bottom: 14px; }
.legende-schema { margin-top: -8px; margin-bottom: 12px; }

/* ---------- Ecussons / etoiles ---------- */
/* Les cinq ecussons occupent leur propre ligne : dans la ligne du nom, ils
   debordaient de la carte et passaient sous le texte (donc intouchables). */
.carte-etoiles {
  background: var(--blanc); border-radius: var(--rayon);
  padding: 12px 14px 10px; margin-bottom: 10px; box-shadow: var(--ombre-basse);
}
.ce-tete { display: flex; align-items: center; gap: 12px; }
.ce-note { flex: none; font-family: 'Anton', sans-serif; font-size: 1.05rem; color: var(--bleu); }
.rang-etoiles { display: flex; gap: 6px; margin-top: 8px; }
.ecusson { flex: 1; height: 48px; padding: 4px; display: grid; place-items: center; border-radius: 10px; }
.ecusson svg { width: 34px; height: 34px; display: block; }
.ecusson:active { background: #EEF2FA; }
.ecusson.actif { --e-fond: var(--bleu); --e-couture: var(--bleu-texte-2); --e-etoile: var(--blanc); }
.ecusson.actif svg { animation: cousu .25s ease-out; }
@keyframes cousu { 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.barre-etoiles { height: 10px; border-radius: 5px; background: var(--gris-doux); overflow: hidden; }
.barre-etoiles i { display: block; height: 100%; background: var(--bleu); border-radius: 5px; }

/* ---------- Fiche joueur ---------- */
.fiche-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 44px; }
.bouton-plein .ic-bouton { width: 18px; height: 18px; stroke: currentColor; fill: none; vertical-align: -3px; margin-right: 6px; }
.frise { display: flex; gap: 4px; }
.frise-case {
  flex: 1; min-width: 0; height: 46px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .62rem; font-weight: 700;
}
.frise-case.present { background: var(--bleu); color: var(--blanc); }
.frise-case.absent { background: var(--gris-doux); color: var(--encre-2); }
.frise-case.vide { background: transparent; border: 1.5px dashed var(--ligne); color: var(--maillot-absent); }
.frise-jour { font-size: .58rem; opacity: .75; }
.frise-note { font-family: 'Anton', sans-serif; font-size: .9rem; }
.frise-legende { display: flex; gap: 14px; justify-content: center; margin-top: 8px; font-size: .72rem; color: var(--encre-2); font-weight: 600; }
.frise-legende span { display: inline-flex; align-items: center; gap: 5px; }
.frise-legende .pt { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.frise-legende .pt.present { background: var(--bleu); }
.frise-legende .pt.absent { background: var(--gris-doux); }
.frise-legende .pt.vide { border: 1.5px dashed var(--ligne); }

/* ---------- Stats ---------- */
.histo { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding: 10px 8px 0; background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre-basse); }
.histo-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.histo-barre {
  width: 100%; max-width: 26px; border-radius: 5px 5px 0 0;
  background: var(--bleu); position: relative;
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 8px;
}
.histo-barre.faible { background: var(--ambre-barre); }
.histo-barre b { font-family: 'Anton', sans-serif; font-weight: 400; font-size: .68rem; color: var(--blanc); margin-top: 2px; }
.histo-legende { font-size: .55rem; color: var(--encre-2); font-weight: 700; margin-top: 4px; white-space: nowrap; }

.carte-liste { background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre-basse); overflow: hidden; }
.rang-ligne { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--fond); }
.rang-ligne:last-child { border-bottom: 0; }
.rang-num { flex: none; width: 18px; font-family: 'Anton', sans-serif; color: var(--maillot-absent); font-size: .9rem; text-align: center; }
.rang-poste { flex: none; width: 38px; text-align: center; font-size: .68rem; font-weight: 800; color: var(--bleu-nuit); background: #E3EAFB; border-radius: 6px; padding: 3px 0; }
.rang-ligne .mini-maillot { width: 32px; height: 29px; }
.rang-ligne .mini-maillot svg { width: 32px; height: 29px; }
.rang-ligne .mini-num { top: 9px; font-size: .68rem; }
.rang-ligne .mini-num.n2 { top: 10px; font-size: .52rem; }
.rang-ligne .mini-num.initiales { top: 10px; font-size: .48rem; }
.rang-nom { flex: 1; min-width: 0; font-size: .86rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rang-nom.petit { font-weight: 600; color: var(--encre-2); font-size: .8rem; }
.rang-barre { flex: none; width: 74px; height: 8px; border-radius: 4px; background: var(--gris-doux); overflow: hidden; display: flex; }
.rang-barre i { display: block; height: 100%; background: var(--bleu); }
.rang-barre i.faible { background: var(--ambre-barre); }
.rang-barre u { display: block; height: 100%; background: #AEC3F4; }
.rang-valeur { flex: none; width: 44px; text-align: right; font-family: 'Anton', sans-serif; font-size: .95rem; }
.rang-valeur.ton-rouge { color: var(--rouge); }
.rang-etoiles-mini { flex: none; display: flex; gap: 2px; }
.rang-etoiles-mini .etoile-mini { --e-fond: var(--gris-doux); --e-etoile: var(--maillot-absent); --e-couture: transparent; }
.rang-etoiles-mini .etoile-mini.pleine { --e-fond: var(--bleu); --e-etoile: var(--blanc); }

/* ---------- Reglages ---------- */
.carte-reglage { background: var(--blanc); border-radius: var(--rayon); padding: 14px 16px 16px; box-shadow: var(--ombre-basse); margin-bottom: 10px; }
.carte-reglage .bouton-contour { margin-top: 12px; }
.carte-reglage .aide-champ { margin-bottom: 0; line-height: 1.45; }
.code-coach { font-family: 'Anton', sans-serif; font-size: 1.5rem; letter-spacing: .1em; color: var(--bleu); margin: 6px 0 2px; }
.interrupteur {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--blanc); border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--ombre-basse); margin: 4px 0 12px; text-align: left;
}
.int-texte { flex: 1; min-width: 0; display: block; }
.int-texte strong { display: block; font-size: .92rem; }
.int-texte span { display: block; font-size: .76rem; color: var(--encre-2); margin-top: 2px; }
.int-piste { flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--gris-doux); position: relative; transition: background .2s; }
.int-pastille { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--blanc); box-shadow: var(--ombre-basse); transition: transform .2s; }
.interrupteur[aria-pressed="true"] .int-piste { background: var(--bleu); }
.interrupteur[aria-pressed="true"] .int-pastille { transform: translateX(20px); }

/* ---------- Feuillet (bottom sheet) ---------- */
.voile {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(14, 27, 61, .45);
  opacity: 0; transition: opacity .22s ease-out;
}
.voile.visible { opacity: 1; }
.feuillet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--fond);
  border-radius: 22px 22px 0 0;
  max-height: calc(var(--vh) - 60px);
  display: flex; flex-direction: column;
  padding: 10px 0 0;
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 -10px 34px rgba(14, 27, 61, .25);
}
.feuillet.visible { transform: translateY(0); }
.feuillet .poignee { flex: none; width: 42px; height: 5px; border-radius: 3px; background: var(--maillot-absent); margin: 4px auto 10px; }
/* Le corps du feuillet defile, donc il rogne ce qui depasse en haut : sans ce
   petit retrait, l'accent du titre en Anton (« LES ÉTOILES ») se faisait couper. */
.feuillet-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 5px 18px calc(16px + var(--safe-bas)); }
.feuillet-pied {
  flex: none; padding: 12px 18px calc(14px + var(--safe-bas));
  background: var(--fond); border-top: 1px solid var(--ligne);
}
.feuillet h2 { font-size: 1.5rem; line-height: 1.08; margin-bottom: 4px; padding-right: 40px; }
.feuillet .ss-titre { color: var(--encre-2); font-size: .86rem; font-weight: 600; margin-bottom: 14px; line-height: 1.4; }
.feuillet h3.section-titre { margin-top: 20px; }
.feuillet .fermer {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gris-doux); display: grid; place-items: center;
}
.feuillet .fermer svg { width: 16px; height: 16px; stroke: var(--encre-2); fill: none; }

/* ---------- Formulaires ---------- */
.champ { margin-bottom: 14px; }
/* Les intitules d'une meme rangee font la meme hauteur, sinon un libelle sur
   deux lignes decale son champ par rapport a son voisin. */
.champ label { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-2); margin-bottom: 6px; }
.rang-2 > .champ > label, .rang-3 > .champ > label { display: flex; align-items: flex-end; min-height: 2.7em; }
.champ input[type="text"], .champ input[type="url"], .champ input[type="number"], .champ input[type="date"], .champ input[type="time"], .champ select {
  width: 100%;
  height: 48px;
  background: var(--blanc);
  border: 1.5px solid var(--ligne);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 1rem;
  appearance: none;
}
.champ input:focus, .champ select:focus { outline: none; border-color: var(--bleu); }
.rang-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.rang-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: start; }
.segmente { display: flex; background: var(--gris-doux); border-radius: 12px; padding: 3px; height: 48px; }
.segmente button { flex: 1; padding: 0 6px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--encre-2); }
.segmente button.actif { background: var(--blanc); color: var(--bleu); box-shadow: var(--ombre-basse); }
.segmente.sur-bleu { background: rgba(255, 255, 255, .18); height: 46px; margin-top: 12px; }
.segmente.sur-bleu button { color: var(--bleu-texte-2); font-size: .84rem; }
.segmente.sur-bleu button.actif { background: var(--blanc); color: var(--bleu); }
.chips-postes { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-poste {
  min-width: 48px; padding: 11px 13px; border-radius: 10px;
  border: 1.5px solid var(--ligne); background: var(--blanc);
  font-weight: 800; font-size: .85rem; letter-spacing: .03em; color: var(--encre-2);
}
.chip-poste.prefere { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.chip-poste.secondaire { border-color: var(--bleu); color: var(--bleu); background: #E9EFFC; }
.aide-champ { font-size: .76rem; color: var(--encre-2); margin-top: 5px; line-height: 1.4; }
.bouton-danger { width: 100%; padding: 13px; border-radius: 999px; color: var(--rouge); font-weight: 700; border: 1.5px solid rgba(216, 52, 31, .35); margin-top: 14px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; left: 16px; right: 16px; z-index: 60;
  top: calc(10px + var(--safe-haut));
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--encre); color: var(--blanc);
  border-radius: 12px; padding: 12px 16px;
  font-size: .9rem; font-weight: 600;
  box-shadow: var(--ombre);
  animation: toast-entre .3s ease-out;
}
.toast.erreur { background: var(--rouge); }
@keyframes toast-entre { from { transform: translateY(-14px); opacity: 0; } }

/* ---------- Login ---------- */
.login[hidden] { display: none; }
.login {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bleu);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-carte { width: 100%; max-width: 360px; text-align: center; color: var(--blanc); }
.login-maillot { width: 110px; height: 100px; margin-bottom: 8px; }
.login-maillot { --m-corps: var(--blanc); --m-trait: var(--bleu-nuit); --m-detail: var(--bleu); }
.login-carte h1 { font-size: 2.4rem; }
.login-carte p { color: var(--bleu-texte-2); font-weight: 600; margin: 6px 0 22px; }
.login-carte input {
  width: 100%; text-align: center;
  background: var(--bleu-nuit);
  border: 1.5px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  color: var(--blanc);
  font-family: 'Anton', sans-serif; font-size: 1.3rem; letter-spacing: .12em;
  padding: 14px;
  margin-bottom: 12px;
}
.login-carte input::placeholder { color: rgba(255, 255, 255, .45); }
.login-carte .bouton-plein { background: var(--blanc); color: var(--bleu); }
.login-erreur { margin-top: 12px; color: #FFD9CF; font-size: .88rem; font-weight: 600; }

/* ---------- Calendrier de la saison (dans Seances) ---------- */
.entete-repli {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 14px 0 10px;
}
.entete-repli .repli-info { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--encre-2); }
.entete-repli .chev { width: 20px; height: 20px; stroke: var(--encre-2); fill: none; transform: rotate(90deg); transition: transform .2s; }
.entete-repli .chev.ouvert { transform: rotate(-90deg); }
.repli-corps[hidden] { display: none; }
.ligne-semaine {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--blanc);
  border-radius: 12px;
  box-shadow: var(--ombre-basse);
  font-size: .88rem;
}
.ligne-semaine .num-sem { flex: none; width: 34px; text-align: center; font-family: 'Anton', sans-serif; color: var(--maillot-absent); font-size: .95rem; }
.ligne-semaine .sem-texte { flex: 1; min-width: 0; display: block; }
.ligne-semaine .sem-theme { display: block; font-weight: 700; font-size: .86rem; line-height: 1.25; }
.ligne-semaine .sem-dates { display: block; font-size: .72rem; color: var(--encre-2); margin-top: 2px; }
.ligne-semaine.passee { opacity: .6; }
.ligne-semaine.encours { box-shadow: inset 0 0 0 2px var(--bleu), var(--ombre-basse); }
.ligne-semaine.encours .num-sem { color: var(--bleu); }
.ligne-semaine.vacances { background: #E7EBF5; box-shadow: none; color: var(--encre-2); font-weight: 600; }
.pastilles-seances { margin-left: auto; display: flex; gap: 5px; flex: none; }
.pastille-seance { width: 10px; height: 10px; border-radius: 50%; background: #D3DAE8; }
.pastille-seance.faite { background: var(--bleu); }
.pastille-seance.annulee { background: var(--rouge); }
.pastille-seance.active { box-shadow: 0 0 0 2px var(--blanc), 0 0 0 4px var(--bleu); }
.etiquette-phase {
  display: block; margin: 16px 0 8px;
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bleu);
}

/* ---------- Etats vides ---------- */
.etat-vide { text-align: center; padding: 40px 20px; color: var(--encre-2); }
.etat-vide svg { width: 60px; height: 60px; stroke: var(--maillot-absent); margin-bottom: 12px; }
.etat-vide .ev-titre { font-size: 1.3rem; color: var(--encre); margin-bottom: 6px; }
.etat-vide p { font-size: .9rem; font-weight: 500; max-width: 300px; margin: 0 auto; line-height: 1.45; }
.etat-vide .ev-action { margin-top: 18px; }

/* ---------- Transitions de vue ---------- */
.vue-entre { animation: vue-entre .28s ease-out; }
@keyframes vue-entre { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Focus clavier */
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 6px; }

/* ---------- Confirmation ---------- */
.confirme-voile {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(14, 27, 61, .5);
  display: grid; place-items: center; padding: 28px;
  animation: vue-entre .18s ease-out;
}
.confirme-carte {
  background: var(--blanc); border-radius: 18px;
  padding: 22px 20px 16px; max-width: 340px; width: 100%;
  box-shadow: var(--ombre); text-align: center;
}
.confirme-carte p { font-size: .95rem; margin-bottom: 18px; line-height: 1.4; }
.confirme-carte .rang-2 { gap: 8px; }
.confirme-carte button { padding: 12px; border-radius: 999px; font-weight: 700; }
.confirme-carte .annuler { background: #E8ECF4; color: var(--encre); }
.confirme-carte .confirmer { background: var(--rouge); color: var(--blanc); }

/* ---------- Affiche du prochain match ---------- */
.affiche-match {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 100%;
  background: var(--bleu-nuit);
  border-radius: var(--rayon);
  padding: 16px 14px 14px;
  margin-top: 14px;
  color: var(--blanc);
  box-shadow: var(--ombre);
  text-align: center;
}
.affiche-match:active { transform: scale(.98); }
.affiche-ligne { display: flex; align-items: center; gap: 18px; }
.affiche-ligne .mini-maillot { width: 56px; height: 51px; }
.affiche-ligne .mini-maillot svg { width: 56px; height: 51px; }
.affiche-ligne .mini-maillot .mini-num { top: 16px; font-size: .82rem; }
.affiche-vs { font-size: 1.5rem; color: var(--bleu-texte-2); }
.affiche-nom { font-size: 1.05rem; letter-spacing: .03em; }
.affiche-sous { font-size: .8rem; font-weight: 600; color: var(--bleu-texte-2); }

/* ---------- Ecrans larges (iPad, bureau) ---------- */
@media (min-width: 640px) {
  .contenu, .entete { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  .entete { border-radius: 0 0 22px 22px; }
  .grille-maillots { grid-template-columns: repeat(5, 1fr); }
  .grille-casiers { max-width: 520px; }   /* sinon les portes s'étirent en largeur */
  .barre-cta > * { max-width: 720px; margin: 0 auto; }
}
