/* =============================================================================================
   LOT UX « LE TERRAIN AU QUOTIDIEN » (16/11/2026) — Board, Calendrier, Présences, Matchs,
   Classement, Statistiques.

   Une COUCHE de mise en page, posée par-dessus `styles.css` sans la réécrire. Référence : les
   maquettes de Jérôme (`_CLAUDE_IMPORT/MAQUETTES_TERRAIN_2026-11-16/`), reproduites dans leur
   disposition (zones, ordre, grilles, cartes, ombres, KPI, onglets en pastilles, puces, états
   vides) — **pas dans leurs couleurs** : décision de Jérôme du 16/11, 02 h 26, la charte
   actuelle reste. Toute couleur passe donc par un jeton de la charte ; le « violet » des
   maquettes est `--section`, la couleur de l'univers ouvert.

   Feuille à part, comme `fiche-joueur.css` : `styles.css` est à son plafond de poids, et ce lot
   ne touche ni la feuille ni sa garde. Tout est borné à `#view-coach` (et, pour les onglets et
   cartes voisins, à `#view-team`) : aucun autre écran ne change.
   ============================================================================================= */

#view-coach {
  --tq-rayon: 18px;
  --tq-rayon-grand: 22px;
  --tq-ombre: var(--ombre-2);
  --tq-ecart: 22px;
  --tq-gouttiere: clamp(22px, 3vw, 48px);
}

/* --- 0. Correctif du 16/11 (12 h 51) : « trop de fond rose/violet » ------------------------
   Le fond de travail de l'espace Coach est neutre : le gris très clair de la charte, sans le
   halo magenta d'univers. La couleur ne reste que là où la maquette en met (bouton principal,
   onglet actif, puces de statut, scores, ronds des KPI). */
body[data-section="coach"] #main-content { background: var(--fond-atelier); }
#view-coach .coach-pane { gap: var(--tq-ecart); }
#view-coach .coach-pane .panel,
#view-coach .coach-duo > .panel {
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: var(--surface-premium);
}
#view-coach .coach-pane .panel::before { display: none; }
#view-coach .button { min-height: 44px; font-size: 0.95rem; }
#view-coach .button.button-small { min-height: 40px; }

/* --- Les tons des pastilles : un nom, un couple (encre, fond) de la charte -------------------- */
#view-coach [data-tq-ton="violet"] { --tq-encre: var(--section); --tq-fond: var(--section-soft); }
#view-coach [data-tq-ton="bleu"] { --tq-encre: var(--blue); --tq-fond: var(--blue-soft); }
#view-coach [data-tq-ton="vert"] { --tq-encre: var(--green); --tq-fond: var(--green-soft); }
#view-coach [data-tq-ton="orange"] { --tq-encre: var(--orange); --tq-fond: var(--orange-soft); }
#view-coach [data-tq-ton="rouge"] { --tq-encre: var(--red); --tq-fond: var(--red-soft); }
#view-coach [data-tq-ton="cyan"] { --tq-encre: var(--teal); --tq-fond: var(--teal-soft); }
#view-coach [data-tq-ton="gris"] { --tq-encre: var(--slate); --tq-fond: var(--surface-soft); }

#view-coach .picto { flex: none; }

/* --- 1. Le bandeau d'en-tête -------------------------------------------------------------------
   Le dégradé profond de la charte, et à droite un visuel discret : le décor du stade amateur déjà
   livré pour la vue 3D (validé par Jérôme), fondu dans le bandeau. Aucune photo de personne.
   Correctif du 16/11 : pleine largeur, bord à bord de la zone de travail, comme la maquette —
   il annule le rembourrage de `.main-content` (30px en haut, la gouttière sur les côtés). */
#view-coach .tq-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 132px;
  margin: -30px calc(-1 * var(--tq-gouttiere)) 4px;
  padding: 26px var(--tq-gouttiere) 28px;
  border-radius: 0;
  box-shadow: none;
}
#view-coach .tq-hero p { font-size: 1.05rem; }
#view-coach .tq-hero > :not(.tq-hero-visuel) { position: relative; z-index: 1; }
#view-coach .tq-hero-visuel {
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  z-index: 0;
  background: url("/app/decor-stade-paysage.webp") center 62% / cover no-repeat;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #fff 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #fff 55%);
  pointer-events: none;
}
#view-coach .tq-hero h2 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); margin: 0 0 4px; }
#view-coach .tq-hero .eyebrow { margin: 0 0 6px; }
#view-coach .tq-hero .equipe-active { color: var(--accent-vert-clair); font-weight: 850; }
#view-coach .tq-hero .equipe-active::before { color: var(--mjp-hero-encre-faible); }
#view-coach .coach-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#view-coach .coach-hero-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--radius-pilule);
  font-size: 0.98rem;
}

/* --- 2. Les onglets en pastilles -------------------------------------------------------------- */
#view-coach .tq-onglets,
#view-team .team-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}
#view-coach .tq-onglets { margin-top: 14px; }
#view-coach #coach-message:empty { display: none; }
#view-coach .tq-onglets .coach-onglet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 46px;
  padding: 10px 22px;
  font-size: 1rem;
  box-shadow: var(--ombre-1);
}
#view-coach .tq-onglets .coach-onglet .picto { width: 20px; height: 20px; }
#view-coach .tq-onglets .coach-onglet.is-active { box-shadow: var(--ombre-2); }

/* --- 3. L'en-tête d'un écran : le picto dans un carré pastel, le titre, le sous-titre --------- */
#view-coach .tq-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
}
#view-coach .tq-entete .ec-entete-titre { flex: 1 1 220px; }
#view-coach .tq-entete h3 { font-size: clamp(1.75rem, 2.4vw, 2.25rem); letter-spacing: -0.02em; margin: 0; }
#view-coach .tq-entete .ec-sous-titre { font-size: 1.02rem; margin-top: 4px; }
#view-coach .tq-titre-icone {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
  color: var(--section);
}
#view-coach .tq-titre-icone .picto { width: 26px; height: 26px; }
#view-coach .tq-entete-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#view-coach .tq-entete-actions .button,
#view-coach .tq-bouton-fleche,
#view-coach .tq-bouton-large,
#view-coach .coach-match .button,
#view-coach .coach-presence-actions .button,
#view-coach .coach-convocations .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* L'action maîtresse d'un écran se porte pleine, comme dans les maquettes — sans changer sa
   classe de grammaire (Lot D1 : un seul PRIMARY par écran). */
#view-coach .ec-action-maitresse {
  background: var(--degrade-section);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--ombre-2);
}
#view-coach .ec-action-maitresse:hover:not(:disabled) { filter: brightness(1.06); }

/* --- 4. Les cartes ------------------------------------------------------------------------------ */
#view-coach .tq-carte,
#view-coach .coach-pane > .panel,
#view-coach .coach-duo > .panel {
  border-radius: var(--tq-rayon-grand);
  box-shadow: var(--tq-ombre);
}

/* --- 5. Les cartes KPI ---------------------------------------------------------------------------- */
#view-coach .tq-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
#view-coach .tq-kpi[hidden] { display: none; }
/* Le ton par défaut ne passe que par `:where()` : écrit à égalité de poids, il écrasait le
   `data-tq-ton` posé sur la même carte, et les quatre KPI sortaient tous magenta. */
#view-coach :where(.tq-kpi-carte:not([data-tq-ton])) { --tq-encre: var(--section); --tq-fond: var(--section-soft); }
#view-coach .tq-kpi-carte {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon);
  background: var(--surface-premium);
}
#view-coach .tq-kpi-carte::before,
#view-coach .tq-kpi-carte::after { display: none; }
#view-coach .tq-kpi-rond {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tq-fond);
  color: var(--tq-encre);
}
#view-coach .tq-kpi-rond .picto { width: 30px; height: 30px; }
#view-coach .tq-kpi-texte { display: grid; gap: 4px; min-width: 0; }
#view-coach .tq-kpi-carte .accueil-kpi-valeur { font-size: 2.4rem; line-height: 1; color: var(--ink); white-space: nowrap; }
#view-coach .tq-kpi-carte .accueil-kpi-libelle {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
}
#view-coach .tq-kpi-fond {
  margin-left: auto;
  color: var(--tq-encre);
  opacity: 0.13;
}
#view-coach .tq-kpi-fond .picto { width: 56px; height: 56px; stroke-width: 2.2; }

/* --- 6. Les puces de statut ------------------------------------------------------------------- */
#view-coach .tq-puce,
#view-coach .tq-lieu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pilule);
  background: var(--tq-fond, var(--surface-soft));
  color: var(--tq-encre, var(--slate));
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}
#view-coach .tq-puce .picto,
#view-coach .tq-lieu .picto { width: 16px; height: 16px; }
#view-coach .tq-lieu[data-lieu="domicile"] { --tq-fond: var(--green-soft); --tq-encre: var(--green); }
#view-coach .tq-lieu[data-lieu="exterieur"] { --tq-fond: var(--surface-soft); --tq-encre: var(--slate); }

/* --- 7. Board : la carte du jour --------------------------------------------------------------- */
#view-coach .tq-jour {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 24px;
  min-height: 210px;
  padding: 26px 0 26px 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon-grand);
  background: var(--surface-premium);
  box-shadow: var(--tq-ombre);
  justify-items: stretch;
}
#view-coach .tq-jour-icone {
  display: inline-grid;
  place-items: center;
  align-self: start;
  justify-self: start;
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
  color: var(--section);
}
#view-coach .tq-jour-icone .picto { width: 42px; height: 42px; }
#view-coach .tq-jour-texte { display: grid; gap: 10px; justify-items: start; min-width: 0; }
#view-coach .tq-jour-texte .eyebrow { margin: 0; color: var(--section); }
#view-coach .tq-jour-texte h3 { font-size: clamp(1.6rem, 2.5vw, 2.25rem); margin: 0; }
#view-coach .tq-bouton-fleche { min-height: 52px; padding: 12px 28px; border-radius: var(--radius-pilule); font-size: 1.05rem; }
#view-coach .tq-jour-photo {
  align-self: stretch;
  min-height: 210px;
  margin: -26px 0;
  background: url("/app/decor-amateur-surface.webp") center 70% / cover no-repeat;
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, #fff 34%);
  mask-image: linear-gradient(100deg, transparent 0%, #fff 34%);
}

/* --- 8. Board : les trois cartes --------------------------------------------------------------- */
#view-coach .tq-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: var(--tq-ecart); }
#view-coach .ec-zone-titre {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.22rem;
}
#view-coach .ec-zone-titre > .picto { width: 24px; height: 24px; color: var(--section); }
#view-coach .tq-prochain {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon);
  background: var(--surface-elevee);
}
#view-coach .tq-prochain .coach-fait { text-transform: uppercase; }
#view-coach .tq-bouton-large {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--section);
  border-radius: var(--tq-rayon);
  background: var(--surface-premium);
  color: var(--section);
}
#view-coach .tq-bouton-large:hover { background: var(--surface-soft); }
#view-coach .tq-vide { display: flex; align-items: center; gap: 8px; }
#view-coach .tq-logo {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--muted);
}
#view-coach .tq-logo .picto { width: 34px; height: 34px; }
#view-coach .tq-logo-img { width: 44px; height: 44px; object-fit: contain; }

#view-coach .tq-a-cocher { list-style: none; margin: 8px 0 0; padding: 0; }
#view-coach .tq-a-cocher li { margin: 0; border-bottom: 1px solid var(--line); }
#view-coach .tq-a-cocher li:last-child { border-bottom: 0; }
#view-coach .tq-ligne,
#view-coach .tq-rappel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 6px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
}
#view-coach .tq-ligne:hover,
#view-coach .tq-rappel:hover { background: var(--surface-soft); }
#view-coach .tq-case {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: #fff;
}
#view-coach li[data-fait="oui"] .tq-case { border-color: var(--green); background: var(--green); }
#view-coach li[data-fait="oui"] .tq-case .picto { width: 16px; height: 16px; }
#view-coach li[data-fait="oui"] .tq-ligne-texte { color: var(--muted); text-decoration: line-through; }
#view-coach .tq-chevron { color: var(--muted); }
#view-coach .tq-rappel {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon);
  background: var(--surface-premium);
}
#view-coach .tq-rappel-picto { color: var(--section); }
#view-coach .tq-rappel .coach-rappel-date { font-weight: 700; font-variant-numeric: tabular-nums; }
#view-coach .tq-rappel-texte { display: grid; min-width: 0; }
#view-coach .tq-rappel .coach-rappel-titre { font-weight: 800; }
#view-coach .tq-rappel .coach-rappel-note { color: var(--muted); font-size: 0.8rem; font-weight: 500; }

/* --- 9. Le bandeau « Synchronisation FFF » ------------------------------------------------------ */
#view-coach .tq-fff { padding: 0; border: 0; background: none; }
#view-coach .tq-fff-bandeau {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon-grand);
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
}
#view-coach .tq-fff-marque {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
#view-coach .tq-fff-bloc { display: flex; align-items: center; gap: 10px; min-width: 0; }
#view-coach .tq-fff-bloc > span,
#view-coach .tq-fff-titre { display: grid; gap: 2px; }
#view-coach .tq-fff-titre { flex: 1 1 240px; }
#view-coach .tq-fff-titre p { margin: 0; }
#view-coach .tq-fff-bloc span span,
#view-coach .tq-fff-titre > span { color: var(--muted); font-size: 0.86rem; }
#view-coach .tq-fff-prochain > .picto { color: var(--section); width: 24px; height: 24px; }
#view-coach .tq-fff-etat > .picto { color: var(--tq-encre); width: 28px; height: 28px; }
#view-coach .tq-fff-etat strong { color: var(--tq-encre); }
#view-coach .tq-fff-info { color: var(--muted); cursor: help; }
#view-coach .tq-fff-bandeau .fff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
#view-coach .tq-fff-bandeau .fff-actions select { min-height: 36px; }

/* --- 10. Présences ------------------------------------------------------------------------------ */
/* Lot UX « Accueil, Staff, Présences » (16/11) : la séance au-dessus, les compteurs sur une ligne. */
#view-coach .tq-carte .coach-presence-entete {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 18px 22px;
  margin-top: 18px;
}
#view-coach .coach-presence-entete > label { min-width: 0; max-width: 420px; }
#view-coach .coach-presence-entete select { min-height: 48px; border-radius: 14px; }
#view-coach .tq-compteurs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
}
#view-coach .tq-tuile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--tq-rayon);
  background: var(--tq-fond);
  color: var(--ink);
  font-size: inherit;
  text-align: left;
  cursor: pointer;
}
#view-coach .tq-tuile[aria-pressed="true"] { border-color: var(--tq-encre); box-shadow: var(--halo-section); }
#view-coach .tq-tuile-rond {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-premium);
  color: var(--tq-encre);
}
#view-coach .tq-tuile-texte { display: grid; min-width: 0; line-height: 1.15; }
#view-coach .tq-tuile-texte strong { font-size: 1.5rem; color: var(--tq-encre); }
#view-coach .tq-tuile-texte span { font-size: 0.78rem; font-weight: 700; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
#view-coach .tq-compteurs .tq-tuile { min-width: 0; padding: 10px; gap: 8px; }

#view-coach .tq-filtres {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
}
#view-coach .tq-recherche {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pilule);
  background: var(--surface-premium);
}
#view-coach .tq-recherche > span { color: var(--muted); display: inline-flex; }
#view-coach .tq-recherche input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; font-size: 0.98rem; }
#view-coach .tq-recherche:focus-within { border-color: var(--section); box-shadow: var(--halo-section); }
#view-coach .tq-statut-filtre select { min-height: 44px; border-radius: var(--radius-pilule); padding-inline: 14px; }
#view-coach .tq-filtres .button { border-radius: var(--radius-pilule); }
#view-coach .tq-aide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon);
  background: var(--surface-soft);
  color: var(--ink);
}
#view-coach .tq-aide > span { color: var(--section); display: inline-flex; }
#view-coach .tq-aide .ec-legende summary { font-weight: 800; }
#view-coach .tq-aide .assisted-section-note { margin: 0; flex: 1 1 320px; color: var(--ink); font-size: 0.86rem; }
#view-coach .tq-aide .ec-legende[open] { flex-basis: 100%; }

#view-coach .tq-joueurs {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
#view-coach .tq-joueur {
  grid-template-columns: minmax(0, 1fr) 40px;
  grid-template-areas: "carte mobilite" "etat etat";
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--tq-encre);
  border-radius: var(--tq-rayon);
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
}
#view-coach .tq-joueur .coach-joueuse {
  grid-area: carte;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
#view-coach .tq-joueur .coach-joueuse-numero { width: 38px; height: 34px; border-radius: 10px; }
#view-coach .tq-joueur .coach-joueuse-reperes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
#view-coach .tq-joueur .coach-mobilite { grid-area: mobilite; min-height: 36px; border: 0; background: none; }
#view-coach .tq-etat-choix {
  grid-area: etat;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pilule);
  color: var(--tq-encre);
}
#view-coach .tq-etat-choix select {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  border: 0;
  background-color: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}
#view-coach .coach-presence-actions .button-primary { min-height: 50px; padding-inline: 28px; border-radius: var(--tq-rayon); }

/* --- 11. Matchs ------------------------------------------------------------------------------ */
#view-coach .tq-matchs .ec-match-zone { display: grid; gap: 8px; }
#view-coach .tq-matchs .ec-zone-compte::before { content: "("; }
#view-coach .tq-matchs .ec-zone-compte::after { content: ")"; }
#view-coach .tq-matchs .ec-zone-compte { background: none; padding: 0; font-weight: 700; color: var(--slate); }
#view-coach .tq-match {
  grid-template-columns: 84px auto minmax(0, 1fr) auto auto;
  gap: 18px;
  padding: 12px 18px;
  border-radius: var(--tq-rayon);
}
#view-coach .tq-match .coach-match-date {
  white-space: nowrap;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  line-height: 1.15;
}
#view-coach .tq-date-jour { font-size: 0.72rem; font-weight: 800; color: var(--slate); }
#view-coach .tq-match .coach-match-date strong { font-size: 1.05rem; }
#view-coach .tq-match .coach-match-titre { text-transform: uppercase; }
#view-coach .tq-match.est-prochain {
  border: 1.5px solid var(--section);
  background: var(--surface-premium);
}
#view-coach .coach-score {
  padding: 6px 16px;
  border-radius: var(--radius-pilule);
  background: var(--surface-soft);
  font-weight: 900;
}
#view-coach .coach-score[data-resultat="victoire"] { background: var(--green-soft); color: var(--green); }
#view-coach .coach-score[data-resultat="defaite"] { background: var(--red-soft); color: var(--red); }
#view-coach .coach-match .button-small {
  border: 1.5px solid color-mix(in srgb, var(--section) 45%, var(--line));
  background: var(--surface-premium);
  color: var(--section);
  border-radius: 12px;
}

/* La feuille de match et la composition (maquettes 05 et 03). */
#view-coach .tq-feuille-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#view-coach .tq-feuille-tete h3 { margin: 0; font-size: clamp(1.5rem, 2vw, 1.85rem); }
#view-coach .tq-feuille-tete #coach-feuille-fermer { margin-left: auto; }
#view-coach .tq-faits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) repeat(2, minmax(150px, 1.15fr));
  gap: 0;
  margin: 18px 0 14px;
}
#view-coach .tq-faits > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
  border-right: 1px solid var(--line);
}
#view-coach .tq-faits > div:last-child { border-right: 0; }
#view-coach .tq-faits .picto { color: var(--section); width: 22px; height: 22px; }
#view-coach .tq-faits dt { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
#view-coach .tq-faits dd { margin: 0; font-weight: 850; font-size: 1.05rem; }
#view-coach .tq-faits .tq-fait-choix label { display: grid; gap: 4px; flex: 1; min-width: 0; }
#view-coach .tq-fait-choix label > span { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
#view-coach .tq-fait-choix select { min-height: 42px; border-radius: 12px; }
#view-coach .tq-reglages { display: flex; flex-wrap: wrap; gap: 12px 18px; }
#view-coach .tq-reglages label { display: grid; gap: 4px; width: 130px; }
#view-coach .tq-reglages label > span { display: inline-flex; align-items: center; gap: 6px; }
#view-coach .tq-compo-titre { display: flex; align-items: center; gap: 14px; margin: 22px 0 12px; }
#view-coach .tq-compo-titre h4 { margin: 0; font-size: 1.4rem; }
#view-coach .tq-compo-titre .ec-sous-titre { margin: 2px 0 0; }
#view-coach .tq-match-choisi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding: 14px 20px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon);
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
}
#view-coach .tq-match-choisi > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
#view-coach .tq-match-choisi > span > .picto { color: var(--section); }
#view-coach .tq-match-choisi .tq-logo { width: 32px; height: 32px; }
#view-coach .tq-match-choisi .tq-logo .picto { width: 26px; height: 26px; color: var(--muted); }
#view-coach .tq-convocations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 18px 20px;
  border-radius: var(--tq-rayon);
}
#view-coach .tq-convocations { align-items: center; }
#view-coach .tq-convocations[data-etat="attente"] { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, var(--line)); }
#view-coach .tq-convocations .coach-convocations-texte { display: flex; flex-direction: row; gap: 14px; align-items: flex-start; flex: 1 1 280px; }
#view-coach .tq-convocations .coach-convocations-texte > div { display: grid; gap: 4px; justify-items: start; }
#view-coach .tq-convocations .coach-convocations-texte strong { font-size: 1.3rem; }
#view-coach .tq-convoc-compteurs { display: flex; flex-wrap: wrap; gap: 10px; }
#view-coach .tq-convoc-compteurs > span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--tq-fond);
  color: var(--tq-encre);
}
#view-coach .tq-convoc-compteurs > span > .picto { grid-row: span 2; width: 26px; height: 26px; }
#view-coach .tq-convoc-compteurs strong { font-size: 1.25rem; color: var(--ink); line-height: 1; }
#view-coach .tq-convoc-compteurs span span { font-size: 0.78rem; font-weight: 700; color: var(--ink); }
#view-coach .tq-convocations .coach-convocations-envoi { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; flex: 1 1 100%; }
#view-coach .tq-convocations .coach-convocations-envoi label > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
#view-coach #coach-convoc-publier { margin-left: auto; min-height: 48px; padding-inline: 26px; border-radius: var(--tq-rayon); }

#view-coach .tq-compo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
#view-coach .tq-depot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--tq-rayon);
  border: 1px solid var(--line);
}
#view-coach .tq-depot[data-tq-depot="titulaire"] { background: var(--green-soft); --tq-encre: var(--green); }
#view-coach .tq-depot[data-tq-depot="remplacant"] { background: var(--blue-soft); --tq-encre: var(--blue); }
#view-coach .tq-depot .eyebrow { margin: 0; color: var(--ink); font-size: 1.25rem; letter-spacing: 0; text-transform: none; font-weight: 850; }
#view-coach .tq-depot .eyebrow span { color: var(--tq-encre); }
#view-coach .tq-depot-icone {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--surface-premium);
  color: var(--tq-encre);
}
#view-coach .tq-depot-icone .picto { width: 34px; height: 34px; }
#view-coach .tq-depot-cible {
  display: inline-grid;
  place-items: center;
  width: 110px;
  height: 64px;
  border: 2px dashed var(--tq-encre);
  border-radius: 14px;
  color: var(--tq-encre);
}
#view-coach .tq-depot-cible .picto + .picto { width: 14px; height: 14px; }
#view-coach .tq-depot.est-survolee,
#view-coach .tq-feuille-liste.est-survolee { outline: 3px solid var(--section); outline-offset: 2px; }
#view-coach .tq-depot .coach-onze { margin-top: 8px; }
#view-coach .coach-pion[draggable="true"],
#view-coach .tq-feuille-joueur { cursor: grab; }

#view-coach .tq-feuille-liste {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
#view-coach .tq-feuille-joueur {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--tq-rayon);
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
}
#view-coach .tq-feuille-joueur .coach-feuille-identite { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
#view-coach .tq-feuille-joueur .coach-joueuse-numero { border-radius: 50%; width: 38px; height: 38px; }
#view-coach .tq-feuille-joueur .coach-feuille-roles { display: flex; gap: 4px; flex-wrap: wrap; }
#view-coach .tq-feuille-joueur .coach-role { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--radius-pilule); }
#view-coach .tq-feuille-joueur .coach-role.is-active { background: var(--degrade-section); color: #fff; border-color: transparent; }
#view-coach .tq-feuille-joueur .coach-feuille-chiffres { grid-column: 1 / -1; }
#view-coach .coach-convoc-badge { display: inline-flex; align-items: center; gap: 4px; }
#view-coach .coach-convoc-badge .picto { width: 14px; height: 14px; }

/* --- 12. Calendrier ------------------------------------------------------------------------- */
#view-coach .tq-cal .coach-cal-barre { flex-wrap: wrap; gap: 12px; }
#view-coach .tq-cal .coach-cal-vue {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--radius-pilule);
  box-shadow: var(--ombre-1);
}
#view-coach .tq-cal .coach-cal-nav .button { border-radius: 12px; min-width: 40px; }
#view-coach .tq-cal .coach-cal-periode { font-size: 1.2rem; font-weight: 850; min-width: 150px; text-align: center; }
#view-coach .tq-cal .coach-cal-mois { gap: 6px; }
#view-coach .tq-cal .coach-cal-case { min-height: 56px; border-radius: 12px; padding: 6px 8px; }
#view-coach .tq-cal .coach-cal-case[data-aujourdhui="oui"] { border: 2px solid var(--section); background: var(--surface-premium); }
#view-coach .tq-cal .coach-cal-puce {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--section-soft);
  color: var(--section);
  font-size: 0.72rem;
}
#view-coach .tq-cal .coach-cal-puce .picto { width: 13px; height: 13px; }
#view-coach .tq-cal .coach-cal-puce[data-kind="match"] { background: var(--green-soft); color: var(--green); }
#view-coach .tq-cal .coach-cal-puce[data-annule="oui"] { background: var(--surface-soft); color: var(--muted); }
#view-coach .tq-duo-cal .panel-heading { display: flex; align-items: center; gap: 14px; justify-content: flex-start; }
#view-coach .tq-duo-cal .panel-heading .eyebrow { color: var(--section); }
#view-coach .tq-duo-cal .coach-serie { border-radius: 14px; }
#view-coach .tq-duo-cal .ec-formulaire-repli > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1.5px solid var(--section);
  border-radius: 14px;
  background: var(--surface-premium);
  color: var(--section);
  font-weight: 850;
}
#view-coach .tq-etat-vide {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px 10px;
  color: var(--muted);
  text-align: center;
}
#view-coach .tq-etat-vide .picto { width: 44px; height: 44px; color: var(--section); }
#view-coach .tq-etat-vide p { margin: 0; }
#view-coach .tq-ponctuels { margin-bottom: 12px; }

/* --- 13. Classement et statistiques ------------------------------------------------------- */
#view-coach .tq-repli > summary {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
  font-weight: 800;
  cursor: pointer;
}
#view-coach .tq-repli[open] > summary { margin-bottom: 12px; }
#view-coach .tq-forme { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 800; color: var(--slate); }
#view-coach .tq-table-defile { overflow-x: auto; }
#view-coach .tq-classement { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-variant-numeric: tabular-nums; }
#view-coach .tq-classement th,
#view-coach .tq-classement td { padding: 10px 12px; text-align: center; white-space: nowrap; }
#view-coach .tq-classement thead th { font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
#view-coach .tq-classement tbody th { text-align: left; font-weight: 700; }
#view-coach .tq-classement tbody tr { background: var(--surface-elevee); }
#view-coach .tq-classement tbody tr > :first-child { border-radius: 12px 0 0 12px; font-weight: 850; }
#view-coach .tq-classement tbody tr > :last-child { border-radius: 0 12px 12px 0; }
#view-coach .tq-classement tr.est-nous { background: var(--surface-soft); box-shadow: inset 4px 0 0 var(--section); }
#view-coach .tq-classement tr.est-nous th { color: var(--section); font-weight: 900; }
#view-coach .tq-barre-resultats {
  display: flex;
  height: 14px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: var(--radius-pilule);
  background: var(--surface-soft);
}
#view-coach .tq-barre-resultats [data-resultat="victoire"],
#view-coach .tq-legende-resultats [data-resultat="victoire"]::before { background: var(--green); }
#view-coach .tq-barre-resultats [data-resultat="nul"],
#view-coach .tq-legende-resultats [data-resultat="nul"]::before { background: var(--slate); }
#view-coach .tq-barre-resultats [data-resultat="defaite"],
#view-coach .tq-legende-resultats [data-resultat="defaite"]::before { background: var(--red); }
#view-coach .tq-legende-resultats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
#view-coach .tq-legende-resultats li { display: inline-flex; align-items: center; gap: 8px; }
#view-coach .tq-legende-resultats li[data-resultat]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }

/* --- 14. Le focus se voit partout --------------------------------------------------------- */
#view-coach :is(button, select, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--section);
  outline-offset: 2px;
}

/* --- 15. Les écrans voisins de l'équipe : même langage de cartes et de pastilles ------------ */
#view-team .team-subnav .rondo-tab {
  flex: none;
  min-height: 44px;
  padding: 9px 20px;
  border-radius: var(--radius-pilule);
  box-shadow: var(--ombre-1);
}
#view-team .panel { border-radius: 22px; box-shadow: var(--ombre-2); }
/* Lot PLAYER du 16/11 : les corrections proposées par le joueur, à valider ou refuser. */
#view-team .player-propositions { margin: 8px 0 0; padding: 0; list-style: none; }
#view-team .player-propositions li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
#view-team .player-proposition-gestes { display: flex; flex-wrap: wrap; gap: 8px; }
#view-team .player-suivi { margin: 10px 0 0; padding-left: 18px; }

/* --- 16. Tablette et téléphone ------------------------------------------------------------- */
@media (max-width: 1500px) {
  /* Le grand picto de fond mordait sur le libellé des KPI à 1440 px : il ne vient qu'au large. */
  #view-coach .tq-kpi-fond { display: none; }
}
@media (max-width: 1180px) {
  #view-coach .tq-carte .coach-presence-entete { grid-template-columns: minmax(0, 1fr); }
  #view-coach .tq-compteurs { grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
  #view-coach .tq-compteurs .tq-tuile { scroll-snap-align: start; }
  #view-coach .tq-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-coach .tq-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-coach .tq-faits { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  #view-coach .tq-faits > div:nth-child(3n) { border-right: 0; }
}
@media (max-width: 860px) {
  #view-coach .tq-carte .coach-presence-entete { grid-template-columns: minmax(0, 1fr); }
  #view-coach .tq-trio,
  #view-coach .tq-compo,
  #view-coach .tq-feuille-liste { grid-template-columns: minmax(0, 1fr); }
  #view-coach .tq-jour { grid-template-columns: auto minmax(0, 1fr); padding-right: 24px; }
  #view-coach .tq-jour-photo { display: none; }
  #view-coach .tq-hero-visuel { width: 70%; opacity: 0.18; }
  #view-coach .tq-match { grid-template-columns: 72px auto minmax(0, 1fr); }
  #view-coach .tq-match .tq-lieu,
  #view-coach .tq-match .coach-match-droite { grid-column: 2 / -1; justify-self: start; }
}
@media (max-width: 620px) {
  #view-coach { --tq-gouttiere: 15px; }
  #view-coach .tq-hero { margin-top: -22px; padding-block: 20px 22px; min-height: 0; }
  #view-coach .coach-pane .panel,
  #view-coach .coach-duo > .panel { padding: 18px 16px; }
}
@media (max-width: 560px) {
  #view-coach .tq-compteurs { grid-auto-columns: minmax(140px, 46%); }
  #view-coach .tq-faits > div { padding: 4px 8px; }
  #view-coach .tq-kpi { gap: 10px; }
  #view-coach .tq-kpi-carte { padding: 12px; gap: 10px; min-height: 0; }
  #view-coach .tq-kpi-rond { width: 40px; height: 40px; }
  #view-coach .tq-kpi-rond .picto { width: 22px; height: 22px; }
  #view-coach .tq-kpi-fond { display: none; }
  #view-coach .tq-kpi-carte .accueil-kpi-valeur { font-size: 1.6rem; }
  #view-coach .tq-kpi-carte .accueil-kpi-libelle { font-size: 0.66rem; letter-spacing: 0.03em; }
  #view-coach .tq-jour { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 14px; }
  #view-coach .tq-jour-icone { width: 56px; height: 56px; border-radius: 16px; }
  #view-coach .tq-jour-icone .picto { width: 30px; height: 30px; }
  #view-coach .tq-bouton-fleche { width: 100%; }
  #view-coach .tq-faits { grid-template-columns: minmax(0, 1fr); }
  #view-coach .tq-faits > div { border-right: 0; }
  #view-coach .tq-depot { grid-template-columns: auto minmax(0, 1fr); }
  #view-coach .tq-depot-cible { display: none; }
  #view-coach .tq-feuille-joueur { grid-template-columns: minmax(0, 1fr); }
  #view-coach .tq-match { gap: 10px; padding: 12px; }
  #view-coach .tq-match .coach-match-date { padding-right: 8px; }
  #view-coach .tq-match .tq-logo { display: none; }
  #view-coach .tq-match { grid-template-columns: 64px minmax(0, 1fr); }
  #view-coach .tq-match .tq-lieu,
  #view-coach .tq-match .coach-match-droite { grid-column: 1 / -1; }
  #view-coach .tq-cal .coach-cal-puce { padding: 2px 4px; font-size: 0.62rem; }
  #view-coach .tq-cal .coach-cal-puce .picto { display: none; }
  #view-coach .tq-entete-actions { width: 100%; }
  #view-coach .tq-entete-actions .button { flex: 1 1 100%; }
  #view-coach .tq-fff-bandeau { padding: 14px; }
  #view-coach #coach-convoc-publier { width: 100%; margin-left: 0; }
}
