/* ==========================================================================
   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; } }
