/* ===== Extrait d'index.html : bloc <style> d'origine (lignes 27-1264) ===== */
  /* Polices hébergées dans l'app (dossier fonts/, licence SIL OFL 1.1 : fonts/OFL.txt, CREDITS.md), à la place de Google Fonts : mêmes
     familles, graisses et découpage que la feuille de Google d'avant (Anton, Lalezar, Inter 400 à 700, Kanit 700 d'index.html).
     Sous-ensembles latin (textes de l'app) et latin-ext (noms comme « Łukasz », « Şükrü » : téléchargé seulement s'il sert).
     Inter : UN fichier variable (axe wght) par sous-ensemble, déclaré pour chaque graisse, comme le faisait Google. Les fichiers
     sont nommés par index.html (preload / prefetch) : sw.js les garde hors ligne dès la première visite. */
  @font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
  @font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
  @font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
  @font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
  @font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/inter-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  @font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/inter-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  @font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/inter-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  @font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/inter-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  @font-face{font-family:'Anton';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/anton-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
  @font-face{font-family:'Anton';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/anton-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  @font-face{font-family:'Lalezar';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/lalezar-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
  @font-face{font-family:'Lalezar';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/lalezar-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
  @font-face{font-family:'Kanit';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/kanit-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

  :root{
    --bg:#10141d;
    --bg2:#161c28;
    --surface:#1b2331;
    --surface2:#212b3c;
    --line:#2b3649;
    --line2:#384660;
    --text:#e9edf5;
    --muted:#8893a8;
    --muted2:#8893a8;
    /* ---- jetons de la charte (chantier « jetons de couleur », puis « mode sport ») ----
       Seul l'ACCENT change d'un sport à l'autre : l'attribut data-sport de <html> (posé par le script
       d'en-tête d'index.html, puis par le registre de js/01) redéfinit les quatre jetons ci-dessous.
       Fonds, surfaces, traits et textes sont communs à tous les sports. Les « -rgb » servent aux
       couleurs avec transparence : rgba(var(--accent-rgb),.15). Valeurs par défaut = Basketball
       (charte validée le 2 novembre 2026, contrat-sport §9). */
    --accent:#F5953F;            /* accent du sport : boutons primaires, GO, chevrons, icônes, chiffres, focus, étoiles (6,3:1 sur --surface2) */
    --accent-rgb:245,149,63;
    --on-accent:#2a1300;         /* texte écrit sur l'accent (7,8:1 sur l'accent basket) */
    --sport-bloc:#C4520F;        /* blocs du nom du sport sur l'accueil (lettres blanches : 4,6:1) */
    --accent-gauche:transparent; /* touches de couleur à gauche / à droite du GO et de la pastille active (taekwondo : bleu / rouge) */
    --accent-droite:transparent;
    --amber:var(--accent);       /* alias historiques de l'accent (nommé du temps où c'était un azur) : gardés pour ne pas réécrire leurs usages */
    --amber-dim:var(--accent);
    --text-rgb:233,237,245;
    --green:#3fd17a;
    --green-rgb:63,209,122;
    --green-glow:rgba(var(--green-rgb),.18);
    --blue:#56a8ff;
    --blue-rgb:86,168,255;
    --red:#ff5d6c;
    --red-rgb:255,93,108;
    /* vraie teinte d'avertissement (ambre), distincte de --amber qui est en
       réalité l'azur d'accent de l'app : réservée aux badges/messages qui
       signalent un problème (cf. .hl-clip.is-raw). */
    --warn:#ffb020;
    --warn-rgb:255,176,32;
    --eclair:#ffd21f;            /* éclair « Temps fort » (icône, bordure, case cochée ; jamais du texte sur fond clair) */
    --eclair-rgb:255,210,31;
    --on-eclair:#10141d;         /* coche posée sur l'éclair (12,4:1) */
    --white:#fff;                /* texte sur une couleur pleine, commandes posées sur la vidéo */
    --white-rgb:255,255,255;
    --scrim-rgb:10,14,22;        /* voiles translucides : fenêtres, boîte de dialogue, menu, story, caméra */
    --scrim2-rgb:5,7,11;         /* voile des feuilles du bas, pastilles sur la caméra */
    --viewer-bg:#06090f;         /* fond des visionneuses plein écran (highlights, story) */
    --viewer-bg-rgb:6,9,15;
    --thumb-bg:#0d121b;          /* fond des vignettes vidéo */
    --photo-bg:#05070c;          /* fond de la prise de photo d'un joueur */
    /* exports (rendus hors écran par html2canvas, js/01 et js/03) : lus par cssToken() au moment de l'export */
    --story-bg:#000;             /* story joueur : fond derrière la photo */
    --story-box:#1E1E1E;         /* story joueur : pastilles nom, stats, logo */
    --story-text:#fff;           /* story joueur : texte des pastilles */
    --sheet-bg-top:#232c3d;      /* fiche de stats : haut du dégradé de fond */
    --sheet-bg:var(--surface);   /* fiche de stats : bas du dégradé et fond du canvas */
    --sheet-head:#2f3d54;        /* fiche de stats : bande des groupes de colonnes (libellés à l'accent : 4,8:1 basket, 5,6:1 football, 11:1 taekwondo ; #3a4a63 avant, 3,96:1) */
  }

  /* accent par sport (mode sport) : seul l'accent change, le fond reste le même pour tous */
  html[data-sport="basket"],#recompense[data-sport="basket"]{--accent:#F5953F;--accent-rgb:245,149,63;--on-accent:#2a1300;--sport-bloc:#C4520F;--accent-gauche:transparent;--accent-droite:transparent}
  html[data-sport="taekwondo"],#recompense[data-sport="taekwondo"]{--accent:#f2f2ef;--accent-rgb:242,242,239;--on-accent:#111113;--sport-bloc:#000;--accent-gauche:#5b8cff;--accent-droite:#ff5a67} /* blanc dobok 12,7:1 ; bleu et rouge restent les camps */
  html[data-sport="football"],#recompense[data-sport="football"]{--accent:#34D27D;--accent-rgb:52,210,125;--on-accent:#04200f;--sport-bloc:#16833F;--accent-gauche:transparent;--accent-droite:transparent} /* 7,2:1 */

  *{box-sizing:border-box;margin:0;padding:0}
  html,body{background:var(--bg);color:var(--text);font-family:'Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased;max-width:100%}
  body{padding:18px;line-height:1.45}
  .wrap{max-width:960px;margin:0 auto;width:100%}

  /* ---------- brand header ---------- */
  .brand-header{padding:14px 0 20px;overflow:visible;display:flex;align-items:center;justify-content:space-between}
  .brand-header img{display:block;max-width:100%;min-width:0}

  /* ---------- titre du match (interface en direct) ---------- */
  .match-title-text{
    font-family:'Anton';font-size:13px;letter-spacing:.4px;color:var(--muted);
    flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }

  /* ---------- layout ---------- */
  .cols{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
  @media(min-width:780px) and (orientation:landscape){.cols{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}}

  /* portrait : une colonne, pas de débordement */
  @media(orientation:portrait){
    .cols{grid-template-columns:minmax(0,1fr)}
  }
  .card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px}
  .card h2{font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin-bottom:12px;font-weight:600}


  /* ---------- feed ---------- */
  .feed{list-style:none;display:flex;flex-direction:column;gap:8px;max-height:320px;overflow:auto}
  .feed li{display:flex;align-items:center;gap:11px;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:9px 11px;animation:slidein .25s ease}
  @keyframes slidein{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
  .feed .num{font-family:'Anton';font-size:18px;width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:8px;background:var(--surface2);color:var(--amber);font-variant-numeric:tabular-nums}
  .feed .ev{flex:1;min-width:0}
  .feed .ev b{font-size:14px}
  .feed .ev em{font-style:normal;color:var(--muted);font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .feed .meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
  .feed .t{font-family:'Anton';font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
  .engtag{font-size:9px;letter-spacing:.1em;text-transform:uppercase;padding:2px 6px;border-radius:5px;font-weight:600}
  .engtag.ia{background:rgba(var(--blue-rgb),.14);color:var(--blue)}
  .engtag.rules{background:rgba(var(--accent-rgb),.14);color:var(--amber)}
  .clipchip{font-size:10px;color:var(--green);background:var(--green-glow);border-radius:5px;padding:2px 6px;display:inline-flex;gap:3px;align-items:center}
  .undo{background:none;border:1px solid var(--line2);color:var(--muted);border-radius:7px;width:28px;height:28px;cursor:pointer;flex:none}
  .undo:hover{color:var(--red);border-color:var(--red)}
  .empty{color:var(--muted2);font-size:13px;text-align:center;padding:24px 0}

  /* ---------- stat sheet ---------- */
  .sheetwrap{overflow-x:auto;margin-top:4px}
  table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}
  th,td{text-align:center;padding:9px 6px;border-bottom:1px solid var(--line)}
  th{font-size:10px;letter-spacing:.06em;color:var(--muted);text-transform:uppercase;font-weight:600;position:sticky;top:0;background:var(--surface)}
  td.player{text-align:left;white-space:nowrap}
  td.player .n{font-family:'Anton';color:var(--amber);margin-right:7px;font-variant-numeric:tabular-nums}
  td.pts{font-family:'Anton';font-size:17px}
  td.val{font-size:15px;color:var(--text)}
  td.zero{color:var(--muted2)}
  tr.total td{border-top:2px solid var(--line2);border-bottom:none;font-weight:700;color:var(--muted);font-size:12px;padding-top:11px}
  tr.total td.pts{color:var(--amber)}
  .flash{animation:flash .9s ease}
  @keyframes flash{0%{background:var(--green-glow);color:var(--green)}100%{background:transparent}}

  /* ---------- vue détaillée de la feuille de stats (groupes PANIER / REBONDS) ----------
     La vue essentielle garde le tableau compact. La vue
     détaillée (12 colonnes) est plus large : elle défile horizontalement DANS
     .sheetwrap si nécessaire, sans jamais faire déborder la page. */
  .sheetwrap.detail-mode{overflow-x:auto}
  .sheetwrap.detail-mode table{table-layout:auto;min-width:640px}
  .sheetwrap.detail-mode th:not(:first-child),
  .sheetwrap.detail-mode td:not(.player){white-space:nowrap}
  th.grp-panier,td.grp-panier{background:rgba(var(--accent-rgb),.07)}
  th.grp-rebond,td.grp-rebond{background:rgba(var(--green-rgb),.07)}
  .grp-first{border-left:2px solid rgba(var(--white-rgb),.15)}
  #archive-section-stats .sheetwrap.detail-mode table{table-layout:auto;width:max-content;min-width:100%}
  #archive-section-stats .sheetwrap.detail-mode td.player{white-space:nowrap}

  /* ---------- feuille à l'écran : mots entiers (chantier « feuilles imprimables ») ----------
     Les intitulés de colonnes sont en mots entiers (« Passes décisives »), dans un <span class="lib"> posé par le code commun
     (buildSheetTableHTML, js/03, qui ne fait que lire le catalogue). Habillage ici seulement, pour le viewer d'archive et
     l'« Aperçu des stats » : vue essentielle, mots à l'horizontale sur deux lignes au plus (jamais coupés dans un mot) ; vue
     détaillée, intitulés à la VERTICALE (lus de bas en haut, chacun exactement au-dessus de sa colonne) ; colonne Joueur fixe
     quand le tableau défile à l'horizontale. Fond sombre de l'app inchangé. */
  .sheetwrap .lib{display:inline-block;color:var(--text);text-transform:none;letter-spacing:0;line-height:1.2;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:manual}
  .sheetwrap thead th{vertical-align:bottom}
  .sheetwrap.detail-mode thead tr + tr th .lib{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;text-align:left}
  .sheetwrap.detail-mode thead tr + tr th{padding-top:8px;padding-bottom:8px}
  /* colonne Joueur fixe au défilement horizontal (fonds opaques : les chiffres passent dessous) */
  .sheetwrap thead tr:first-child th:first-child,.sheetwrap td.player{position:sticky;left:0;z-index:2;background-color:var(--surface);box-shadow:1px 0 0 var(--line2)}
  .sheetwrap thead tr:first-child th:first-child{z-index:3}
  /* vue essentielle : intitulés en 10 px (9 px sous 380 px de large), sur TROIS lignes au plus, jamais coupés dans un mot
     (décision du propriétaire : « Tirs cadrés / tirs », « Récupérations », « Duels gagnés / joués » tiennent sans défilement).
     Tableau en disposition automatique : chaque colonne de stat prend exactement sa largeur minimale (width:1px = le mot le
     plus long de son intitulé, ou sa valeur la plus large) et la colonne Joueur reçoit tout le reste. Le numéro est posé dans
     la marge gauche de la cellule (position absolue) : la largeur minimale de la colonne Joueur est celle du mot le plus long
     du prénom, donc « 10 Youssef » tient toujours sur une ligne, « Jean-Baptiste » passe à la ligne après son trait d'union,
     et un prénom d'un seul mot très long élargit la colonne (le tableau défile alors, colonne Joueur fixe) au lieu d'être
     coupé ou de déborder. À 360 px : basket et football sans défilement dans l'archive et l'aperçu avec des prénoms jusqu'à
     « Youssef » (« Christopher » : l'aperçu défile de quelques pixels, rien n'est coupé). */
  .sheetwrap:not(.detail-mode) table{table-layout:auto;width:100%}
  .sheetwrap:not(.detail-mode) .lib{font-size:10px}
  @media (max-width:379px){ .sheetwrap:not(.detail-mode) .lib{font-size:9px} }
  .sheetwrap:not(.detail-mode) thead th:not(:first-child){width:1px}
  .sheetwrap:not(.detail-mode) thead th:not(:first-child),.sheetwrap:not(.detail-mode) td:not(.player){padding-left:2px;padding-right:2px}
  .sheetwrap:not(.detail-mode) td.player{white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.2;padding-left:22px;padding-right:0}
  .sheetwrap:not(.detail-mode) td.player .n{position:absolute;left:4px;min-width:0;margin:0}   /* numéro dans la marge gauche */
  .sheetwrap:not(.detail-mode) tr.total td.player,.sheetwrap:not(.detail-mode) thead th:first-child{padding-left:4px}
  #stats-preview-sheet-block .sheetwrap:not(.detail-mode) td.player{font-size:14px}   /* comme l'archive : « 10 Youssef » en 360 px */
  #stats-preview-sheet-block .sheetwrap:not(.detail-mode) th:last-child,#stats-preview-sheet-block .sheetwrap:not(.detail-mode) td:last-child{padding-right:0}   /* la carte de l'aperçu a déjà 14 px de marge */

  /* ---------- export imprimable de la feuille (PDF / image, js/03) ----------
     Les pages de l'export sont posées hors écran dans #stats-sheet-offscreen, en styles inline. Les règles générales du tableau
     de l'app (table, th, td plus haut : fond sombre des en-têtes, majuscules, chiffres tabulaires, filets sombres) ne doivent pas
     s'y appliquer : html2canvas les peindrait. Remise à zéro ici, les styles inline de l'export décident du reste. Sans
     font-variant-numeric: tabular-nums, html2canvas 1.4.1 n'écrit plus « Jean- Baptiste » ni « 1 /2 ». */
  #stats-sheet-offscreen table{width:auto;font-variant-numeric:normal}
  #stats-sheet-offscreen th,#stats-sheet-offscreen td{position:static;background:none;border:0;padding:0;
    text-transform:none;letter-spacing:normal;font-size:inherit;font-weight:inherit;color:inherit;text-align:inherit}

  /* ---------- lignes de saisie effectif (réutilisées par l'écran de config du match) ---------- */
  .rrow{display:flex;gap:7px;align-items:center}
  .rrow .rn{width:54px}
  .rrow button{background:none;border:1px solid var(--line2);color:var(--muted2);width:32px;height:34px;border-radius:8px;cursor:pointer;flex:none}
  .rrow button:hover{color:var(--red);border-color:var(--red)}

  /* ---------- saisie express ---------- */
  #express-panel{
    position:fixed;background:var(--bg2);border-top:2px solid var(--amber-dim);
    z-index:200;display:flex;flex-direction:column;gap:8px;
  }
  @media(orientation:portrait){
    #express-panel{bottom:0;left:0;right:0;height:50vh;border-radius:14px 14px 0 0;padding:10px 12px 16px;overflow-y:auto;}
    body{padding-bottom:calc(50vh + 4px)}
    #exp-toast{bottom:calc(50vh + 10px);top:auto;transform:translateX(-50%)}
  }
  @media(orientation:landscape){
    #express-panel{top:0;right:0;bottom:0;width:34vw;border-top:none;border-left:2px solid var(--amber-dim);padding:12px 10px;overflow-y:auto;}
    body{padding-right:calc(34vw + 8px)}
    #exp-toast{left:calc((100vw - 34vw)/2)}
  }

  .exp-header{display:flex;align-items:center;gap:8px;flex-shrink:0}
  .exp-title{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);font-weight:600;flex:1}
  .exp-status{font-size:12px;padding:5px 11px;border-radius:8px;background:var(--bg);border:1px solid var(--line);color:var(--muted2);transition:.2s;flex-shrink:0}
  .exp-status.armed{color:var(--amber);border-color:var(--amber-dim);background:rgba(var(--accent-rgb),.1)}

  /* gros bouton "NOUVELLE ACTION" : dominant dans l'encadré de saisie,
     large cible tactile pensée pour être tapée au pouce sans viser — c'est
     LUI qui déclenche la capture vidéo (cf. startNewAction() plus bas dans
     le script), donc il doit être impossible à manquer. */
  .new-action-btn{
    flex-shrink:0;width:100%;display:block;font-family:'Anton';
    font-size:clamp(20px,5.5vw,28px);letter-spacing:.04em;text-transform:uppercase;
    color:var(--on-accent);background:var(--amber);
    border:none;border-radius:16px;padding:22px 12px;cursor:pointer;
    box-shadow:0 4px 0 var(--amber-dim),0 8px 18px rgba(0,0,0,.35);
    transition:.1s;-webkit-tap-highlight-color:transparent;user-select:none;
  }
  .new-action-btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--amber-dim),0 3px 8px rgba(0,0,0,.3)}

  /* bouton "NON" de la sous-question "Saisir aussi une passe décisive ?" :
     volontairement plus grand et plus voyant que les boutons joueur qui le
     suivent (cf. .exp-player-btn plus bas) — c'est le cas le plus fréquent. */
  .passedec-non-btn{
    width:100%;display:block;font-family:'Anton';font-size:20px;letter-spacing:.4px;
    text-transform:uppercase;color:var(--on-accent);background:var(--amber);
    border:none;border-radius:12px;padding:16px 10px;cursor:pointer;margin-bottom:14px;
    box-shadow:0 3px 0 var(--amber-dim);transition:.1s;-webkit-tap-highlight-color:transparent;user-select:none;
  }
  .passedec-non-btn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--amber-dim)}

  .exp-players{display:flex;flex-wrap:wrap;gap:5px;flex-shrink:0}
  .exp-player-btn{
    background:var(--surface);border:2px solid var(--line);border-radius:9px;
    color:var(--text);cursor:pointer;padding:5px 7px;min-width:42px;text-align:center;
    transition:.12s;-webkit-tap-highlight-color:transparent;user-select:none;
  }
  .exp-player-btn .pnum{font-family:'Anton';font-size:16px;color:var(--amber);display:block}
  .exp-player-btn .pname{font-size:9px;color:var(--muted);display:block}
  .exp-player-btn:active{transform:scale(.92)}
  .exp-player-btn.armed{border-color:var(--amber);background:rgba(var(--accent-rgb),.15)}
  .exp-player-btn.ok{animation:epflash .5s ease forwards}
  @keyframes epflash{0%{background:var(--green-glow);border-color:var(--green)}100%{background:rgba(var(--accent-rgb),.15);border-color:var(--amber)}}

  /* 3 boutons d'action par ligne, agrandis pour une cible tactile confortable
     (≥48px de haut, texte plus lisible) — cf. bloc dédié plus bas qui
     redéfinit encore la taille pour la fenêtre "Quelle action ?" précisément. */
  .exp-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
  .exp-action-btn{
    background:var(--surface);border:1px solid var(--line2);border-radius:10px;color:var(--text);
    cursor:pointer;padding:9px 4px;font-family:inherit;font-size:12px;font-weight:600;text-align:center;
    transition:.12s;-webkit-tap-highlight-color:transparent;user-select:none;
  }
  .exp-action-btn.pts{font-family:'Anton';font-size:16px;color:var(--amber)}
  .exp-action-btn:active{transform:scale(.94)}
  .exp-action-btn.ok{animation:eaflash .35s ease forwards}
  @keyframes eaflash{0%{background:rgba(var(--green-rgb),.22)}100%{background:var(--surface)}}

  /* ---------- bloc « Dernière action » (maquette validée) : écran de match
     (#exp-lastaction-toolbar) et plein écran caméra (#camfs-lastaction-toolbar).
     À gauche, « DERNIÈRE ACTION » et la saisie (« #4 Inès · 2 points »,
     libellé à l'accent, points de suspension si trop long) ; à droite, trois
     boutons icônes de 46 px : supprimer (rouge), corriger (accent), temps
     fort (éclair ; plein une fois marqué). Toujours en place : sans saisie,
     « Aucune saisie » et boutons grisés. ---------- */
  .da-bloc{
    display:flex;align-items:center;gap:10px;flex-shrink:0;min-width:0;box-sizing:border-box;
    padding:8px 8px 8px 14px;border:1px solid var(--line2);border-radius:16px;background:var(--surface);
  }
  .da-txt{flex:1 1 auto;min-width:0}
  .da-k{font-size:11px;font-weight:800;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .da-v{display:flex;align-items:baseline;min-width:0;margin-top:2px;font-size:15px;font-weight:700;line-height:1.3;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* le prénom se tronque d'abord (il peut ne rester que « … ») ; le libellé
     de l'action ne se coupe que s'il dépasse seul la ligne (place gardée
     pour le numéro et le point) ; le numéro reste toujours visible */
  .da-qui{display:flex;flex:0 1 auto;min-width:0}
  .da-num{flex:none}
  .da-nom,.da-noms{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:pre}
  .da-sep{flex:none;white-space:pre}
  .da-act{flex:none;max-width:calc(100% - 3em);overflow:hidden;text-overflow:ellipsis;font-weight:700;color:var(--accent)}
  .da-act.da-tf{max-width:none}   /* « Temps fort » d'un temps fort seul : jamais coupé, les prénoms se coupent */
  .da-act.da-equipe{max-width:none}   /* saisie d'équipe (« But encaissé ») : seule sur la ligne, ni numéro ni prénom */
  .da-act.da-chg{max-width:none}   /* « Changement » : jamais coupé, les prénoms se coupent */
  .da-c{display:none}
  .da-bloc.is-vide .da-v{font-weight:600;color:var(--muted)}
  .da-btns{display:flex;gap:8px;flex:none}
  .da-ib{
    flex:none;width:46px;height:46px;padding:0;box-sizing:border-box;display:flex;align-items:center;justify-content:center;
    border:1px solid var(--line2);border-radius:12px;background:var(--surface2);color:var(--text);
    cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .1s;
  }
  .da-ib svg{flex:none}
  .da-ib:active{transform:scale(.95)}
  .da-ib:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  .da-x svg{color:var(--red)}
  .da-p svg{color:var(--accent)}
  .da-e svg{color:var(--eclair)}
  .da-e.is-on{background:var(--eclair);border-color:var(--eclair)}
  .da-e.is-on svg{color:var(--on-eclair)}
  .da-ib:disabled,.da-ib[aria-disabled="true"]{cursor:default}
  .da-ib:disabled{opacity:.4}
  .da-ib:disabled:active,.da-ib[aria-disabled="true"]:active{transform:none}
  @media(hover:hover){
    .da-ib:not(:disabled):not([aria-disabled="true"]):hover{border-color:var(--accent)}
    .da-e.is-on:not([aria-disabled="true"]):hover{border-color:var(--text)}
  }

  #exp-toast{
    position:fixed;top:40%;left:50%;transform:translateX(-50%);z-index:300;
    background:rgba(var(--red-rgb),.92);color:var(--white);font-size:13px;font-weight:600;
    padding:9px 20px;border-radius:20px;pointer-events:none;opacity:0;
    transition:opacity .18s;white-space:nowrap;
  }
  #exp-toast.show{opacity:1}
  /* confirmation neutre (éclair du bloc « Dernière action ») : pas le rouge des autres bulles */
  #exp-toast.is-neutre{background:var(--surface2);color:var(--text);box-shadow:0 0 0 1px var(--line2)}

  /* ---------- modal fin de match ---------- */
  .modal-overlay{position:fixed;inset:0;z-index:500;background:rgba(var(--scrim-rgb),.95);display:flex;align-items:center;justify-content:center;padding:20px;}
  .modal-overlay.hidden{display:none}
  .modal-card{background:var(--surface);border:2px solid var(--amber-dim);border-radius:18px;padding:28px;width:100%;max-width:420px;}
  .modal-card h3{font-family:'Anton';font-size:20px;font-weight:400;color:var(--text);margin-bottom:8px;letter-spacing:.5px}
  .modal-card p{font-size:13px;color:var(--muted);margin-bottom:20px;line-height:1.6}
  .modal-btns{display:flex;flex-direction:column;gap:10px}
  .modal-btn{width:100%;border-radius:10px;padding:13px;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;border:1px solid var(--line2);background:var(--surface2);color:var(--text);transition:.12s;text-align:left;}
  .modal-btn:hover{border-color:var(--amber-dim);background:rgba(var(--accent-rgb),.08)}
  .modal-btn .mbt{display:block;font-weight:700;margin-bottom:2px}
  .modal-btn .mbd{font-size:12px;color:var(--muted);font-weight:400}
  .modal-btn.primary{background:rgba(var(--accent-rgb),.12);border-color:var(--amber-dim)}
  .modal-btn.danger{border-color:rgba(var(--red-rgb),.4)}
  .modal-btn.danger:hover{border-color:var(--red);background:rgba(var(--red-rgb),.08)}
  .modal-btn.cancel-btn{border-color:var(--line);color:var(--muted)}

  /* ---------- fenêtres de saisie en panneau (.is-sheet) ----------
     Les fenêtres de qualification (NOUVELLE ACTION, Ajouter une action,
     Corriger le joueur) montent du bas de l'écran. Tout est limité à
     .is-sheet : les règles de base .modal-* ci-dessus servent aussi à
     #team-pick-modal et ne changent pas. Pas de « poignée » en haut : le
     panneau ne se fait pas glisser. */
  .modal-overlay.is-sheet{align-items:flex-end;padding:0;background:rgba(var(--scrim2-rgb),.74)}
  .is-sheet .modal-card{
    width:100%;max-width:560px;margin:0 auto;box-sizing:border-box;
    background:var(--bg2);border:none;border-top:1px solid var(--line);border-radius:22px 22px 0 0;
    padding:20px 20px calc(24px + env(safe-area-inset-bottom));
    max-height:92dvh;overflow-y:auto;display:flex;flex-direction:column;
  }
  .is-sheet h3{font-family:'Anton';font-size:26px;line-height:1.15;letter-spacing:.5px;margin:0}
  .is-sheet .modal-card > p{margin:6px 0 0;font-size:14px;line-height:1.45;color:var(--muted)}

  /* listes de joueurs : 2 colonnes, seule la liste défile */
  .is-sheet .exp-players{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
    margin:16px 0 14px;max-height:56dvh;overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .is-sheet .exp-player-btn{
    display:flex;align-items:center;gap:10px;min-height:60px;padding:0 10px;box-sizing:border-box;
    border-radius:14px;background:var(--surface);border:1px solid var(--line);color:var(--text);
    text-align:left;min-width:0;
  }
  .is-sheet .exp-player-btn .pnum{
    flex:none;width:40px;height:40px;border-radius:10px;background:var(--surface2);border:1px solid var(--line2);
    display:flex;align-items:center;justify-content:center;font-family:'Anton';font-size:20px;color:var(--amber);
  }
  .is-sheet .exp-player-btn .pname{
    min-width:0;font-size:15px;font-weight:600;color:var(--text);line-height:1.2;overflow-wrap:anywhere;
  }
  .is-sheet .exp-player-btn.armed{border-color:var(--amber);background:rgba(var(--accent-rgb),.1)}
  .is-sheet .exp-player-btn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

  .is-sheet .modal-btn.cancel-btn{
    height:48px;min-height:0;padding:0 16px;border-radius:12px;background:transparent;border:1px solid var(--line);
    color:var(--text);text-align:center;font-size:15px;font-weight:600;
  }

  /* « Quelle action ? » : trois familles (cf. renderStatChoices) */
  .is-sheet .exp-actions{display:block}
  .is-sheet .modal-card .ui-section{margin:16px 0 8px}
  .is-sheet .ui-section + .exp-players{margin-top:0}
  .is-sheet .exp-family{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .is-sheet .exp-family.is-autres{grid-template-columns:repeat(2,minmax(0,1fr))}
  .is-sheet .exp-action-btn{
    height:76px;padding:6px 4px;border-radius:14px;background:var(--surface);border:1px solid var(--line);
    color:var(--text);font-family:inherit;font-size:13px;font-weight:600;line-height:1.25;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;
  }
  .is-sheet .exp-action-btn svg{flex:none;color:var(--amber)}
  .is-sheet .exp-action-btn.pts{height:88px;border:none;border-radius:16px;background:var(--amber);color:var(--on-accent);gap:0}
  .is-sheet .exp-action-btn .ea-num{font-family:'Lalezar';font-size:40px;line-height:1;padding-top:8px}
  .is-sheet .exp-action-btn .ea-unit{font-size:13px;font-weight:700}
  /* familles décrites par le catalogue d'un autre sport (classes fam-…, aucune au basket) : grande tuile, 2 ou 3 colonnes */
  .is-sheet .exp-family.fam-quatre{grid-template-columns:repeat(2,minmax(0,1fr))}
  .is-sheet .exp-action-btn.grand{
    grid-column:span 2;height:88px;flex-direction:row;gap:14px;border:none;border-radius:16px;
    background:var(--amber);color:var(--on-accent);
  }
  .is-sheet .exp-action-btn.grand svg{width:32px;height:32px;color:var(--on-accent)}
  .is-sheet .exp-action-btn .ea-grand{font-family:'Anton';font-size:36px;font-weight:400;line-height:1;letter-spacing:.5px}

  /* sous-questions (rebond, faute sur tir, panier rentré) */
  .is-sheet .modal-btns{margin-top:16px;gap:10px}
  .is-sheet .modal-btn{
    min-height:56px;border-radius:14px;padding:14px 16px;
    background:var(--surface);border:1px solid var(--line2);color:var(--text);
  }
  .is-sheet .modal-btn.primary{background:var(--amber);border:none;color:var(--on-accent)}
  .is-sheet .modal-btn .mbt{font-size:17px;font-weight:700}

  /* fenêtre générique à deux choix (#choix-modal) : libellé à gauche, pastille de couleur facultative (cartons) */
  #choix-modal .choix-btn{display:flex;align-items:center;justify-content:flex-start;gap:14px;text-align:left}
  #choix-modal .choix-pastille{display:none;flex:none;width:16px;height:22px;border-radius:3px}
  #choix-modal .choix-pastille.is-jaune{display:block;background:#f7c948;box-shadow:0 0 0 1.5px var(--on-accent)}
  #choix-modal .choix-pastille.is-rouge{display:block;background:#ff5a67}

  /* fenêtre « Détails » (#details-modal, décrite par le catalogue ; aucune au basket) : puces à choix unique (.hl-chip, 44 px),
     passeurs (listes partagées .is-sheet .exp-players, plus compactes), « Valider » toujours visible en bas */
  #details-modal .details-puces{display:flex;flex-wrap:wrap;gap:8px}
  #details-modal .details-puce{height:44px;padding:0 16px;border-radius:22px;white-space:normal;text-align:center}
  #details-modal .details-puce[aria-checked="true"]{background:var(--amber);border-color:var(--amber);color:var(--on-accent)}
  #details-modal .details-puce:disabled{opacity:.45;cursor:default}
  #details-modal .exp-players{max-height:none;overflow:visible;margin:0}
  #details-modal .exp-player-btn{min-height:48px}
  #details-modal .exp-player-btn[aria-checked="true"]{border-color:var(--amber);background:rgba(var(--accent-rgb),.1)}
  #details-modal .details-aucune{grid-column:1 / -1;justify-content:center}
  #details-modal .details-aucune .pname{font-size:15px;font-weight:700}
  #details-modal .details-passe[hidden],#details-modal .details-types-passe[hidden]{display:none}
  #details-modal .modal-btns{position:sticky;bottom:calc(-24px - env(safe-area-inset-bottom));margin:16px -20px calc(-24px - env(safe-area-inset-bottom));
    padding:12px 20px calc(16px + env(safe-area-inset-bottom));background:var(--bg2);border-top:1px solid var(--line)}
  #details-modal .modal-btn.primary{text-align:center}
  @media(orientation:landscape){
    #details-modal .modal-btns{bottom:calc(-12px - env(safe-area-inset-bottom,0px));margin:12px calc(-16px - env(safe-area-inset-right,0px)) calc(-12px - env(safe-area-inset-bottom,0px)) -16px;
      padding:10px calc(16px + env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) 16px}
    #details-modal .modal-btn.primary{min-height:0;height:48px;padding:0 18px}
    #details-modal .details-puce{height:44px}
  }
  /* entrée du catalogue en fin de « Qui a fait l'action ? » (contre son camp adverse) : après un filet, sur toute la largeur, icône à la
     place du numéro */
  .is-sheet .exp-players .qui-filet{grid-column:1 / -1;height:1px;margin:4px 0;background:var(--line)}
  .is-sheet .exp-player-btn.qui-entree{grid-column:1 / -1}
  .is-sheet .exp-player-btn.qui-entree .pnum svg{color:var(--amber)}
  /* listes coupées « terrain, puis remplaçants » (catalogue : titulaires ; jamais au basket) : intertitre « Remplaçants » et bouton
     « Changement » sur toute la largeur, banc en plus petit (44 px au moins, 3 colonnes ; 4 en paysage), exclus en dernier avec
     « Exclu » ; « Qui entre ? » rappelle qui sort en intertitre */
  .is-sheet .exp-players .qui-banc-tete{grid-column:1 / -1;display:flex;align-items:center;gap:10px;margin:8px 0 0;min-width:0}
  .is-sheet .exp-players .qui-banc-tete .ui-section{flex:1 1 auto;min-width:0;margin:0}
  .is-sheet .exp-players .qui-sortant{grid-column:1 / -1;margin:0 0 4px}
  .qui-changement{
    flex:none;display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 14px;box-sizing:border-box;
    border:1px solid var(--amber);border-radius:12px;background:transparent;color:var(--text);
    font-family:inherit;font-size:14px;font-weight:700;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .qui-changement svg{flex:none;color:var(--amber)}
  .qui-changement:active{background:var(--surface2)}
  .qui-changement:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .is-sheet .exp-players .qui-banc{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-width:0}
  .is-sheet .exp-player-btn.is-banc{min-height:44px;padding:0 8px;gap:6px;border-radius:12px}
  .is-sheet .exp-player-btn.is-banc .pnum{width:30px;height:30px;border-radius:8px;font-size:16px}
  .is-sheet .exp-player-btn.is-banc .pname{font-size:13px}
  .is-sheet .exp-player-btn.is-exclu{grid-column:1 / -1}
  /* exclu désactivé (saisie en direct) : couleurs gardées (contraste), aucune réaction au toucher */
  .is-sheet .exp-player-btn.is-exclu:disabled{cursor:default;transform:none}
  .is-sheet .exp-player-btn .qui-exclu{
    flex:none;margin-left:auto;padding:2px 8px;border:1px solid var(--red);border-radius:8px;
    font-size:12px;font-weight:700;color:var(--red);
  }
  @media(hover:hover){ .qui-changement:hover{background:rgba(var(--accent-rgb),.08)} }
  /* « Toutes les saisies » : bouton « Détails » d'une action (but du catalogue), sous la ligne de la saisie */
  .entry-details{
    display:inline-flex;align-items:center;gap:6px;align-self:flex-start;min-height:44px;margin-top:4px;padding:0 12px;
    border:1px solid var(--line2);border-radius:10px;background:transparent;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .entry-details svg{flex:none;color:var(--amber)}
  .entry-details:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

  /* passe décisive : « NON, PAS DE PASSE » en tête, puis les passeurs */
  .is-sheet .passedec-non-btn{
    height:64px;padding:0 10px;border-radius:14px;font-family:'Anton';font-size:22px;
    box-shadow:none;margin:16px 0 0;
  }
  .is-sheet .passedec-non-btn:active{box-shadow:none}

  /* paysage : panneau collé à droite, sur toute la hauteur, assez compact
     pour que tout soit visible sans défiler (près du pouce droit). Le
     portrait ci-dessus ne change pas. */
  @media(orientation:landscape){
    .modal-overlay.is-sheet{align-items:stretch;justify-content:flex-end}
    .is-sheet .modal-card{
      position:relative;width:clamp(360px,56vw,480px);max-width:none;max-height:none;margin:0;
      border-top:none;border-left:1px solid var(--line);border-radius:22px 0 0 22px;
      padding:calc(12px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) 16px;
    }
    .is-sheet h3{font-size:20px}
    .is-sheet .modal-card > p{margin-top:2px;font-size:13px;line-height:1.35}

    /* fenêtres dont la seule action est « Annuler » : le bouton passe en
       haut à droite ; titre et texte lui laissent 112 px */
    .is-sheet .modal-card:has(> .modal-btns > .cancel-btn:only-child) > .modal-btns{
      position:absolute;margin:0;
      top:calc(12px + env(safe-area-inset-top,0px));right:calc(16px + env(safe-area-inset-right,0px));
    }
    .is-sheet .modal-card:has(> .modal-btns > .cancel-btn:only-child) > .modal-btns > .cancel-btn{
      width:auto;height:40px;padding:0 16px;
    }
    .is-sheet .modal-card:has(> .modal-btns > .cancel-btn:only-child) > h3,
    .is-sheet .modal-card:has(> .modal-btns > .cancel-btn:only-child) > p{padding-right:112px}

    /* « Quelle action ? » : intertitres masqués, 3 rangées qui se
       partagent la hauteur restante (grille de 6 colonnes) */
    .is-sheet .exp-actions .ui-section{display:none}
    .is-sheet .exp-actions{
      display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:minmax(48px,1fr);gap:8px;
      flex:1 1 auto;min-height:0;margin-top:12px;
    }
    .is-sheet .exp-family{display:contents}
    .is-sheet .exp-action-btn,
    .is-sheet .exp-action-btn.pts{grid-column:span 2;height:auto;min-height:48px}
    .is-sheet .exp-family.is-autres .exp-action-btn{grid-column:span 3}
    .is-sheet .exp-action-btn .ea-num{font-size:34px;padding-top:4px}
    /* familles fam-ligne : chacune sa rangée, avec sa propre grille (une grande tuile sur 2 colonnes sur 3, 4 ou 3 tuiles égales) */
    .is-sheet .exp-family.fam-ligne{display:grid;grid-column:1 / -1;gap:8px;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr))}
    .is-sheet .exp-family.fam-quatre{grid-template-columns:repeat(4,minmax(0,1fr))}
    .is-sheet .exp-family.fam-ligne .exp-action-btn{grid-column:auto}
    .is-sheet .exp-family.fam-ligne .exp-action-btn.grand{grid-column:span 2;height:auto;min-height:48px}

    /* listes de joueurs : 3 colonnes, toute la hauteur restante, ne
       défilent que si elles débordent */
    .is-sheet .exp-players{
      grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-content:start;
      flex:1 1 auto;min-height:0;max-height:none;margin:12px 0 0;
    }
    .is-sheet .exp-player-btn{min-height:48px;padding:4px 8px;gap:8px}
    .is-sheet .exp-player-btn .pnum{width:34px;height:34px;font-size:18px}
    .is-sheet .exp-player-btn .pname{font-size:14px}
    /* listes coupées (titulaires) : banc compact sur 4 colonnes, sous le terrain à 3 colonnes ; la liste défile */
    .is-sheet .exp-players .qui-banc{grid-template-columns:repeat(4,minmax(0,1fr))}
    .is-sheet .exp-player-btn.is-banc{padding:0 6px;gap:6px}
    .is-sheet .exp-player-btn.is-banc .pnum{width:28px;height:28px;font-size:15px}
    .is-sheet .exp-player-btn.is-banc .pname{font-size:13px}
    .is-sheet .exp-players .qui-banc-tete{margin-top:4px}

    /* passe décisive : intertitre « Passeur » masqué */
    .is-sheet .modal-card > .ui-section{display:none}
    .is-sheet .passedec-non-btn{height:48px;font-size:20px;margin:8px 0 0}
    .is-sheet .passedec-non-btn ~ .exp-players{margin-top:10px}

    /* sous-questions (rebond, faute sur tir, panier rentré) */
    .is-sheet .modal-btns{margin-top:12px;gap:8px}
    .is-sheet .modal-btn{min-height:52px;padding:10px 14px}
  }

  /* ---------- fin de match (fenêtre centrée, pas un panneau) ---------- */
  #end-match-modal .modal-card{background:var(--bg2);border:1px solid var(--line2);border-radius:20px;padding:24px 20px 18px}
  #end-match-modal h3{font-family:'Anton';font-size:26px;margin:0 0 6px}
  #end-match-modal .modal-card p{font-size:14px;color:var(--muted)}
  #end-match-modal .modal-btn{display:flex;align-items:center;gap:12px;border-radius:16px;padding:16px}
  #end-match-modal .modal-btn svg{flex:none}
  #end-match-modal .modal-btn .mb-text{min-width:0}
  #end-match-modal .modal-btn.primary{background:var(--amber);border:none;color:var(--on-accent)}
  #end-match-modal .modal-btn.danger{background:transparent;border:1px solid var(--red);color:var(--red)}
  #end-match-modal .modal-btn.danger .mbt{color:var(--red)}
  #end-match-modal .modal-btn.cancel-btn{
    height:44px;padding:0;border:none;background:transparent;color:var(--muted);justify-content:center;text-align:center;
  }

  /* ---------- modale maison confirm / alert ----------
     Remplace window.confirm() et window.alert() : plus aucune fenêtre
     système du navigateur (celles qui affichent l'URL du site), style
     100 % cohérent avec l'app. Voir confirmerModale() / alerteModale(). */
  #app-dialog-overlay{position:fixed;inset:0;z-index:2000;background:rgba(var(--scrim-rgb),.72);display:flex;align-items:center;justify-content:center;padding:20px;}
  #app-dialog-overlay.hidden{display:none}
  #app-dialog-overlay .app-dialog{background:var(--surface);border:1px solid var(--line2);border-radius:16px;padding:24px;width:100%;max-width:400px;box-shadow:0 18px 50px rgba(0,0,0,.5);}
  #app-dialog-overlay .app-dialog h3{font-family:'Anton';font-size:19px;font-weight:400;color:var(--text);margin-bottom:10px;letter-spacing:.5px}
  #app-dialog-overlay .app-dialog p{font-size:13px;color:var(--muted);margin-bottom:20px;line-height:1.6;white-space:pre-line}
  #app-dialog-overlay .app-dialog-btns{display:flex;flex-direction:column;gap:10px}
  #app-dialog-overlay .app-dialog-btn{width:100%;border-radius:10px;padding:13px;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;border:1px solid var(--line2);background:var(--surface2);color:var(--text);transition:.12s;text-align:center;}
  #app-dialog-overlay .app-dialog-btn:hover{border-color:var(--amber-dim);background:rgba(var(--accent-rgb),.08)}
  #app-dialog-overlay .app-dialog-btn.primary{background:var(--amber);border-color:var(--amber);color:var(--on-accent);font-weight:700}
  #app-dialog-overlay .app-dialog-btn.primary:hover{background:var(--amber);border-color:var(--amber)}
  #app-dialog-overlay .app-dialog-btn.secondary{border-color:var(--line);color:var(--muted)}
  #app-dialog-overlay .app-dialog-btn.secondary:hover{color:var(--text);border-color:var(--line2)}

  /* ---------- écran archives ---------- */
  #archives-screen{position:fixed;inset:0;z-index:450;background:var(--bg);overflow-y:auto;padding:20px 20px 32px;}
  #archives-screen.hidden{display:none}
  .arch-empty{color:var(--muted2);font-size:14px;text-align:center;padding:48px 0}
  .arch-list{display:flex;flex-direction:column;gap:12px;max-width:700px;margin:0 auto}

  /* ---------- viewer archive ---------- */
  #archive-viewer{position:fixed;inset:0;z-index:460;background:var(--bg);overflow-y:auto;padding:20px 20px 32px;}
  /* Écran "Toutes les saisies" : au-dessus du viewer d'archive (460) — il
     peut s'ouvrir PAR-DESSUS lui — mais SOUS .modal-overlay (500), pour que
     la modale "Corriger le joueur" (fix-player-modal) reste au-dessus quand
     on la déclenche depuis cet écran, sans toucher au z-index de la modale. */
  #all-entries-screen{position:fixed;inset:0;z-index:480;background:var(--bg);overflow-y:auto;padding:20px 20px 32px;}
  #all-entries-screen.hidden{display:none}
  .all-entries-hint{margin-top:16px}
  .all-entries-hint[hidden]{display:none}   /* conseil déclaré par le catalogue (conseilSaisies) ; aucun : caché */
  .all-entries-add{margin-top:12px}
  #allEntriesEquipeBtn[hidden]{display:none}
  #allEntriesEquipeBtn svg{color:var(--red)}   /* couleur du bouton de la saisie d'équipe (« But encaissé ») */
  #all-entries-list{margin-top:14px}
  /* une carte par saisie (le journal #feed de l'écran de match garde ses propres styles .feed) */
  .entry-list{display:flex;flex-direction:column;gap:8px}
  .entry{
    display:flex;align-items:center;gap:12px;padding:8px 8px 8px 10px;
    background:var(--surface);border:1px solid var(--line);border-radius:14px;
  }
  .entry-num{
    flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:44px;
    border-radius:10px;background:var(--surface2);border:1px solid var(--line2);
    font-family:'Anton';font-size:18px;color:var(--amber);
  }
  .entry-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .entry-title{font-size:15px;font-weight:600;line-height:1.3;overflow-wrap:anywhere} /* jamais coupé par « … » : l'action reste visible */
  .entry-meta{font-size:12px;color:var(--muted)}
  .entry .ui-icon-btn{flex:none}
  /* temps fort : éclair à la place du numéro (temps fort seul), petit éclair
     après le libellé (action cochée « Temps fort ») ; jaune sur l'icône seulement */
  .entry.is-tf .entry-num{color:var(--eclair)}
  .entry-tf{display:inline-flex;vertical-align:-2px;margin-left:4px;color:var(--eclair)}
  /* saisie d'équipe (but encaissé, football) : icône du bouton à la place du numéro, place du crayon gardée vide */
  .entry.is-equipe .entry-num{color:var(--red)}
  .entry.is-equipe.teinte-accent .entry-num{color:var(--amber)}   /* saisie d'équipe qui est un but POUR nous (catalogue : teinte) */
  .entry.is-chg .entry-num{color:var(--amber)}   /* changement (catalogue : titulaires) : son icône à la place du numéro */
  .entry-sans-fix{flex:none;width:44px;height:44px}
  /* pastille discrète sur une saisie ajoutée manuellement (cf. "Ajouter une
     action") : aucune vidéo n'existe pour elle, contrairement aux actions
     capturées pendant le match — jamais confondue avec une vraie absence de
     clip (stockage plein, capture ratée...). */
  /* changement ignoré par le terrain (titulaires) : étiquette « sans effet » de « Toutes les saisies » */
  .entry-sans-effet{
    display:inline-block;margin-left:6px;padding:1px 6px;border-radius:6px;white-space:nowrap;
    font-size:10px;font-weight:700;color:var(--muted);background:var(--surface2);
    border:1px solid var(--line2);vertical-align:middle;
  }
  .all-entries-novideo{
    display:inline-block;margin-left:6px;padding:1px 6px;border-radius:6px;
    font-size:10px;font-weight:700;color:var(--muted);background:var(--surface2);
    border:1px solid var(--line2);vertical-align:middle;
  }
  #archive-viewer.hidden{display:none}
  .viewer-score{font-family:'Anton';font-size:26px;letter-spacing:.5px;text-align:center;margin-bottom:4px;}

  /* ---------- viewer archive : page d'accueil (hub) + sections séparées ---------- */
  .arch-hub.hidden,.arch-section.hidden{display:none}
  .arch-hub-title{overflow-wrap:anywhere}
  #archive-viewer .deco-dots{margin:20px 0 22px}
  /* section Highlights sans clip (chargement, aucun clip, stockage indisponible, erreur) */
  #archive-section-highlights .deco-dots{margin:18px 0}
  .hl-arch-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;margin-top:72px}
  .hl-arch-empty svg{color:var(--amber);opacity:.5}
  .hl-arch-empty-title{margin:4px 0 0;font-family:'Anton';font-size:20px;letter-spacing:.3px;color:var(--text)}
  .hl-arch-empty-text{margin:0;max-width:290px;font-size:14px;line-height:1.5;color:var(--muted)}
  .arch-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .arch-tile{
    display:flex;flex-direction:column;justify-content:space-between;gap:12px;min-height:136px;padding:14px;
    background:var(--surface);border:1px solid var(--line);border-radius:16px;
    color:var(--text);text-align:left;font-family:inherit;cursor:pointer;
    -webkit-tap-highlight-color:transparent;transition:.12s;
  }
  .arch-tile:active{background:var(--surface2)}
  .arch-tile:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .arch-tile-ico{
    display:flex;align-items:center;justify-content:center;width:44px;height:44px;
    border-radius:12px;background:var(--surface2);border:1px solid var(--line2);color:var(--amber);
  }
  .arch-tile-text{display:flex;flex-direction:column;gap:3px}
  .arch-tile-name{font-family:'Anton';font-size:18px;line-height:1.15;letter-spacing:.3px}
  @media(hover:hover){
    .arch-tile:hover{border-color:var(--amber-dim)}
  }

  /* ---------- feuille de stats d'un match archivé ----------
     Le HTML (buildStatsSheetBlockHTML / buildSheetTableHTML) est partagé avec
     l'aperçu des stats du match en cours : tout l'habillage reste limité à
     #archive-section-stats. */
  #archive-stats-sheet-block{margin-top:18px}
  /* bascule Vue essentielle / Vue détaillée */
  #archive-stats-sheet-block .story-fmt-switch{
    display:grid;grid-template-columns:1fr 1fr;gap:0;padding:4px;
    background:var(--surface);border:1px solid var(--line);border-radius:12px;
  }
  #archive-stats-sheet-block .story-fmt-btn{
    height:38px;padding:0;border:0;border-radius:9px;background:transparent;
    color:var(--text);font-size:14px;font-weight:600;
  }
  #archive-stats-sheet-block .story-fmt-btn.active{background:var(--amber);color:var(--on-accent);font-weight:700}
  /* tableau en carte : le défilement horizontal (vue détaillée) reste dans la carte */
  #archive-section-stats .sheetwrap{
    margin-top:4px;overflow-x:auto;
    background:var(--surface);border:1px solid var(--line);border-radius:16px;
  }
  #archive-section-stats th,#archive-section-stats td{padding:0 2px}
  #archive-section-stats th:first-child,#archive-section-stats td:first-child{padding-left:12px;text-align:left}
  #archive-section-stats th:last-child,#archive-section-stats td:last-child{padding-right:12px}
  #archive-section-stats th{
    height:36px;background-color:var(--surface2);border:0;
    font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--muted);
  }
  #archive-section-stats tbody td{height:44px;border-top:1px solid var(--line);border-bottom:0;font-size:14px}
  #archive-section-stats td.player .n{
    display:inline-block;min-width:24px;margin-right:8px;
    font-family:'Anton';font-size:15px;color:var(--amber);
  }
  #archive-section-stats td.pts{font-family:inherit;font-size:14px;font-weight:700}
  #archive-section-stats td.val{font-size:14px}
  #archive-section-stats td.zero{color:var(--muted)}
  #archive-section-stats tr.total td{
    height:46px;padding-top:0;background-color:var(--surface2);border-top:1px solid var(--line2);
    font-size:14px;font-weight:700;color:var(--text);
  }
  #archive-section-stats tr.total td.player{font-size:12px;letter-spacing:.08em;color:var(--muted)}
  #archive-section-stats tr.total td.pts{font-family:'Lalezar';font-size:20px;font-weight:400;color:var(--amber)}
  /* vue essentielle : disposition commune plus haut (« feuille à l'écran : mots entiers ») ; ici, la marge gauche de la carte
     (12 px) devant le numéro, posé dans la marge de la cellule ; le prénom n'est jamais coupé dans un mot */
  #archive-section-stats .sheetwrap:not(.detail-mode) td.player{padding-left:31px}
  #archive-section-stats .sheetwrap:not(.detail-mode) td.player .n{left:12px;min-width:0;margin:0}
  #archive-section-stats .sheetwrap:not(.detail-mode) tr.total td.player{padding-left:12px}
  @media (max-width:379px){   /* 360 px : 4 px de marge à droite au lieu de 12 (« Interceptions » entier, sans défilement) */
    #archive-section-stats .sheetwrap:not(.detail-mode) th:last-child,
    #archive-section-stats .sheetwrap:not(.detail-mode) td:last-child{padding-right:4px}
  }
  /* vue Détaillée : les groupes PANIER / REBONDS gardent leurs fonds et filets */
  #archive-section-stats .sheetwrap.detail-mode th,
  #archive-section-stats .sheetwrap.detail-mode td{padding-left:6px;padding-right:6px}
  #archive-section-stats .sheetwrap.detail-mode th:first-child,
  #archive-section-stats .sheetwrap.detail-mode td:first-child{padding-left:12px}
  #archive-section-stats .sheetwrap.detail-mode th:last-child,
  #archive-section-stats .sheetwrap.detail-mode td:last-child{padding-right:12px}
  #archive-section-stats .sheetwrap.detail-mode thead tr + tr th{height:auto;min-width:34px}
  /* colonne Joueur fixe : fond de la carte (en-tête et TOTAL : --surface2) */
  #archive-section-stats .sheetwrap thead tr:first-child th:first-child,#archive-section-stats .sheetwrap tr.total td.player{background-color:var(--surface2)}
  /* en-tête et TOTAL ont un fond --surface2 : la teinte de groupe y est reposée par-dessus */
  #archive-section-stats th.grp-panier,#archive-section-stats tr.total td.grp-panier{background-image:linear-gradient(rgba(var(--accent-rgb),.07),rgba(var(--accent-rgb),.07))}
  #archive-section-stats th.grp-rebond,#archive-section-stats tr.total td.grp-rebond{background-image:linear-gradient(rgba(var(--green-rgb),.07),rgba(var(--green-rgb),.07))}
  #archive-section-stats .grp-first{border-left:2px solid rgba(var(--white-rgb),.15)}
  /* ---------- feuille du football (chantier 6) ----------
     Classe .feuille-foot posée par le catalogue du football (classeFeuille) : le basket ne la porte jamais, ces règles ne le
     touchent pas. Groupe ATTAQUE teinté à l'accent (grp-accent), libellés de groupe à l'accent (5,6:1 sur --surface2), et
     largeurs de la vue essentielle B · PD · TIRS · RÉC · DUELS (« 24/45 » en 14 px gras). */
  .sheetwrap.feuille-foot th.grp-accent,.sheetwrap.feuille-foot td.grp-accent{background:rgba(var(--accent-rgb),.07)}
  .sheetwrap.feuille-foot.detail-mode thead tr:first-child th[colspan],
  #archive-section-stats .sheetwrap.feuille-foot.detail-mode thead tr:first-child th[colspan]{color:var(--accent)}
  #archive-section-stats .sheetwrap.feuille-foot th.grp-accent,#archive-section-stats .sheetwrap.feuille-foot tr.total td.grp-accent{background-image:linear-gradient(rgba(var(--accent-rgb),.07),rgba(var(--accent-rgb),.07))}
  /* export */
  .sheet-export{display:flex;gap:10px}
  #sheet-fmt-switch{
    flex:none;width:132px;display:grid;grid-template-columns:1fr 1fr;gap:0;padding:4px;
    background:var(--surface);border:1px solid var(--line);border-radius:12px;
  }
  #sheet-fmt-switch .story-fmt-btn{
    height:40px;padding:0;border:0;border-radius:9px;background:transparent;
    color:var(--text);font-size:14px;font-weight:600;
  }
  #sheet-fmt-switch .story-fmt-btn.active{background:var(--surface2);color:var(--amber);font-weight:700}
  .sheet-save{
    flex:1;display:flex;align-items:center;justify-content:center;gap:8px;height:50px;
    border:0;border-radius:12px;background:var(--amber);color:var(--on-accent);
    font-family:inherit;font-size:15px;font-weight:700;cursor:pointer;
  }
  .sheet-save svg{flex:none}
  .sheet-save:focus-visible{outline:2px solid var(--text);outline-offset:2px}

  /* ---------- panneau highlights ---------- */
  #highlights-panel{position:fixed;inset:0;z-index:725;background:var(--bg);overflow-y:auto;padding:18px;}
  #highlights-panel.hidden{display:none}
  /* ---------- arborescence Highlights (écran 1/2A/3A/4A/2B), mutualisée
     match en cours + archive ---------- */
  /* ---------- liste des joueurs (maquette « Highlights — B ») : composants
     ui-* partagés + carte d'équipe et ligne « aucun clip » ---------- */
  #highlights-panel .deco-dots{margin:18px 0}
  .hl-team-card{
    display:flex;align-items:center;gap:14px;width:100%;padding:12px;margin-bottom:4px;
    background:transparent;border:1.5px dashed var(--line2);border-radius:16px;
    color:var(--text);text-align:left;font-family:inherit;cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .hl-team-card:active{background:var(--surface2)}
  .hl-team-card:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .hl-team-ico{
    flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;
    border-radius:12px;background:var(--amber);color:var(--on-accent);
  }
  .hl-team-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
  .hl-team-title{font-size:16px;font-weight:600;line-height:1.3}
  .hl-nobody{
    display:flex;align-items:flex-start;gap:12px;margin-top:10px;padding:14px;
    border:1.5px dashed var(--line2);border-radius:16px;
    font-size:14px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere;
  }
  .hl-nobody svg{flex:none;color:var(--muted)}
  /* ---------- page d'un joueur (maquette « Clips d'un joueur ») ---------- */
  .hl-chips{
    display:flex;gap:8px;margin:20px 0 14px;overflow-x:auto;flex-wrap:nowrap;
    scrollbar-width:none;-webkit-overflow-scrolling:touch;
  }
  .hl-chips::-webkit-scrollbar{display:none}
  .hl-chip{
    flex:none;height:40px;padding:0 16px;border-radius:20px;border:1px solid var(--line2);
    background:transparent;color:var(--text);font-family:inherit;font-size:14px;font-weight:600;
    white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .hl-chip.is-active{background:var(--amber);border-color:var(--amber);color:var(--on-accent)}
  .hl-chip:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .hl-note{display:flex;align-items:flex-start;gap:8px;margin:0 0 14px;font-size:13px;line-height:1.45;color:var(--muted)}
  .hl-note svg{flex:none;margin-top:1px;color:var(--amber)}
  .hl-clip-list{display:flex;flex-direction:column;gap:12px}
  .hl-clip{padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:16px}
  .hl-clip.is-raw{border-color:var(--warn)}
  .hl-clip-top{display:flex;align-items:flex-start;gap:12px}
  .hl-thumb{
    position:relative;flex:none;display:flex;align-items:center;justify-content:center;
    width:88px;height:88px;padding:0;overflow:hidden;border:0;border-radius:10px;
    background:var(--thumb-bg);color:var(--muted);cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .hl-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
  .hl-thumb-ph{display:flex}
  .hl-thumb-play{
    position:relative;display:flex;align-items:center;justify-content:center;
    width:36px;height:36px;border-radius:50%;background:rgba(var(--viewer-bg-rgb),.72);color:var(--white);
  }
  .hl-thumb:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .hl-clip-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;padding-top:2px}
  .hl-clip-title{font-size:16px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
  .hl-clip-meta{font-size:13px;color:var(--muted)}
  /* joueurs d'un temps fort (page « Temps forts ») */
  .hl-clip-who{font-size:14px;font-weight:600;line-height:1.3;color:var(--text);overflow-wrap:anywhere}
  /* entrée « Temps forts » de la liste des joueurs, case de la compilation : éclair jaune */
  .hl-tf-pad svg{color:var(--eclair)}
  .hl-be-pad svg{color:var(--red)}   /* carte « Buts encaissés » (Highlights d'un sport à saisie d'équipe), couleur du bouton */
  .hl-be-pad.teinte-accent svg{color:var(--amber)}   /* carte d'une saisie d'équipe qui est un but POUR nous (catalogue : teinte) */
  .hl-picks-tf{margin-top:14px}
  .hl-clip-note{font-size:12px;line-height:1.4;color:var(--muted)}
  .hl-clip-warn{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--warn)}
  .hl-clip-warn svg{flex:none}
  .hl-clip-err{font-size:12px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
  .hl-clip-actions{display:flex;gap:8px;margin-top:10px}
  .hl-clip-btn{flex:1 1 0;min-width:0;width:auto;height:44px;padding:0 6px;font-size:14px}
  .hl-clip-actions .ui-icon-btn{flex:none}
  .hl-clip-line{
    display:flex;align-items:center;gap:10px;min-height:52px;padding:4px 4px 4px 14px;
    border:1.5px dashed var(--line2);border-radius:14px;font-size:14px;color:var(--muted);
  }
  .hl-clip-line svg{flex:none}
  .hl-clip-line-text{flex:1;min-width:0;padding:8px 0;overflow-wrap:anywhere}
  .hl-spin{color:var(--amber);animation:hl-spin .9s linear infinite}
  @keyframes hl-spin{to{transform:rotate(360deg)}}
  @media (prefers-reduced-motion:reduce){ .hl-spin{animation-duration:2.4s} }
  .hl-actions{margin-top:18px}
  .hl-actions .ui-btn-primary span{min-width:0;line-height:1.1;overflow-wrap:anywhere;text-align:center}
  .hl-actions .ui-btn-primary:disabled{opacity:.35;cursor:default}
  /* écrans courts (compilation, montage, vidéo prête) : toute la hauteur, la
     barre d'actions posée en bas (le conteneur qui défile a 18px de marge
     tout autour dans le panneau, 20px en haut et 32px en bas en archive) */
  .hl-page{display:flex;flex-direction:column;min-height:calc(100dvh - 36px)}
  #archive-section-highlights .hl-page{min-height:calc(100dvh - 52px)}
  .hl-page > .ui-actions,#highlights-panel .hl-page > .ui-actions{margin-top:auto}
  .hl-page > :nth-last-child(2){margin-bottom:18px}
  /* ---------- page de compilation (maquette « Compilation — B ») ---------- */
  .hl-picks{display:flex;flex-wrap:wrap;gap:8px}
  .hl-pick{
    display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px;border-radius:20px;
    border:1px solid var(--line2);background:transparent;color:var(--text);
    font-family:inherit;font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .hl-pick svg{flex:none}
  .hl-pick.is-on{border-color:var(--amber);background:rgba(var(--accent-rgb),.1);color:var(--amber)}
  .hl-pick:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .hl-sum{flex-direction:column;gap:12px;margin-top:22px;padding:14px}
  .hl-sum-text{margin:0;font-size:15px;line-height:1.4;color:var(--muted)}
  .hl-sum-text b{color:var(--text);font-weight:700}
  .hl-minis{display:flex;flex-wrap:wrap;gap:8px}
  .hl-mini{
    position:relative;flex:none;display:flex;align-items:center;justify-content:center;
    width:64px;height:64px;overflow:hidden;border-radius:10px;background:var(--thumb-bg);color:var(--muted);
  }
  .hl-mini img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
  .hl-mini-plus{background:var(--surface2);border:1px solid var(--line2);color:var(--text);font-size:15px;font-weight:700}
  /* ---------- « Montage en cours », échec, « Ta vidéo est prête » ---------- */
  .hl-gen{margin-top:48px;text-align:center}
  .hl-gen-count{font-family:'Anton';font-size:64px;line-height:1.1;letter-spacing:.5px}
  .hl-gen-k{color:var(--amber)}
  .hl-gen-n{color:var(--muted)}
  .hl-gen-bar{height:8px;margin-top:18px;border-radius:4px;background:var(--line2);overflow:hidden}
  .hl-gen-fill{width:0;height:100%;border-radius:4px;background:var(--amber);transition:width .25s ease}
  .hl-gen-prep{margin:12px 0 0;font-size:13px;color:var(--muted)}
  .hl-gen-prep[hidden]{display:none}
  .hl-gen-text{max-width:300px;margin:28px auto 0;font-size:14px;line-height:1.5;color:var(--muted)}
  .hl-gen-erreur{margin:20px 0 0;font-size:14px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
  .hl-pv-video{display:block;width:100%;max-height:55vh;margin-top:20px;border-radius:16px;background:#000;object-fit:contain}
  /* ui-actions suppose un écran à 20px de marge latérale et sans marge basse :
     le panneau Highlights a 18px tout autour, le viewer d'archive 32px en bas.
     Le bottom/margin-bottom négatifs collent la barre au vrai bord de l'écran. */
  #highlights-panel .ui-actions{margin:18px -18px -18px;padding-left:18px;padding-right:18px;bottom:-18px}
  #archive-section-highlights .ui-actions{margin-bottom:-32px;bottom:-32px}
  @media(hover:hover){
    .hl-team-card:hover{border-color:var(--amber-dim)}
    .hl-chip:not(.is-active):hover{border-color:var(--amber-dim)}
    .hl-pick:not(.is-on):hover{border-color:var(--amber-dim)}
    .hl-thumb:hover .hl-thumb-play{background:rgba(var(--viewer-bg-rgb),.88)}
  }


  /* ---------- lecteur "Voir" (lecture seule d'un clip, en superposition) ---------- */
  /* Panneau en grille : en-tête (« Clip N sur M »), vidéo (prend la hauteur
     restante, image entière), barre de commandes. En paysage bas, les
     commandes passent à droite de la vidéo pour que tout reste visible sans
     défilement. Boutons : composants partagés ui-btn-outline. */
  #hl-viewer-overlay{
    position:fixed;inset:0;z-index:920;background:var(--viewer-bg); /* opaque : la page derrière ne doit pas transparaître sous les commandes */
    display:flex;align-items:center;justify-content:center;
    padding:calc(12px + env(safe-area-inset-top,0px)) 16px calc(12px + env(safe-area-inset-bottom,0px));
  }
  #hl-viewer-overlay:focus{outline:none}
  #hl-viewer-overlay.hidden{display:none}
  #hl-viewer-overlay .hl-viewer-panel{
    display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;
    gap:12px;width:100%;max-width:520px;height:100%;
  }
  #hl-viewer-overlay .hl-viewer-head{text-align:center}
  #hl-viewer-overlay .hl-viewer-count{margin:0;font-family:'Anton';font-size:22px;font-weight:400;letter-spacing:.4px;line-height:1.2}
  #hl-viewer-overlay .hl-viewer-meta{margin:2px 0 0;font-size:13px;line-height:1.35;color:var(--muted)}
  #hl-viewer-overlay video{width:100%;height:100%;min-height:0;border-radius:12px;background:#000;object-fit:contain}
  #hl-viewer-overlay .hl-viewer-bar{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  #hl-viewer-overlay .hl-viewer-bar .hl-viewer-close{grid-column:1 / -1}
  #hl-viewer-overlay .ui-btn-outline{min-width:0;height:48px;min-height:48px;padding:0 6px;gap:6px;font-size:14px;background:var(--surface2)}
  #hl-viewer-overlay .ui-btn-outline span{min-width:0}
  #hl-viewer-overlay .ui-btn-outline:disabled{opacity:.4;cursor:default}
  #hl-viewer-overlay .ui-btn-outline:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  #hl-viewer-overlay .ui-btn-outline.is-danger svg{color:var(--red)}
  @media (orientation:landscape) and (max-height:600px){
    #hl-viewer-overlay{padding:calc(8px + env(safe-area-inset-top,0px)) calc(12px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) calc(12px + env(safe-area-inset-left,0px))}
    #hl-viewer-overlay .hl-viewer-panel{
      max-width:none;grid-template-columns:minmax(0,1fr) 268px;grid-template-rows:auto minmax(0,1fr);
      grid-template-areas:"video head" "video bar";gap:8px 14px;
    }
    #hl-viewer-overlay video{grid-area:video}
    #hl-viewer-overlay .hl-viewer-head{grid-area:head}
    #hl-viewer-overlay .hl-viewer-bar{grid-area:bar;align-self:start}
    #hl-viewer-overlay .hl-viewer-count{font-size:19px}
  }
  @media(hover:hover){
    #hl-viewer-overlay .ui-btn-outline:not(:disabled):hover{border-color:var(--amber-dim)}
  }

  /* ---------- setup overlay ---------- */
  #setup-overlay{
    position:fixed;inset:0;z-index:400;
    background:var(--bg);overflow-y:auto;
    padding:20px 20px 0;
  }
  #setup-overlay.hidden{display:none}
  .setup-roster-wrap{display:flex;flex-direction:column;gap:7px;margin-bottom:10px}
  .setup-roster-wrap input{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:8px 10px;color:var(--text);font-family:inherit;font-size:14px}
  .setup-roster-wrap input.rn{width:64px;text-align:center;font-family:'Anton';color:var(--amber)}
  .setup-roster-wrap input.rname{flex:1;min-width:0}
  .setup-roster-wrap input:focus{outline:none;border-color:var(--amber-dim)}
  .setup-roster-wrap .rrow button{background:none;border:1px solid var(--line2);color:var(--muted2);width:32px;height:34px;border-radius:8px;cursor:pointer;flex:none}
  .setup-roster-wrap .rrow button:hover{color:var(--red);border-color:var(--red)}
  .setup-warning{font-size:12px;color:var(--red);margin-top:8px;min-height:18px}
  /* page « Configuration du match » (composants ui-*). Les règles ci-dessus
     (.setup-roster-wrap, .setup-warning) restent partagées avec le formulaire
     d'équipe : ne pas les modifier pour cet écran. */
  .setup-page{min-height:100%;display:flex;flex-direction:column} /* .ui-actions collée en bas même avec une liste courte */
  #setup-overlay:not(.is-edit) .setup-topbar{display:none}       /* création : pas de bouton retour */
  .setup-pick{
    display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;
    background:var(--surface);border:1px solid var(--line2);border-radius:14px;
    color:var(--text);text-align:left;font-family:inherit;cursor:pointer;
    -webkit-tap-highlight-color:transparent;transition:.12s;
  }
  .setup-pick:active{background:var(--surface2)}
  .setup-pick:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .setup-pick-ico{
    flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;
    border-radius:12px;background:var(--surface2);color:var(--amber);
  }
  .setup-pick-title{font-size:15px;font-weight:600}
  #setup-pick-info:empty{display:none}
  #setup-pick-info{display:flex;gap:8px;margin:10px 2px 0;font-size:13px;line-height:1.45;color:var(--muted)}
  #setup-pick-info::before{
    content:"";flex:none;width:16px;height:16px;margin-top:1px;background:var(--green);
    -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5l10 -10'/></svg>") center/16px 16px no-repeat;
            mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5l10 -10'/></svg>") center/16px 16px no-repeat;
  }
  .setup-page .ui-label{margin-top:18px}
  .setup-page .ui-section{margin:22px 0 10px}
  /* « Ton équipe » et « Adversaire » (sport à score en direct, catalogue scoreEnDirect) à la place de « Nom du match » */
  .setup-equipes[hidden]{display:none}
  /* « Ton équipe » vide (football : le champ n'existe qu'avec l'en-tête « équipe 2 - 1 adversaire ») : bordure rouge */
  .setup-equipes #setup-equipe[aria-invalid="true"]{border-color:var(--red)}
  /* lignes de joueurs : uniquement dans #setup-roster (le formulaire d'équipe garde les siennes) */
  #setup-roster{gap:8px;margin-bottom:0}
  #setup-roster .rrow{gap:8px}
  #setup-roster input{
    height:48px;padding:0 14px;border-radius:12px;
    background:var(--surface);border:1px solid var(--line2);font-size:15px;
  }
  #setup-roster input:focus{border-color:var(--amber)}
  #setup-roster input.rn{width:56px;padding:0;text-align:center;font-family:'Anton';font-size:19px;color:var(--amber)}
  #setup-roster .rrow button{
    display:flex;align-items:center;justify-content:center;width:44px;height:48px;padding:0;
    background:none;border:1px solid var(--line);border-radius:12px;color:var(--muted);
  }
  #setup-roster .rrow button:focus-visible{color:var(--red)}
  /* « + » sous la croix de la dernière ligne (hors .rrow : n'hérite pas du style de la croix) */
  #setup-roster .setup-add-row{display:flex;justify-content:flex-end}
  #setup-roster .setup-add{
    display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;
    background:none;border:1px solid var(--line);border-radius:12px;color:var(--amber);cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  #setup-roster .setup-add:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  #setup-roster .setup-add:active{background:var(--surface2)}
  /* titulaires (catalogue : titulaires ; jamais au basket) : nombre en tête de la liste, bascule « Titulaire » de chaque ligne,
     coche visible une fois enfoncée (pas seulement la couleur), figée (lecture seule) après un changement */
  #setup-roster .setup-titu-compteur{align-self:flex-end;font-size:13px;font-weight:700;color:var(--muted)}
  #setup-roster .rrow button.setup-titu{
    display:flex;align-items:center;justify-content:center;gap:4px;width:auto;min-width:96px;height:48px;padding:0 10px;
    border:1px solid var(--line2);border-radius:12px;background:transparent;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  #setup-roster .rrow button.setup-titu svg{display:none;flex:none}
  #setup-roster .rrow button.setup-titu[aria-pressed="true"]{background:var(--amber);border-color:var(--amber);color:var(--on-accent)}
  #setup-roster .rrow button.setup-titu[aria-pressed="true"] svg{display:block}
  #setup-roster .rrow button.setup-titu:focus-visible{outline:2px solid var(--amber);outline-offset:2px;color:var(--text)}
  #setup-roster .rrow button.setup-titu[aria-pressed="true"]:focus-visible{color:var(--on-accent)}
  /* figés (« Modifier le match » après un changement) : couleurs explicites, jamais d'opacité ; texte à 4,5:1 au moins
     (gris #8893a8 sur le fond #10141d : 6,0:1 ; texte clair sur l'accent assombri : 9:1 et plus) */
  #setup-roster .rrow button.setup-titu:disabled{cursor:default;background:var(--bg);border-color:var(--line);color:var(--muted)}
  #setup-roster .rrow button.setup-titu[aria-pressed="true"]:disabled{background:rgba(var(--accent-rgb),.16);border-color:var(--amber);color:var(--text)}
  /* numéro et croix d'un joueur cité par un changement (« Modifier le match ») : lecture seule */
  #setup-roster input.rn:disabled{background:var(--bg);border-color:var(--line);color:var(--muted);-webkit-text-fill-color:var(--muted);opacity:1}
  #setup-roster .rrow button:disabled{cursor:default;background:var(--bg);border-color:var(--line);color:var(--muted)}
  /* croix figée : bord en pointillé et icône éteinte (une croix active a un bord plein et l'icône grise) */
  #setup-roster .rrow button:not(.setup-titu):disabled{border-style:dashed;color:var(--line2)}
  .ui-actions #setup-warning{margin:0;min-height:0}
  .ui-actions #setup-warning:empty{display:none}
  #setup-start.no-icon .setup-start-ico{display:none}
  .setup-start-ico{display:flex}
  @media(hover:hover){
    .setup-pick:hover{border-color:var(--amber-dim)}
    #setup-roster .rrow button:hover{color:var(--red)}
    #setup-roster .rrow button.setup-titu:not(:disabled):hover{color:var(--text);border-color:var(--amber)}
    #setup-roster .rrow button.setup-titu[aria-pressed="true"]:not(:disabled):hover{color:var(--on-accent)}
    #setup-roster .rrow button:disabled:hover{color:var(--muted)}   /* figé : jamais le rouge de la croix au survol */
    #setup-roster .rrow button:not(.setup-titu):disabled:hover{color:var(--line2)}
    #setup-roster .rrow button.setup-titu[aria-pressed="true"]:disabled:hover{color:var(--text)}
  }

  /* ---------- décor partagé : points reliés (.deco-dots) ---------- */
  /* motif de points reliés repris du logo : purement décoratif (aucun survol, curseur ni transition).
     Le SVG est répété dans le HTML ; la boîte fait 14px de haut (hauteur de l'ancien décor). */
  .deco-dots{
    display:block;flex:none;width:76px;height:14px;overflow:visible;
    pointer-events:none;user-select:none;
  }
  .deco-dots polyline{stroke:var(--line2)}
  .deco-dots circle{stroke:var(--line2);fill:var(--bg)}
  .deco-dots .dd-halo{stroke:var(--amber);fill:none;opacity:.45}
  .deco-dots .dd-end{stroke:none;fill:var(--amber)}

  /* ---------- composants d'écran partagés (ui-*) ---------- */
  /* écrans plein page au style de l'accueil et des archives (les .arch-* sont
     d'anciennes classes partagées par d'autres écrans). Les :hover sont dans
     @media(hover:hover) : sur écran tactile, le survol resterait collé après un appui. */
  .ui-content{position:relative;z-index:1;max-width:700px;margin:0 auto}
  .ui-topbar{display:flex;align-items:center;height:44px}
  .ui-back{
    display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;
    background:var(--surface2);border:1px solid var(--line2);border-radius:12px;
    color:var(--text);cursor:pointer;transition:.12s;
  }
  .ui-head{margin-top:40px}
  .ui-head.is-compact{margin-top:24px}
  .ui-title{font-family:'Anton';font-size:32px;font-weight:400;line-height:1.15;letter-spacing:.5px}
  .ui-head.is-compact .ui-title{font-size:30px}
  .ui-kicker{margin:0 0 6px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  .ui-subtitle{margin-top:4px;font-size:13px;color:var(--muted)}
  /* titre avec un bouton sur sa rangée, à droite (page interne qui déclare `action` : Vestiaire, « Règlement ») */
  .ui-head-ligne{display:flex;align-items:center;gap:12px}
  .ui-head-ligne .ui-title{flex:1;min-width:0;overflow-wrap:anywhere}
  .ui-head-btn{flex:none}
  .ui-head-btn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .ui-content > .deco-dots{margin:20px 0 22px}
  /* intertitre de section : texte puis filet sur le reste de la ligne */
  .ui-section{
    display:flex;align-items:center;gap:12px;margin:20px 0 12px;
    font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);
  }
  .ui-section:first-child{margin-top:0}
  .ui-section::after{content:"";flex:1;height:1px;background:var(--line)}
  /* carte : zone d'ouverture (pavé + nom + chevron), filet, corbeille */
  .ui-card + .ui-card{margin-top:10px}
  .ui-card{
    display:flex;align-items:stretch;overflow:hidden;
    background:var(--surface);border:1px solid var(--line);border-radius:16px;
  }
  .ui-card-open{
    flex:1;min-width:0;display:flex;align-items:center;gap:14px;padding:12px 6px 12px 12px;
    background:transparent;border:0;color:var(--text);text-align:left;cursor:pointer;
    font-family:inherit;-webkit-tap-highlight-color:transparent;
  }
  .ui-card-open:active{background:var(--surface2)}
  .ui-card-open:focus-visible,.ui-card-del:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .ui-pad{
    flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;
    width:58px;height:64px;border-radius:12px;background:var(--surface2);border:1px solid var(--line2);
  }
  /* Lalezar a une ligne de base haute (vide sous les chiffres) : la marge basse
     négative et le padding-top recentrent chiffres + mois à l'œil dans le pavé */
  .ui-pad-big{font-family:'Lalezar';font-size:30px;line-height:1;padding-top:2px;margin-bottom:-4px;color:var(--amber)}
  .ui-pad-code{font-family:'Lalezar';font-size:22px;line-height:1;padding-top:4px;color:var(--amber)} /* variante pour un code (« U15 ») */
  .ui-pad-small{font-size:11px;font-weight:700;line-height:1.2;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
  .ui-card-name{flex:1;min-width:0;font-family:'Anton';font-size:19px;font-weight:400;line-height:1.2;letter-spacing:.5px;overflow-wrap:anywhere}
  .ui-card-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px} /* nom + méta */
  .ui-card-meta{font-size:13px;color:var(--muted)}
  .ui-chev{flex:none;color:var(--amber)}
  .ui-card-sep{flex:none;width:1px;margin:16px 0;background:var(--line)}
  .ui-card-del{
    flex:none;display:flex;align-items:center;justify-content:center;width:52px;padding:0;
    background:transparent;border:0;color:var(--muted);cursor:pointer;transition:.12s;
    -webkit-tap-highlight-color:transparent;
  }
  .ui-card-del:focus-visible{color:var(--red)}
  /* formulaires */
  .ui-label{display:block;margin:0 0 6px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  .ui-input,.ui-select,.ui-num{
    width:100%;height:48px;box-sizing:border-box;padding:0 14px;
    background:var(--surface);border:1px solid var(--line2);border-radius:12px;
    color:var(--text);font-size:15px;font-family:inherit;
  }
  .ui-input:focus,.ui-select:focus,.ui-num:focus{outline:none;border-color:var(--amber)}
  /* chevron de la liste déroulante : une image par sport (la couleur d'un data-URI ne peut pas être un jeton) ; basket par défaut */
  .ui-select{
    -webkit-appearance:none;appearance:none;padding-right:36px;
    background:var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5953F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6l6 -6'/></svg>") no-repeat right 12px center/16px 16px;
  }
  html[data-sport="taekwondo"] .ui-select{
    background:var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f2ef' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6l6 -6'/></svg>") no-repeat right 12px center/16px 16px;
  }
  html[data-sport="football"] .ui-select{
    background:var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334D27D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6l6 -6'/></svg>") no-repeat right 12px center/16px 16px;
  }
  .ui-num{width:56px;padding:0;text-align:center;font-family:'Anton';font-size:19px;color:var(--amber)}
  /* boutons */
  .ui-btn-primary{
    display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:62px;
    background:var(--amber);border:none;border-radius:14px;color:var(--on-accent);
    font-family:'Anton';font-size:22px;letter-spacing:.5px;cursor:pointer;
  }
  .ui-btn-primary svg{flex:none}
  .ui-btn-dashed,.ui-btn-outline{
    display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:48px;
    background:transparent;border:1.5px dashed var(--line2);border-radius:12px;color:var(--text);
    font-family:inherit;font-size:15px;font-weight:600;cursor:pointer;
  }
  .ui-btn-outline{border:1px solid var(--line2)}
  .ui-btn-dashed svg,.ui-btn-outline svg{flex:none;color:var(--amber)}
  .ui-icon-btn{
    display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;
    background:transparent;border:1px solid var(--line2);border-radius:10px;
    color:var(--muted);cursor:pointer;transition:.12s;
  }
  .ui-icon-btn.is-accent{color:var(--amber)}
  .ui-icon-btn.is-danger:focus-visible{color:var(--red)}
  /* barre d'actions collée en bas pendant le défilement (écran à padding latéral 20px) */
  .ui-actions{
    position:sticky;bottom:0;z-index:2;margin:auto -20px 0;
    padding:14px 20px max(24px, env(safe-area-inset-bottom));
    background:var(--bg);border-top:1px solid var(--line);
    display:flex;flex-direction:column;gap:10px;
  }
  .ui-note{
    display:flex;gap:10px;padding:12px;
    background:var(--surface);border:1px solid var(--line);border-radius:12px;
    font-size:13px;line-height:1.45;color:var(--muted);
  }
  .ui-note svg{flex:none;color:var(--amber)}
  @media(hover:hover){
    .ui-back:hover{border-color:var(--amber-dim);color:var(--amber)}
    .ui-card-del:hover{color:var(--red)}
    .ui-icon-btn:hover{border-color:var(--amber-dim)}
    .ui-icon-btn.is-danger:hover{color:var(--red)}
  }

  /* ---------- écran d'accueil ---------- */
  #home-screen{
    position:fixed;inset:0;z-index:600;background:var(--bg);
    display:flex;flex-direction:column;align-items:center;padding:84px 24px 32px;overflow-y:auto; /* 84 : sous les pastilles (20 + 54) */
  }
  #home-screen.hidden{display:none}
  .home-login-area{position:absolute;top:calc(20px + env(safe-area-inset-top,0px));right:calc(20px + env(safe-area-inset-right,0px));z-index:2}
  #home-screen .hamburger-btn{width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center}
  /* pastilles de sport (mode sport) : en haut à gauche, icônes Tabler seules (le nom est dans aria-label), 44 px chacune.
     La pastille active porte l'accent (et, pour le taekwondo, les touches bleu à gauche / rouge à droite) ; une pastille
     verrouillée (match en cours, compétition ouverte) garde un cadenas / aria-disabled et répond par un message. */
  .home-sports{
    position:absolute;top:calc(20px + env(safe-area-inset-top,0px));left:calc(20px + env(safe-area-inset-left,0px));z-index:2;
    display:flex;gap:4px;padding:4px;border-radius:28px;background:var(--bg2);border:1px solid var(--line);
  }
  .home-sport{
    position:relative;width:44px;height:44px;padding:0;border:0;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    background:transparent;color:var(--muted);cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .home-sport[aria-pressed="true"]{
    background:var(--amber);color:var(--on-accent);
    box-shadow:-2px 0 0 0 var(--accent-gauche),2px 0 0 0 var(--accent-droite);
  }
  .home-sport[aria-disabled="true"]{cursor:default}
  .home-sport[aria-disabled="true"] > svg{opacity:.6}
  .home-sport:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .home-sport-cadenas{
    position:absolute;right:0;bottom:0;width:18px;height:18px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;background:var(--surface2);color:var(--muted);
  }
  .home-sport-cadenas svg{opacity:1}
  /* nom du sport : une lettre blanche par bloc (Anton), blocs légèrement de travers et de hauteurs inégales, mot penché de −7°, sans texture */
  .home-sport-nom{display:flex;align-items:center;gap:2px;transform:rotate(-7deg);margin-top:-6px}
  .home-sport-nom:empty{display:none}
  .home-lettre{
    display:inline-block;min-width:20px;padding:5px 4px;text-align:center;
    font-family:'Anton';font-size:clamp(22px,7.6vw,30px);font-weight:400;line-height:1;
    background:var(--sport-bloc);color:var(--white);
  }
  .home-lettre:nth-child(10n+1){transform:rotate(-2deg);padding:6px 4px 5px}
  .home-lettre:nth-child(10n+2){transform:rotate(1deg);padding:4px 4px 7px}
  .home-lettre:nth-child(10n+3){transform:rotate(-1deg);padding:7px 4px 4px}
  .home-lettre:nth-child(10n+4){transform:rotate(2deg);padding:5px 4px 6px}
  .home-lettre:nth-child(10n+5){padding:4px 4px 5px}
  .home-lettre:nth-child(10n+6){transform:rotate(-2deg);padding:6px 4px 6px}
  .home-lettre:nth-child(10n+7){transform:rotate(1deg);padding:5px 4px 4px}
  .home-lettre:nth-child(10n+8){transform:rotate(-1deg);padding:7px 4px 5px}
  .home-lettre:nth-child(10n+9){transform:rotate(2deg);padding:4px 4px 6px}
  .home-lettre:nth-child(10n+10){transform:rotate(-1deg);padding:6px 4px 4px}
  /* bloc propre au sport (widget « Compétition en cours ») : sous le logo et le nom, centré avec eux ; vide = rien */
  .home-bloc{width:100%}
  .home-bloc:empty{display:none}
  .home-hero:has(.home-bloc:not(:empty)) .home-logo{height:clamp(110px,22vh,180px)}
  .home-content{
    position:relative;z-index:1;
    display:flex;flex-direction:column;flex:1 0 auto;width:100%;max-width:480px;
    padding-bottom:calc(60px + env(safe-area-inset-bottom,0px));  /* la barre (92 px) recouvre déjà les 32 px de marge basse de #home-screen */
  }
  .home-hero{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:22px;padding-bottom:0;
  }
  /* le logo seul, centré dans l'espace au-dessus des points reliés */
  .home-logo-frame{
    flex:none;width:auto;height:auto;max-width:100%;
    display:flex;align-items:center;justify-content:center;
  }
  .home-logo{width:auto;height:clamp(150px,34vh,270px);max-width:100%;object-fit:contain}
  /* étoiles filantes décoratives (CSS pur) : une toutes les 2 s, cycle de 8 s, 2 s visibles chacune.
     Départ en % du conteneur ; trajet en cqmin (l'angle reste exact à tout format d'écran).
     Seuls transform et opacity sont animés ; display:none sur l'accueil suspend tout. */
  .home-stars{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;container-type:size}
  .home-star{position:absolute;width:0;height:0;opacity:0}
  .home-star::before{ /* traînée : 44 × 4 px, qui s'efface vers l'arrière */
    content:"";position:absolute;left:0;top:-2px;width:44px;height:4px;border-radius:2px;
    background:linear-gradient(90deg,transparent,var(--amber));
    transform-origin:0 50%;transform:rotate(var(--a));
  }
  .home-star::after{ /* tête : point de 6 px avec halo, en bout de traînée */
    content:"";position:absolute;left:-3px;top:-3px;width:6px;height:6px;border-radius:50%;
    background:var(--amber);box-shadow:0 0 8px 2px color-mix(in srgb,var(--amber) 55%,transparent);
    transform:rotate(var(--a)) translateX(41px);
  }
  .home-star-a{left:8%; top:22%;--a:31deg;  animation:star-a 8s linear 0s infinite}
  .home-star-b{left:92%;top:30%;--a:147deg; animation:star-b 8s linear 2s infinite}
  .home-star-c{left:6%; top:62%;--a:-29deg; animation:star-c 8s linear 4s infinite}
  .home-star-d{left:94%;top:66%;--a:213deg; animation:star-d 8s linear 6s infinite}
  @keyframes star-a{0%{opacity:0;transform:translate(0,0)}4%{opacity:1}20%{opacity:1}25%,100%{opacity:0;transform:translate(60cqmin,36cqmin)}}
  @keyframes star-b{0%{opacity:0;transform:translate(0,0)}4%{opacity:1}20%{opacity:1}25%,100%{opacity:0;transform:translate(-59cqmin,38cqmin)}}
  @keyframes star-c{0%{opacity:0;transform:translate(0,0)}4%{opacity:1}20%{opacity:1}25%,100%{opacity:0;transform:translate(61cqmin,-34cqmin)}}
  @keyframes star-d{0%{opacity:0;transform:translate(0,0)}4%{opacity:1}20%{opacity:1}25%,100%{opacity:0;transform:translate(-59cqmin,-38cqmin)}}
  @media (prefers-reduced-motion:reduce){ .home-stars{display:none} }
  /* barre du bas : 5 colonnes égales (2 raccourcis · bouton rond · 2 raccourcis).
     position:fixed (et non absolute) : #home-screen défile (overflow-y:auto), la barre doit rester en bas.
     z-index 2 : au-dessus des étoiles filantes (0) et du contenu (1). Masquée avec l'accueil (display:none). */
  .home-bar{
    position:fixed;left:0;right:0;bottom:0;z-index:2;
    height:calc(92px + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);
    display:grid;grid-template-columns:repeat(5,1fr);
    background:var(--bg2);border-top:1px solid var(--line);
  }
  .home-slot{position:relative;min-width:0;display:flex;align-items:center;justify-content:center}
  .home-shortcut{
    width:100%;height:100%;min-height:56px;padding:0 2px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
    background:transparent;border:0;border-radius:12px;color:var(--muted);cursor:pointer;
    font-family:inherit;-webkit-tap-highlight-color:transparent;
  }
  .home-shortcut svg{flex:none;color:var(--amber)}
  .home-shortcut-label{
    max-width:100%;font-size:11px;font-weight:600;line-height:1.2;text-align:center;
    overflow-wrap:normal;word-break:normal;hyphens:none;
  }
  .home-shortcut:active{background:var(--surface2)}
  .home-shortcut:focus-visible,.home-go:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  /* bouton rond : remonté de 38 px au-dessus de la barre ; le libellé est posé sous le disque.
     Même respiration et même halo pour tous les sports, à l'accent du sport ; touches gauche / droite (taekwondo) dans le halo. */
  .home-go{
    position:absolute;top:-38px;left:calc(50% - 38px);width:76px;height:76px;
    display:flex;align-items:center;justify-content:center;
    background:var(--amber);border:5px solid var(--bg);border-radius:50%;
    color:var(--on-accent);cursor:pointer;font-family:inherit;-webkit-tap-highlight-color:transparent;
    box-shadow:-3px 0 0 0 var(--accent-gauche),3px 0 0 0 var(--accent-droite);
    animation:home-go-breathe 2.6s ease-in-out infinite,home-go-halo 2.6s ease-out infinite;
  }
  .home-go-txt{font-size:24px;font-weight:800;line-height:1}
  .home-go > svg{display:none}
  .home-go-label{
    position:absolute;top:calc(100% + 12px);left:50%;transform:translateX(-50%);
    font-size:10px;font-weight:800;letter-spacing:.1em;line-height:1;white-space:nowrap;color:var(--amber);
  }
  .home-go-label.is-long{font-size:9px;letter-spacing:.05em} /* « COMPÉTITION » : tient dans la colonne centrale à 360 px */
  /* reprise d'un match : disque sombre, contour azur, icône play (le « GO » disparaît) */
  .home-go[data-mode="resume"]{
    background:var(--surface2);border:2px solid var(--amber);color:var(--amber);
    animation:home-go-breathe 2.6s ease-in-out infinite;
  }
  .home-go[data-mode="resume"] .home-go-txt{display:none}
  .home-go[data-mode="resume"] > svg{display:block}
  @keyframes home-go-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
  @keyframes home-go-halo{
    0%{box-shadow:-3px 0 0 0 var(--accent-gauche),3px 0 0 0 var(--accent-droite),0 0 0 0 color-mix(in srgb,var(--amber) 55%,transparent)}
    70%,100%{box-shadow:-3px 0 0 0 var(--accent-gauche),3px 0 0 0 var(--accent-droite),0 0 0 18px transparent}
  }
  /* taekwondo : le halo part en bleu à gauche et en rouge à droite (les touches des deux camps) */
  @keyframes home-go-halo-camps{
    0%{box-shadow:-3px 0 0 0 var(--accent-gauche),3px 0 0 0 var(--accent-droite),-3px 0 0 0 color-mix(in srgb,var(--accent-gauche) 60%,transparent),3px 0 0 0 color-mix(in srgb,var(--accent-droite) 60%,transparent)}
    70%,100%{box-shadow:-3px 0 0 0 var(--accent-gauche),3px 0 0 0 var(--accent-droite),-14px 0 0 10px transparent,14px 0 0 10px transparent}
  }
  html[data-sport="taekwondo"] .home-go{animation-name:home-go-breathe,home-go-halo-camps}
  @media (prefers-reduced-motion:reduce){ .home-go,.home-go[data-mode="resume"],html[data-sport] .home-go{animation:none} }
  @media(hover:hover){ .home-shortcut:hover{color:var(--text)} }
  /* verrou anti double-appui (cf. lockHome) : coupe tous les appuis 400 ms */
  html.home-lock body{pointer-events:none}
  /* petits écrans : tout tient sans défilement à 360×640 */
  @media(max-height:720px){
    .home-logo-frame{width:auto;height:auto}
    .home-hero{padding-bottom:0;gap:14px}
    .home-sport-nom{margin-top:-2px}
  }
  /* paysage bas : le bloc du sport passe au-dessus du logo (ordre visuel seulement) pour rester visible sans défiler */
  @media(max-height:420px){
    .home-bloc:not(:empty){order:-1;margin-top:0;margin-bottom:12px}
  }

  /* ---------- premier lancement : « Quel est ton sport ? » (mode sport) ---------- */
  .sport-onboarding{
    position:fixed;inset:0;z-index:650;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:calc(24px + env(safe-area-inset-top,0px)) 20px calc(24px + env(safe-area-inset-bottom,0px));
  }
  .sport-onboarding:focus{outline:none}
  .sport-onboarding-page{min-height:100%;max-width:480px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
  .sport-onboarding-logo{align-self:center;height:clamp(84px,16vh,120px);width:auto;object-fit:contain}
  .sport-onboarding-titre{margin:6px 0 6px;font-size:26px;font-weight:800;line-height:1.15;text-align:center}
  .sport-onboarding-titre:focus{outline:none}
  .sport-onboarding-cartes{display:flex;flex-direction:column;gap:12px}
  .sport-carte{
    display:flex;align-items:center;gap:16px;min-height:92px;padding:0 18px;text-align:left;
    background:var(--surface);border:1px solid var(--line);border-radius:18px;color:var(--text);
    font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .sport-carte[aria-checked="true"]{background:var(--surface2);border:2px solid var(--amber);padding:0 17px}
  .sport-carte[aria-disabled="true"]{cursor:default}
  .sport-carte:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  /* couleur seulement sur l'icône : la charte de CHAQUE sport, quel que soit le sport actif */
  .sport-carte-ico{
    flex:none;display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:50%;
    background:var(--surface2);color:var(--muted);
  }
  .sport-carte[data-sport-id="basket"] .sport-carte-ico{background:#F5953F;color:#2a1300}
  .sport-carte[data-sport-id="taekwondo"] .sport-carte-ico{background:#f2f2ef;color:#111113;box-shadow:-3px 0 0 0 #5b8cff,3px 0 0 0 #ff5a67}
  .sport-carte[data-sport-id="football"] .sport-carte-ico{background:#34D27D;color:#04200f}
  .sport-carte[aria-disabled="true"] .sport-carte-ico{opacity:.7}
  .sport-carte-texte{flex:1;min-width:0;display:flex;flex-direction:column}
  .sport-carte-nom{font-family:'Kanit',Inter,sans-serif;font-size:22px;font-weight:700;letter-spacing:.04em;line-height:1.2;color:var(--text)}
  .sport-carte-meta{font-size:11px;font-weight:700;letter-spacing:.1em;color:var(--muted)}
  .sport-carte-coche{flex:none;display:flex;color:var(--amber)}
  .sport-onboarding-espace{flex:1}
  .sport-onboarding-continuer{height:56px;border-radius:16px;font-family:inherit;font-size:16px;font-weight:800;letter-spacing:0}
  @media(max-height:640px){
    .sport-onboarding-logo{height:72px}
    .sport-carte{min-height:76px}
    .sport-carte-ico{width:46px;height:46px}
  }

  /* ---------- Paramètres : sport favori (mode sport) ---------- */
  .settings-sports{display:flex;flex-direction:column;gap:10px;margin-bottom:8px}
  .settings-sport{
    align-items:center;gap:14px;width:100%;min-height:64px;padding:10px 14px;text-align:left;
    color:var(--text);font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .settings-sport[aria-checked="true"]{border-color:var(--amber)}
  .settings-sport[aria-disabled="true"]{cursor:default}
  .settings-sport:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .settings-sport-ico{
    flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;
    background:var(--surface2);color:var(--muted);
  }
  .settings-sport[data-sport-id="basket"] .settings-sport-ico{color:#F5953F}
  .settings-sport[data-sport-id="taekwondo"] .settings-sport-ico{color:#f2f2ef}
  .settings-sport[data-sport-id="football"] .settings-sport-ico{color:#34D27D}
  .settings-sport-coche{flex:none;display:flex;color:var(--amber)}
  .brand-header img{cursor:pointer}

  /* ---------- hamburger button ---------- */
  .hamburger-btn{
    background:var(--surface2);border:1px solid var(--line2);color:var(--text);
    border-radius:10px;padding:9px 14px;cursor:pointer;font-size:22px;line-height:1;
    flex:none;transition:.12s;
  }
  .hamburger-btn:hover{border-color:var(--amber-dim);color:var(--amber)}

  /* ---------- menu overlay + panneau latéral ---------- */
  .menu-overlay{position:fixed;inset:0;z-index:700;background:rgba(var(--scrim-rgb),.6)}
  .menu-overlay.hidden{display:none}
  .hamburger-panel{
    position:fixed;top:0;right:0;bottom:0;width:min(320px,85vw);
    z-index:710;background:var(--bg2);border-left:1px solid var(--line);
    padding:20px 16px 24px;overflow-y:auto;overflow-x:hidden;
    display:flex;flex-direction:column;gap:2px;
    transform:translateX(100%);transition:transform .25s ease;
  }
  .hamburger-panel.open{transform:translateX(0)}
  .hmenu-head{display:flex;align-items:center;justify-content:space-between;flex:none;height:52px}
  .hmenu-logo{height:52px;width:auto;min-width:0;max-width:100%;object-fit:contain}
  .hamburger-close{
    flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;
    background:var(--surface2);border:1px solid var(--line2);border-radius:12px;
    color:var(--text);cursor:pointer;transition:.12s;
  }
  .hmenu-section-label{
    display:flex;align-items:center;gap:10px;margin:22px 4px 6px;
    font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);
  }
  .hmenu-section-label::after{content:"";flex:1;height:1px;background:var(--line)}
  .hmenu-item{
    display:flex;align-items:center;gap:14px;flex:none;width:100%;height:48px;padding:0 8px;
    background:transparent;border:none;border-radius:12px;
    color:var(--text);font-family:inherit;font-size:15px;font-weight:600;text-align:left;cursor:pointer;
    -webkit-tap-highlight-color:transparent;transition:.12s;
  }
  .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}   /* texte pour les lecteurs d'écran seulement */
  a.hmenu-item{text-decoration:none}   /* « Confidentialité » : un lien (nouvel onglet), habillé comme les boutons du menu */
  .hmenu-item:active{background:var(--surface)}
  .hmenu-item:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .hmenu-ico{
    flex:none;display:flex;align-items:center;justify-content:center;width:34px;height:34px;
    border-radius:10px;background:var(--surface2);color:var(--amber);
  }
  .hmenu-item.hmenu-danger,.hmenu-danger .hmenu-ico{color:var(--red)}
  @media(hover:hover){
    .hamburger-close:hover{border-color:var(--amber-dim)}
    .hmenu-item:hover{background:var(--surface)}
  }

  /* ---------- pages internes ---------- */
  .internal-page{position:fixed;inset:0;z-index:720;background:var(--bg);overflow-y:auto;padding:20px 20px 32px}
  .internal-page.hidden{display:none}
  #internal-page .deco-dots{margin:18px 0 20px}
  /* écran Paramètres : raccourcis de l'accueil (cartes .ui-card, boutons .ui-icon-btn) */
  .settings-count{order:1}   /* le compteur passe après le filet de .ui-section */
  .internal-body .settings-empty,.internal-body .settings-full{margin:0 0 12px;font-size:14px;line-height:1.5}
  .settings-main{flex:1;min-width:0;display:flex;align-items:center;gap:14px;padding:12px 6px 12px 12px}
  .settings-card .ui-card-name{display:flex;align-items:center;gap:10px;color:var(--text)}
  .settings-card .ui-card-name svg{flex:none;color:var(--amber)}
  .settings-card .ui-icon-btn{flex:none;align-self:center;margin:0 12px 0 6px}
  .settings-card .ui-icon-btn[aria-pressed="true"]{background:color-mix(in srgb,var(--amber) 15%,transparent);border-color:var(--amber)}
  .settings-card .ui-icon-btn:disabled{opacity:.4;cursor:not-allowed}
  .settings-card .ui-icon-btn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media(hover:hover){ .settings-card .ui-icon-btn:disabled:hover{border-color:var(--line2)} }
  /* écran « Stockage vidéo » (même classe .internal-page) */
  .vs-summary{padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:16px}
  .vs-summary[hidden]{display:none}
  .vs-summary-head{display:flex;align-items:baseline;justify-content:space-between}
  .vs-summary-label{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  .vs-summary-count{font-size:13px;color:var(--muted)}
  .vs-summary-total{margin:6px 0 12px;padding-top:6px;font-family:'Lalezar';font-size:34px;line-height:1;color:var(--amber)}
  .vs-bar{height:8px;border-radius:4px;background:var(--line);overflow:hidden}
  .vs-bar-fill{height:100%;background:var(--amber)}
  .vs-summary-line{margin:8px 0 0;font-size:13px;color:var(--muted)}
  .vs-persist{display:flex;gap:8px;margin:12px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}
  .vs-persist svg{flex:none;margin-top:1px}
  .vs-persist.is-ok svg{color:var(--green)}
  .vs-persist.is-warn svg{color:var(--warn)}
  #video-storage-panel .ui-section{margin:22px 0 12px}
  .vs-card-main{flex:1;min-width:0;display:flex;align-items:center;gap:14px;padding:12px 6px 12px 12px}
  .vs-pad-ico{display:flex;color:var(--amber)}
  /* une section par sport (lot 3) ; carte « pile » : infos, puis une rangée de boutons (Détails, Supprimer tout) ou la raison d'un refus */
  .vs-summary-head{flex-wrap:wrap;gap:2px 12px}
  .vs-summary-label,.vs-insecable{white-space:nowrap}
  .vs-sport + .vs-sport{margin-top:6px}
  .vs-note{margin:0 0 12px}
  .vs-cartes > .ui-card + .ui-card{margin-top:10px}
  .ui-card.vs-card.is-pile{flex-direction:column}
  .vs-card.is-pile .vs-card-main{padding:12px}
  .vs-card-actions{display:flex;gap:8px;padding:0 12px 12px}
  .vs-btn{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 12px;
    background:transparent;border:1px solid var(--line2);border-radius:12px;color:var(--text);
    font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .vs-btn svg{flex:none;color:var(--amber)}
  .vs-btn-details{flex:1 1 0;min-width:0}
  .vs-btn-details svg{transition:transform .15s}
  .vs-btn-details[aria-expanded="true"] svg{transform:rotate(180deg)}
  .vs-btn-tout{flex:1 1 0;min-width:0}
  .vs-btn-del svg{color:var(--red)}
  .vs-btn:disabled{opacity:.6;cursor:default}
  .vs-btn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .vs-refus{display:flex;gap:8px;margin:0;padding:0 12px 12px;font-size:13px;line-height:1.45;color:var(--muted)}
  .vs-refus svg{flex:none;margin-top:1px;color:var(--amber)}
  .vs-details{border-top:1px solid var(--line)}
  .vs-details[hidden]{display:none}
  .vs-enfants{list-style:none;margin:0;padding:0}
  .vs-details > .vs-enfants{padding:4px 12px 8px}
  .vs-enfant + .vs-enfant{border-top:1px solid var(--line)}
  .vs-enfant .vs-enfants{margin:0 0 6px 14px;padding-left:12px;border-left:2px solid var(--line2)}
  .vs-enfant.is-n2 + .vs-enfant.is-n2{border-top:0}
  .vs-ligne{display:flex;align-items:center;gap:10px;padding:8px 0}
  .vs-ligne-texte{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .vs-ligne-nom{font-size:15px;font-weight:700;color:var(--text);overflow-wrap:anywhere}
  .vs-enfant.is-n2 .vs-ligne-nom{font-size:14px;font-weight:600}
  .vs-ligne-meta{font-size:13px;color:var(--muted)}
  .vs-ligne .vs-btn{flex:none}
  @media(hover:hover){
    .vs-btn:hover{border-color:var(--amber-dim)}
    .vs-btn-del:hover{border-color:var(--red);color:var(--red)}
  }
  /* page Jetons (préfixe .internal-body : plus fort que .internal-body p) */
  .token-card{padding:20px;background:rgba(var(--accent-rgb),.1);border:1px solid var(--amber);border-radius:16px}
  .internal-body .token-kicker{margin:0;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--amber)}
  .internal-body .token-big{margin:8px 0 0;font-family:'Anton';font-size:34px;line-height:1.1;color:var(--text)}
  .internal-body .token-text{margin:8px 0 0;font-size:14px;line-height:1.5;color:var(--text)}
  .internal-body .token-note{margin:20px 2px 0;font-size:15px;line-height:1.6;color:var(--muted)}
  .internal-body{font-size:15px;color:var(--muted);line-height:1.7;max-width:640px}
  .internal-body p{margin-bottom:12px}

  /* ---------- formulaire de contact ---------- */
  .contact-form{display:flex;flex-direction:column}
  .contact-form .ui-label{margin-top:16px}
  .contact-form .ui-label:first-child{margin-top:0}
  .contact-message{height:auto;min-height:140px;padding:12px 14px;line-height:1.5;resize:vertical}
  .contact-hint{margin-top:14px}
  .contact-error{margin-top:14px}
  .contact-submit{margin-top:20px}
  .contact-submit:disabled{opacity:.55}
  .contact-error{
    color:var(--red);font-size:13.5px;line-height:1.6;
    background:rgba(var(--red-rgb),.08);border:1px solid rgba(var(--red-rgb),.35);
    border-radius:9px;padding:10px 12px;
  }

  /* ---------- modales (story individuelle) ---------- */
  .card-modal-overlay{
    position:fixed;inset:0;z-index:800;
    background:rgba(var(--scrim-rgb),.96);
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    padding:16px;overflow-y:auto;
  }
  .card-modal-overlay.hidden{display:none}
  .card-modal-inner{
    display:flex;flex-direction:column;align-items:center;gap:14px;
    width:100%;max-width:360px;
  }
  .card-modal-title{
    font-family:'Anton';font-size:20px;font-weight:400;
    color:var(--text);text-align:center;letter-spacing:.5px;
  }
  .card-modal-close{
    background:none;border:1px solid var(--line2);color:var(--muted);
    border-radius:8px;padding:8px 24px;cursor:pointer;font-family:inherit;font-size:13px;transition:.12s;
  }
  .card-modal-close:hover{color:var(--text);border-color:var(--amber-dim)}

  /* ---------- story habillée (match archivé) ---------- */
  /* liste « Stories à partager » d'un match archivé : une ligne cliquable par joueur */
  #archive-section-stories .deco-dots{margin:18px 0}
  .story-list{display:flex;flex-direction:column;gap:8px}
  .story-item{
    display:flex;align-items:center;gap:12px;width:100%;height:60px;padding:0 12px 0 8px;
    background:var(--surface);border:1px solid var(--line);border-radius:14px;
    color:var(--text);text-align:left;font-family:inherit;cursor:pointer;
    -webkit-tap-highlight-color:transparent;transition:.12s;
  }
  .story-item:active{background:var(--surface2)}
  .story-item:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .story-item:disabled{opacity:.6;cursor:wait}
  .story-item-num{
    flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;
    border-radius:10px;background:var(--surface2);border:1px solid var(--line2);
    font-family:'Anton';font-size:18px;color:var(--amber);
  }
  .story-item-name{flex:1;min-width:0;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .story-item-go{flex:none;display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--amber)}
  @media(hover:hover){
    .story-item:hover{border-color:var(--amber-dim)}
  }
  .story-fmt-switch{display:flex;gap:8px;width:100%}
  .story-fmt-btn{
    flex:1;border-radius:9px;padding:9px;cursor:pointer;
    font-family:inherit;font-size:13px;font-weight:600;
    border:1px solid var(--line2);background:var(--surface2);color:var(--muted);transition:.12s;
  }
  .story-fmt-btn.active{background:rgba(var(--accent-rgb),.15);border-color:var(--amber-dim);color:var(--amber)}

  /* ---------- fenêtre STORY : tout doit tenir dans l'écran, sans défilement ----------
     Entièrement limitée à #story-modal. Grille : titre, format, aperçu (prend la
     hauteur restante, image entière), Enregistrer, aide, Fermer. En paysage bas,
     l'aperçu passe à gauche et les commandes en colonne à droite (comme le lecteur
     de clips). Boutons : composants partagés ui-btn-primary / ui-btn-outline. */
  #story-modal{
    position:fixed;inset:0;z-index:800;background:var(--viewer-bg);
    display:flex;align-items:center;justify-content:center;
    padding:calc(12px + env(safe-area-inset-top,0px)) 16px calc(12px + env(safe-area-inset-bottom,0px));
  }
  #story-modal:focus{outline:none}
  #story-modal.hidden{display:none}
  #story-modal .story-panel{
    display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto;
    grid-template-areas:"head" "fmt" "img" "save" "close";
    gap:10px;width:100%;max-width:400px;height:100%;
  }
  #story-modal .story-title{
    grid-area:head;margin:0;text-align:center;
    font-family:'Anton';font-size:22px;font-weight:400;letter-spacing:.4px;line-height:1.4;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  #story-modal .story-fmt-switch{grid-area:fmt}
  #story-modal .story-fmt-btn{height:44px;padding:0 6px;font-size:14px}
  #story-modal .story-fmt-btn:focus-visible,
  #story-modal .ui-btn-primary:focus-visible,
  #story-modal .ui-btn-outline:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  #story-modal .story-preview{
    grid-area:img;min-height:0;min-width:0;
    display:flex;align-items:center;justify-content:center;
  }
  #story-modal .story-preview img{
    display:block;width:auto;height:auto;max-width:100%;max-height:100%;
    object-fit:contain;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.7);
  }
  #story-modal .ui-btn-primary{grid-area:save;height:48px;font-size:18px}
  #story-modal .ui-btn-primary span{min-width:0}
  #story-modal .ui-btn-outline{grid-area:close;height:48px;background:var(--surface2)}
  #story-modal .ui-btn-outline span{min-width:0}
  @media (orientation:landscape) and (max-height:600px){
    #story-modal{padding:calc(8px + env(safe-area-inset-top,0px)) calc(12px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) calc(12px + env(safe-area-inset-left,0px))}
    #story-modal .story-panel{
      max-width:none;grid-template-columns:minmax(0,1fr) 268px;grid-template-rows:auto auto auto minmax(0,1fr);
      grid-template-areas:"img head" "img fmt" "img save" "img close";gap:8px 14px;
    }
    #story-modal .story-title{font-size:19px}
    #story-modal .ui-btn-outline{align-self:start}
  }
  @media(hover:hover){
    #story-modal .story-fmt-btn:not(.active):hover{border-color:var(--amber-dim);color:var(--text)}
    #story-modal .ui-btn-outline:hover{border-color:var(--amber-dim)}
  }

  /* ---------- zone haute figée : titre + caméra ---------- */
  #match-top-fixed{
    position:sticky;top:0;z-index:190;
    background:var(--bg);padding-top:2px;padding-bottom:8px;
  }

  .cam-zone{display:grid;grid-template-columns:1fr 1fr;gap:10px;height:40vh}
  @media(orientation:landscape){.cam-zone{height:22vh;min-height:170px}}
  .cam-zone-video{
    position:relative;border-radius:12px;overflow:hidden;
    border:1px solid var(--line2);background:#000;min-height:0;
  }
  #cam-preview{width:100%;height:100%;object-fit:cover;display:block}
  #cam-preview.hidden{display:none}
  .cam-placeholder{
    position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;
    justify-content:center;gap:6px;background:var(--surface);color:var(--muted);
    font-size:12px;text-align:center;cursor:pointer;line-height:1.5;transition:.12s;
  }
  .cam-placeholder:hover{color:var(--amber)}
  .cam-placeholder.hidden{display:none}
  .cam-zone-controls{display:flex;flex-direction:column;gap:8px;justify-content:center;min-height:0}
  .cam-status-text{font-size:10px;color:var(--muted);line-height:1.4}

  /* ============================================================================
     MODE PLEIN ÉCRAN CAMÉRA (#cam-fullscreen)
     ----------------------------------------------------------------------------
     Volontairement un enfant DIRECT de <body> (pas de #match-top-fixed / .wrap) :
     ces ancêtres posent position:sticky+z-index (cf. #match-top-fixed, z190),
     ce qui crée un contexte d'empilement propre — un descendant position:fixed
     y resterait plafonné à ce z190 et se ferait recouvrir par #express-panel
     (z200, un FRÈRE de .wrap dans le document). En restant au niveau racine du
     <body>, #cam-fullscreen peut se poser franchement au-dessus de toute
     l'interface de match (z260 : > #match-top-fixed 190 et #express-panel 200)
     tout en restant SOUS les fenêtres de qualification/#exp-toast/menus
     (.modal-overlay 500, #exp-toast 300, #setup-overlay 400, etc.), qui doivent
     pouvoir s'ouvrir PAR-DESSUS lui sans rien changer à leur propre z-index.
     Le <video> ici présent est un SECOND élément vidéo qui reçoit le MÊME
     objet MediaStream que #cam-preview (cf. syncCamfsUI plus bas dans le
     script) — aucun nouvel appel à getUserMedia, aucun MediaRecorder recréé :
     un MediaStream peut alimenter plusieurs <video> à la fois, et
     l'enregistrement (MediaRecorder + tampon glissant) ne dépend d'aucun
     élément <video>, seulement du flux caméra lui-même. */
  #cam-fullscreen{position:fixed;inset:0;z-index:260;background:#000;overflow:hidden}
  #cam-fullscreen.hidden{display:none}
  #cam-fullscreen-preview{
    position:absolute;inset:0;width:100%;height:100%;
    object-fit:contain; /* image COMPLÈTE, sans recadrage ni déformation */
    background:#000;display:block;
  }
  .camfs-placeholder{
    position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;
    justify-content:center;gap:8px;color:var(--muted);font-size:13px;text-align:center;
    padding:0 30px;
  }
  .camfs-placeholder.hidden{display:none}

  /* ---------- plein écran caméra : image dégagée + bande de commandes (maquettes validées) ----------
     L'image n'est jamais recouverte par la bande : seuls les trois boutons
     du haut et, en portrait, le zoom sont posés dessus.
     Disposition : #cam-fullscreen est une boîte flex, en colonne en
     portrait (image en haut, bande en bas) et en ligne en paysage (image à
     gauche, rail de 168 px à droite). Dans la bande : une grille en
     portrait, une colonne flex en paysage. Aucun JS : la bascule
     d'orientation suit les media queries. */
  #cam-fullscreen{display:flex;flex-direction:column}
  .camfs-stage{position:relative;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;background:#000}
  #cam-fullscreen-preview{object-position:50% 0}
  .camfs-placeholder{gap:8px;font-size:13px;color:var(--muted)}
  .camfs-placeholder svg{flex:none;color:var(--amber)}

  /* boutons du haut, posés sur l'image : Retour, REC, Arrêter / Démarrer */
  .camfs-overlay-top{
    position:absolute;z-index:2;
    top:calc(12px + env(safe-area-inset-top,0px));
    left:calc(12px + env(safe-area-inset-left,0px));
    right:calc(12px + env(safe-area-inset-right,0px));
    display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;
  }
  .camfs-pill{
    display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 14px;border-radius:22px;
    background:rgba(var(--scrim-rgb),.78);border:none;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .camfs-pill svg{flex:none}
  .camfs-pill:disabled{opacity:.5;cursor:default}
  .camfs-pill-back{grid-column:1;justify-self:start}
  .camfs-rec{
    grid-column:2;justify-self:center;display:none;align-items:center;gap:6px;height:28px;padding:0 10px;
    border-radius:14px;background:rgba(var(--scrim2-rgb),.6);color:var(--text);
    font-size:12px;font-weight:700;letter-spacing:.08em;line-height:1;
  }
  .camfs-rec::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--red)}
  #cam-fullscreen:has(#camfsToggleBtn.running) .camfs-rec{display:inline-flex}
  .camfs-pill-toggle{grid-column:3;justify-self:end}
  .camfs-pill-toggle .camfs-ico-start{color:var(--amber)}
  .camfs-pill-toggle .camfs-ico-stop{display:none;color:var(--red)}
  .camfs-pill-toggle.running .camfs-ico-start{display:none}
  .camfs-pill-toggle.running .camfs-ico-stop{display:block}

  /* bande de commandes — portrait : NOUVELLE ACTION et Temps fort, puis le
     bloc « Dernière action » et « Saisies » */
  .camfs-bar{
    position:relative;flex:none;background:var(--bg2);border-top:1px solid var(--line);
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px;gap:8px;
    padding:10px calc(16px + env(safe-area-inset-right,0px)) max(10px, env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left,0px));
  }
  .camfs-action{
    grid-column:1 / -1;grid-row:1;display:flex;align-items:center;justify-content:center;gap:12px;
    height:80px;padding:0 12px;border:none;border-radius:18px;background:var(--amber);color:var(--on-accent);
    font-family:'Anton';font-size:26px;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;
    cursor:pointer;transition:transform .1s,filter .1s;-webkit-tap-highlight-color:transparent;user-select:none;
  }
  .camfs-action svg{flex:none}
  .camfs-action:active{transform:scale(.98);filter:brightness(.92)}
  .camfs-ctrl{
    display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;height:44px;padding:0 8px;
    background:transparent;border:1px solid var(--line2);border-radius:12px;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;
  }
  .camfs-ctrl svg{flex:none;color:var(--amber)}
  .camfs-ctrl:disabled{opacity:.4;cursor:default;pointer-events:none}
  /* rangée du bas : bloc « Dernière action », puis « Saisies » (56 px) */
  .camfs-last{grid-row:2;grid-column:1 / 3;padding:8px 6px 8px 10px;gap:8px}
  .camfs-last .da-btns{gap:4px}
  .camfs-last .da-ib{width:44px;height:44px}
  .camfs-last .da-k{font-size:10px;letter-spacing:.02em}
  .camfs-last .da-v{font-size:14px}
  .camfs-last .da-l{display:none}
  .camfs-last .da-c{display:inline}
  #camfsAllEntriesBtn{grid-row:2;grid-column:3;height:auto;flex-direction:column;gap:2px;padding:0 4px;font-size:12px}

  /* zoom − valeur + : en portrait, posé sur l'image en bas à droite
     (12 px au-dessus du haut de la bande) */
  .camfs-zoom-group{
    position:absolute;right:calc(12px + env(safe-area-inset-right,0px));bottom:calc(100% + 12px);
    display:flex;align-items:center;height:44px;border-radius:22px;background:rgba(var(--scrim-rgb),.78);
  }
  .camfs-zoom-group.hidden{display:none}
  .camfs-zoom-step{
    flex:none;width:44px;height:100%;padding:0;display:flex;align-items:center;justify-content:center;
    background:transparent;border:none;border-radius:22px;color:var(--amber);cursor:pointer;
  }
  .camfs-zoom-step:disabled{opacity:.4;cursor:default}
  .camfs-zoom-val{flex:none;min-width:48px;text-align:center;font-size:13px;font-weight:700;color:var(--text)}

  /* paysage : image à gauche (calée en haut à gauche), rail à droite ;
     de haut en bas : Saisies, NOUVELLE ACTION (prend le reste), Annuler,
     Corriger, zoom. Le rail ne défile jamais. */
  @media(orientation:landscape){
    #cam-fullscreen{flex-direction:row}
    #cam-fullscreen-preview{object-position:0 0}
    .camfs-overlay-top{display:flex;justify-content:flex-start;right:auto}
    .camfs-bar{
      width:calc(168px + env(safe-area-inset-right,0px));border-top:none;border-left:1px solid var(--line);
      display:flex;flex-direction:column;gap:8px;overflow:hidden;
      padding:max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) 10px;
    }
    .camfs-action{
      flex:1 1 auto;min-height:64px;height:auto;flex-direction:column;gap:4px;padding:8px;
      font-size:22px;line-height:1.1;white-space:normal;text-align:center;
    }
    .camfs-ctrl{flex:none;width:100%}
    .camfs-zoom-group{
      position:static;flex:none;width:100%;justify-content:space-between;
      background:transparent;border:1px solid var(--line2);border-radius:12px;
    }
  }
  /* paysage très bas (ex. 746×273 : S25 dans Chrome, barres visibles,
     Annuler + Corriger + zoom affichés) : NOUVELLE ACTION descend à ~89 px,
     trop peu pour l'icône + deux lignes (~96 px) ; l'icône s'efface,
     « NOUVELLE » / « ACTION » restent entiers. Dès 780×304, l'icône tient. */
  @media(orientation:landscape) and (max-height:290px){
    .camfs-action svg{display:none}
    .camfs-action{line-height:1}
  }

  /* ============================================================================
     INTERFACE DE MATCH EN DIRECT — DEUX ZONES FIGÉES, AUCUN DÉFILEMENT DE PAGE
     ----------------------------------------------------------------------------
     La feuille de stats + le journal sont sortis du flux (#match-offscreen).
     Il ne reste que DEUX zones qui se partagent la hauteur visible :
        • .wrap          = zone HAUTE  (barre de titre + caméra)
        • #express-panel = zone BASSE  (saisie express + NOUVELLE ACTION)
     Les deux sont en position:fixed => le <body> ne défile jamais. Si une zone
     manque de place sur un petit écran, elle défile DANS son propre cadre
     (overflow interne), la page globale reste figée.
     ============================================================================ */
  #match-offscreen{display:none !important}

  @media(orientation:portrait){
    html,body{height:100%;overflow:hidden}
    body{padding:0}

    /* --- ZONE HAUTE : barre de titre + caméra, figée sur le haut de l'écran --- */
    .wrap{
      position:fixed; top:0; left:0; right:0;
      height:52vh; height:52dvh;
      max-width:none; margin:0;
      padding:8px 12px 6px;
      display:flex; flex-direction:column;
      overflow-y:auto; overflow-x:hidden;
      background:var(--bg); z-index:190;
    }
    .brand-header{flex:none; padding:0 0 6px; margin:0}
    #match-top-fixed{
      position:static; z-index:auto;
      flex:1 1 auto; min-height:0;
      display:flex; flex-direction:column;
      padding:0;
    }
    .cam-zone{flex:1 1 auto; min-height:190px; height:auto}

    /* --- ZONE BASSE : saisie express, figée sur le bas de l'écran --- */
    #express-panel{height:48vh; height:48dvh}
    body{padding-bottom:0}
    #exp-toast{bottom:calc(48dvh + 10px); top:auto}
  }

  @media(orientation:landscape){
    /* La feuille de stats étant retirée, la colonne gauche (titre + caméra)
       tient sans défilement. On verrouille le <body> et, au cas où l'écran
       serait très bas, c'est .wrap qui défile dans son cadre — pas la page.
       #express-panel reste le rail vertical de droite déjà défini plus haut. */
    html,body{overflow:hidden}
    .wrap{max-height:100vh; max-height:100dvh; overflow-y:auto; overflow-x:hidden}
    .brand-header{padding:8px 0 10px}
  }

  /* ---------- écran de match : saisie express (maquette validée) ----------
     Les hauteurs 52 / 48 dvh et le rail paysage à 34vw (plus haut) ne
     changent pas : seul l'habillage du panneau et de ses boutons est ici. */
  #express-panel{background:var(--bg2);border-top:1px solid var(--line);gap:10px;padding:14px 16px max(18px, env(safe-area-inset-bottom))}
  @media(orientation:portrait){
    #express-panel{border-radius:22px 22px 0 0}
  }
  @media(orientation:landscape){
    #express-panel{border-top:none;border-left:1px solid var(--line)}
  }
  #express-panel .exp-header{gap:12px}
  #express-panel .exp-title{flex:1;min-width:0;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  /* pastille d'état : en ::before, car setExpStatus() réécrit le textContent */
  #express-panel .exp-status{
    display:inline-flex;align-items:center;gap:6px;padding:0;border:none;border-radius:0;background:none;
    font-size:12px;font-weight:700;color:var(--green);
  }
  #express-panel .exp-status::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:currentColor}
  #express-panel .exp-status.armed{color:var(--amber);border:none;background:none}
  #express-panel .ui-btn-outline{flex-shrink:0;height:44px;padding:0 12px;font-size:14px;white-space:nowrap}
  #express-panel .ui-btn-outline:disabled{opacity:.4;cursor:default;pointer-events:none}
  #express-panel .new-action-btn{
    display:flex;align-items:center;justify-content:center;gap:12px;
    height:96px;padding:0 16px;border-radius:18px;font-size:28px;
    box-shadow:none;transition:transform .1s,filter .1s;
  }
  #express-panel .new-action-btn svg{flex:none}
  #express-panel .new-action-btn:active{transform:scale(.98);filter:brightness(.92);box-shadow:none}
  @media(orientation:portrait) and (max-height:700px){
    #express-panel{gap:8px}
    #express-panel .new-action-btn{height:80px}
    #express-panel .ui-btn-outline{height:40px}
  }
  /* paysage (rail étroit) : NOUVELLE ACTION peut passer sur deux lignes,
     centrée, sans jamais déborder ; bloc « Dernière action » sur UNE ligne
     comme en portrait (58 px de haut, pas plus haut que l'ancienne rangée
     Annuler · Corriger) : « #4 · 2 pts », boutons de 44 px ; sous 44 px
     de place (rail de 640 px de large), le texte s'efface, les boutons
     restent */
  @media(orientation:landscape){
    #express-panel .new-action-btn{flex-direction:column;gap:4px;height:auto;min-height:96px;padding:10px 12px;text-align:center;line-height:1.1}
    #express-panel .new-action-btn span{min-width:0}
    #express-panel .da-bloc{gap:6px;padding:6px 6px 6px 10px}
    #express-panel .da-txt{container-type:inline-size}
    #express-panel .da-btns{gap:4px}
    #express-panel .da-ib{width:44px;height:44px}
    #express-panel .da-k{font-size:10px;letter-spacing:.04em}
    #express-panel .da-v{font-size:13px}
    #express-panel .da-nom,
    #express-panel .da-l{display:none}
    #express-panel .da-c{display:inline}
    /* sans prénom, rien d'autre ne se coupe : le libellé prend toute la place restante */
    #express-panel .da-act{flex:0 1 auto;min-width:0;max-width:none}
    @container (max-width:44px){
      #express-panel .da-k,
      #express-panel .da-v{display:none}
    }
  }

  /* ---------- « Temps fort » (basket) : éclair à droite de NOUVELLE ACTION, case
     dans « Quelle action ? » (saisie en direct seulement), fenêtre « Qui ? » ----------
     Éclair en contour (jamais plein) pour ne pas concurrencer NOUVELLE ACTION ;
     le jaune ne sert qu'à l'icône, aux bordures et aux cases cochées. */
  .exp-action-row{display:flex;gap:10px;flex-shrink:0}
  #express-panel .exp-action-row .new-action-btn{flex:1 1 auto;width:auto;min-width:0}
  .tf-btn{
    flex:0 0 84px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
    min-width:0;padding:6px 4px;box-sizing:border-box;border:2px solid var(--eclair);border-radius:18px;
    background:transparent;color:var(--text);font-family:inherit;font-size:13px;font-weight:700;line-height:1.15;
    text-align:center;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;transition:transform .1s;
  }
  .tf-btn svg{flex:none;color:var(--eclair)}
  .tf-btn:active{transform:scale(.97)}
  .tf-btn:focus-visible{outline:2px solid var(--eclair);outline-offset:2px}
  @media(orientation:landscape){
    .tf-btn{flex-basis:68px;border-radius:16px}
    /* rail étroit : « NOUVELLE » / « ACTION » sur deux lignes ; l'icône caméra
       s'efface pour garder la hauteur d'avant (96 px au lieu de 114) */
    #express-panel .exp-action-row .new-action-btn svg{display:none}
  }
  /* portrait étroit (moins de 390 px) : « NOUVELLE ACTION » reste sur une
     ligne à côté de l'éclair (à 28 px, il passait sur deux lignes et
     débordait de 2 px à 360 × 640) */
  @media(orientation:portrait) and (max-width:389px){
    #express-panel .exp-action-row .new-action-btn{font-size:23px;gap:8px;padding:0 12px}
  }

  /* plein écran — portrait : rangée NOUVELLE ACTION + éclair (80 × 80), la
     bande ne grandit pas ; rangée suivante inchangée */
  .camfs-action-row{grid-column:1 / -1;grid-row:1;display:flex;gap:8px;min-width:0}
  .camfs-action-row .camfs-action{flex:1 1 auto;min-width:0}
  .camfs-tf{
    flex:0 0 80px;height:80px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    min-width:0;padding:4px;box-sizing:border-box;border:2px solid var(--eclair);border-radius:18px;background:transparent;
    color:var(--text);font-family:inherit;font-size:12px;font-weight:700;line-height:1.1;text-align:center;white-space:nowrap;
    cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;transition:transform .1s;
  }
  .camfs-tf svg{flex:none;color:var(--eclair)}
  .camfs-tf:active{transform:scale(.97)}
  /* paysage : le rail devient une grille de 2 colonnes ; en haut Saisies et
     Temps fort côte à côte (52 px, icône au-dessus du libellé, comme Annuler
     et Corriger), puis NOUVELLE ACTION (le reste), Annuler + Corriger, zoom */
  @media(orientation:landscape){
    .camfs-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto minmax(0,1fr)}
    .camfs-action-row{display:contents}
    #camfsAllEntriesBtn{grid-row:1;grid-column:1;height:52px;flex-direction:column;gap:2px;padding:0 4px;font-size:12px}
    .camfs-tf{grid-row:1;grid-column:2;width:auto;height:52px;gap:2px;padding:0 2px;border-radius:12px}
    .camfs-tf svg{width:20px;height:20px}
    .camfs-action{grid-row:2;grid-column:1 / -1}
    /* bloc « Dernière action » du rail : « #4 · 2 points » au-dessus des
       trois boutons de 44 px */
    .camfs-last{grid-row:3;grid-column:1 / -1;flex-direction:column;align-items:stretch;gap:6px;padding:6px 5px}
    .camfs-last .da-txt{padding:0 3px}
    .camfs-last .da-k{font-size:10px;letter-spacing:.08em}
    .camfs-last .da-v{font-size:13px;margin-top:1px}
    .camfs-last .da-nom{display:none}
    .camfs-last .da-l{display:inline}
    .camfs-last .da-c{display:none}
    .camfs-last .da-btns{justify-content:space-between;gap:2px}
    .camfs-last .da-ib{width:44px;height:44px}
    .camfs-zoom-group{grid-row:4;grid-column:1 / -1}
  }

  /* ---------- saisie d'équipe du catalogue (« But encaissé », football ; jamais au basket : bouton caché par le
     catalogue, saisieAdverse, js/02 matchMajSport) ----------
     Écran de match : à droite de Highlights, même rangée, aucune hauteur en plus. Plein écran : la rangée du match
     (#camfs-match) ; portrait, une rangée au-dessus de NOUVELLE ACTION ; paysage, une rangée de 44 px sous Saisies et
     Temps fort. L'image n'est jamais recouverte. */
  .exp-hl-row{display:flex;gap:10px;flex-shrink:0;min-width:0}
  #express-panel .exp-hl-row > .ui-btn-outline{flex:1 1 0;min-width:0}
  #express-panel .exp-hl-row > .ui-btn-outline > span{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .exp-hl-row > [hidden],
  .camfs-match[hidden],
  .camfs-match > [hidden]{display:none}
  .exp-adverse svg,.camfs-adverse svg{color:var(--red)}
  /* paysage (rail de 34vw) : Highlights et But encaissé l'un sous l'autre, en entier (côte à côte, ils seraient coupés) */
  @media(orientation:landscape){
    #express-panel .exp-hl-row.avec-adverse{flex-direction:column;gap:8px}
    #express-panel .exp-hl-row.avec-adverse > .ui-btn-outline{flex:none}
  }
  .camfs-match{grid-column:1 / -1;grid-row:1;display:flex;gap:8px;min-width:0}
  .camfs-match .camfs-adverse{flex:0 0 auto;padding:0 14px}
  .camfs-match .camfs-score:not([hidden]) + .camfs-adverse{flex:0 0 auto}
  .camfs-match .camfs-score[hidden] + .camfs-adverse{flex:1 1 auto}
  /* score en direct : « NOISY [2 - 1] BONDY », les noms se coupent (…), le score jamais */
  .camfs-score{
    flex:1 1 auto;min-width:0;height:44px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;
    gap:8px;padding:0 10px;border:1px solid var(--line2);border-radius:12px;background:var(--surface);
  }
  .camfs-score .sc-nom{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700;color:var(--text)}
  .camfs-score .sc-lu{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .camfs-score .sc-val{flex:none;font-family:'Anton';font-size:24px;line-height:1;color:var(--accent);white-space:nowrap;font-variant-numeric:tabular-nums}
  #cam-fullscreen.avec-match .camfs-action-row{grid-row:2}
  #cam-fullscreen.avec-match .camfs-last,
  #cam-fullscreen.avec-match #camfsAllEntriesBtn{grid-row:3}
  /* paysage (rail de 168 px), à TOUTES les hauteurs : de haut en bas, le score ; Saisies, Temps fort et But encaissé sur
     UNE rangée de trois boutons icônes de 44 px (libellés gardés pour les lecteurs d'écran, aria-label et title) ;
     NOUVELLE ACTION (le reste, jamais recouvert : la piste peut rétrécir, le bouton ne déborde plus sur la suite) ;
     Dernière action ; zoom. Mesures : 780×360 et 740×330 (S25, appli et onglet Chrome), 844×390. */
  @media(orientation:landscape){
    #cam-fullscreen.avec-match .camfs-bar{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto auto minmax(0,1fr)}
    #cam-fullscreen.avec-match .camfs-match{display:contents}
    #cam-fullscreen.avec-match .camfs-score{grid-row:1;grid-column:1 / -1;height:40px;gap:5px;padding:0 6px}
    #cam-fullscreen.avec-match .camfs-score .sc-nom{font-size:12px}
    #cam-fullscreen.avec-match .camfs-score .sc-val{font-size:20px}
    #cam-fullscreen.avec-match #camfsAllEntriesBtn{grid-row:2;grid-column:1;height:44px;padding:0}
    #cam-fullscreen.avec-match .camfs-tf{grid-row:2;grid-column:2;height:44px;padding:0}
    #cam-fullscreen.avec-match .camfs-adverse{grid-row:2;grid-column:3;height:44px;padding:0}
    #cam-fullscreen.avec-match #camfsAllEntriesBtn span,
    #cam-fullscreen.avec-match .camfs-tf span,
    #cam-fullscreen.avec-match .camfs-adverse span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
    #cam-fullscreen.avec-match .camfs-action{grid-row:3;min-height:0}
    #cam-fullscreen.avec-match .camfs-last{grid-row:4}
    #cam-fullscreen.avec-match .camfs-zoom-group{grid-row:5}
  }
  /* paysage jusqu'à 400 px de haut : NOUVELLE ACTION a de 72 à 110 px ; l'icône passe à gauche de « NOUVELLE » / « ACTION »
     (en colonne, il faudrait 96 px) */
  @media(orientation:landscape) and (max-height:400px){
    #cam-fullscreen.avec-match .camfs-action{flex-direction:row;gap:8px;padding:6px 8px;text-align:left;line-height:1.05}
    #cam-fullscreen.avec-match .camfs-action span{min-width:0;overflow-wrap:normal;word-break:normal;hyphens:none}
  }
  /* paysage jusqu'à 370 px de haut (S25 : 360 dans l'appli, 330 dans l'onglet Chrome) : rangées serrées de 6 px et bloc
     « Dernière action » sans son titre visible (gardé pour les lecteurs d'écran) : la saisie, puis les trois boutons */
  @media(orientation:landscape) and (max-height:370px){
    #cam-fullscreen.avec-match .camfs-bar{gap:6px}
    #cam-fullscreen.avec-match .camfs-last{gap:4px}
    #cam-fullscreen.avec-match .camfs-last .da-k{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
    #cam-fullscreen.avec-match .camfs-last .da-v{margin-top:0}
  }
  /* paysage jusqu'à 320 px de haut : score de 34 px, rangées de 4 px, libellé en 20 px : NOUVELLE ACTION garde 72 px
     jusque vers 310 px avec le zoom ; plus bas (746×273 avec le zoom : environ 57 px), « NOUVELLE » / « ACTION » tiennent
     encore entiers, sans rien recouvrir */
  @media(orientation:landscape) and (max-height:320px){
    #cam-fullscreen.avec-match .camfs-bar{gap:4px}
    #cam-fullscreen.avec-match .camfs-score{height:34px}
    #cam-fullscreen.avec-match .camfs-action{font-size:20px;line-height:1;padding:4px 8px}
  }
  /* sous 290 px, l'icône s'efface (règle commune plus haut) : le libellé se recentre */
  @media(orientation:landscape) and (max-height:290px){
    #cam-fullscreen.avec-match .camfs-action{text-align:center}
  }
  /* paysage très bas (746×273 : S25 dans Chrome, barres visibles) : le plein
     écran est le SEUL écran de match, la saisie reste donc lisible : titre
     « Dernière action » lu par les lecteurs d'écran seulement, saisie sur une
     ligne en 12 px (coupée par « … »), à côté des trois boutons */
  @media(orientation:landscape) and (max-height:300px){
    .camfs-last .da-k{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
    .camfs-last .da-v{font-size:12px;margin-top:0;line-height:1.2}
  }

  /* ============================================================================
     ÉCRAN DE MATCH UNIQUE (chantier « écran de match unique » : js/11, index.html)
     ----------------------------------------------------------------------------
     Le plein écran caméra est l'UNIQUE écran de match des sports d'équipe. L'écran normal (.wrap, #express-panel) reste dans
     le DOM (CameraModule lit #cam-preview, camStartBtn, camStopBtn, #cam-status ; les relais de js/11 cliquent ses vrais
     boutons) mais n'est JAMAIS montré : ni pendant un match, ni en flash entre deux écrans (hideHome, Historique, autres
     briques : leurs écrans sont opaques, le fond de la page est celui de l'app). visibility (et non display:none) : les
     éléments restent rendus (aperçu vidéo, dimensions lues pour la rotation), mais invisibles, hors du focus et des lecteurs
     d'écran. */
  .wrap,#express-panel{visibility:hidden !important}

  /* « Plus » : en portrait, pastille ronde de 44 px à la place de Retour (sur l'image, en haut à gauche) ; en paysage, en haut du
     rail (#camfsPlusRailBtn). */
  .camfs-pill-plus{grid-column:1;justify-self:start;width:44px;padding:0;justify-content:center}
  .camfs-plus-rail{display:none}
  @media(orientation:landscape){
    .camfs-pill-plus{display:none}
    /* rail (basket) : en haut, Saisies, Temps fort et Plus en UNE rangée de trois boutons icônes de 44 px (libellés gardés pour
       les lecteurs d'écran, comme la rangée du football), puis NOUVELLE ACTION, Dernière action, zoom : le rail ne grandit pas */
    .camfs-bar{grid-template-columns:repeat(3,minmax(0,1fr))}
    .camfs-plus-rail{display:flex;grid-row:1;grid-column:3;height:44px;padding:0}
    #camfsAllEntriesBtn{grid-column:1;height:44px;padding:0}
    .camfs-tf{grid-column:2;height:44px;padding:0}
    #camfsAllEntriesBtn span,.camfs-tf span,.camfs-plus-rail span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
    /* football (rangée du match) : le score partage la première rangée avec Plus ; sur ces 96 px, les noms des équipes ne
       tiendraient qu'en « F… » : seul le score est montré (les noms restent lus par les lecteurs d'écran, .sc-lu, et sont écrits en
       entier en tête de la feuille « Plus ») */
    #cam-fullscreen.avec-match .camfs-score{grid-column:1 / 3}
    #cam-fullscreen.avec-match .camfs-score .sc-nom{display:none}
    #cam-fullscreen.avec-match .camfs-plus-rail{grid-row:1;grid-column:3;height:40px}
  }
  @media(orientation:landscape) and (max-height:320px){
    #cam-fullscreen.avec-match .camfs-plus-rail{height:34px}
  }

  /* caméra arrêtée (ou flux perdu) : titre, message de CameraModule (refus, non supportée, reprise ratée) et « Démarrer la caméra » */
  .camfs-placeholder .camfs-ph-titre{font-size:14px;font-weight:700;color:var(--text)}
  .camfs-cam-status{max-width:420px;font-size:13px;line-height:1.4;color:var(--text)}
  .camfs-cam-status:empty{display:none}
  .camfs-start.ui-btn-outline{width:auto;height:48px;padding:0 18px;margin-top:4px;background:rgba(var(--scrim-rgb),.78);color:var(--text)}
  .camfs-start.ui-btn-outline:disabled{opacity:.5;cursor:default}
  /* le rail (portrait : la bande du bas) garde le haut ; en paysage très bas, le cadre reste lisible */
  @media(orientation:landscape) and (max-height:360px){
    .camfs-placeholder > svg:first-child{display:none}
  }

  /* feuille « Plus » (#match-plus) : au-dessus du plein écran (260), sous #exp-toast (300) et les fenêtres (500, 2000) ; portrait,
     feuille du bas ; paysage, panneau à droite, sur toute la hauteur */
  #match-plus{position:fixed;inset:0;z-index:270;display:flex;align-items:flex-end;justify-content:center}
  #match-plus.hidden{display:none}
  .match-plus-voile{position:absolute;inset:0;background:rgba(var(--scrim-rgb),.72)}
  .match-plus-carte{
    position:relative;width:100%;max-width:560px;max-height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;
    background:var(--bg2);border-top:1px solid var(--line);border-radius:22px 22px 0 0;
    padding:18px calc(16px + env(safe-area-inset-right,0px)) max(20px, env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left,0px));
  }
  .match-plus-tete{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}
  .match-plus-txt{flex:1;min-width:0}
  .match-plus-txt .ui-kicker{margin-bottom:4px}
  .match-plus-titre{
    font-family:'Anton';font-weight:400;font-size:24px;line-height:1.2;color:var(--text);overflow-wrap:anywhere;outline:none;
  }
  .match-plus-titre:focus-visible{outline:2px solid var(--amber);outline-offset:2px;border-radius:6px}
  .match-plus-titre.is-score{display:flex;align-items:center;gap:10px;white-space:nowrap}
  .match-plus-titre.is-score .mt-nom{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .match-plus-titre.is-score .mt-score{
    flex:none;padding:0 10px;border-radius:10px;background:rgba(var(--accent-rgb),.14);color:var(--accent);
    font-size:26px;line-height:1.25;font-variant-numeric:tabular-nums;
  }
  .match-plus-score{margin-top:4px;font-size:14px;font-weight:600;color:var(--text)}
  .match-plus-fermer{flex:none;color:var(--text)}
  .match-plus-liste{display:flex;flex-direction:column;gap:8px}
  .match-plus-item.ui-btn-outline{justify-content:flex-start;gap:12px;height:52px;padding:0 14px;font-size:16px;text-align:left}
  .match-plus-item .mp-lib{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .match-plus-item .mp-nb{
    flex:none;min-width:28px;height:28px;padding:0 8px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;
    background:var(--surface2);color:var(--text);font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;
  }
  .match-plus-item:focus-visible,.match-plus-fermer:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .match-plus-item:active{background:var(--surface)}
  @media(hover:hover){
    .match-plus-item:hover{border-color:var(--amber-dim);background:var(--surface)}
    .match-plus-fermer:hover{border-color:var(--amber-dim)}
  }
  @media(orientation:landscape){
    #match-plus{align-items:stretch;justify-content:flex-end}
    .match-plus-carte{
      width:min(380px, 100%);max-width:none;height:100%;border-top:none;border-left:1px solid var(--line);border-radius:22px 0 0 22px;
      padding:max(14px, env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right,0px)) max(14px, env(safe-area-inset-bottom)) 16px;
    }
    .match-plus-tete{margin-bottom:10px}
    .match-plus-titre{font-size:22px}
    .match-plus-item.ui-btn-outline{height:48px}
    .match-plus-liste{gap:6px}
  }

  /* case « Temps fort » de « Quelle action ? » : portrait, une ligne au-dessus
     des actions ; paysage, petite case à cocher dans la ligne du titre, à
     gauche d'« Annuler » (la grille des actions reste celle d'avant) :
     aucune hauteur en plus */
  #new-action-stat-modal .tf-case-action{
    position:relative;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;margin:14px 0 0;padding:0 14px;
    box-sizing:border-box;border:1px solid var(--line2);border-radius:14px;background:var(--surface);color:var(--text);
    font-family:inherit;font-size:15px;font-weight:700;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;
  }
  #new-action-stat-modal .tf-case-action > span:not(.tf-coche){flex:1 1 auto;min-width:0}
  #new-action-stat-modal .tf-case-action > svg{flex:none;color:var(--eclair)}
  #new-action-stat-modal .tf-case-action[aria-pressed="true"]{border-color:var(--eclair);background:rgba(var(--eclair-rgb),.12)}
  #new-action-stat-modal .tf-case-action[aria-pressed="true"] .tf-coche{background:var(--eclair);border-color:var(--eclair)}
  #new-action-stat-modal .tf-case-action[aria-pressed="true"] .tf-coche svg{display:block;color:var(--on-eclair)}
  #new-action-stat-modal .tf-case-action:focus-visible{outline:2px solid var(--eclair);outline-offset:2px}
  @media(orientation:portrait) and (max-height:700px){
    #new-action-stat-modal .tf-case-action{min-height:48px;margin-top:10px}
    #new-action-stat-modal .tf-case-action + .ui-section{margin-top:12px}
  }
  @media(orientation:landscape){
    /* « Annuler » à largeur fixe : la case se pose juste à sa gauche */
    #new-action-stat-modal .modal-btns > .cancel-btn{width:96px;padding:0}
    #new-action-stat-modal .tf-case-action{
      position:absolute;z-index:1;top:calc(10px + env(safe-area-inset-top,0px));right:calc(16px + env(safe-area-inset-right,0px) + 104px);
      width:auto;height:44px;min-height:0;margin:0;padding:0 10px;gap:6px;border-radius:12px;
      font-size:13px;line-height:1;white-space:nowrap;
    }
    #new-action-stat-modal .tf-case-action > span:not(.tf-coche){flex:none}
    #new-action-stat-modal .tf-case-action > svg{width:18px;height:18px}
    #new-action-stat-modal .tf-case-action .tf-coche{width:20px;height:20px;border-radius:6px}
    #new-action-stat-modal .tf-case-action .tf-coche svg{width:14px;height:14px}
    /* titre et « Pour #N … » sur une ligne chacun, à gauche de la case et
       d'« Annuler » (jamais une ligne de plus) */
    #new-action-stat-modal .modal-card > h3,
    #new-action-stat-modal .modal-card > p{padding-right:248px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  }
  /* panneau de moins de 420 px (largeur clamp(360px,56vw,480px) : écran de
     moins de 750 px de large) : la case ne garde que l'éclair et la coche
     (66 px, 44 px de haut ; « Temps fort » reste lu par les lecteurs
     d'écran), pour que le titre « Quelle action ? » ne soit jamais coupé */
  @media(orientation:landscape) and (max-width:749.98px){
    #new-action-stat-modal .tf-case-action > span:not(.tf-coche){
      position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;
    }
    #new-action-stat-modal .modal-card > h3,
    #new-action-stat-modal .modal-card > p{padding-right:178px}
  }

  /* case à cocher dessinée (coche Tabler montrée une fois cochée) */
  .tf-coche{
    flex:none;width:24px;height:24px;box-sizing:border-box;border:2px solid var(--line2);border-radius:7px;
    display:flex;align-items:center;justify-content:center;
  }
  .tf-coche svg{display:none}

  /* fenêtre « Qui ? » : titre et « Toute l'équipe » sur une ligne, joueurs
     (listes partagées .is-sheet .exp-players), « Valider » */
  .tf-qui-tete{display:flex;align-items:center;gap:12px}
  .tf-qui-tete h3{flex:1 1 auto;min-width:0}
  #temps-fort-qui-modal .tf-qui-tout{flex:none;width:auto;height:44px;padding:0 14px;font-size:14px;white-space:nowrap}
  #temps-fort-qui-modal .tf-qui-joueur .pname{flex:1 1 auto}
  #temps-fort-qui-modal .tf-qui-joueur[aria-checked="true"]{border-color:var(--amber);background:rgba(var(--accent-rgb),.1)}
  #temps-fort-qui-modal .tf-qui-joueur[aria-checked="true"] .tf-coche{background:var(--amber);border-color:var(--amber)}
  #temps-fort-qui-modal .tf-qui-joueur[aria-checked="true"] .tf-coche svg{display:block;color:var(--on-accent)}
  #temps-fort-qui-modal .modal-btns{margin-top:0}
  #temps-fort-qui-modal .modal-btn.primary{text-align:center}
  #temps-fort-qui-modal .modal-btn.primary:disabled{opacity:.45;cursor:default}
  /* paysage : joueurs sur 2 colonnes (sur 3, la case coupait les prénoms) ;
     « Annuler » en haut à droite, sur la ligne du titre, à la même place que
     dans les autres fenêtres de saisie ; « Valider » en bas, pleine largeur */
  @media(orientation:landscape){
    #temps-fort-qui-modal .exp-players{grid-template-columns:repeat(2,minmax(0,1fr));margin:10px 0 8px}
    #temps-fort-qui-modal .tf-qui-tete{padding-right:112px}
    #temps-fort-qui-modal .modal-btn.cancel-btn{
      position:absolute;width:auto;height:40px;padding:0 16px;
      top:calc(12px + env(safe-area-inset-top,0px));right:calc(16px + env(safe-area-inset-right,0px));
    }
    #temps-fort-qui-modal .modal-btn.primary{min-height:0;height:48px;padding:0 18px}
    #temps-fort-qui-modal .modal-btn .mbt{font-size:15px;margin:0}
  }

  /* ---------- écran de match : en-tête, titre et caméra (maquette validée) ----------
     Pas de ligne « Match en cours · N actions » (le nombre est sur « Toutes
     les saisies »), pas de cadre autour de la zone caméra, logo à 40 px :
     autant de hauteur gardée pour l'aperçu caméra. */
  @media(orientation:portrait){
    .wrap{padding:8px 16px;--wrap-px:16px}
  }
  /* paysage : .wrap défile dans son cadre, qui doit tenir dans l'écran
     marges du body (18 px en haut et en bas) comprises, sinon son bas
     passe sous le bord sans pouvoir être atteint */
  @media(orientation:landscape){
    .wrap{max-height:calc(100vh - 36px); max-height:calc(100dvh - 36px)}
  }
  /* séparateur sous l'en-tête : le trait va d'un bord à l'autre de la colonne
     (marge négative = retrait latéral de .wrap, 0 en paysage) */
  .brand-header{
    margin:0 calc(-1 * var(--wrap-px,0px)) 8px;
    padding-left:var(--wrap-px,0px);padding-right:var(--wrap-px,0px);padding-bottom:6px;
    border-bottom:1px solid var(--line);
  }
  .brand-header img{width:auto;height:40px;max-width:100%;margin:0}
  .brand-header .hamburger-btn{width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center}

  .match-head{flex:none}
  .match-head .match-title-text{
    font-family:'Anton';font-weight:400;font-size:24px;line-height:1.15;color:var(--text);
    flex:none;white-space:normal;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  }
  /* score en direct (catalogue scoreEnDirect, jamais au basket) : « FC Noisy [2 - 1] Bondy », pastille de score à l'accent ;
     les noms se coupent (…), le score jamais */
  .match-head .match-title-text.is-score{display:flex;align-items:center;gap:10px;-webkit-line-clamp:unset;white-space:nowrap}
  .match-title-text.is-score .mt-nom{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:26px}
  .match-title-text.is-score .mt-score{
    flex:none;padding:0 12px;border-radius:12px;background:rgba(var(--accent-rgb),.14);color:var(--accent);
    font-size:32px;line-height:1.25;font-variant-numeric:tabular-nums;
  }
  .match-head-actions{display:flex;gap:10px;margin:10px 0 12px}
  .match-head-actions .ui-btn-outline{flex:1 1 0;min-width:0;height:44px;padding:0 8px;font-size:14px;white-space:nowrap}

  .cam-zone{gap:12px;grid-template-rows:minmax(0,1fr)}
  @media(orientation:portrait){
    .cam-zone{min-height:140px}
  }
  .cam-placeholder{gap:8px;font-size:13px;color:var(--text)}
  .cam-placeholder svg{flex:none;color:var(--amber)}
  .cam-rec{
    position:absolute;top:8px;left:8px;z-index:1;display:none;align-items:center;gap:6px;
    padding:4px 8px;border-radius:999px;background:rgba(var(--scrim2-rgb),.6);
    color:var(--text);font-size:12px;font-weight:700;letter-spacing:.08em;line-height:1;
  }
  .cam-rec::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--red)}
  .cam-zone:has(#camStopBtn:not(:disabled)) .cam-rec{display:inline-flex}
  .cam-zone-controls{justify-content:flex-start;gap:10px;min-height:0;overflow-y:auto}
  .cam-zone-controls .ui-btn-outline{flex:none;height:44px;padding:0 10px;font-size:14px;white-space:nowrap}
  .cam-zone-controls .ui-btn-outline:disabled{opacity:.4;cursor:default}
  #camStartBtn{border-color:var(--amber)}
  #camStopBtn svg{color:var(--red)}
  /* un seul bouton Démarrer / Arrêter visible, sans JS : pendant la demande
     d'accès (les deux désactivés), Démarrer reste visible, grisé */
  #camStopBtn:disabled{display:none}
  .cam-zone-controls:has(#camStopBtn:not(:disabled)) #camStartBtn{display:none}
  .cam-zone-controls .cam-status-text{margin-top:auto;font-size:12px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}

  /* ---------- gestion des équipes enregistrées (IndexedDB) ---------- */
  #teams-screen{position:fixed;inset:0;z-index:620;background:var(--bg);overflow-y:auto;padding:20px 20px 32px}
  #teams-screen.hidden{display:none}
  .teams-create{margin-top:16px;height:56px;border-radius:14px}
  .teams-note{margin:10px 2px 0;font-size:13px;color:var(--muted)}
  #team-form-overlay{position:fixed;inset:0;z-index:640;background:var(--bg);overflow-y:auto;padding:20px 20px 0}
  #team-form-overlay.hidden{display:none}
  /* page « Formulaire d'équipe » (composants ui-*) */
  .team-form-page{min-height:100%;display:flex;flex-direction:column} /* .ui-actions collée en bas même avec une liste courte */
  .team-form-page .ui-label{margin-top:16px}
  .team-form-page .ui-section{margin:22px 0 10px}
  .team-form-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.8fr) minmax(0,1fr);gap:10px}
  .team-form-grid .ui-select{padding:0 30px 0 12px;background-position:right 8px center}
  .ui-actions #team-form-warning{margin:0;min-height:0}
  .ui-actions #team-form-warning:empty{display:none}
  /* un joueur = une carte : vignette à gauche sur 2 lignes, numéro / prénom / croix
     en haut à droite, actions photo en bas à droite (uniquement sous #team-roster) */
  #team-roster{gap:8px;margin-bottom:12px}
  #team-roster .team-player{
    display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px 10px;padding:8px;
    background:var(--surface);border:1px solid var(--line);border-radius:14px;
  }
  #team-roster .player-photo-line{display:contents}
  #team-roster .rrow{grid-column:2;grid-row:1;gap:8px}
  #team-roster .pp-thumb{grid-column:1;grid-row:1 / span 2;width:42px;height:75px;border-radius:8px}
  #team-roster .pp-actions{grid-column:2;grid-row:2}
  #team-roster input{
    height:40px;padding:0 12px;border-radius:10px;
    background:var(--bg);border:1px solid var(--line2);font-size:15px;
  }
  #team-roster input:focus{border-color:var(--amber)}
  #team-roster input.rn{width:52px;padding:0;text-align:center;font-family:'Anton';font-size:18px;color:var(--amber)}
  #team-roster .rrow button{
    display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;
    background:none;border:1px solid var(--line);border-radius:10px;color:var(--muted);
  }
  #team-roster .rrow button:focus-visible{color:var(--red)}
  @media(hover:hover){
    #team-roster .rrow button:hover{color:var(--red)}
  }
  /* « + » sous la croix de la dernière carte (même bouton que #setup-roster .setup-add ;
     7 px à droite : centré sous la croix de 40 px, à 9 px du bord de la carte) */
  #team-roster .team-add-row{display:flex;justify-content:flex-end;padding-right:7px}
  #team-roster .team-add{
    display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;
    background:none;border:1px solid var(--line);border-radius:12px;color:var(--amber);cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  #team-roster .team-add:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  #team-roster .team-add:active{background:var(--surface2)}
  #team-roster .team-add[aria-disabled="true"]{opacity:.45;cursor:default}
  /* fenêtre « Choisir une équipe » : uniquement sous #team-pick-modal
     (.modal-card / .modal-btn sont partagés par les fenêtres de saisie du match) */
  #team-pick-modal .modal-card{border:1px solid var(--line2);border-radius:20px;padding:24px 20px 20px}
  #team-pick-modal .modal-card h3{font-size:24px;margin-bottom:18px}
  #team-pick-modal .team-pick-item{
    display:flex;align-items:center;gap:14px;width:100%;padding:10px;
    background:var(--surface2);border:1px solid var(--line2);border-radius:14px;
    color:var(--text);text-align:left;font-family:inherit;cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  #team-pick-modal .team-pick-item:active{background:var(--line)}
  #team-pick-modal .team-pick-item:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  #team-pick-modal .team-pick-item .ui-pad{background:var(--surface)}

  /* ---------- PHOTO INDIVIDUELLE DU JOUEUR (vivier — format story 9:16) ----------
     Purement additif. Rien ici n'est lu par la logique de match / capture /
     highlights : la photo vit uniquement dans le vivier de l'équipe (IndexedDB)
     et dans la copie de travail du formulaire d'équipe. */
  .team-player{display:flex;flex-direction:column;gap:6px}
  .player-photo-line{display:flex;align-items:center;gap:10px;padding:2px 0 6px 0}
  .pp-thumb{
    width:45px;height:80px;flex:none;border-radius:7px;overflow:hidden;
    background:var(--bg);border:1px solid var(--line2);
    display:block;object-fit:cover;
  }
  /* Placeholder neutre quand le joueur n'a pas (encore) de photo. Un fond par
     défaut sera fourni plus tard : cf. PlayerPhoto.DEFAULT_BG_PLACEHOLDER dans
     le script — c'est là qu'on le branchera (image de fond 9:16). */
  .pp-thumb.empty{
    display:grid;place-items:center;color:var(--muted2);font-size:18px;
    background:repeating-linear-gradient(135deg,var(--bg),var(--bg) 6px,var(--surface2) 6px,var(--surface2) 12px);
  }
  .pp-actions{display:flex;flex-wrap:wrap;gap:6px;flex:1;min-width:0}
  .pp-btn{
    background:var(--bg);border:1px solid var(--line2);color:var(--muted);
    border-radius:8px;padding:7px 10px;cursor:pointer;font-family:inherit;
    font-size:12px;white-space:nowrap;
  }
  .pp-btn:hover{color:var(--text);border-color:var(--amber)}
  .pp-btn.danger:hover{color:var(--red);border-color:var(--red)}
  /* formulaire d'équipe refondu : vignette vide et boutons photo (sous #team-roster) */
  #team-roster .pp-thumb.empty{
    background:transparent;border:1px dashed var(--line2);
    font-size:10px;font-weight:700;color:var(--muted);
  }
  #team-roster .pp-btn{
    display:flex;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 10px;
    background:transparent;border:1px solid var(--line2);border-radius:8px;
    color:var(--text);font-size:12px;font-weight:600;
  }
  #team-roster .pp-btn:not(.danger)::before{
    content:"";flex:none;width:14px;height:14px;background:var(--amber);
    -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2'/><path d='M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0'/></svg>") center/14px 14px no-repeat;
            mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2'/><path d='M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0'/></svg>") center/14px 14px no-repeat;
  }
  @media(hover:hover){
    #team-roster .pp-btn:hover{border-color:var(--amber-dim)}
    #team-roster .pp-btn.danger:hover{color:var(--red);border-color:var(--red)}
  }

  /* Plein écran de prise de vue / import (au-dessus du formulaire d'équipe
     z-index 640, mais SOUS la modale confirm/alert maison z-index 2000). */
  #pp-overlay{position:fixed;inset:0;z-index:1000;background:var(--photo-bg);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:14px;overflow:auto}
  #pp-overlay.hidden{display:none}
  #pp-overlay .pp-title{font-family:'Anton';font-size:18px;letter-spacing:.5px;color:var(--text);text-align:center}
  #pp-overlay .pp-sub{font-size:12px;color:var(--muted);text-align:center;max-width:340px;line-height:1.5}
  #pp-overlay .pp-sub:empty{display:none}
  /* Cadre 9:16 : le média remplit ce cadre, un repère visuel matérialise le
     cadrage story. La caméra "voit" plus large, mais SEUL ce cadre est gardé.
     IMPORTANT : il faut une dimension DÉFINIE (height) pour que aspect-ratio
     calcule la largeur — sinon, tout le contenu étant en position:absolute,
     la boîte s'effondrait à 0 de large et l'aperçu paraissait "noir". */
  .pp-stage{
    position:relative;flex:none;
    /* Dimensions DÉFINIES en dur (9:16 exact : 36/64 = 0,5625) : ne dépend
       plus d'aspect-ratio pour éviter tout effondrement à 0 de large. */
    height:64vh;width:36vh;
    height:min(64vh, 78vw * 16 / 9);width:min(36vh, 78vw);
    max-width:92vw;aspect-ratio:9 / 16;
    background:#000;border-radius:12px;overflow:hidden;
  }
  .pp-stage video,.pp-stage canvas,.pp-stage img{
    position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;
    background:#000;
  }
  /* Repère visuel du cadrage story : le stage EST déjà la zone 9:16 gardée
     (le média la remplit en object-fit:cover). Cadre + lignes des tiers pour
     aider au cadrage vertical. */
  .pp-frame-guide{
    position:absolute;inset:0;pointer-events:none;border-radius:12px;
    border:2px solid rgba(var(--white-rgb),.85);
    box-shadow:inset 0 0 0 1px rgba(0,0,0,.35);
  }
  .pp-frame-guide::before,.pp-frame-guide::after{
    content:'';position:absolute;left:8%;right:8%;height:1px;background:rgba(var(--white-rgb),.35);
  }
  .pp-frame-guide::before{top:33.33%}
  .pp-frame-guide::after{top:66.66%}
  #pp-overlay .pp-row{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
  #pp-overlay .pp-cta{
    border-radius:10px;padding:12px 18px;cursor:pointer;font-family:inherit;
    font-size:14px;font-weight:600;border:1px solid var(--line2);
    background:var(--surface2);color:var(--text);
  }
  #pp-overlay .pp-cta.primary{background:var(--amber);border-color:var(--amber);color:var(--on-accent);font-weight:700}
  #pp-overlay .pp-cta.ghost{background:transparent;color:var(--muted)}
  #pp-overlay .pp-cta:disabled{opacity:.5;cursor:default}

  /* ---------- gamification (G4, G5) : pastille Replo de l'accueil, Vestiaire, écran de récompense ----------
     Replo (SVG en calques, js/06) prend la tenue du sport actif ; l'accent est celui du sport (jetons de data-sport). Textes en --text
     ou --muted sur --surface / --surface2 (4,5:1 au moins) ; les grades à venir gardent --muted, jamais une opacité. Survol sous
     @media(hover:hover) ; transitions coupées en mouvement réduit (les animations de Replo le sont dans js/06). */
  .home-login-area{display:flex;align-items:center;gap:8px}
  /* pastille : Replo dans sa tenue, sans aucun niveau (ni rang, ni insigne, ni anneau : le grade est dans le Vestiaire) */
  .home-replo{
    position:relative;flex:none;width:44px;height:44px;padding:0;box-sizing:border-box;border:1px solid var(--line2);border-radius:50%;
    background:var(--surface2);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:border-color .12s;
  }
  .home-replo-av{position:absolute;inset:2px;border-radius:50%;overflow:hidden;background:#2b3a52;pointer-events:none}
  .home-replo-av svg{display:block;width:100%;height:100%}
  .home-replo:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  /* insigne d'un grade (ceinture à sa couleur, barrette éventuelle) : couleurs posées par js/06 depuis la fiche du sport */
  .replo-insigne{position:relative;display:inline-block;flex:none;width:28px;height:10px;box-sizing:border-box;border:1.5px solid;border-radius:3px;overflow:hidden}
  .replo-insigne > span{position:absolute;top:0;bottom:0;left:5px;width:5px}
  /* barre de progression vers le grade suivant (Vestiaire, récompense) */
  .replo-progres-haut{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;margin-bottom:8px;font-size:13px;line-height:1.4;color:var(--muted)}
  .replo-progres-haut b,.replo-progres-haut .replo-xp-total{color:var(--text);font-weight:700}
  .replo-barre{height:12px;border-radius:999px;background:var(--bg);border:1px solid var(--line2);overflow:hidden}
  .replo-barre > span{display:block;height:100%;border-radius:999px;background:var(--amber);transition:width .9s cubic-bezier(.2,.8,.2,1)}
  /* Vestiaire (page interne) */
  .vestiaire{display:flex;flex-direction:column;min-height:240px}
  .vestiaire .vest-scene{
    position:relative;display:block;width:100%;height:250px;margin:0;padding:0;overflow:hidden;cursor:pointer;
    border:1px solid var(--line);border-radius:20px;-webkit-tap-highlight-color:transparent;
    background:radial-gradient(120% 90% at 50% 30%,#22324a 0%,#182233 55%,#121926 100%);
  }
  .vestiaire .vest-scene svg{position:absolute;left:50%;top:0;height:248px;width:auto;transform:translateX(-50%);overflow:visible}
  .vestiaire .vest-scene:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .vest-scene-rayons,.recompense-rayons{
    position:absolute;left:50%;top:50%;width:440px;height:440px;margin:-220px 0 0 -220px;border-radius:50%;pointer-events:none;
    background:repeating-conic-gradient(from 0deg,rgba(var(--accent-rgb),.09) 0 9deg,rgba(var(--accent-rgb),0) 9deg 22.5deg);
    -webkit-mask:radial-gradient(circle,#000 0 28%,transparent 62%);mask:radial-gradient(circle,#000 0 28%,transparent 62%);
  }
  .vestiaire .vest-nom{margin:14px 0 0;text-align:center;font-family:'Anton';font-size:30px;line-height:1.15;letter-spacing:.5px;color:var(--text);overflow-wrap:anywhere}
  .vestiaire .vest-grade{display:flex;align-items:center;justify-content:center;gap:8px;margin:6px 0 0;font-size:15px;font-weight:600;line-height:1.3;color:var(--text);text-align:center}
  .vest-grade-sport{display:flex;flex:none;color:var(--amber)}
  .vest-progres{margin:16px 0 0;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px}
  .vestiaire .ui-section{margin-top:24px;scroll-margin-top:20px}
  .vest-grades,.vest-sports{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
  .vest-g,.vest-s{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 12px;border-radius:12px;background:var(--surface);border:1px solid var(--line);font-size:14px;line-height:1.35}
  .vest-g.is-actuel{border-color:var(--amber);background:var(--surface2)}
  .vest-g-ico{flex:none;width:28px;display:flex;align-items:center;justify-content:center}
  .vest-g-coche{display:flex;color:var(--amber)}
  .vest-g-point{width:10px;height:10px;box-sizing:border-box;border-radius:50%;border:2px solid var(--line2)}
  .vest-g-nom{flex:1;min-width:0;font-weight:600;color:var(--text)}
  .vest-g.is-avenir .vest-g-nom{font-weight:500;color:var(--muted)}
  .vest-g-seuil,.vest-s-val{flex:none;font-size:13px;color:var(--muted);text-align:right}
  .vest-s-ico{display:flex;flex:none;color:var(--amber)}
  .vest-s-nom{flex:1;min-width:0;font-weight:600;color:var(--text)}
  .vest-s-val{flex:0 1 auto;min-width:0}
  .vest-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .vest-form{display:flex;flex-direction:column;gap:10px}
  .vest-form .ui-label{margin:0}
  .vestiaire .vest-msg{margin:0;min-height:20px;font-size:13px;line-height:1.5;color:var(--muted)}
  .vest-note{margin-top:14px}
  /* Règlement (sous-page du Vestiaire, #reglement-page) : texte en --text ou --muted sur --bg / --surface / --surface2, accent du sport
     pour les gains et la marque ; lignes de 44 px au moins, aucun survol */
  .reglement-titre:focus{outline:none}
  #reglement-page .deco-dots{margin:18px 0 20px}   /* comme #internal-page (Vestiaire) */
  .reglement-section + .reglement-section{margin-top:26px}
  .reglement-section .ui-section{margin:0 0 10px}
  .reglement-p{margin:10px 0 0;font-size:15px;line-height:1.5;color:var(--text)}
  .reglement-liste{margin:0;padding:0 0 0 22px;font-size:15px;line-height:1.5;color:var(--text)}
  .reglement-liste li + li{margin-top:4px}
  .reglement-liste li::marker{color:var(--amber)}
  .reglement-lignes{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
  .reglement-ligne{
    display:flex;align-items:center;gap:12px;min-height:44px;box-sizing:border-box;padding:9px 12px;
    background:var(--surface);border:1px solid var(--line);border-radius:12px;font-size:14px;line-height:1.4;color:var(--text);
  }
  .reglement-ligne.is-marque{border-color:var(--amber);background:var(--surface2)}
  .reglement-terme{flex:none;min-width:0;font-weight:700;overflow-wrap:anywhere}
  .reglement-texte{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;overflow-wrap:anywhere}
  .reglement-lignes.is-xp .reglement-terme{min-width:76px;color:var(--amber);font-weight:800;white-space:nowrap}   /* « +1 000 XP » s'élargit, le texte se resserre */
  .reglement-lignes.is-defi .reglement-terme{width:84px}
  .reglement-lignes.is-grades .reglement-terme{flex:1 1 50%}
  /* objets : le nom, puis sa condition dessous (pleine largeur : jamais une colonne étroite à 360 px) */
  .reglement-lignes.is-objets .reglement-ligne{flex-direction:column;align-items:stretch;gap:2px}
  .reglement-lignes.is-objets .reglement-texte{color:var(--muted)}
  .reglement-lignes.is-grades .reglement-texte{flex:none;justify-content:flex-end;color:var(--muted);text-align:right;white-space:nowrap}
  .reglement-marque{flex:none;padding:1px 8px;border:1px solid var(--amber);border-radius:999px;color:var(--amber);font-size:12px;font-weight:700;white-space:nowrap}
  .reglement-lignes.is-objets .reglement-marque{margin-left:auto}
  .reglement-note{margin-top:26px}
  .vest-illisible{margin-top:16px}
  /* personnalisation (« Ma tenue », « Pelage ») : nuanciers en boutons radio natifs (nom de la couleur en étiquette), cibles de 48 px ;
     sélection visible autrement que par la couleur : contour clair et coche ; verrouillé : cadenas (inactif : couleur éteinte) */
  .vest-nuancier{min-width:0;margin:0 0 16px;padding:0;border:0}
  .vest-nuancier:last-of-type{margin-bottom:0}   /* dernier nuancier d'un bloc : le titre de la section suivante garde sa seule marge */
  .vest-nuancier-leg{display:flex;align-items:center;gap:8px;width:100%;margin:0 0 8px;padding:0}
  .vest-nuancier-nom{font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text)}
  .vest-nuancier-nom:not(:empty)::before{content:"· ";color:var(--muted)}
  .vest-compte{display:inline-flex;align-items:center;margin-left:auto;font-size:13px;font-weight:700;letter-spacing:0;color:var(--text)}
  .vest-compte > span[aria-hidden]{display:inline-flex;align-items:center;gap:4px}
  .vest-compte svg{color:var(--muted)}
  .vest-pastilles{display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));gap:4px 6px}
  .vest-pastille{
    position:relative;display:flex;align-items:center;justify-content:center;min-width:44px;height:48px;margin:0;padding:0;
    background:transparent;border:0;border-radius:12px;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .vest-radio{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
  .vest-pastille-rond{display:block;width:36px;height:36px;box-sizing:border-box;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(255,255,255,.3),0 0 0 1px var(--line2)}
  .vest-radio:checked ~ .vest-pastille-rond,.vest-pastille.is-porte .vest-pastille-rond{box-shadow:inset 0 0 0 1px rgba(255,255,255,.3),0 0 0 2px var(--bg),0 0 0 4px var(--text)}
  .vest-pastille-coche{
    position:absolute;left:50%;top:50%;display:none;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px 0 0 -12px;
    border-radius:50%;background:rgba(16,20,29,.78);color:#fff;pointer-events:none;
  }
  .vest-radio:checked ~ .vest-pastille-coche,.vest-pastille.is-porte .vest-pastille-coche{display:flex}
  .vest-radio:focus-visible ~ .vest-pastille-rond{outline:2px solid var(--amber);outline-offset:5px}
  .vest-pastille:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .vest-pastille-cadenas{
    position:absolute;right:calc(50% - 22px);bottom:2px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;
    border-radius:50%;background:var(--bg);color:var(--text);box-shadow:0 0 0 1px var(--line2);pointer-events:none;
  }
  .vest-pastille:disabled{cursor:default}
  .vest-pastille:disabled .vest-pastille-rond{filter:saturate(.3) brightness(.55)}
  .vest-pastille:disabled .vest-pastille-cadenas{color:var(--muted)}
  .vest-numero{margin-bottom:12px}
  .vest-numero-ligne{display:flex;gap:10px}
  .vest-numero-champ{flex:none;width:96px;text-align:center;font-family:'Anton';font-size:20px;letter-spacing:.5px}
  .vest-numero-ok{flex:1;min-width:0}
  .vest-numero .ui-input[aria-invalid="true"]{border-color:var(--red)}
  .vestiaire .vest-err{margin:0;font-size:13px;line-height:1.5;color:var(--red)}   /* 4,8:1 sur --surface2 */
  .vestiaire .vest-err:empty{display:none}
  .vestiaire .vest-msg:empty{min-height:0}
  /* écran de récompense : superposition de l'accueil (dans #home-screen, au-dessus de sa barre), défile si l'écran est bas */
  .recompense{
    position:fixed;inset:0;z-index:5;display:flex;padding:16px;overflow-y:auto;
    background:rgba(var(--scrim-rgb),.92);
  }
  .recompense.hidden{display:none}
  /* récompense d'un autre sport que le sport actif : son accent (jetons posés par data-sport, plus haut) ; les alias de l'accent sont
     recalculés ici, sinon ils garderaient la valeur calculée sur <html> */
  #recompense[data-sport]{--amber:var(--accent);--amber-dim:var(--accent)}
  .recompense-carte{
    position:relative;width:100%;max-width:420px;margin:auto;padding:12px 16px 18px;text-align:center;
    background:var(--surface);border:1px solid var(--line2);border-radius:24px;box-shadow:0 18px 50px rgba(0,0,0,.5);
  }
  .recompense-perso{position:relative;height:210px;margin:0 -16px;overflow:hidden}
  .recompense-perso svg{position:relative;display:block;height:210px;width:auto;margin:0 auto;overflow:visible}
  .recompense-sport{display:flex;align-items:center;justify-content:center;gap:6px;margin:0;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
  .recompense-sport svg{flex:none;color:var(--amber)}
  .recompense-passage{
    display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0 0;padding:10px 14px;
    border:1px solid var(--amber);border-radius:14px;background:var(--surface2);
  }
  .recompense-passage-ico{display:flex;flex:none;color:var(--amber)}
  .recompense-passage-texte{display:flex;flex-direction:column;min-width:0;text-align:left}
  .recompense-passage-k{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text)}
  .recompense-passage-nom{font-family:'Anton';font-size:20px;line-height:1.2;color:var(--amber);overflow-wrap:anywhere}
  .recompense-titre{margin:12px 0 0;font-family:'Anton';font-size:26px;font-weight:400;line-height:1.15;letter-spacing:.5px;color:var(--text);overflow-wrap:anywhere}
  .recompense-titre:focus{outline:none}
  .recompense-xp{display:inline-block;margin:10px 0 0;padding:6px 16px;border-radius:999px;background:var(--amber);color:var(--on-accent);font-size:18px;font-weight:800}
  .recompense-lignes{list-style:none;margin:14px 0 0;padding:0;text-align:left;border-top:1px solid var(--line)}
  .recompense-lignes li{display:flex;justify-content:space-between;gap:12px;padding:9px 2px;border-bottom:1px solid var(--line);font-size:14px;line-height:1.4;color:var(--text)}
  .recompense-lignes b{flex:none;font-weight:700;color:var(--amber)}
  .recompense-progres{margin:16px 0 0;text-align:left}
  .recompense-continuer{margin-top:18px}
  .recompense-pelage{display:flex;align-items:center;justify-content:center;gap:8px;margin:16px 0 0;font-size:14px;font-weight:600;line-height:1.4;color:var(--text)}
  .recompense-pelage svg{flex:none;color:var(--amber)}
  .recompense-couleur{margin-top:12px}
  /* G6 : défi du mois, semaines actives, objets de Replo, carte « Invitation » (annonce, non interactive), objet nouveau de la récompense.
     Textes en --text ou --muted sur --surface / --surface2 ; accent du sport (6,3:1 au moins sur --surface2) ; cibles de 44 px au moins. */
  .vest-defi{padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px}
  .vest-defi.is-reussi{border-color:var(--amber);background:var(--surface2)}
  .vest-defi-haut{display:flex;align-items:center;gap:8px;min-height:26px}
  .vest-defi-ico{display:flex;flex:none;color:var(--amber)}
  .vest-defi-k{flex:1;min-width:0;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  .vest-defi-xp{flex:none;padding:3px 10px;border-radius:999px;border:1px solid var(--amber);color:var(--amber);font-size:13px;font-weight:800;white-space:nowrap}
  .vest-defi-nom{margin:8px 0 10px;font-family:'Anton';font-size:21px;font-weight:400;line-height:1.2;letter-spacing:.3px;color:var(--text);overflow-wrap:anywhere}
  .vest-defi .replo-progres-haut{color:var(--text)}
  .vest-defi-ok{color:var(--amber)}
  .vest-semaines{
    display:flex;align-items:center;gap:10px;min-height:48px;box-sizing:border-box;margin:10px 0 0;padding:10px 14px;
    background:var(--surface);border:1px solid var(--line);border-radius:14px;font-size:14px;line-height:1.4;color:var(--text);
  }
  .vest-semaines-ico{display:flex;flex:none;color:var(--amber)}
  .vest-semaines b{font-weight:700}
  .vest-semaines-pal{color:var(--muted)}
  #vest-objets-titre::after{order:1}
  .vest-objets-compte{order:2;font-size:13px;letter-spacing:0;color:var(--text)}
  .vest-objets{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .vest-objets > li{display:flex;min-width:0}
  .vest-objet{
    position:relative;display:flex;flex-direction:column;align-items:stretch;gap:2px;width:100%;min-height:44px;box-sizing:border-box;margin:0;
    padding:5px 5px 8px;background:var(--surface);border:1px solid var(--line);border-radius:14px;color:var(--text);font-family:inherit;
    text-align:center;-webkit-tap-highlight-color:transparent;
  }
  button.vest-objet{cursor:pointer}
  .vest-objet.is-porte{border-color:var(--amber);background:var(--surface2);box-shadow:inset 0 0 0 1px var(--amber)}
  .vest-objet:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .vest-objet-vue,.recompense-objet-vue{
    position:relative;display:block;width:100%;aspect-ratio:4/3;border-radius:10px;overflow:hidden;
    background:radial-gradient(120% 100% at 50% 35%,#22324a 0%,#182233 60%,#121926 100%);
  }
  .vest-objet-vue svg,.recompense-objet-vue svg{display:block;width:100%;height:100%}
  .vest-objet.is-verrou .vest-objet-vue svg{filter:saturate(.25) brightness(.62)}
  .vest-objet-cadenas,.vest-objet-coche{
    position:absolute;right:4px;display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;
  }
  .vest-objet-cadenas{bottom:4px;background:var(--bg);color:var(--text);box-shadow:0 0 0 1px var(--line2)}
  .vest-objet-coche{top:4px;background:var(--amber);color:var(--on-accent)}
  .vest-objet-nom{margin-top:4px;font-size:13px;font-weight:700;line-height:1.25;overflow-wrap:anywhere;hyphens:auto}
  .vest-objet-etat{font-size:12px;line-height:1.3;color:var(--muted);overflow-wrap:anywhere}
  .vest-objet.is-porte .vest-objet-etat{color:var(--amber);font-weight:700}
  .vest-invitation{
    display:flex;align-items:center;gap:12px;margin-top:24px;padding:14px;
    background:var(--surface);border:1px dashed var(--line2);border-radius:16px;
  }
  .vest-invitation-ico{display:flex;flex:none;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:var(--surface2);color:var(--amber)}
  .vest-invitation-texte{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
  .vest-invitation-titre{font-size:15px;font-weight:700;line-height:1.3;color:var(--text)}
  .vest-invitation-ligne{font-size:13px;line-height:1.4;color:var(--muted)}
  .vest-bientot{
    flex:none;align-self:flex-start;display:inline-flex;align-items:center;gap:4px;padding:3px 8px 3px 6px;border-radius:999px;
    border:1px solid var(--line2);background:var(--surface2);font-size:12px;font-weight:700;line-height:1.3;color:var(--text);
  }
  .vest-bientot svg{color:var(--muted)}
  .recompense-objet{
    display:grid;grid-template-columns:72px 1fr;align-items:center;gap:10px 12px;margin:14px 0 0;padding:10px;
    border:1px solid var(--amber);border-radius:14px;background:var(--surface2);text-align:left;
  }
  .recompense-objet-vue{width:72px}
  .recompense-objet-texte{min-width:0;font-size:15px;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
  .recompense-objet-k{font-weight:600}
  .recompense-objet-nom{font-weight:800;color:var(--amber)}
  .recompense-porter{grid-column:1 / -1;background:var(--surface)}
  .recompense-porter:disabled{cursor:default;border-color:var(--amber)}   /* « Porté » : texte en --text, lisible (jamais d'opacité) */
  .recompense-msg{margin:8px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
  .recompense-msg:empty{display:none}
  @media (prefers-reduced-motion:reduce){
    .replo-barre > span{transition:none}
  }
  @media(hover:hover){
    .home-replo:hover{border-color:var(--amber-dim)}
    .vestiaire .vest-scene:hover{border-color:var(--amber-dim)}
    .vest-pastille:not(:disabled):hover .vest-pastille-rond{transform:scale(1.06)}
    button.vest-objet:hover{border-color:var(--amber-dim)}
    .recompense-porter:hover{border-color:var(--amber-dim)}
  }

/* === TKD DEBUT === */
  /* Brique Taekwondo : toutes les règles de ce bloc commencent par .tkd- ou #tkd-. */

  /* jetons propres au Taekwondo (déclarés une fois ici, sur :root, au lieu de quatre fois sur des écrans) :
     mêmes valeurs qu'avant, aucun changement visible. Le bleu et le rouge sont les couleurs des deux camps,
     distinctes de l'accent de l'app. */
  :root{
    --tkd-bleu:#56a8ff;          /* camp bleu : trait, texte, bordure */
    --tkd-bleu-fond:#1a4fa8;     /* camp bleu : fond plein (texte blanc dessus, 7,7:1) */
    --tkd-rouge:#ff5d6c;         /* camp rouge : trait, texte, bordure */
    --tkd-rouge-fond:#c42b3b;    /* camp rouge : fond plein (texte blanc dessus, 5,6:1) */
    --tkd-eclair:#ffd21f;        /* éclair « temps fort » */
    --tkd-sombre:#0a0e16;        /* texte sur l'éclair et sur un bouton blanc */
    --tkd-or:#f2b705;            /* médailles du widget d'accueil */
    --tkd-argent:#C0C6D0;
    --tkd-bronze:#D08A4E;
    --tkd-puce-bord:#64789b;     /* bordure des puces à choix unique (type de combat) */
  }

  /* écran d'avertissement stockage (ouvert depuis « Quel sport ? ») : plein écran, défilable
     (nécessaire en paysage bas) ; margin:auto sur le contenu = centré quand il tient, défilement sinon */
  #tkd-avertissement{
    position:fixed;inset:0;z-index:420;display:flex;
    background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:calc(20px + env(safe-area-inset-top,0px)) calc(20px + env(safe-area-inset-right,0px))
            calc(20px + env(safe-area-inset-bottom,0px)) calc(20px + env(safe-area-inset-left,0px));
  }
  #tkd-avertissement.hidden{display:none}
  #tkd-avertissement:focus{outline:none}
  .tkd-centre{margin:auto;width:100%;max-width:440px}
  .tkd-carte{background:var(--surface);border:1px solid var(--line2);border-radius:18px;padding:20px}
  .tkd-pastille{
    display:flex;align-items:center;justify-content:center;width:52px;height:52px;margin-bottom:16px;
    border-radius:14px;background:rgba(var(--warn-rgb),.15);color:var(--warn);
  }
  .tkd-titre{
    margin-bottom:12px;font-family:'Anton';font-size:24px;font-weight:400;line-height:1.2;
    letter-spacing:.02em;text-transform:uppercase;color:var(--text);
  }
  .tkd-texte{margin-bottom:12px;font-size:14px;line-height:1.5;color:var(--text)}
  .tkd-texte strong{font-weight:700}
  .tkd-beta{margin-bottom:20px;font-size:13px;line-height:1.5;color:var(--muted)}
  .tkd-carte .ui-btn-primary{min-height:62px}

  /* écran « Nouvelle compétition » / mode édition : même squelette que #setup-overlay (fixed, défilable) ;
     la barre d'actions est le .ui-actions partagé (sticky dans l'écran, jamais position:fixed : le clavier mobile
     ne la recouvre pas). Les classes ui-* ne sont pas modifiées : seuls la grille et la ligne d'athlète sont ajoutées. */
  #tkd-creation{
    position:fixed;inset:0;z-index:420;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-creation.hidden{display:none}
  #tkd-creation:focus{outline:none}
  .tkd-page{min-height:100%;display:flex;flex-direction:column}
  .tkd-page .ui-label{margin-top:18px}
  .tkd-page .ui-section{margin:22px 0 10px}
  .tkd-page .ui-section:focus{outline:none}
  .tkd-page .ui-note{margin-bottom:10px}
  /* 16 px : en dessous, Safari sur iPhone zoome la page quand on touche un champ */
  .tkd-page .ui-input,.tkd-page .ui-select{font-size:16px}
  .tkd-grille{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}
  .tkd-champ{min-width:0}
  .tkd-champ-large{grid-column:1 / -1}
  .tkd-erreur{margin-top:6px;font-size:13px;line-height:1.4;color:var(--red)}
  .tkd-erreur:empty{display:none}
  .tkd-page [aria-invalid="true"]{border-color:var(--red)}
  .tkd-athlete .ui-card-text{padding:12px 14px}
  .tkd-ajouter{margin:16px 0 20px}
  .tkd-aide{margin:0;font-size:13px;line-height:1.4;color:var(--muted)}
  .tkd-aide:empty{display:none}
  /* désactivé : fond de surface et texte gris secondaire (lisible, 4,5:1 sur --surface2), pas un bleu délavé */
  .tkd-ecran .ui-btn-primary:disabled{background:var(--surface2);color:var(--muted);border:1px solid var(--line2);cursor:default}
  /* paysage bas (ex. 746×273) : la barre d'actions prend moins de place */
  @media(max-height:420px){
    .tkd-page .ui-actions{padding-top:8px;padding-bottom:max(12px, env(safe-area-inset-bottom));gap:6px}
    .tkd-page .ui-actions .ui-btn-primary{height:52px}
  }

  /* widget d'accueil « Compétition en cours » (js/16), inséré dans .home-content après .home-hero.
     Aucun défilement interne : c'est l'accueil qui défile, la barre du bas reste fixe. Les composants ui-* (.ui-pad…)
     ne sont pas modifiés : seuls des réglages locaux au widget. Contrastes (mesurés sur --surface2 #212b3c) :
     texte 12,13 · gris 4,60 · azur 6,51 · rouge 4,77 · or 7,83 · argent 8,29 · bronze 5,03. */
  .tkd-accueil{
    position:relative;z-index:1;width:100%;margin-top:8px;text-align:left;
    margin-bottom:56px; /* le bouton rond dépasse de 38 px au-dessus de la barre (+ halo) : en bas de défilement il ne doit pas recouvrir la carte */
    background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden;
  }
  .tkd-accueil-entete{
    display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:12px 14px;
    background:transparent;border:0;color:var(--text);text-align:left;cursor:pointer;
    font-family:inherit;-webkit-tap-highlight-color:transparent;
  }
  .tkd-accueil-entete:active{background:var(--surface2)}
  .tkd-accueil-entete:focus-visible,.tkd-accueil-bouton:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .tkd-accueil-entete-texte{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
  .tkd-accueil-kicker{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  .tkd-accueil-nom{font-family:'Anton';font-size:19px;font-weight:400;line-height:1.2;letter-spacing:.5px;overflow-wrap:anywhere}
  .tkd-accueil-resume{font-size:13px;line-height:1.35;color:var(--muted)}
  .tkd-accueil-resume-court{display:none}
  .tkd-accueil-chev{flex:none;display:flex;color:var(--amber);transition:transform .15s}
  .tkd-accueil:not(.is-replie) .tkd-accueil-chev{transform:rotate(180deg)}
  /* replié : une seule ligne (nom, nombre d'athlètes, chevron) */
  .tkd-accueil.is-replie .tkd-accueil-kicker,.tkd-accueil.is-replie .tkd-accueil-resume{display:none}
  .tkd-accueil.is-replie .tkd-accueil-entete-texte{flex-direction:row;align-items:center;gap:10px}
  .tkd-accueil.is-replie .tkd-accueil-nom{flex:0 1 auto;min-width:0;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tkd-accueil.is-replie .tkd-accueil-resume-court{display:block;flex:none;font-size:13px;color:var(--muted);white-space:nowrap}
  .tkd-accueil-corps{border-top:1px solid var(--line)}
  .tkd-accueil-corps[hidden]{display:none}
  .tkd-accueil-liste{list-style:none;margin:0;padding:0}
  .tkd-accueil-ligne{display:flex;align-items:center;gap:12px;padding:12px 14px}
  .tkd-accueil-ligne + .tkd-accueil-ligne{border-top:1px solid var(--line)}
  .tkd-accueil-ligne .ui-pad-small{white-space:nowrap;letter-spacing:.04em}
  .tkd-accueil-texte{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .tkd-accueil-athlete{font-family:'Anton';font-size:17px;font-weight:400;line-height:1.2;letter-spacing:.5px;overflow-wrap:anywhere}
  .tkd-accueil-statut{display:flex;align-items:flex-start;gap:6px;font-size:13px;font-weight:600;line-height:1.3;color:var(--text)}
  .tkd-accueil-statut svg{flex:none;margin-top:1px}
  .tkd-accueil-statut.is-or{color:var(--tkd-or)}
  .tkd-accueil-statut.is-argent{color:var(--tkd-argent)}
  .tkd-accueil-statut.is-bronze{color:var(--tkd-bronze)}
  .tkd-accueil-statut.is-elimine svg{color:var(--red)}
  .tkd-accueil-bilan{font-size:12px;line-height:1.3;color:var(--muted)}
  .tkd-accueil-bouton{
    flex:none;min-width:78px;min-height:44px;padding:0 10px;border-radius:12px;
    font-family:'Anton';font-size:15px;font-weight:400;letter-spacing:.5px;cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .tkd-accueil-bouton.is-combat{background:var(--amber);border:0;color:var(--on-accent);box-shadow:-2px 0 0 0 var(--accent-gauche),2px 0 0 0 var(--accent-droite)} /* touches des deux camps (mode sport) */
  .tkd-accueil-bouton.is-rouvrir{background:transparent;border:1px solid var(--line2);color:var(--text)}
  .tkd-accueil-bouton:active{opacity:.7}
  /* paysage bas (ex. 746×273) : le bloc du sport (#home-bloc, socle) passe au-dessus du logo ; ici seulement les marges */
  @media(max-height:420px){
    .tkd-accueil{margin-top:0;margin-bottom:12px}
  }
  @media(hover:hover){
    .tkd-accueil-entete:hover .tkd-accueil-chev{color:var(--text)}
    .tkd-accueil-bouton.is-rouvrir:hover{border-color:var(--amber-dim)}
  }

  /* écran « Quel athlète ? » (js/12, bouton rond COMBAT, mode sport) : plein écran opaque (l'écran de match du basket est dessous, comme pour tout
     écran TKD ouvert après hideHome), au-dessus de l'accueil ; la liste des athlètes est un panneau collé en bas, en composants ui-*. */
  #tkd-choix-athlete{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-choix-athlete.hidden{display:none}
  #tkd-choix-athlete:focus{outline:none}
  .tkd-choix-page{min-height:100%;max-width:700px;margin:0 auto;display:flex;flex-direction:column}
  .tkd-choix-panneau{margin-top:auto;padding:16px 0 calc(24px + env(safe-area-inset-bottom,0px))}
  .tkd-choix-panneau .ui-head{margin-top:0}
  .tkd-choix-liste{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
  .tkd-choix-ligne{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px}
  .tkd-choix-ligne .ui-card-meta{color:var(--amber);font-size:12px;font-weight:800;letter-spacing:.08em}
  .tkd-choix-ligne:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-choix-chev{display:flex}

  /* écran « Nouveau combat » (js/17) : même squelette que #tkd-creation (fixed, défilable, barre .ui-actions collée en bas).
     Accents d'équipe : bleu #56a8ff et rouge #ff5d6c ; le mot BLEU ou ROUGE est toujours écrit (la couleur ne porte jamais seule).
     Contrastes mesurés : bleu 5,72 / rouge 4,77 sur --surface2 (6,34 / 5,28 sur --surface) ; azur des valeurs 6,51 ; gris des notes 4,60. */
  #tkd-nouveau-combat{
    position:fixed;inset:0;z-index:420;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-nouveau-combat.hidden{display:none}
  #tkd-nouveau-combat:focus{outline:none}
  .tkd-combat-athlete .ui-card-text{padding:12px 14px}
  .tkd-page .tkd-label-premier{margin-top:0}
  /* texte lu par les lecteurs d'écran seulement */
  .tkd-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  /* type de combat : puces à choix unique (groupe + boutons aria-pressed) */
  .tkd-puces{display:flex;flex-wrap:wrap;gap:8px}
  .tkd-puce{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:56px;padding:0 14px;
    background:var(--surface);border:1px solid var(--tkd-puce-bord);border-radius:12px;color:var(--text); /* bordure 3,53:1 sur --surface (intérieur), 4,12:1 sur --bg (extérieur) */
    font-family:inherit;font-size:15px;font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-puce-coche{display:none}
  .tkd-puce[aria-pressed="true"]{background:var(--amber);border-color:var(--amber);color:var(--on-accent);font-weight:700}
  .tkd-puce[aria-pressed="true"] .tkd-puce-coche{display:inline-flex}
  .tkd-puce:focus-visible,.tkd-pas-bouton:focus-visible,.tkd-inverser:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  /* couleurs : le bloc de gauche est toujours BLEU, celui de droite ROUGE ; l'inversion échange les deux blocs */
  .tkd-couleurs{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px}
  .tkd-couleur{
    min-width:0;display:flex;flex-direction:column;gap:2px;padding:10px 12px;
    background:var(--surface);border:1px solid var(--line);border-left-width:4px;border-radius:12px;
  }
  .tkd-couleur.is-bleu{border-left-color:var(--tkd-bleu)}
  .tkd-couleur.is-rouge{border-left-color:var(--tkd-rouge)}
  .tkd-couleur-role{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
  .tkd-couleur-nom{font-family:'Anton';font-size:16px;line-height:1.2;letter-spacing:.5px;overflow-wrap:anywhere}
  .tkd-couleur-mot{font-size:13px;font-weight:800;letter-spacing:.12em}
  .tkd-couleur.is-bleu .tkd-couleur-mot{color:var(--tkd-bleu)}
  .tkd-couleur.is-rouge .tkd-couleur-mot{color:var(--tkd-rouge)}
  /* réglages des rounds : − / valeur / + (cibles de 44 px) ; à la borne, aria-disabled (le bouton garde le focus) */
  .tkd-pas-ligne{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0}
  .tkd-pas-ligne + .tkd-pas-ligne{border-top:1px solid var(--line)}
  .tkd-pas-nom{flex:1;min-width:0;font-size:15px;font-weight:600;line-height:1.3}
  .tkd-pas{flex:none;display:flex;align-items:center;gap:8px}
  .tkd-pas-bouton{color:var(--text)}
  .tkd-pas-bouton[aria-disabled="true"]{color:var(--muted);border-style:dashed;cursor:default}
  .tkd-pas-valeur{
    display:flex;align-items:center;justify-content:center;min-width:68px;height:44px;padding:0 6px;
    background:var(--surface);border:1px solid var(--line2);border-radius:10px;
    font-family:'Anton';font-size:21px;letter-spacing:.5px;color:var(--amber);font-variant-numeric:tabular-nums;
  }
  .tkd-note-manque{padding:8px 12px}
  .tkd-note-manque[hidden]{display:none}
  @media(hover:hover){
    .tkd-puce:not([aria-pressed="true"]):hover{border-color:var(--amber-dim)}
    .tkd-pas-bouton:not([aria-disabled="true"]):hover{border-color:var(--amber-dim)}
  }
  /* paysage bas : la barre d'actions, plus la note de ce qui manque, ne doivent pas manger l'écran */
  @media(max-height:420px){
    #tkd-nouveau-combat .ui-actions{flex-direction:row;align-items:center;gap:10px}
    #tkd-nouveau-combat .ui-actions .ui-btn-primary{flex:1 1 0;min-width:0}
    #tkd-nouveau-combat .tkd-note-manque{flex:1 1 0;min-width:0;padding:6px 10px;font-size:12px}
    #tkd-nouveau-combat .tkd-note-manque svg{display:none}
  }

  /* écran de round (js/19) : plein écran noir au-dessus de tout le basket (z-index 1500 : au-dessus de l'accueil 600, des menus
     700-725, des lecteurs 800-920 et de la photo 1000 ; sous les fenêtres maison 2000, pour que « Arrêter le round ? » s'affiche
     par-dessus). Portrait ET paysage par CSS seulement. Texte blanc sur fond sombre translucide : au moins 8:1 même sur une image
     blanche. Le point REC change de FORME en pause (carré), le texte REC / PAUSE est toujours écrit. */
  #tkd-round{
    position:fixed;inset:0;z-index:1500;background:#000;color:var(--white);overflow:hidden;
  }
  #tkd-round.hidden{display:none}
  #tkd-round:focus{outline:none}
  #tkd-round-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
  .tkd-round-haut{
    position:absolute;top:0;left:0;right:0;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:10px;
    padding:calc(10px + env(safe-area-inset-top,0px)) calc(12px + env(safe-area-inset-right,0px)) 10px calc(12px + env(safe-area-inset-left,0px));
    pointer-events:none;
  }
  .tkd-round-etiquette,.tkd-round-rec{
    display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;border-radius:10px;
    background:rgba(var(--scrim-rgb),.78);font-size:15px;font-weight:700;
  }
  .tkd-round-point{flex:none;width:12px;height:12px;border-radius:50%;background:var(--red)}
  .tkd-round-rec.is-rec .tkd-round-point{animation:tkd-clignote 1.2s ease-in-out infinite}
  .tkd-round-rec.is-pause .tkd-round-point{border-radius:2px;background:var(--warn)}
  .tkd-round-rec.is-pret .tkd-round-point{background:transparent;border:2px solid var(--white);box-sizing:border-box}
  @keyframes tkd-clignote{50%{opacity:.25}}
  @media (prefers-reduced-motion:reduce){ .tkd-round-rec.is-rec .tkd-round-point{animation:none} }
  #tkd-round-chrono{font-family:'Anton';font-size:19px;font-weight:400;letter-spacing:.5px;font-variant-numeric:tabular-nums}
  .tkd-round-centre{
    position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
    padding:20px;background:rgba(0,0,0,.55);
  }
  .tkd-round-centre[hidden]{display:none}
  .tkd-round-centre .ui-btn-primary,.tkd-round-centre .ui-btn-outline{width:100%;max-width:360px;background-clip:padding-box}
  .tkd-round-centre .ui-btn-outline{background:rgba(var(--scrim-rgb),.78)}
  .tkd-round-centre .ui-btn-primary:disabled{background:var(--surface2);color:var(--muted);border:1px solid var(--line2);cursor:default}
  .tkd-round-consigne{max-width:420px;margin:0;padding:12px 14px;border-radius:12px;background:rgba(var(--scrim-rgb),.82);text-align:center;font-size:16px;line-height:1.45}
  .tkd-round-message{
    position:absolute;z-index:4;left:12px;right:12px;top:calc(68px + env(safe-area-inset-top,0px));margin:0 auto;max-width:520px;
    display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:12px;
    background:rgba(var(--scrim-rgb),.9);border:2px solid var(--white);font-size:16px;line-height:1.4;
  }
  .tkd-round-message[hidden]{display:none}
  .tkd-round-message.is-erreur{border-color:var(--warn)}
  .tkd-round-message svg{flex:none;margin-top:2px}
  .tkd-round-bas{
    position:absolute;z-index:3;left:0;right:0;bottom:0;display:flex;justify-content:center;gap:10px;
    padding:10px calc(12px + env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) calc(12px + env(safe-area-inset-left,0px));
  }
  .tkd-round-bas[hidden]{display:none}
  .tkd-round-bouton{
    flex:1;max-width:260px;min-height:56px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;
    border-radius:14px;background:rgba(var(--scrim-rgb),.85);border:2px solid var(--white);color:var(--white);cursor:pointer;
    font-family:'Anton';font-size:16px;font-weight:400;letter-spacing:.5px;-webkit-tap-highlight-color:transparent;
  }
  .tkd-round-bouton.is-fin{background:var(--amber);border-color:var(--amber);color:var(--on-accent)}
  .tkd-round-bouton:disabled{background:rgba(var(--scrim-rgb),.95);border:2px dashed var(--muted);color:var(--muted);cursor:default} /* fond plus opaque : gris #8893a8 à 5,6:1 même sur une image blanche */
  .tkd-round-bouton:focus-visible,#tkd-round-demarrer:focus-visible,#tkd-round-quitter:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
  /* paysage bas : les deux boutons passent en colonne à droite, sous le bandeau du haut */
  @media (orientation:landscape) and (max-height:520px){
    .tkd-round-bas{
      left:auto;top:calc(64px + env(safe-area-inset-top,0px));flex-direction:column;justify-content:center;align-items:stretch;width:210px;
      padding:8px calc(12px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) 8px;
    }
    .tkd-round-bouton{flex:none;max-width:none}
    .tkd-round-message{top:calc(60px + env(safe-area-inset-top,0px));right:230px;left:12px}
  }
  /* écran du déroulé du combat (js/20) : fenêtre d'échec d'écriture et repos entre deux rounds. Même squelette que « Nouveau combat »
     (défilable, composants ui-*), au niveau de l'écran de round (z-index 1500, sous les fenêtres maison 2000). */
  #tkd-deroule{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-deroule.hidden{display:none}
  #tkd-deroule:focus{outline:none}
  .tkd-deroule-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
  .tkd-deroule-actions .ui-btn-primary,.tkd-deroule-actions .ui-btn-outline{width:100%;text-decoration:none}
  /* repos : grand compte à rebours (Anton, ambre sur le fond : plus de 9:1) ; à zéro il passe en blanc et le texte dit que le repos est fini */
  .tkd-deroule-decompte{
    margin:18px 0 8px;text-align:center;font-family:'Anton';font-size:84px;line-height:1.1;letter-spacing:1px;
    color:var(--amber);font-variant-numeric:tabular-nums;
  }
  .tkd-deroule-decompte.is-fini{color:var(--text)}
  .tkd-deroule-etat{text-align:center;font-size:16px;font-weight:600}
  @media (orientation:landscape) and (max-height:520px){
    .tkd-deroule-decompte{margin:6px 0 2px;font-size:56px}
    .tkd-deroule-actions{flex-direction:row;margin-top:8px}
    .tkd-deroule-actions .ui-btn-primary,.tkd-deroule-actions .ui-btn-outline{flex:1 1 0;min-width:0}
  }
  /* saisie des actions en direct (js/21) : l'écran de round (#tkd-round.is-saisie ; sans js/21, l'écran garde sa barre PAUSE / ROUND TERMINÉ de repli).
     Camps : bleu = fond #1a4fa8, accent #56a8ff ; rouge = fond #c42b3b, accent #ff5d6c ; texte blanc (7,7:1 et 5,6:1) ; éclair #ffd21f.
     Le mot du camp est toujours écrit (BLEU / ROUGE) : la couleur ne porte jamais seule l'information. Cibles tactiles de 44 px au moins.
     Z-index : score 5 (comme l'en-tête), barre du bas 3, feuille « Quelle action ? » 6, sous les fenêtres maison (2000). */
  #tkd-round.is-saisie .tkd-round-message{top:calc(116px + env(safe-area-inset-top,0px))}
  .tkd-round-score{
    position:absolute;z-index:5;left:calc(12px + env(safe-area-inset-left,0px));top:calc(66px + env(safe-area-inset-top,0px));
    display:flex;gap:8px;pointer-events:none;
  }
  .tkd-score-chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:2px 12px;border-radius:10px;border:2px solid;color:var(--white);font-weight:700}
  .tkd-score-chip.is-bleu{background:var(--tkd-bleu-fond);border-color:var(--tkd-bleu)}
  .tkd-score-chip.is-rouge{background:var(--tkd-rouge-fond);border-color:var(--tkd-rouge)}
  .tkd-score-mot{font-size:13px;letter-spacing:.6px}
  .tkd-score-chip output{font-family:'Anton';font-size:24px;font-weight:400;line-height:1;font-variant-numeric:tabular-nums}
  /* barre du bas : deux rangées en portrait (NOUVELLE ACTION, puis PAUSE / éclair / ROUND TERMINÉ), 16 px sous le bouton principal */
  #tkd-round.is-saisie .tkd-round-bas{
    flex-direction:column;align-items:stretch;gap:16px;
    padding:10px calc(16px + env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));
  }
  .tkd-round-bouton.is-action{flex:none;width:100%;max-width:none;min-height:64px;background:var(--white);border-color:var(--white);color:var(--tkd-sombre);font-size:20px}
  .tkd-round-bouton.is-action:disabled,.tkd-round-bouton.is-eclair:disabled{background:rgba(var(--scrim-rgb),.95);border:2px dashed var(--muted);color:var(--muted)}
  .tkd-round-rangee{display:flex;gap:10px}
  .tkd-round-rangee .tkd-round-bouton{flex:1 1 auto;min-width:0;max-width:none;height:56px;padding:0 10px;font-size:14px;white-space:nowrap}
  .tkd-round-rangee .tkd-round-bouton.is-eclair{flex:0 0 64px;color:var(--tkd-eclair);border-color:var(--tkd-eclair)}
  .tkd-eclair-texte{display:none}
  /* bloc « Dernière action » (modèle commun du contrat d'un sport, §3.4 ter) : à gauche « DERNIÈRE ACTION » (--muted) et la saisie (« BLEU · Tête 3 pts »,
     mot du camp à sa couleur), à droite la croix (rouge) et l'éclair (jaune ; plein une fois l'action marquée, plein et inactif pour un repère seul).
     Même hauteur que l'ancienne pastille (52 px : boutons de 44 px + 2 x 2 px de marge + 2 x 2 px de bord), largeur ajustée au contenu : il ne couvre
     pas plus d'image qu'avant. Affiché seulement après une saisie. Voile à 95 % : le rouge du camp (#ff5d6c) reste au-dessus de 4,5:1 même sur une image blanche. */
  .tkd-round-derniere{
    display:flex;align-items:center;gap:8px;align-self:flex-start;max-width:100%;min-width:0;padding:2px 2px 2px 10px;border-radius:12px;
    background:rgba(var(--scrim-rgb),.95);border:2px solid var(--white);
  }
  .tkd-round-derniere[hidden]{display:none}
  .tkd-da-txt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
  .tkd-da-k{font-size:11px;font-weight:800;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tkd-da-v{display:flex;align-items:baseline;min-width:0;margin-top:1px;font-size:15px;font-weight:700;line-height:1.3;color:var(--white);white-space:nowrap}
  /* une seule ligne : le mot du camp, les points et « KO » ne se coupent jamais, seul le nom de la technique se raccourcit (…) */
  .tkd-da-mot{flex:none;font-weight:800}
  .tkd-da-mot.is-bleu{color:var(--tkd-bleu)}
  .tkd-da-mot.is-rouge{color:var(--tkd-rouge)}
  .tkd-da-sep,.tkd-da-pts{flex:none;white-space:pre}
  .tkd-da-ko{flex:none;font-weight:800}
  .tkd-da-nom{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .tkd-da-btns{display:flex;gap:4px;flex:none}
  /* téléphone étroit (360 px) : un point de moins, même hauteur (52 px) */
  @media (max-width:379px){ .tkd-da-v{font-size:14px} }
  .tkd-da-ib{
    flex:none;width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:10px;
    border:2px solid rgba(255,255,255,.4);background:transparent;color:var(--white);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .1s;
  }
  .tkd-da-ib svg{flex:none;display:block}
  .tkd-da-ib:active{transform:scale(.95)}
  .tkd-da-ib.is-croix{color:var(--red)}
  .tkd-da-ib.is-eclair{color:var(--tkd-eclair);border-color:var(--tkd-eclair)}
  .tkd-da-ib.is-eclair[aria-pressed="true"],.tkd-da-ib.is-eclair[aria-disabled="true"]{background:var(--tkd-eclair);color:var(--tkd-sombre)}   /* repère seul : plein, inactif */
  .tkd-da-ib[aria-disabled="true"]{cursor:default}
  .tkd-da-ib[aria-disabled="true"]:active{transform:none}
  @media (hover:hover){ .tkd-da-ib.is-croix:hover{border-color:var(--red)} }
  @media (prefers-reduced-motion:reduce){ .tkd-da-ib{transition:none} .tkd-da-ib:active{transform:none} }
  /* feuille « Quelle action ? » : ancrée au-dessus de la rangée PAUSE / éclair / ROUND TERMINÉ (qui reste visible), l'image reste visible au-dessus */
  .tkd-feuille{
    position:absolute;z-index:6;left:0;right:0;bottom:calc(88px + env(safe-area-inset-bottom,0px));
    padding:10px calc(12px + env(safe-area-inset-right,0px)) 10px calc(12px + env(safe-area-inset-left,0px));
    background:rgba(var(--scrim-rgb),.95);border-top:2px solid var(--white);border-radius:16px 16px 0 0;color:var(--white);
  }
  .tkd-feuille[hidden]{display:none}
  .tkd-feuille:focus{outline:none}
  .tkd-feuille-tete{display:flex;align-items:center;gap:6px;margin-bottom:8px}
  .tkd-feuille-titre{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Anton';font-size:16px;letter-spacing:.5px}
  .tkd-feuille-puces{flex:none;display:flex;gap:6px}
  .tkd-feuille-puce{
    min-height:44px;display:inline-flex;align-items:center;gap:5px;padding:0 10px;border-radius:22px;border:2px solid var(--white);background:transparent;color:var(--white);
    font-family:inherit;font-size:14px;font-weight:700;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-feuille-puce svg{display:block}
  .tkd-feuille-puce-coche{display:none}
  .tkd-feuille-puce[aria-pressed="true"] .tkd-feuille-puce-coche{display:inline-flex}
  .tkd-feuille-puce.is-temps_fort .tkd-feuille-puce-icone{color:var(--tkd-eclair)}
  .tkd-feuille-puce.is-temps_fort[aria-pressed="true"]{background:var(--tkd-eclair);border-color:var(--tkd-eclair);color:var(--tkd-sombre)}
  .tkd-feuille-puce.is-temps_fort[aria-pressed="true"] .tkd-feuille-puce-icone{color:var(--tkd-sombre)}
  .tkd-feuille-puce.is-ko[aria-pressed="true"]{background:var(--white);color:var(--tkd-sombre)}
  .tkd-feuille-fermer{
    flex:none;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;border:2px solid var(--white);
    background:transparent;color:var(--white);cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-feuille-camps{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .tkd-feuille-camp-tete{display:flex;align-items:baseline;justify-content:space-between;gap:6px;padding:4px 10px;border-radius:10px 10px 0 0}
  .tkd-feuille-camp.is-bleu .tkd-feuille-camp-tete{background:var(--tkd-bleu-fond);border-bottom:3px solid var(--tkd-bleu)}
  .tkd-feuille-camp.is-rouge .tkd-feuille-camp-tete{background:var(--tkd-rouge-fond);border-bottom:3px solid var(--tkd-rouge)}
  .tkd-feuille-camp-mot{font-family:'Anton';font-size:18px;letter-spacing:.5px}
  .tkd-feuille-camp-role{font-size:13px;font-weight:600}
  .tkd-feuille-grille{display:grid;grid-template-columns:1fr;gap:4px;margin-top:4px}
  .tkd-tuile{
    min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 10px;border-radius:10px;border:2px solid;color:var(--white);
    font-family:inherit;font-size:15px;font-weight:700;line-height:1.1;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-feuille-camp.is-bleu .tkd-tuile{background:var(--tkd-bleu-fond);border-color:var(--tkd-bleu)}
  .tkd-feuille-camp.is-rouge .tkd-tuile{background:var(--tkd-rouge-fond);border-color:var(--tkd-rouge)}
  .tkd-tuile.is-gamjeom{border-style:dashed}
  .tkd-tuile.is-gamjeom .tkd-tuile-nom{white-space:nowrap}
  .tkd-tuile-pts{flex:none;font-family:'Anton';font-size:17px;font-weight:400;letter-spacing:.3px}
  .tkd-tuile.is-gamjeom .tkd-tuile-pts{font-family:inherit;font-size:13px;font-weight:600}
  .tkd-tuile:active{filter:brightness(1.25)}
  @media (hover:hover){ .tkd-tuile:hover{filter:brightness(1.15)} }
  .tkd-tuile:focus-visible,.tkd-feuille-puce:focus-visible,.tkd-feuille-fermer:focus-visible,.tkd-da-ib:focus-visible,#tkd-round-action:focus-visible,#tkd-round-eclair:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
  /* paysage : colonne de commandes à droite (NOUVELLE ACTION, éclair, PAUSE, ROUND TERMINÉ), pastille en bas à gauche, feuille à gauche de la colonne
     sur deux colonnes de camps, chaque camp en 2 x 3 tuiles : tient sans défilement sur 360 px de haut */
  @media (orientation:landscape) and (max-height:520px){
    #tkd-round.is-saisie .tkd-round-message{top:calc(110px + env(safe-area-inset-top,0px))}
    #tkd-round.is-saisie .tkd-round-bas{gap:8px;padding:8px calc(12px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) 8px}
    .tkd-round-rangee{display:contents}
    .tkd-round-bouton.is-action{order:1;min-height:56px;font-size:18px}
    .tkd-round-rangee .tkd-round-bouton{height:48px;min-height:48px;flex:none;font-size:15px}
    .tkd-round-rangee .tkd-round-bouton.is-eclair{order:2;flex:none}
    #tkd-round-pause{order:3}
    #tkd-round-fin{order:4}
    .tkd-eclair-texte{display:inline}
    .tkd-round-derniere{position:fixed;left:calc(12px + env(safe-area-inset-left,0px));bottom:calc(12px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 260px)}
    .tkd-feuille{
      left:calc(12px + env(safe-area-inset-left,0px));right:calc(222px + env(safe-area-inset-right,0px));bottom:calc(6px + env(safe-area-inset-bottom,0px));
      padding:8px;border:2px solid var(--white);border-radius:16px;
    }
    .tkd-feuille-tete{margin-bottom:4px}
    .tkd-feuille-camp-tete{padding:2px 10px}
    .tkd-feuille-grille{grid-template-columns:1fr 1fr}
    .tkd-tuile{min-height:44px;padding:0 8px;font-size:14px}
    .tkd-tuile.is-gamjeom .tkd-tuile-pts{display:none}
  }
  /* écran « Fin du combat » (js/22) : même squelette que « Nouveau combat » (page défilante, composants ui-*, puces tkd-puce, pas tkd-pas), au niveau
     de l'écran de round (z-index 1500, sous les fenêtres maison 2000). Camps : bleu = fond #1a4fa8 / texte #fff / accent #56a8ff ; rouge = fond #c42b3b /
     texte #fff / accent #ff5d6c. Le mot du camp (BLEU / ROUGE) et son rôle sont toujours écrits : la couleur ne porte jamais seule l'information.
     Portrait : une colonne. Paysage bas : deux colonnes (rounds et vainqueur à gauche, le reste à droite, bouton en bas de la colonne de droite). */
  #tkd-fin{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-fin.hidden{display:none}
  #tkd-fin:focus{outline:none}
  .tkd-fin-page .ui-subtitle{font-size:14px;line-height:1.4;color:var(--muted)}
  .tkd-fin-colonnes{display:flex;flex-direction:column;flex:1}
  .tkd-fin-col{display:flex;flex-direction:column}
  .tkd-fin-page > .ui-actions{margin-top:20px}
  .tkd-fin-rounds{list-style:none;display:flex;flex-direction:column;gap:8px}
  .tkd-fin-round{background:var(--surface);border:1px solid var(--line2);border-radius:12px;padding:10px 12px}
  .tkd-fin-round-ligne{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 10px}
  .tkd-fin-round-nom{font-family:'Anton';font-size:17px;letter-spacing:.5px}
  .tkd-fin-score{grid-column:1;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
  .tkd-fin-score-bleu{color:var(--tkd-bleu)}
  .tkd-fin-score-rouge{color:var(--tkd-rouge)}
  .tkd-fin-round-gagnant{grid-column:1;font-size:13px;color:var(--text)}
  .tkd-fin-corriger{grid-column:2;grid-row:1 / span 3;width:auto;min-width:112px;height:44px;padding:0 12px;font-size:14px}
  .tkd-fin-corriger svg{transition:transform .12s}
  .tkd-fin-corriger[aria-expanded="true"] svg{transform:rotate(180deg)}
  .tkd-fin-correction{margin-top:10px;padding-top:6px;border-top:1px solid var(--line)}
  .tkd-fin-pas .tkd-fin-mot{font-weight:800;letter-spacing:.1em}
  .tkd-fin-pas.is-bleu .tkd-fin-mot{color:var(--tkd-bleu)}
  .tkd-fin-pas.is-rouge .tkd-fin-mot{color:var(--tkd-rouge)}
  .tkd-fin-role{font-size:13px;font-weight:600;color:var(--muted)}
  .tkd-fin-correction-gagnant{display:flex;flex-direction:column;gap:6px;padding:8px 0;border-top:1px solid var(--line)}
  .tkd-fin-remise{height:44px;font-size:14px;margin-top:6px}
  .tkd-fin-remise:disabled{color:var(--muted);border-style:dashed;cursor:default}
  /* vainqueur : deux grandes cases, BLEU toujours à gauche */
  .tkd-fin-camps{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .tkd-fin-camp{
    display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:76px;padding:10px 12px;border-radius:14px;
    background:var(--surface);border:2px solid;color:var(--text);font-family:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-fin-camp.is-bleu{border-color:var(--tkd-bleu)}
  .tkd-fin-camp.is-rouge{border-color:var(--tkd-rouge)}
  .tkd-fin-camp-haut{display:flex;align-items:center;gap:6px}
  .tkd-fin-camp-coche{display:none}
  .tkd-fin-camp .tkd-fin-mot{font-family:'Anton';font-size:22px;letter-spacing:.6px;line-height:1.1}
  .tkd-fin-camp.is-bleu .tkd-fin-mot{color:var(--tkd-bleu)}
  .tkd-fin-camp.is-rouge .tkd-fin-mot{color:var(--tkd-rouge)}
  .tkd-fin-camp-nom{max-width:100%;font-size:15px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
  .tkd-fin-camp[aria-pressed="true"]{color:var(--white)}
  .tkd-fin-camp[aria-pressed="true"] .tkd-fin-camp-coche{display:inline-flex}
  .tkd-fin-camp[aria-pressed="true"] .tkd-fin-mot,.tkd-fin-camp[aria-pressed="true"] .tkd-fin-role{color:var(--white)}
  .tkd-fin-camp.is-bleu[aria-pressed="true"]{background:var(--tkd-bleu-fond)}
  .tkd-fin-camp.is-rouge[aria-pressed="true"]{background:var(--tkd-rouge-fond)}
  .tkd-fin-explication{margin:10px 0 0;font-size:14px;line-height:1.45;color:var(--text)}
  .tkd-fin-bilan{margin:6px 0 0;font-size:13px;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums}
  .tkd-fin-question{margin-bottom:10px;font-weight:600}
  .tkd-fin-camp:focus-visible,.tkd-fin-corriger:focus-visible,.tkd-fin-remise:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-fin-colonnes .tkd-pas-ligne .tkd-pas-nom{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
  @media(hover:hover){
    .tkd-fin-camp[aria-pressed="false"]:hover{background:var(--surface2)}
  }
  @media (orientation:landscape) and (max-height:520px){
    .tkd-fin-colonnes{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 28px;align-items:stretch}
    .tkd-fin-page .ui-head.is-compact{margin-top:0}
    .tkd-fin-page .ui-head.is-compact .ui-title{font-size:24px}
    .tkd-fin-page .ui-subtitle{margin-top:0}
    .tkd-fin-page > .deco-dots{display:none}
    .tkd-fin-colonnes{margin-top:6px}
    .tkd-fin-page > .ui-actions{padding-left:calc(50% + 34px);padding-top:10px}
    .tkd-fin-camp{min-height:64px}
  }
  /* widget d'accueil : accès « Saisir le résultat » d'un combat à conclure (js/16), sur sa propre ligne sous le texte de l'athlète ; COMBAT et
     Rouvrir ne bougent pas. Cible de 44 px, texte clair sur le fond du widget (le gris des petits caractères fait plus de 5:1). */
  .tkd-accueil-ligne{flex-wrap:wrap}
  .tkd-accueil-resultat{
    flex:0 0 100%;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:0 12px;
    background:transparent;border:1px solid var(--amber-dim);border-radius:12px;color:var(--text);
    font-family:inherit;font-size:14px;font-weight:700;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-accueil-resultat-texte{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
  .tkd-accueil-resultat-type{font-size:12px;font-weight:600;color:var(--muted)}
  .tkd-accueil-resultat svg{flex:none;color:var(--amber);transform:rotate(-90deg)}
  .tkd-accueil-resultat:active{opacity:.7}
  .tkd-accueil-resultat:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  @media(hover:hover){ .tkd-accueil-resultat:hover{background:rgba(var(--accent-rgb),.08)} }
  /* écran « Stats du combat » (js/23) : même squelette que « Fin du combat » (page défilante, composants ui-*, classes de score .tkd-fin-*), au niveau de
     l'écran de round (z-index 1500, sous les fenêtres maison 2000). Camps : bleu = fond #1a4fa8 / texte #fff / accent #56a8ff ; rouge = fond #c42b3b /
     texte #fff / accent #ff5d6c. Le mot du camp (BLEU / ROUGE) et son rôle sont toujours écrits : la couleur ne porte jamais seule l'information.
     Portrait : une colonne. Paysage bas : deux colonnes (score par round, résultat et bouton à gauche ; face-à-face et temps forts à droite). */
  #tkd-stats-combat{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-stats-combat.hidden{display:none}
  #tkd-stats-combat:focus{outline:none}
  .tkd-vue-page{padding-bottom:max(24px, env(safe-area-inset-bottom))}
  .tkd-vue-hub.hidden,.tkd-vue-section.hidden,.tkd-fiche-hub.hidden,.tkd-fiche-section.hidden{display:none}
  .tkd-vue-tete{margin-top:18px}
  .tkd-vue-tete .ui-kicker{margin:0}
  .tkd-page .ui-title:focus{outline:none}
  /* page du combat (chantier « pages TKD ») : deux blocs face à face, fond plein de la couleur du camp, texte blanc (bleu 7,7:1, rouge 5,6:1) ; BLEU toujours à gauche.
     Le mot du camp est écrit, « Vainqueur » aussi : la couleur ne porte jamais seule l'information. */
  .tkd-vue-duel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:12px}
  .tkd-vue-camp{display:flex;flex-direction:column;gap:2px;min-width:0;padding:12px;border-radius:16px;color:var(--white)}
  .tkd-vue-camp.is-bleu{background:var(--tkd-bleu-fond)}
  .tkd-vue-camp.is-rouge{background:var(--tkd-rouge-fond);text-align:right;align-items:flex-end}
  .tkd-vue-camp-mot{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
  .tkd-vue-camp-nom{font-size:15px;font-weight:800;line-height:1.2;overflow-wrap:anywhere}
  .tkd-vue-camp-bas{display:flex;align-items:flex-end;gap:8px;margin-top:2px}
  .tkd-vue-camp.is-rouge .tkd-vue-camp-bas{flex-direction:row-reverse}
  .tkd-vue-camp-score{font-family:'Anton';font-size:40px;line-height:1}
  .tkd-vue-camp-vainqueur{display:inline-flex;align-items:center;gap:4px;margin-bottom:4px;padding:3px 8px;border-radius:10px;background:rgba(0,0,0,.28);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
  /* rounds : une ligne par round, bordure gauche à la couleur du vainqueur (rien pour un nul) */
  .tkd-vue-rounds{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
  .tkd-vue-round{display:flex;align-items:center;gap:10px;min-height:56px;padding:6px 8px 6px 14px;background:var(--surface);border:1px solid var(--line2);border-left:4px solid var(--line2);border-radius:14px}
  .tkd-vue-round.is-g-bleu{border-left-color:var(--tkd-bleu)}
  .tkd-vue-round.is-g-rouge{border-left-color:var(--tkd-rouge)}
  .tkd-vue-round-info{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 14px}
  .tkd-vue-round-nom{font-family:'Anton';font-size:19px;letter-spacing:.5px}
  .tkd-vue-round-score{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
  .tkd-vue-tiret{color:var(--muted)}
  .tkd-vue-vide{font-size:18px;color:var(--muted)}
  .tkd-vue-corrige{font-size:13px;font-weight:700;color:var(--text)}
  .tkd-vue-revoir{
    flex:none;display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 14px;border:0;border-radius:12px;
    background:var(--amber);color:var(--on-accent);font-family:inherit;font-size:15px;font-weight:800;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-vue-revoir:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-vue-sans-video{flex:none;padding-right:6px;font-size:13px;color:var(--muted)}
  .tkd-vue-actions{margin-top:16px}
  .tkd-vue-actions .ui-btn-outline,.tkd-vue-actions .ui-btn-primary{width:100%}
  .tkd-vue-actions .ui-btn-outline{height:52px;font-size:15px}
  .tkd-vue-actions .ui-btn-primary,.tkd-carte-saisir{height:52px;font-family:inherit;font-size:16px;font-weight:800;letter-spacing:0}
  .tkd-vue-rien{margin-top:4px;color:var(--muted)}
  .tkd-vue-section .deco-dots,.tkd-fiche-section .deco-dots{display:block;margin:14px 0 18px}
  .tkd-vue-sous-section{margin:18px 0 8px}
  /* tuiles (grille .arch-tiles partagée, non modifiée) : un chiffre utile sous le nom ; une tuile seule en fin de grille prend toute la largeur */
  .tkd-tuiles{margin-top:16px}
  .tkd-tuiles .arch-tile{min-height:118px}
  .tkd-tuiles .arch-tile:last-child:nth-child(odd){grid-column:1 / -1;min-height:0;flex-direction:row;align-items:center;justify-content:flex-start}
  .tkd-hub-tuile-sous{font-size:13px;line-height:1.3;color:var(--muted)}
  /* face-à-face : tableau de trois colonnes (statistique, BLEU, ROUGE) */
  .tkd-vue-note-force{margin-bottom:10px}
  .tkd-vue-tableau{
    width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--line2);border-radius:12px;overflow:hidden;
  }
  .tkd-vue-c0{width:38%}
  .tkd-vue-tableau th,.tkd-vue-tableau td{text-transform:none;letter-spacing:normal;position:static;border-bottom:0}
  .tkd-vue-tableau thead th{padding:8px 6px;color:var(--white);text-align:center;vertical-align:top;font-weight:700}
  .tkd-vue-tableau thead th:first-child{background:var(--surface2)}
  .tkd-vue-tableau thead th.is-bleu{background:var(--tkd-bleu-fond);border-bottom:3px solid var(--tkd-bleu)}
  .tkd-vue-tableau thead th.is-rouge{background:var(--tkd-rouge-fond);border-bottom:3px solid var(--tkd-rouge)}
  .tkd-vue-col-mot{display:block;font-family:'Anton';font-size:18px;font-weight:400;letter-spacing:.6px;line-height:1.1}
  .tkd-vue-col-role{display:block;font-size:13px;font-weight:600}
  .tkd-vue-col-nom{display:block;margin-top:2px;font-size:12px;font-weight:600;line-height:1.25;overflow-wrap:anywhere}
  .tkd-vue-tableau tbody th{padding:10px 10px;text-align:left;font-size:14px;font-weight:600;line-height:1.3;color:var(--text)}
  .tkd-vue-tableau tbody td{padding:8px 6px;text-align:center;font-family:'Anton';font-size:20px;font-weight:400;font-variant-numeric:tabular-nums}
  .tkd-vue-tableau tbody tr + tr th,.tkd-vue-tableau tbody tr + tr td{border-top:1px solid var(--line)}
  .tkd-vue-tableau tbody tr.is-sous th{padding-left:22px;font-size:13px;font-weight:500;color:var(--muted)}
  .tkd-vue-tableau tbody tr.is-sous td{font-size:16px;color:var(--muted)}
  /* lignes qui ouvrent Revoir à un instant (temps forts, toutes les actions) : 56 px au moins, bordure gauche du camp (éclair jaune pour un repère) */
  .tkd-lignes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
  .tkd-ligne{background:var(--surface);border:1px solid var(--line2);border-left:4px solid var(--line2);border-radius:14px;overflow:hidden}
  .tkd-ligne.is-bleu{border-left-color:var(--tkd-bleu)}
  .tkd-ligne.is-rouge{border-left-color:var(--tkd-rouge)}
  .tkd-ligne.is-repere{border-left-color:var(--tkd-eclair)}
  .tkd-ligne-main{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;margin:0;padding:8px 10px 8px 12px;background:transparent;border:0;color:var(--text);font-family:inherit;text-align:left}
  button.tkd-ligne-main{cursor:pointer;-webkit-tap-highlight-color:transparent}
  button.tkd-ligne-main:active{background:var(--surface2)}
  button.tkd-ligne-main:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .tkd-ligne-eclair{flex:none;display:flex;color:var(--tkd-eclair)}
  .tkd-ligne-corps{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .tkd-ligne-titre{font-size:15px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
  .tkd-ligne-sous{font-size:13px;font-weight:600;line-height:1.3;color:var(--muted);overflow-wrap:anywhere}
  .tkd-ligne-lecture{flex:none;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--amber);color:var(--on-accent)}
  @media(hover:hover){ button.tkd-ligne-main:hover{background:var(--surface2)} .tkd-vue-revoir:hover{opacity:.9} }
  .tkd-vue-page .ui-back:focus-visible,.tkd-vue-actions button:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media (orientation:landscape) and (max-height:520px){
    .tkd-vue-page .ui-head.is-compact{margin-top:8px}
    .tkd-vue-page .ui-head.is-compact .ui-title{font-size:24px}
    .tkd-vue-page .deco-dots{display:none}
    .tkd-tuiles .arch-tile{min-height:0}
  }
  /* widget d'accueil : l'en-tête est une rangée. À gauche le bouton de repli (apparence et comportement d'avant), à droite le bouton « Paramètres » de la
     compétition (js/16, bouton FRÈRE : un bouton ne s'imbrique pas dans un bouton). Il reste visible quand le widget est replié. Zone d'appui de 44 x 44 px,
     icône ambre (plus de 7:1 sur le fond du widget). */
  .tkd-accueil-tete{display:flex;align-items:center}
  .tkd-accueil-tete .tkd-accueil-entete{flex:1;width:auto;min-width:0}
  .tkd-accueil-reglages{
    flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0 12px 0 0;padding:0;
    background:transparent;border:1px solid var(--line2);border-radius:12px;color:var(--amber);cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-accueil-reglages:active{background:var(--surface2)}
  .tkd-accueil-reglages:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media(hover:hover){ .tkd-accueil-reglages:hover{border-color:var(--amber-dim);color:var(--text)} }
  /* édition d'une compétition ouverte : le dernier athlète ne se supprime pas (bouton inactif, explication écrite sous la liste) */
  .tkd-athlete .ui-card-del:disabled{color:var(--muted);cursor:default;opacity:1}
  @media(hover:hover){ .tkd-athlete .ui-card-del:disabled:hover{color:var(--muted)} }
  .tkd-aide-dernier{margin-top:8px}
  /* édition d'une compétition : « Enregistrer le nom » (bouton explicite, 48 px) sous le champ ; inactif quand le nom est refusé ou inchangé (texte gris
     #8893a8, 5,1:1 sur le fond) ; le message d'erreur (rouge) et le statut « Nom enregistré. » sont écrits sous le champ, jamais dans une alerte */
  .tkd-renommer{margin-top:10px}
  .tkd-renommer:disabled{color:var(--muted);border-style:dashed;cursor:default}
  .tkd-renommer:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-statut-nom{margin-top:6px;color:var(--text)}
  /* modifier un athlète (édition d'une compétition) : le bouton « Modifier » (crayon) partage la zone d'appui de la suppression (52 x carte, 44 px au moins) ; il
     s'éclaire en ambre au survol et au focus ; pendant une modification, les boutons de la liste qui sont inactifs sont atténués ; le message d'état et le
     bouton « Annuler » (48 px) sont écrits sous le titre du formulaire */
  .tkd-card-modifier:focus-visible{color:var(--amber)}
  @media(hover:hover){ .tkd-athlete .ui-card-del.tkd-card-modifier:not(:disabled):hover{color:var(--amber)} }
  .tkd-athlete .ui-card-del:disabled{opacity:.45}
  #tkd-aide-modification{margin-bottom:12px;font-size:14px;line-height:1.45;color:var(--text)}
  .tkd-annuler-modification{margin-top:10px}
  .tkd-annuler-modification:disabled{color:var(--muted);border-style:dashed;cursor:default}
  .tkd-annuler-modification:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  /* écran « Revoir le round » (js/24) : lecteur sans plein écran, barre de position, commandes (44 px au moins), puis la liste des actions et des temps forts. La
     feuille « Quelle action ? » (js/21) est posée dans le flux de la page (ce n'est PAS la feuille ancrée en bas de l'écran de round) : elle ne masque jamais le lecteur. */
  #tkd-apres-coup{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-apres-coup.hidden{display:none}
  #tkd-apres-coup:focus{outline:none}
  .tkd-ac-page{padding-bottom:max(24px, env(safe-area-inset-bottom))}
  .tkd-ac-page .ui-subtitle{font-size:14px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
  .tkd-ac-page .ui-head.is-compact{margin-top:18px}
  /* Revoir (js/24) : onglets « Round 1 / Round 2 / … » (rounds joués), 44 px de haut, l'onglet actif en blanc plein (texte sombre) */
  .tkd-ac-onglets{display:flex;gap:6px;margin:12px 0 10px;overflow-x:auto;scrollbar-width:none}
  .tkd-ac-onglets::-webkit-scrollbar{display:none}
  .tkd-ac-onglet{flex:1 0 auto;min-width:84px;height:44px;padding:0 12px;background:var(--surface2);border:1px solid var(--line2);border-radius:12px;color:var(--text);font-family:inherit;font-size:14px;font-weight:800;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .tkd-ac-onglet.is-actif{background:var(--amber);border-color:var(--amber);color:var(--on-accent)}
  .tkd-ac-onglet:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-ac-page .ui-kicker{margin:0}
  .tkd-ac-page .ui-back:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-ac-avertissement{margin-bottom:8px}
  .tkd-ac-colonnes{display:flex;flex-direction:column}
  .tkd-ac-col{display:flex;flex-direction:column;min-width:0}
  .tkd-ac-lecteur{background:#000;border-radius:12px;overflow:hidden;line-height:0}
  .tkd-ac-lecteur video{display:block;width:100%;height:auto;max-height:32vh;object-fit:contain;background:#000}
  .tkd-ac-position{display:flex;align-items:center;gap:10px;margin-top:8px}
  .tkd-ac-horloge{flex:none;min-width:5.6em;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
  .tkd-ac-barre{flex:1;min-width:0;height:44px;margin:0;background:transparent;accent-color:var(--amber);cursor:pointer}
  .tkd-ac-barre:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-ac-commandes{display:grid;grid-template-columns:1fr 1fr 1.5fr 1fr 1fr;gap:6px;margin-top:4px}
  .tkd-ac-saut,.tkd-ac-lecture{
    min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0 2px;
    background:var(--surface);border:1px solid var(--line2);border-radius:12px;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:700;line-height:1.1;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-ac-saut svg,.tkd-ac-lecture svg{flex:none;color:var(--amber)}
  .tkd-ac-saut:active,.tkd-ac-lecture:active{background:var(--surface2)}
  .tkd-ac-saut:focus-visible,.tkd-ac-lecture:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-ac-saut:disabled,.tkd-ac-lecture:disabled{opacity:.45;cursor:default}
  .tkd-ac-precision,.tkd-ac-erreur-lecture{margin-top:8px}
  .tkd-ac-sans-video{margin-bottom:6px}
  .tkd-ac-ajout{display:flex;flex-direction:column;gap:8px;margin-top:12px}
  .tkd-ac-ajout .ui-btn-primary{height:56px;font-size:19px}
  .tkd-ac-ajout .ui-btn-outline{height:52px;font-size:15px}
  .tkd-ac-ajout button:disabled{opacity:.45;cursor:default}
  .tkd-ac-ajout button:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-ac-feuille-zone .tkd-feuille{position:static;margin-top:10px;border:2px solid var(--white);border-radius:16px}
  .tkd-ac-score{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
  .tkd-ac-liste{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
  .tkd-ac-ligne{display:flex;align-items:stretch;background:var(--surface);border:1px solid var(--line2);border-left-width:5px;border-radius:12px;overflow:hidden}
  .tkd-ac-ligne.is-bleu{border-left-color:var(--tkd-bleu)}
  .tkd-ac-ligne.is-rouge{border-left-color:var(--tkd-rouge)}
  .tkd-ac-ligne.is-repere{border-left-color:var(--tkd-eclair)}
  .tkd-ac-ligne-main{
    flex:1;min-width:0;min-height:52px;display:grid;grid-template-columns:42px 78px minmax(0,1fr);align-items:center;gap:8px;padding:6px 10px;margin:0;
    background:transparent;border:0;color:var(--text);font-family:inherit;font-size:14px;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  div.tkd-ac-ligne-main{cursor:default}
  .tkd-ac-ligne-main:active{background:var(--surface2)}
  .tkd-ac-ligne-main:focus-visible,.tkd-ac-suppr:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
  .tkd-ac-instant{font-weight:700;font-variant-numeric:tabular-nums}
  .tkd-ac-camp{display:flex;flex-direction:column;line-height:1.15}
  .tkd-ac-camp-mot{font-family:'Anton';font-size:16px;letter-spacing:.5px}
  .tkd-ac-camp-role{font-size:12px;font-weight:600}
  .tkd-ac-camp-repere svg{color:var(--tkd-eclair)}
  .tkd-ac-libelle{line-height:1.3;overflow-wrap:anywhere}
  .tkd-ac-suppr{
    flex:none;width:52px;min-height:52px;display:flex;align-items:center;justify-content:center;padding:0;margin:0;
    background:transparent;border:0;border-left:1px solid var(--line2);color:var(--muted);cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-ac-suppr:active{background:var(--surface2)}
  .tkd-ac-suppr:disabled{opacity:.45;cursor:default}
  @media(hover:hover){ .tkd-ac-ligne-main:hover,.tkd-ac-suppr:not(:disabled):hover{background:var(--surface2)} .tkd-ac-suppr:not(:disabled):hover{color:var(--red)} }
  .tkd-ac-vide{padding:12px;color:var(--muted);font-size:14px}
  .tkd-ac-erreur-ecriture{margin-top:8px}
  /* paysage bas : le bouton retour et le titre sur une même ligne ; à gauche le lecteur puis le score et la liste, à droite la barre, les commandes et les boutons
     d'ajout (lecture et « Ajouter » restent visibles sans défiler) */
  @media (orientation:landscape) and (max-height:520px){
    #tkd-apres-coup{padding-top:8px}
    .tkd-ac-page .ui-topbar{position:absolute;top:0;left:0}
    .tkd-ac-page .ui-head.is-compact{margin:0 0 6px;padding-left:56px;min-height:44px}
    .tkd-ac-page .ui-head.is-compact .ui-title{font-size:22px}
    .tkd-ac-page .ui-subtitle{margin-top:0;font-size:13px}
    .tkd-ac-haut{display:flex;align-items:flex-start;gap:12px}
    .tkd-ac-haut .tkd-ac-entete{flex:1;min-width:0}
    .tkd-ac-page .ui-kicker{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .tkd-ac-onglets{flex:none;margin:0 0 6px}
    .tkd-ac-onglet{flex:none;min-width:76px}
    .tkd-ac-colonnes{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"video pilote" "liste pilote";gap:0 24px;align-items:start;margin-top:4px}
    .tkd-ac-col-lecteur{display:contents}
    .tkd-ac-lecteur{grid-area:video}
    .tkd-ac-pilote{grid-area:pilote;display:flex;flex-direction:column;min-width:0}
    .tkd-ac-col-liste{grid-area:liste}
    .tkd-ac-lecteur video{max-height:30vh}
    .tkd-ac-position{margin-top:0}
    .tkd-ac-ajout{flex-direction:row;margin-top:8px}
    .tkd-ac-ajout .ui-btn-primary,.tkd-ac-ajout .ui-btn-outline{height:48px;font-size:15px;flex:1;min-width:0}
    .tkd-ac-ajout .ui-btn-primary{font-family:inherit;font-weight:700}
  }
  /* widget d'accueil : le bloc nom + statut d'un athlète est un bouton qui ouvre sa fiche (js/16, js/25). Remise à zéro du style du bouton ; le texte garde sa mise en
     forme ; chevron discret à droite (le chevron du widget tourné vers la droite) ; zone d'appui d'au moins 44 px de haut. */
  .tkd-accueil-fiche{
    display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6px;row-gap:2px;align-items:center;align-content:center;text-align:left;
    min-height:44px;margin:0;padding:0;background:transparent;border:0;border-radius:8px;color:inherit;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .tkd-accueil-fiche > span:not(.tkd-accueil-fiche-chev){grid-column:1}
  .tkd-accueil-fiche-chev{grid-column:2;grid-row:1 / span 3;display:flex;align-self:center;color:var(--amber)}
  .tkd-accueil-fiche-chev svg{transform:rotate(-90deg)}
  .tkd-accueil-fiche:active{background:rgba(var(--accent-rgb),.08)}
  .tkd-accueil-fiche:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media(hover:hover){ .tkd-accueil-fiche:hover{background:rgba(var(--accent-rgb),.08)} }
  /* écran « Fiche athlète » (js/25) : même conteneur que « Stats du combat » (au-dessus de l'écran de round, sous les fenêtres maison) ; lignes de combat de 52 px au
     moins ; Gagné / Perdu sont toujours écrits, la couleur de la bordure ne porte jamais seule l'information ; une ligne non ouvrable (en cours, préparé) est du texte
     seul, bordure en tirets. */
  #tkd-fiche{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-fiche.hidden{display:none}
  #tkd-fiche:focus{outline:none}
  .tkd-fiche-page{padding-bottom:max(24px, env(safe-area-inset-bottom))}
  .tkd-fiche-page .ui-subtitle{font-size:14px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
  .tkd-fiche-page .ui-back:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  /* photo de l'athlète (chantier « photo de l'athlète ») : vignette 9:16 à droite du nom (page de l'athlète) et champ du formulaire (js/15) */
  .tkd-fiche-entete{display:flex;align-items:flex-start;gap:14px}
  .tkd-fiche-entete .tkd-fiche-tete{flex:1 1 auto;min-width:0}
  .tkd-fiche-photo{flex:none;display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:4px}
  .tkd-fiche-photo-bouton{width:60px;height:107px;padding:0;border-radius:12px;overflow:hidden;border:1px solid var(--line2);background:var(--surface2);color:var(--muted2,#8893a8);display:flex;align-items:center;justify-content:center;cursor:pointer}
  .tkd-fiche-photo-bouton.is-vide{border-style:dashed;color:var(--text)}
  .tkd-fiche-photo-bouton img{width:100%;height:100%;object-fit:cover;display:block}
  .tkd-fiche-photo-retirer{width:44px;height:44px;border-radius:50%;border:1px solid var(--line2);background:transparent;color:var(--text);display:flex;align-items:center;justify-content:center;cursor:pointer}
  .tkd-fiche-photo-bouton:focus-visible,.tkd-fiche-photo-retirer:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media (hover:hover){
    .tkd-fiche-photo-bouton:hover,.tkd-fiche-photo-retirer:hover{border-color:var(--amber)}
  }
  #pp-overlay.tkd-photo-prise{z-index:1600}   /* prise de vue du TKD (js/12) : au-dessus des écrans TKD, sous les boîtes de dialogue */
  .tkd-photo-champ{margin:4px 0 14px}
  .tkd-photo-ligne{display:flex;align-items:center;gap:10px;margin-top:6px}
  .tkd-photo-vignette{flex:none;width:45px;height:80px;border-radius:10px;overflow:hidden;border:1px solid var(--line2);background:var(--surface2);display:flex;align-items:center;justify-content:center;color:var(--text)}
  .tkd-photo-vignette.is-vide{border-style:dashed}
  .tkd-photo-vignette img{width:100%;height:100%;object-fit:cover;display:block}
  .tkd-photo-bouton{width:auto;flex:1 1 auto;min-width:0;height:44px;padding:0 10px;gap:6px;font-size:14px;white-space:nowrap}
  #tkd-photo-retirer{flex:0 0 auto}
  .tkd-photo-bouton[hidden]{display:none}
  .tkd-fiche-resume{margin-top:4px;padding:12px 14px;background:var(--surface);border:1px solid var(--line2);border-radius:12px}   /* résumé de l'écran « Compétition » (js/28) */
  .tkd-fiche-statut{font-size:15px;font-weight:700;line-height:1.3;color:var(--text);overflow-wrap:anywhere}
  .tkd-fiche-bilan{margin-top:2px;font-size:13px;line-height:1.3;color:var(--muted)}
  /* page de l'athlète (chantier « pages TKD ») : kicker, nom, pastilles de résumé, carte « Dernier combat » avec ses puces de rounds, tuiles */
  .tkd-fiche-tete{margin-top:18px}
  .tkd-fiche-tete .ui-title{overflow-wrap:anywhere}
  .tkd-pastilles{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
  .tkd-pastille-resume{display:inline-flex;align-items:center;min-height:28px;padding:3px 10px;border-radius:14px;background:var(--surface2);border:1px solid var(--line2);color:var(--text);font-size:13px;font-weight:700;line-height:1.3}
  .tkd-carte-combat{display:flex;flex-direction:column;gap:12px;margin-top:14px;padding:12px;background:var(--surface);border:1px solid var(--line2);border-radius:16px}
  .tkd-carte-combat.is-ferme{background:transparent;border-style:dashed}
  .tkd-carte-haut{display:flex;align-items:center;gap:8px;width:100%;min-height:52px;margin:0;padding:2px;background:transparent;border:0;border-radius:10px;color:var(--text);font-family:inherit;text-align:left}
  button.tkd-carte-haut{cursor:pointer;-webkit-tap-highlight-color:transparent}
  button.tkd-carte-haut:active{background:var(--surface2)}
  button.tkd-carte-haut:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-carte-corps{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .tkd-carte-ligne1{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:4px}
  .tkd-carte-sur{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
  .tkd-carte-score{font-size:12px;font-weight:700;color:var(--muted);white-space:nowrap}
  .tkd-carte-tour{font-family:'Anton';font-size:22px;line-height:1.15;letter-spacing:.3px}
  .tkd-carte-adv{font-size:14px;line-height:1.3;color:var(--muted);overflow-wrap:anywhere}
  .tkd-carte-detail{font-size:13px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
  .tkd-carte-chev{flex:none;display:flex;color:var(--amber)}
  .tkd-carte-chev svg{transform:rotate(-90deg)}
  .tkd-carte-saisir{margin:0}
  /* puces R1 R2 R3 : score du round, bordure haute à la couleur du vainqueur ; 64 px de haut ; sans vidéo : « Vidéo perdue », sans bouton */
  .tkd-rd-puces{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px}
  .tkd-rd-puce{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:64px;margin:0;padding:6px 8px 6px 10px;background:var(--surface2);border:1px solid var(--line2);border-top:3px solid var(--line2);border-radius:12px;color:var(--text);font-family:inherit;text-align:left}
  .tkd-rd-puce.is-g-bleu{border-top-color:var(--tkd-bleu)}
  .tkd-rd-puce.is-g-rouge{border-top-color:var(--tkd-rouge)}
  button.tkd-rd-puce{cursor:pointer;-webkit-tap-highlight-color:transparent}
  button.tkd-rd-puce:active{background:var(--line)}
  button.tkd-rd-puce:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-rd-puce-contenu{display:flex;flex-direction:column;gap:2px;min-width:0}
  .tkd-rd-puce-info{display:flex;flex-direction:column;gap:2px;min-width:0}
  .tkd-rd-puce-nom{font-family:'Anton';font-size:16px;line-height:1.1}
  .tkd-rd-puce-score{font-size:15px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
  .tkd-rd-puce-perdue{font-size:12px;font-weight:600;line-height:1.2;color:var(--muted)}
  .tkd-rd-puce-lecture{flex:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:var(--amber);color:var(--on-accent)}
  .tkd-fiche-liste{display:flex;flex-direction:column}
  .tkd-fiche-liste .tkd-carte-combat:first-child{margin-top:0}
  .tkd-fiche-tableau thead th.is-athlete{background:var(--surface2);border-bottom:3px solid var(--amber)}
  .tkd-fiche-tableau thead th.is-adversaires{background:var(--surface2);border-bottom:3px solid var(--line2)}
  .tkd-fiche-tableau thead th .tkd-vue-col-mot{font-family:inherit;font-size:13px;font-weight:800;letter-spacing:0;line-height:1.25;overflow-wrap:anywhere}
  .tkd-fiche-section .tkd-pastilles{margin:0 0 12px}
  @media(hover:hover){ button.tkd-carte-haut:hover,button.tkd-rd-puce:hover{background:var(--line)} }
  .tkd-fiche-vide{margin-top:12px;color:var(--muted)}
  @media (orientation:landscape) and (max-height:520px){
    #tkd-fiche{padding-top:8px}
    .tkd-fiche-page .ui-head.is-compact{margin-top:4px}
    .tkd-fiche-page .ui-head.is-compact .ui-title{font-size:24px}
    .tkd-fiche-page .deco-dots{display:none}
    .tkd-fiche-liste{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
    .tkd-fiche-liste .tkd-carte-combat{margin-top:0}
  }
  /* écran d'attente (js/12) : montré dans le même toucher que hideHome(), à la place de l'écran de match du basket qui apparaîtrait sinon avant l'écran TKD. Même fond que
     l'accueil, plein cadre, au niveau des autres écrans TKD ; rien à lire, rien qui bouge : ni texte, ni indicateur, ni transition, ni animation. */
  #tkd-attente{position:fixed;inset:0;z-index:1500;background:var(--bg);transition:none;animation:none}
  #tkd-attente.hidden{display:none}
  /* fiche athlète : bloc d'un round interrompu à récupérer, sous la ligne de son combat (js/25). Bordure en tirets ambre, bouton de 48 px, texte clair ; une erreur est écrite en rouge sous le bouton. */
  .tkd-fiche-recup{margin-top:6px;padding:10px 12px;background:transparent;border:1px dashed var(--amber-dim);border-radius:12px}
  .tkd-fiche-recup.is-irrecuperable{border-color:var(--line2)}
  .tkd-fiche-recup-texte{margin:0 0 8px;font-size:14px;line-height:1.4;color:var(--text);overflow-wrap:anywhere}
  .tkd-fiche-recup-bouton{height:48px;font-size:15px}
  .tkd-fiche-recup-bouton:disabled{opacity:.6;cursor:default}
  .tkd-fiche-recup-bouton:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-fiche-recup-etat{margin:8px 0 0;font-size:14px;line-height:1.4;color:var(--red);overflow-wrap:anywhere}
  .tkd-fiche-recup-etat[hidden]{display:none}
  .tkd-fiche-message{margin-top:12px}
  .tkd-carte-combat .tkd-fiche-recup{margin-top:0}
  /* écran « Compétition » (js/28) et lignes .tkd-hist-* de l'Historique unifié (js/27) : même conteneur que la fiche athlète (#tkd-fiche), au-dessus de l'écran de round et sous les fenêtres maison. Lignes de 52 px au
     moins ; la liste passe sur deux colonnes en paysage bas. Contrastes mesurés sur --surface2 (#212b3c) : texte 12,13, gris --muted 4,60, ambre (chevron) > 7. Survol seulement
     dans @media(hover:hover). Les composants ui-* (.ui-pad, .ui-back, .ui-head…) ne sont pas modifiés. */
  #tkd-competition{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-competition.hidden{display:none}
  #tkd-competition:focus{outline:none}
  .tkd-comp-page{padding-bottom:max(24px, env(safe-area-inset-bottom))}
  .tkd-comp-page .ui-subtitle{font-size:14px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
  .tkd-comp-page .ui-back:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-hist-liste{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
  .tkd-hist-ligne{
    display:flex;align-items:center;gap:12px;width:100%;min-height:52px;margin:0;padding:10px 12px;text-align:left;cursor:pointer;
    background:var(--surface);border:1px solid var(--line2);border-radius:12px;color:var(--text);font-family:inherit;
    -webkit-tap-highlight-color:transparent;
  }
  .tkd-hist-corps{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .tkd-hist-nom{font-family:'Anton';font-size:17px;font-weight:400;letter-spacing:.5px;line-height:1.2;overflow-wrap:anywhere}
  .tkd-hist-date{font-size:13px;font-weight:600;line-height:1.3;color:var(--text);overflow-wrap:anywhere}
  .tkd-hist-resume{font-size:13px;line-height:1.3;color:var(--muted);overflow-wrap:anywhere}
  .tkd-hist-ligne .ui-pad-small{white-space:nowrap;letter-spacing:.04em}
  .tkd-hist-chev{flex:none;display:flex;color:var(--amber)}
  .tkd-hist-chev svg{transform:rotate(-90deg)}
  .tkd-hist-ligne:active{background:var(--surface2)}
  .tkd-hist-ligne:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media(hover:hover){ .tkd-hist-ligne:hover{background:var(--surface2)} }
  .tkd-comp-vide{margin-top:4px}
  @media (orientation:landscape) and (max-height:520px){
    #tkd-competition{padding-top:8px}
    .tkd-comp-page .ui-head.is-compact{margin-top:4px}
    .tkd-comp-page .ui-head.is-compact .ui-title{font-size:24px}
    .tkd-comp-page .ui-subtitle{margin-top:0}
    .tkd-hist-liste{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  }
  /* « Historique » et « Terminer la compétition » en bas de l'écran Paramètres (js/15, édition seulement) et « Rouvrir la compétition » en bas de l'écran d'une compétition terminée
     (js/28) : boutons secondaires (.ui-btn-outline, composant partagé non modifié), pleine largeur, zone d'appui de 48 px, côte à côte sur deux colonnes en paysage bas. Texte
     blanc sur --surface2 : 12,13 ; icônes ambre. Le survol n'existe que dans @media(hover:hover). */
  .tkd-fin-competition{display:flex;flex-direction:column;gap:10px;margin:20px 0 16px}
  .tkd-fin-competition[hidden]{display:none}
  .tkd-fin-competition .ui-section{margin:0 0 2px}
  .tkd-fin-bouton,.tkd-comp-actions .ui-btn-outline{min-height:48px}
  .tkd-fin-bouton:disabled,.tkd-comp-actions .ui-btn-outline:disabled{opacity:.6;cursor:default}
  .tkd-fin-bouton:focus-visible,.tkd-comp-actions .ui-btn-outline:focus-visible,.tkd-comp-actions .ui-btn-primary:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-comp-actions{margin-top:20px}
  /* Highlights du Taekwondo : « Créer une compilation » (js/34), sur le modèle de la compilation du basket (.hl-pick, .hl-sum : non modifiées) */
  #tkd-compil{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-compil.hidden{display:none}
  #tkd-compil:focus,#tkd-compil-titre:focus{outline:none}
  #tkd-compil-corps{display:contents}
  .tkd-compil-page .ui-back:focus-visible,.tkd-compil-page .ui-btn-primary:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-compil-page .ui-btn-primary:disabled{cursor:default}
  @media (orientation:landscape) and (max-height:520px){
    #tkd-compil{padding-top:8px}
    .tkd-compil-page .ui-head.is-compact{margin-top:4px}
    .tkd-compil-page .ui-head.is-compact .ui-title{font-size:24px}
  }
  .tkd-compil-puces{display:flex;flex-wrap:wrap;gap:8px}
  .tkd-compil-ajouts{margin-top:18px}
  .tkd-compil-puce{display:inline-flex;align-items:center;gap:6px;min-height:44px;max-width:100%;padding:6px 16px;border-radius:22px;border:1px solid var(--line2);
    background:transparent;color:var(--text);font-family:inherit;font-size:14px;font-weight:600;line-height:1.25;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .tkd-compil-puce svg{flex:none}
  .tkd-compil-puce.is-on{border-color:var(--amber);background:rgba(var(--accent-rgb),.1);color:var(--amber)}
  .tkd-compil-puce:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-compil-resume{margin-top:22px;padding:14px}
  .tkd-compil-resume p{margin:0;font-size:15px;line-height:1.4;color:var(--muted)}
  .tkd-compil-resume b{color:var(--text);font-weight:700}
  @media(hover:hover){
    .tkd-fin-bouton:not(:disabled):hover,.tkd-comp-actions .ui-btn-outline:not(:disabled):hover{border-color:var(--amber-dim)}
  }
  /* Historique du sport actif (js/27, mode sport) : quand le Taekwondo est actif, l'écran Historique du basket (#archives-screen) confie son conteneur #arch-sport
     à tkdHistoriqueDessiner, qui lui donne la classe .tkd-hist-conteneur et y met les lignes .tkd-hist-ligne ou le message vide .arch-empty. Plus de sélecteur de sport. */
  .tkd-hist-conteneur .tkd-hist-compte{margin:0 0 12px}
  .tkd-hist-conteneur .tkd-hist-liste{margin-top:0}
  /* vidéo des temps forts (js/30) : bouton en haut de la section « Temps forts » (pages de l'athlète et du combat), puis l'écran #tkd-montage, même conteneur que la
     page de l'athlète : « Montage en cours » (compteur k / n en Anton, barre, « Annuler le montage » dans la barre d'actions collée en bas) et « Ta vidéo est prête »
     (aperçu, « Partager »). Compteur : accent sur fond --bg, total en gris secondaire (4,6:1 sur --surface2). */
  .tkd-montage-entree{margin:0 0 16px}
  .tkd-montage-bouton{min-height:48px}
  .tkd-montage-bouton:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  @media(hover:hover){ .tkd-montage-bouton:hover{border-color:var(--amber-dim)} }
  #tkd-montage{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-montage.hidden{display:none}
  #tkd-montage:focus{outline:none}
  .tkd-montage-page .ui-back:focus-visible,.tkd-montage-page .ui-btn-outline:focus-visible,.tkd-montage-page .ui-btn-primary:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-montage-page .ui-subtitle{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
  .tkd-montage-progres{margin:auto 0;padding:32px 0;text-align:center}   /* au tiers haut de la place libre, entre l'en-tête et la barre d'actions */
  .tkd-montage-compte{font-family:'Anton';font-size:64px;line-height:1.1;letter-spacing:.5px}
  .tkd-montage-k{color:var(--amber)}
  .tkd-montage-n{color:var(--muted)}
  .tkd-montage-barre{height:8px;margin-top:18px;border-radius:4px;background:var(--line2);overflow:hidden}
  .tkd-montage-rempli{width:0;height:100%;border-radius:4px;background:var(--amber);transition:width .25s ease}
  .tkd-montage-video{display:block;width:100%;max-height:58vh;margin:20px 0 16px;border-radius:16px;background:#000;object-fit:contain}
  .tkd-montage-erreur{margin:0 0 12px}
  .tkd-montage-actions .ui-btn-outline{min-height:48px}
  .tkd-montage-actions .ui-btn-primary:disabled{opacity:.6;cursor:default}
  @media (orientation:landscape) and (max-height:520px){
    #tkd-montage{padding-top:8px}
    .tkd-montage-page .ui-head.is-compact{margin-top:4px}
    .tkd-montage-page .ui-head.is-compact .ui-title{font-size:24px}
    .tkd-montage-progres{padding:12px 0}
    .tkd-montage-video{max-height:52vh;margin:10px 0}
  }
  /* story et feuille de stats (js/33) : les gabarits sont posés hors écran dans #tkd-export-hors-ecran, en styles en ligne. Les règles générales du tableau de
     l'app (table, th, td : fond sombre des en-têtes, majuscules, chiffres tabulaires, filets sombres, en-têtes collants) ne doivent pas s'y appliquer : html2canvas
     les peindrait. Remise à zéro ici (même raison que #stats-sheet-offscreen du basket) ; les styles en ligne décident du reste. */
  #tkd-export-hors-ecran table{width:auto;font-variant-numeric:normal}
  #tkd-export-hors-ecran th,#tkd-export-hors-ecran td{position:static;background:none;border:0;padding:0;
    text-transform:none;letter-spacing:normal;font-size:inherit;font-weight:inherit;color:inherit;text-align:inherit}
  /* écran « Partager » (js/33) : même conteneur que #tkd-montage ; bascule PDF / Image (règle générale .story-fmt-switch, non modifiée), aperçu du fichier dans
     un cadre à fond --surface2 (story : 9:16 ; feuille : A4 portrait), « Partager » dans la barre d'actions collée en bas. */
  #tkd-partage{
    position:fixed;inset:0;z-index:1500;background:var(--bg);overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding:20px 20px 0;
  }
  #tkd-partage.hidden{display:none}
  #tkd-partage:focus{outline:none}
  .tkd-partage-page .ui-back:focus-visible,.tkd-partage-page .ui-btn-outline:focus-visible,.tkd-partage-page .ui-btn-primary:focus-visible,
  .tkd-partage-format .story-fmt-btn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .tkd-partage-page .ui-subtitle{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
  .tkd-partage-format{margin:4px 0 14px}
  .tkd-partage-format .story-fmt-btn{min-height:44px;font-size:14px}
  .tkd-partage-format .story-fmt-btn:disabled{opacity:.5;cursor:default}
  .tkd-partage-cadre{display:flex;align-items:center;justify-content:center;margin:6px auto 16px;border-radius:16px;background:var(--surface2);overflow:hidden;
    height:56vh;max-width:100%}
  .tkd-partage-cadre.is-story{aspect-ratio:9/16}
  .tkd-partage-cadre.is-feuille{aspect-ratio:827/1169.5}
  .tkd-partage-apercu{display:block;width:100%;height:100%;object-fit:contain}
  .tkd-partage-erreur{margin:0 0 12px}
  .tkd-partage-actions .ui-btn-outline{min-height:48px}
  .tkd-partage-actions .ui-btn-primary:disabled{opacity:.6;cursor:default}
  @media(hover:hover){ .tkd-partage-format .story-fmt-btn:not(.active):not(:disabled):hover{border-color:var(--amber-dim);color:var(--text)} }
  @media (orientation:landscape) and (max-height:520px){
    #tkd-partage{padding-top:8px}
    .tkd-partage-page .ui-head.is-compact{margin-top:4px}
    .tkd-partage-page .ui-head.is-compact .ui-title{font-size:24px}
    .tkd-partage-cadre{height:50vh}
  }
/* === TKD FIN === */
