/* ==========================================================================
   CSW Équipe v3 — Séances d'entraînement (terrain, matériel, étapes animées)
   ========================================================================== */

/* carte d'accès dans l'onglet Entraînements */
.se-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 4px; padding: 12px 14px; border-radius: 20px; text-align: left;
  color: #fff; background: linear-gradient(135deg, #3f8c38 0%, #2c6b27 55%, #1d4a1a 100%); box-shadow: 0 10px 24px rgba(29, 74, 26, .25); position: relative; overflow: hidden; }
.se-entry::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 22px, transparent 22px 44px); }
.se-entry-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.16); position: relative; }
.se-entry-t { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.se-entry-t b { font-size: 16px; }
.se-entry-t small { font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-entry-go { position: relative; opacity: .9; }
.se-entry:active { transform: scale(.98); }

/* écran plein */
body.se-open { overflow: hidden; }
body.se-open .tabbar { display: none; }
#se-root { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--bg, #fff); color: var(--text);
  padding-top: env(safe-area-inset-top); animation: seIn .28s cubic-bezier(.2,.9,.25,1); }
@keyframes seIn { from { opacity: 0; transform: translateY(14px); } }
.se-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 8px 8px 6px; border-bottom: 1px solid var(--line); }
.se-bt { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-edt { display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: inherit; }
.se-edt span { font-weight: 700; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.se-edt small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.se-ib { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: inherit; }
.se-ib:active { background: var(--fill); }
.se-ib.sm { width: 34px; height: 34px; }
.se-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }

/* liste et séance */
.se-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; margin: 4px 0 14px; border-radius: 16px;
  border: 1.5px dashed var(--line); font-weight: 700; color: var(--text); background: var(--fill); }
.se-card, .se-exmain { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; color: inherit; }
.se-card { padding: 10px; margin-bottom: 10px; border-radius: 18px; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(19,38,80,.06); }
.se-thumb { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: #3f8c38; }
.se-thumb svg { width: 100%; height: 100%; display: block; }
.se-ci { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.se-ci small { font-size: 12px; color: var(--muted); font-weight: 600; }
.se-ci b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-ci > span { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.se-cons { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; }
.se-empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.se-empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.se-empty p { margin: 0 0 16px; line-height: 1.45; }
.se-title { width: 100%; border: 0; background: transparent; color: var(--text); font: 700 24px/1.2 var(--font); padding: 4px 0; outline: none; }
.se-title::placeholder { color: var(--muted); opacity: .7; }
.se-date { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-weight: 600; color: var(--muted); }
.se-date input { flex: 1; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--fill); color: var(--text); font: 600 15px var(--font); }
.se-link { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; min-height: 16px; }
.se-sum { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 14px 0 4px; }
.se-sum > div { padding: 10px 12px; border-radius: 14px; background: var(--fill); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.se-sum span { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.se-sum b { font-size: 14.5px; }
.se-sec { margin: 20px 0 10px; font-weight: 700; font-size: 16px; }
.se-exs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.se-ex { display: flex; align-items: stretch; gap: 6px; padding: 10px; border-radius: 18px; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(19,38,80,.06); }
.se-ord { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.se-ord button { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--text); }
.se-ord button:disabled { opacity: .3; }
.se-muted { color: var(--muted); font-size: 14px; }
.se-actions { display: flex; gap: 10px; margin-top: 18px; }
.se-actions .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.se-danger { color: #d62839 !important; }

/* feuilles */
.se-in { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--fill); color: var(--text); font: 500 15px var(--font); resize: vertical; }
.se-lbl { margin: 14px 2px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.se-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.se-pl { max-height: 150px; overflow-y: auto; }
.se-dur { display: flex; align-items: center; gap: 14px; }
.se-dur button { width: 52px; height: 40px; border-radius: 12px; background: var(--fill); color: var(--text); font-weight: 700; }
.se-dur b { min-width: 70px; text-align: center; font-size: 17px; }
.se-pitchpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.se-pitchpick button { padding: 6px; border-radius: 14px; border: 2px solid transparent; background: var(--fill); color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.se-pitchpick button.on { border-color: #3f8c38; background: rgba(63,140,56,.1); }
.se-pitchpick div { width: 100%; height: 70px; border-radius: 9px; overflow: hidden; background: #3f8c38; }
.se-pitchpick svg { width: 100%; height: 100%; display: block; }
.se-pitchpick span { font-size: 12px; font-weight: 600; }

/* éditeur */
.se-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 8px; background: #2a5e25;
  background-image: radial-gradient(ellipse at 50% 40%, #33702d, #1f4a1b); }
#se-svg { flex: 0 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
#se-svg [data-id], #se-svg [data-aid] { cursor: grab; }
.se-selbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; max-width: calc(100% - 20px);
  padding: 6px; border-radius: 16px; background: rgba(255,255,255,.96); color: #132650; box-shadow: 0 8px 24px rgba(0,0,0,.3); overflow-x: auto; scrollbar-width: none; animation: seIn .18s; }
.se-selbar::-webkit-scrollbar { display: none; }
.se-selbar[hidden] { display: none; }
.se-selbar b { padding: 0 8px; font-size: 13px; white-space: nowrap; }
.se-selbar button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px; border-radius: 11px; background: #eef1f7; color: #132650; font: 600 13px var(--font); white-space: nowrap; }
.se-steps { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg, #fff); }
.se-play { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; font: 700 14px var(--font);
  background: #3f8c38; color: #fff; box-shadow: 0 4px 12px rgba(63,140,56,.35); }
.se-play.on { background: #d62839; box-shadow: 0 4px 12px rgba(214,40,57,.35); }
.se-stepl { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.se-stepl::-webkit-scrollbar { display: none; }
.se-stepl button { flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--fill); color: var(--text); font: 600 13px var(--font); white-space: nowrap; }
.se-stepl button.on { background: #132650; color: #fff; }
body:not([data-theme="blanc"]) .se-stepl button.on { background: var(--ink); color: var(--ink-text); }
.se-stepl .se-addstep { width: 34px; padding: 0; display: grid; place-items: center; border: 1.5px dashed var(--line); background: transparent; }
.se-tools { flex: 0 0 auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg, #fff); }
.se-tools::-webkit-scrollbar { display: none; }
.se-tools button { flex: 0 0 auto; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; color: var(--text); font: 600 10.5px var(--font); }
.se-tools button svg { display: block; }
.se-tools button.on { background: rgba(63,140,56,.14); box-shadow: inset 0 0 0 2px #3f8c38; }
.se-tools button span { white-space: nowrap; }

@media (min-width: 700px) {
  .se-scroll { max-width: 640px; margin: 0 auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { #se-root, .se-selbar { animation: none; } }
.se-stepl .se-addstep.wide { width: auto; padding: 0 12px; display: inline-flex; gap: 4px; align-items: center; border-color: #3f8c38; color: #2c6b27; font-weight: 700; }
.se-help { margin: 6px 0 4px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.4; font-size: 14.5px; }
.se-help li.now { font-weight: 600; }
.se-help li.done { color: var(--muted); }
.se-help em { color: #d62839; font-style: normal; font-weight: 700; }

/* bibliothèque : séances et exercices tout faits */
.se-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.se-two .se-new { margin: 0; padding: 12px 8px; font-size: 14px; }
.se-new.se-lib { border-style: solid; border-color: rgba(63,140,56,.4); background: rgba(63,140,56,.08); color: #2c6b27; }
.se-intro { margin: 0 2px 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.se-model .se-thumb { width: 92px; height: 92px; }
.se-theme { display: inline-block; align-self: flex-start; padding: 2px 8px; border-radius: 99px; background: rgba(63,140,56,.14); color: #2c6b27 !important; font-weight: 700; }
.se-mlist { margin: 12px 0 4px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.se-mlist span { color: var(--muted); font-size: 13px; }
.se-libl { max-height: 62vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.se-libx { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px; margin-bottom: 8px; border-radius: 14px; background: var(--fill); color: var(--text); }
.se-libx .se-thumb { width: 64px; height: 64px; }

/* le contenu de l’exercice se réduit (titre long) : les flèches ↑ ↓ restent dans la carte */
.se-exmain { flex: 1 1 auto; min-width: 0; }
.se-ord { flex: 0 0 auto; }

/* liste des séances : bouton supprimer sur chaque carte */
.se-cardw { position: relative; margin-bottom: 10px; }
.se-cardw .se-card { margin-bottom: 0; padding-right: 54px; }
.se-cdel { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(214,40,57,.08); color: #d62839; }
.se-cdel:active { background: rgba(214,40,57,.18); }

/* corbeille en haut à droite de la carte */
.se-cardw .se-card { padding-right: 46px; }
.se-cdel { top: 8px; right: 8px; transform: none; width: 32px; height: 32px; border-radius: 10px; }
.se-cdel svg { width: 16px; height: 16px; }

/* plan d'entraînement : partie de la séance sur chaque exercice */
.se-ex { flex-wrap: wrap; }
.se-ci .se-bloc { color: #2c6b27; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 11px; }
.se-ex.empty { border-style: dashed; background: var(--fill); box-shadow: none; }
.se-ex.empty .se-thumb { opacity: .55; }
.se-ex.empty .se-ci b { color: var(--muted); }
.se-fill { flex: 0 0 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.se-fill button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 12px; font: 700 13.5px var(--font);
  background: var(--surface, #fff); color: var(--text); border: 1px solid var(--line); }
.se-fill button:first-child { background: rgba(63,140,56,.1); border-color: rgba(63,140,56,.35); color: #2c6b27; }
.se-fill svg { width: 17px; height: 17px; }
.se-mlist small { display: block; font-size: 11px; font-weight: 700; color: #2c6b27; text-transform: uppercase; letter-spacing: .02em; }
.se-lbl span { font-weight: 500; }
.se-ex .se-exmain { flex: 1 1 0; width: auto; }

/* filtre par partie dans les exercices types */
.se-filt { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 6px; padding: 0 4px 4px; }
.se-filt::-webkit-scrollbar { display: none; }
.se-filt .chip { flex: 0 0 auto; white-space: nowrap; }

/* créer une séance à partir de mots-clés */
.se-gen { display: flex; gap: 8px; align-items: stretch; }
.se-genin { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--fill); color: var(--muted); }
.se-genin:focus-within { border-color: #3f8c38; background: var(--surface, #fff); }
.se-genin input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: 500 15px var(--font); padding: 12px 0; }
.se-gen .btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 14px; }
.se-genhint { margin: 8px 2px 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.se-gensug { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 0 16px; }
.se-gensug::-webkit-scrollbar { display: none; }
.se-gensug .chip { flex: 0 0 auto; white-space: nowrap; }
.se-genbar { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 14px; background: rgba(63,140,56,.1); color: #2c6b27; font-size: 13px; font-weight: 600; }
.se-genbar span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.se-genbar span svg { display: inline; vertical-align: -3px; margin-right: 4px; }
.se-genbar small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.se-genbar button { flex: 0 0 auto; padding: 8px 12px; border-radius: 11px; background: #3f8c38; color: #fff; font: 700 12.5px var(--font); white-space: nowrap; }
.se-libq { margin: 4px 0 8px; }
.se-libq input { padding: 10px 0; }
.se-genbar b { font-weight: 700; }

/* pas de zoom : iPhone zoome sur un champ dont le texte fait moins de 16 px */
input, select, textarea { font-size: 16px !important; }
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }

/* groupe d'entraînement + choix vivacité / foncier */
.se-grp { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: var(--fill); color: var(--text); font: 500 13.5px var(--font); text-align: left; }
.se-grp b { font-weight: 700; }
.se-grp span { margin-left: auto; color: #2c6b27; font-weight: 700; font-size: 12.5px; }
.se-kind { flex: 0 0 100%; display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.se-kind button { flex: 1; height: 32px; border-radius: 10px; background: var(--fill); color: var(--text); font: 700 12.5px var(--font); border: 1.5px solid transparent; }
.se-kind button.on { background: rgba(63,140,56,.12); border-color: #3f8c38; color: #2c6b27; }
.se-grpnote { font-size: 12px; color: var(--muted); margin: -2px 2px 6px; }
.se-grpnote button { color: #2c6b27; font: 700 12px var(--font); text-decoration: underline; padding: 0; }

/* exercices types : la feuille part du haut de l'écran pour que le clavier ne cache pas la recherche */
.sheet.se-libsheet { top: calc(var(--safe-t, env(safe-area-inset-top)) + 10px); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.sheet.se-libsheet .se-libl { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet.se-libsheet > p { margin: 2px 0 8px; }
.sheet.se-libsheet > *:not(.se-libl) { flex-shrink: 0; }

/* puces de thèmes → exercices ; choix de la séance qui reçoit l'exercice */
.se-sugl { margin: 2px 2px 6px; }
.se-pickse { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; max-height: 50vh; overflow-y: auto; }
.se-pickse button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px; border-radius: 14px; background: var(--fill); color: var(--text); text-align: left; }
.se-pickse b { font-size: 15px; }
.se-pickse small { font-size: 12px; color: var(--muted); }
.se-pitchpick { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.se-pitchpick span { font-size: 11px; text-align: center; }

/* ===== Nouvelle structure (5 blocs) : réglages de la séance et de chaque bloc ===== */
.se-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.se-meta label, .se-themew { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.se-meta select, .se-meta input, .se-subsel select { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--fill); color: var(--text); font: 600 16px var(--font); -webkit-appearance: none; appearance: none; }
.se-themew { margin-top: 8px; }
.se-themew .se-in { padding: 10px 12px; font-weight: 600; }
.se-alert { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.14); color: #92400e; font-size: 13px; font-weight: 600; line-height: 1.35; }
body:not([data-theme="blanc"]) .se-alert { color: #fbbf24; }
.se-sum b.over { color: #d97706; }
.se-blocrow { flex: 0 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.se-dmin { display: inline-flex; align-items: center; border-radius: 10px; background: var(--fill); overflow: hidden; }
.se-dmin button { width: 32px; height: 32px; font: 700 18px var(--font); color: var(--text); }
.se-dmin b { min-width: 52px; text-align: center; font-size: 13px; }
.se-blocrow .se-kind { flex: 1; margin: 0; }
.se-subsel { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.se-subsel select { padding: 6px 10px; font-size: 16px; height: 34px; }
.se-rmx { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 10px; background: rgba(214,40,57,.08); color: #d62839; font: 700 12.5px var(--font); }
.se-rmx svg { width: 14px; height: 14px; }
.se-ex.extra { border-style: dashed; }
.se-meta label em { font-style: normal; font-weight: 500; }

/* ===== Étape 2 : fiche d'exercice, filtres de la bibliothèque ===== */
.se-fhead small { display: block; color: #2c6b27; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; }
.se-fhead h2 { margin-top: 2px; }
.se-fschema { height: 230px; border-radius: 14px; overflow: hidden; background: #3f8c38; margin: 8px 0 10px; }
.se-fschema svg { width: 100%; height: 100%; display: block; }
.se-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.se-frow { padding: 8px 10px; border-radius: 12px; background: var(--fill); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.se-frow span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.se-frow b { font-size: 13.5px; }
.se-fsec { margin-top: 12px; }
.se-fsec h3 { margin: 0 0 4px; font-size: 14px; color: #2c6b27; }
.se-fsec p { margin: 0 0 4px; font-size: 14px; line-height: 1.45; }
.se-fsec ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.se-fnote { margin: 10px 0 0; font-size: 12px; color: var(--muted); font-style: italic; }
.se-fsheet .sheet-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.se-subf:empty { display: none; }
.se-subf { margin-top: -2px; }
.se-subf .chip { font-size: 12.5px; padding: 6px 10px; }
.se-matf { margin: 0 2px 6px; font-size: 12.5px; color: var(--muted); }
.se-matf summary { cursor: pointer; font-weight: 700; color: #2c6b27; padding: 2px 0; }
.se-matf .se-chips { margin-top: 6px; }
.se-matf .chip.off { opacity: .55; text-decoration: line-through; }
.se-create { margin: 0 0 8px; padding: 10px; font-size: 14px; }
.se-mm { display: flex; gap: 6px; }
.se-mm input { width: 50%; }

/* ===== Étape 3 : générer dans la séance ===== */
.se-genrow { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.se-genrow .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; background: #3f8c38; border-color: #3f8c38; color: #fff; }
.se-genrow small { font-size: 12px; color: var(--muted); text-align: center; }

/* ===== Étape 4 : mode terrain (contraste fort, gros caractères) ===== */
.se-livebtn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin: 14px 0 0; padding: 14px; border-radius: 16px; background: #132650; color: #fff; font: 800 17px var(--font); }
.se-livebtn svg { display: inline; vertical-align: -3px; }
.se-livebtn small { font: 500 12px var(--font); opacity: .8; }
#se-live { position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; background: #ffffff; color: #0b1220; padding-top: env(safe-area-inset-top); }
.lv-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
.lv-ib { width: 42px; height: 42px; border-radius: 12px; background: #f1f5f9; font: 700 18px var(--font); color: #0b1220; }
.lv-dots { flex: 1; display: flex; gap: 6px; justify-content: center; }
.lv-dots i { width: 22px; height: 6px; border-radius: 99px; background: #d1d5db; }
.lv-dots i.ok { background: #3f8c38; }
.lv-dots i.on { background: #132650; width: 34px; }
.lv-rest { font-size: 12.5px; font-weight: 700; color: #475569; white-space: nowrap; }
.lv-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 20px; }
.lv-bloc { font-size: 13px; font-weight: 800; color: #2c6b27; text-transform: uppercase; letter-spacing: .04em; }
.lv-title { margin: 4px 0 12px; font: 800 26px/1.15 var(--font); }
.lv-schema { border-radius: 16px; overflow: hidden; background: #3f8c38; position: relative; }
.lv-schema #lv-svg { height: 260px; }
.lv-schema svg { width: 100%; height: 100%; display: block; }
.lv-schema button { position: absolute; right: 8px; bottom: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.95); color: #0b1220; font: 800 13px var(--font); }
#se-live section { margin-top: 14px; }
#se-live section h3 { margin: 0 0 4px; font-size: 15px; color: #2c6b27; text-transform: uppercase; letter-spacing: .03em; }
#se-live section p, #se-live section li { font-size: 17px; line-height: 1.45; margin: 0 0 4px; }
#se-live section ul { margin: 0; padding-left: 22px; }
.lv-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #e5e7eb; }
.lv-nav button { height: 54px; border-radius: 16px; background: #f1f5f9; color: #0b1220; font: 800 16px var(--font); }
.lv-nav button:disabled { opacity: .35; }
.lv-nav button:last-child { background: #132650; color: #fff; }

/* ===== Étape 5 : indicateurs, historique ===== */
.se-stats { margin: 4px 0 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(19,38,80,.06); }
.se-sth { display: flex; justify-content: space-between; align-items: baseline; }
.se-sth b { font-size: 15px; }
.se-sth span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.se-stl { margin: 10px 0 5px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.se-vf { height: 12px; border-radius: 99px; background: #e8833a; overflow: hidden; }
.se-vf i { display: block; height: 100%; background: #3f8c38; }
.se-vfl { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12.5px; font-weight: 700; }
.se-vfl span:first-child { color: #2c6b27; }
.se-vfl span:last-child { color: #c2621c; }
.se-sthint { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.se-stch { margin: 0; }
.se-stch .chip { font-size: 12px; padding: 5px 10px; cursor: default; }
.se-card.past { opacity: .82; }
.se-done { font-style: normal; color: #2c6b27; font-weight: 700; }

/* boutons d'action de la séance : le texte passe à la ligne au lieu de sortir du cadre */
.se-actions { flex-wrap: wrap; }
.se-actions .btn { flex: 1 1 140px; min-width: 0; white-space: normal; line-height: 1.2; height: auto; min-height: 46px; padding: 10px 12px; text-align: center; }
.se-actions .btn svg { flex: 0 0 auto; }

/* animation dans la fiche d’exercice */
.se-fschema { position: relative; }
.se-fsvg { width: 100%; height: 100%; }
.se-fsvg svg { width: 100%; height: 100%; display: block; }
.se-fanim { position: absolute; right: 8px; bottom: 8px; padding: 7px 12px; border-radius: 12px; background: rgba(255,255,255,.95); color: #132650; font: 800 13px var(--font); box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* ===== Placement précis : loupe au-dessus du doigt ===== */
.se-loupe { position: absolute; z-index: 5; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; pointer-events: none;
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.45); background: #3f8c38; }
.se-loupe svg { display: block; }
.se-loupe i::before, .se-loupe i::after { content: ""; position: absolute; left: 50%; top: 50%; background: #ff2bd6; }
.se-loupe i::before { width: 22px; height: 2px; margin: -1px 0 0 -11px; }
.se-loupe i::after { width: 2px; height: 22px; margin: -11px 0 0 -1px; }
.se-loupe span { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.92); color: #132650; font: 800 10.5px Arial, sans-serif; white-space: nowrap; }

/* ===== Grille + barre de flèches (nudge) ===== */
.se-gridbtn.on { background: rgba(63,140,56,.16); color: #2c6b27; box-shadow: inset 0 0 0 2px #3f8c38; }
.se-nudge { position: absolute; top: 10px; right: 10px; z-index: 4; display: grid; grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(3, 40px); gap: 3px;
  padding: 4px; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(0,0,0,.3); touch-action: none; user-select: none; -webkit-user-select: none; }
.se-nudge[hidden] { display: none; }
.se-nudge button { border-radius: 11px; background: #eef1f7; color: #132650; font: 700 15px var(--font); touch-action: none; }
.se-nudge button:active { background: #3f8c38; color: #fff; }
.se-nudge [data-nd="0,-1"] { grid-column: 2; grid-row: 1; }
.se-nudge [data-nd="-1,0"] { grid-column: 1; grid-row: 2; }
.se-nudge [data-nd="1,0"] { grid-column: 3; grid-row: 2; }
.se-nudge [data-nd="0,1"] { grid-column: 2; grid-row: 3; }

/* ===== Zoom du terrain ===== */
.se-zoomreset { position: absolute; left: 10px; top: 10px; z-index: 4; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.94); color: #132650; font: 800 13px var(--font); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.se-zoomreset[hidden] { display: none; }
