/*
 * Tous au Match – « Saisie du match », mise en page de l écran (lot K-STATS-1, agent K4).
 * © 2026 Ghislain DEMONDA – Tous droits réservés.
 *
 * Cascade unique : socle public/assets/tem.css, puis thème actif /theme.css, puis cette feuille.
 * Cette feuille ne porte que la mise en page : ni couleur, ni fond, ni coin, ni bordure, ni ombre.
 * Couleurs : bloc TEM-STATS du design Mosaïque (teinte rose du score, une teinte par tâche) et repli sobre du
 * socle (bloc TEM-STATS de tem.css), extraits donnés dans docs/lots/RAPPORT_K-STATS-1-K4.md.
 * Cibles : tuiles des joueurs de 96 px de haut, toute autre cible de 56 px au moins (spec 3.1).
 */
/* TEM-STATS début */
/* Les boutons du socle reçoivent display:block par html:root[data-style="stade"] .btn (0,3,1) et le design Mosaïque
   pose inline-flex sur les boutons pressés : les gabarits des tuiles sont donc gardés par html:root[data-style]. */
.st-saisie main.tem-main { padding-top: 12px; padding-bottom: 8px; }
.st-saisie .tem-header .tem-tagline { display: none; }

/* Tableau du match : score, période, part de chacun */
.st-tableau { margin: 0 0 12px; padding: 14px 16px 14px; }
.st-tableau-sur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 4px; font-size: .86rem; font-weight: 700; }
.st-direct { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.st-direct::before { content: ""; inline-size: 8px; block-size: 8px; }
.st-saisie h1.st-titre { margin: 4px 0 6px; font-size: 1rem; line-height: 1.2; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.st-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 6px; margin: 0; }
.st-equipe { display: flex; flex-direction: column; gap: 2px; margin: 0; min-inline-size: 0; }
.st-equipe.adv { align-items: flex-end; text-align: right; }
.st-equipe span { font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; text-transform: uppercase; font-size: 1rem; line-height: 1.05; overflow-wrap: anywhere; }
.st-equipe b { font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; font-size: 3.8rem; line-height: .85; font-variant-numeric: tabular-nums lining-nums; }
.st-score .st-tiret { font-family: var(--typo-police, inherit); font-weight: 800; font-size: 2.6rem; line-height: 1; padding-bottom: .3em; }
.st-periode { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; margin: 10px 0 0; padding: 8px 12px; font-size: .86rem; font-weight: 700; }
.st-periode b { white-space: nowrap; font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; text-transform: uppercase; font-size: 1.2rem; line-height: 1; }
.st-part { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: .88rem; font-weight: 700; }
.st-tache { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; font-size: .84rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.st-tache::before { content: ""; inline-size: 9px; block-size: 9px; flex: none; }

.st-avis { margin: 0 0 12px; padding: 12px 14px; font-size: .95rem; font-weight: 700; line-height: 1.4; }

/* Choix de la tâche (plusieurs tâches attribuées) */
.st-taches { margin: 0 0 12px; }
.st-taches-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
html:root[data-style] .st-saisie .st-tache-btn { display: flex; align-items: center; justify-content: center; gap: .45em; inline-size: 100%; margin: 0; min-block-size: 56px; padding: 6px 10px; font-weight: 800; line-height: 1.15; white-space: normal; text-align: center; }

/* Panneau de la tâche */
.st-bloc { margin: 0 0 12px; padding: 16px; }
/* Réserve R5 du juge : à l étape de la valeur (+2, +3, +1 ; rebond offensif ou défensif), les boutons passent juste
   sous l étape en cours, au-dessus des tuiles, pour rester visibles au-dessus de la barre collante du bas. */
.st-saisie .st-bloc[data-bloc="panneau"]:not([hidden]) { display: flex; flex-direction: column; }
.st-saisie .st-bloc[data-bloc="panneau"] > * { order: 3; }
.st-saisie .st-bloc[data-bloc="panneau"] > h2 { order: 0; }
.st-saisie .st-bloc[data-bloc="panneau"] > .st-clics { order: 1; }
.st-saisie .st-bloc[data-bloc="panneau"][data-etape="valeur"] > .st-actions { order: 2; }
.st-bloc > h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1; letter-spacing: 0; }
.st-bloc > h2::before { content: none; }
.st-bloc > h2 small { font-family: inherit; font-stretch: normal; text-transform: none; font-size: .82rem; font-weight: 650; }
.st-clics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.st-clics li { display: flex; align-items: center; gap: 8px; min-inline-size: 0; padding: 6px 10px 6px 6px; font-size: .8rem; font-weight: 750; line-height: 1.2; }
.st-clics li > span { display: inline-grid; place-items: center; flex: none; inline-size: 26px; block-size: 26px; font-weight: 850; font-size: .82rem; }

/* Tuiles des joueurs : prénom en gros, fautes, état du geste */
.st-cinq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
.st-tuile { display: grid; grid-template-rows: 1fr auto; gap: 6px; min-inline-size: 0; }
.st-tuile.st-large, .st-cinq > .st-large { grid-column: 1 / -1; }
html:root[data-style] .st-saisie .st-joueur { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: start; align-content: space-between; column-gap: 8px; row-gap: 6px; inline-size: 100%; min-block-size: 96px; margin: 0; padding: 12px 12px 12px 14px; text-align: left; white-space: normal; line-height: 1.15; }
.st-joueur .st-nom { grid-row: 1; grid-column: 1 / -1; min-inline-size: 0; font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; font-size: 1.9rem; line-height: .95; text-transform: none; overflow-wrap: break-word; }
.st-joueur .qui { grid-row: 2; grid-column: 1; align-self: end; font-weight: 750; font-size: .9rem; line-height: 1.15; }
.st-joueur .qui:empty { display: none; }
.st-joueur em { grid-row: 2; grid-column: 2; justify-self: end; align-self: end; padding: 3px 10px; font-style: normal; font-size: .74rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.st-joueur.st-banc .st-nom, .st-joueur.st-adverse .st-nom { font-size: 1.45rem; text-transform: uppercase; }
.st-joueur.st-banc .qui, .st-joueur.st-adverse .qui { font-weight: 650; font-size: .84rem; }
.st-tuile.st-large .st-joueur { min-block-size: 76px; }
.st-mini { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
html:root[data-style] .st-saisie .st-mini-btn { inline-size: 100%; min-inline-size: 0; min-block-size: 56px; margin: 0; padding: 2px 4px; font-size: .8rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; line-height: 1.1; }

/* Actions de la tâche (valeurs, rebonds, chronomètre, adversaire) */
.st-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
html:root[data-style] .st-saisie .st-action { display: flex; flex-direction: column; justify-content: center; gap: 3px; inline-size: 100%; min-block-size: 72px; margin: 0; padding: 10px 14px; text-align: left; white-space: normal; line-height: 1.15; }
.st-action b { font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1; }
.st-action span { font-size: .8rem; font-weight: 700; }
.st-action span:empty { display: none; }
html:root[data-style] .st-saisie .btn:is(.st-action, .st-joueur, .st-num)[aria-pressed="true"]::before { content: none; }
.st-defense-choix { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 0; }
.st-defense-titre { grid-column: 1 / -1; margin: 0; font-weight: 800; font-size: .9rem; }
.st-defense-choix .st-action { min-block-size: 60px; align-items: center; text-align: center; padding: 8px 6px; }
.st-defense-choix .st-action b { font-size: 1.05rem; }

/* Pavé des numéros adverses : numéros seulement, aucun champ de texte */
.st-numeros-adv { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
html:root[data-style] .st-saisie .st-num { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; inline-size: 100%; min-block-size: 56px; margin: 0; padding: 4px; font-variant-numeric: tabular-nums; line-height: 1; }
.st-num b { font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; font-size: 1.6rem; line-height: 1; }
.st-num span { font-size: .7rem; font-weight: 750; }
html:root[data-style] .st-saisie .st-num.st-num-mot { font-family: var(--typo-police, inherit); font-weight: 800; font-size: 1.05rem; }
html:root[data-style] .st-saisie .st-num.st-num-mot:last-child { grid-column: span 2; }
.st-pave { display: grid; gap: 8px; margin: 0 0 12px; }
.st-pave-valeur { display: block; font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-pave-touches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html:root[data-style] .st-saisie .st-touche { inline-size: 100%; min-block-size: 56px; margin: 0; padding: 4px; font-family: var(--typo-police, inherit); font-weight: 800; font-size: 1.4rem; }
html:root[data-style] .st-saisie .st-touche.st-touche-mot { grid-column: span 2; font-size: 1rem; }
html:root[data-style] .st-saisie .st-valider { inline-size: 100%; min-block-size: 56px; margin: 0; font-weight: 800; }
.st-feuille-liste { margin: 0 0 10px; font-weight: 750; }
.st-numeros-adv:empty { display: none; }

.st-consigne { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; padding: 12px 14px; font-size: .92rem; line-height: 1.4; }
.st-consigne::before { content: ""; flex: none; inline-size: 10px; block-size: 10px; margin-top: .4em; }
.st-ligne-btn { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html:root[data-style] .st-saisie .st-ligne-btn .btn { margin: 0; min-block-size: 56px; padding-inline: 20px; }
.st-ligne-btn:empty { display: none; }

/* Tes dernières saisies */
.st-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.st-journal li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 10px 12px; font-size: .88rem; line-height: 1.35; }
.st-journal .h { grid-row: 1 / span 2; font-family: var(--typo-police, inherit); font-stretch: condensed; font-weight: 800; font-size: 1.1rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-journal .quoi { font-weight: 750; overflow-wrap: anywhere; }
.st-journal .etat-l { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-journal li.annule .quoi { text-decoration: line-through; text-decoration-thickness: 1.5px; font-weight: 650; }
html:root[data-style] .st-saisie .st-etat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: .78rem; font-weight: 800; white-space: nowrap; line-height: 1.3; margin: 0; }
.st-etat.envoye::before { content: ""; inline-size: 4px; block-size: 8px; transform: rotate(45deg) translate(-1px, -1px); }
.st-etat.garde::before { content: ""; inline-size: 8px; block-size: 8px; box-sizing: border-box; }

/* Barre du bas, toujours visible : annuler et état de la connexion */
html:root[data-style] .st-saisie .st-bas { position: sticky; bottom: 0; z-index: 5; margin: 12px 0 0; padding: 10px 12px 8px; }
html:root[data-style] .st-saisie .st-annuler { display: flex; align-items: center; justify-content: center; inline-size: 100%; min-block-size: 56px; margin: 0 0 8px; padding: 8px 14px; font-size: 1rem; font-weight: 800; line-height: 1.2; white-space: normal; text-align: center; }
.st-reseau-etat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; margin: 0; padding: 8px 12px; font-size: .86rem; line-height: 1.35; }
.st-barres { display: inline-flex; align-items: flex-end; gap: 3px; block-size: 18px; }
.st-barres i { inline-size: 5px; }
.st-barres i:nth-child(1) { block-size: 6px; } .st-barres i:nth-child(2) { block-size: 10px; }
.st-barres i:nth-child(3) { block-size: 14px; } .st-barres i:nth-child(4) { block-size: 18px; }
.st-retour { margin: 6px 2px 0; font-size: .84rem; font-weight: 700; line-height: 1.35; }
.st-retour:empty { display: none; }

.st-sans, .st-oubli { margin: 0 0 12px; }
html:root[data-style] .st-saisie .card > h2::before { content: none; }

/* Pied : mention de droit et d indépendance, repliée sur téléphone */
.st-pied details > summary { cursor: pointer; min-block-size: 44px; display: flex; align-items: center; }
.st-pied details > p { margin: 4px 0 0; }

html[data-contrast="high"] .st-cinq, html[data-contrast="high"] .st-actions { gap: 12px; }
html[data-size="large"] .st-joueur .st-nom { font-size: 1.7rem; }

@media (max-width: 360px) {
  .st-equipe b { font-size: 3.2rem; }
  .st-numeros-adv { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
  .st-cinq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-numeros-adv { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .st-equipe b { font-size: 5rem; }
}
@media (min-width: 1100px) {
  /* Écran pensé pour le téléphone : une colonne centrée en grand écran, barre du bas toujours visible. */
  .st-saisie main.tem-main { max-width: 780px; }
}
/* TEM-STATS fin */
/* TEM-STATS2 début */
/* Vague 2 (lot K-STATS-2, agent A3) : demi-terrain des tirs adverses et duels défensifs. Mise en page seule ;
   lignes et zones en currentColor ; teintes Mosaïque dans l ancre TEM-STATS2 de theme-mosaique.css. */
.st-actions > .ta-saisie { grid-column: 1 / -1; }
.ta-saisie { display: block; margin: 0; padding: 8px; }
.ta-svg.ta-touche { display: block; inline-size: 100%; block-size: auto; max-inline-size: 560px; margin: 0 auto; touch-action: manipulation; cursor: crosshair; -webkit-tap-highlight-color: transparent; }
.ta-touche .ta-sol { fill: transparent; }
.ta-touche .ta-zone { fill: currentColor; fill-opacity: 0; stroke: none; cursor: crosshair; }
.ta-touche .ta-zone:hover { fill-opacity: .08; }
.ta-touche .ta-zone:focus { fill-opacity: .16; }
.ta-touche .ta-zone:focus-visible { fill-opacity: .16; stroke: currentColor; stroke-width: 12; stroke-linejoin: round; }
.ta-touche .ta-lignes { pointer-events: none; }
.ta-touche .ta-ligne { fill: none; stroke: currentColor; stroke-opacity: .6; stroke-width: 5; }
.ta-touche .ta-ligne.ta-planche { stroke-width: 9; stroke-opacity: 1; }
.ta-touche .ta-ligne.ta-cercle { stroke-width: 6; stroke-opacity: 1; }

/* Duels : nos joueurs à gauche, leurs numéros à droite (spec 7.4.2) */
.st-bloc[data-tache="duels"] { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 10px; align-items: start;
  grid-template-areas: "t t" "c c" "k k" "j n" "a a" "p p" "s s"; }
.st-bloc[data-tache="duels"] > h2 { grid-area: t; }
.st-bloc[data-tache="duels"] > .st-clics { grid-area: c; }
.st-bloc[data-tache="duels"] > .st-consigne { grid-area: k; }
.st-bloc[data-tache="duels"] > .st-cinq { grid-area: j; grid-template-columns: minmax(0, 1fr); }
.st-bloc[data-tache="duels"] > .st-numeros-adv { grid-area: n; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-bloc[data-tache="duels"] > .st-actions { grid-area: a; }
.st-bloc[data-tache="duels"] > .st-pave { grid-area: p; }
.st-bloc[data-tache="duels"] > .st-ligne-btn { grid-area: s; }
.st-bloc[data-tache="duels"] .st-joueur .st-nom { font-size: 1.6rem; }
.st-bloc[data-tache="duels"] .st-joueur .qui { grid-column: 1 / -1; }
.st-bloc[data-tache="duels"] .st-joueur em { grid-row: 3; grid-column: 1 / -1; justify-self: start; }
html:root[data-style] .st-saisie .st-bloc[data-tache="duels"] .st-num { block-size: auto; min-block-size: 64px; padding: 6px 4px; }
html:root[data-style] .st-saisie .st-bloc[data-tache="duels"] .st-num.st-num-mot:last-child { grid-column: 1 / -1; }
.st-num .st-num-qui { display: block; max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; font-weight: 800; }
@media (min-width: 700px) {
  .st-bloc[data-tache="duels"] > .st-cinq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-bloc[data-tache="duels"] > .st-numeros-adv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* TEM-STATS2 fin */
