/* Sport — thème sombre « performance » */
:root {
  --fond: #08090b;
  --fond-2: #0e1013;
  --carte: #131619;
  --carte-2: #1a1e23;
  --carte-3: #22272d;
  --bord: rgba(255, 255, 255, .07);
  --bord-fort: rgba(255, 255, 255, .14);
  --texte: #f4f6f8;
  --muted: #8a93a0;
  --muted-2: #5d6570;
  --accent: #c8ff2e;
  --accent-2: #9be600;
  --accent-ink: #0b0d02;
  --accent-doux: rgba(200, 255, 46, .12);
  --alerte: #ff5d5d;
  --info: #5fb3ff;
  --violet: #9b8cff;
  --rayon: 20px;
  --rayon-s: 14px;
  --ombre: 0 10px 30px rgba(0, 0, 0, .35);
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--fond); }
body {
  margin: 0; min-height: 100vh; color: var(--texte); font: 16px/1.5 var(--police);
  -webkit-font-smoothing: antialiased; letter-spacing: -.005em;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(200, 255, 46, .10), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(95, 179, 255, .07), transparent 60%),
    var(--fond);
  background-attachment: fixed;
  padding: env(safe-area-inset-top) 0 calc(96px + env(safe-area-inset-bottom));
}
main { max-width: 600px; margin: 0 auto; padding: 20px 18px; animation: entree .35s ease both; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Typographie */
h1 { font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -.035em; margin: 10px 0 18px; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 750; letter-spacing: -.025em; margin: 6px 0 10px; }
h3 { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
p { margin: 8px 0; }
a { color: var(--accent); text-decoration: none; }
strong { font-weight: 700; }
.muted { color: var(--muted); }
.petit { font-size: 14px; }
.centre { text-align: center; }
.surtitre { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.accent-txt { color: var(--accent); }
.chiffre { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Icônes */
.ico { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.ico svg { width: 100%; height: 100%; }
.ico-rond { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-doux); color: var(--accent); flex: none; }
.ico-rond .ico { width: 20px; height: 20px; }

/* Cartes */
.carte {
  position: relative; background: linear-gradient(180deg, var(--carte-2), var(--carte)); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 18px; margin: 14px 0; box-shadow: var(--ombre);
}
.carte.accent { border-color: rgba(200, 255, 46, .35); background: linear-gradient(180deg, rgba(200, 255, 46, .08), var(--carte) 70%); }
.carte-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.carte-tete > div { flex: 1; min-width: 0; }
details.carte > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
details.carte[open] > summary::after { transform: rotate(-135deg); }

/* Héros de l'accueil */
.salut { margin: 6px 0 2px; }
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 22px 20px 20px; margin: 16px 0;
  background:
    radial-gradient(400px 220px at 100% 0%, rgba(200, 255, 46, .22), transparent 65%),
    linear-gradient(160deg, #1b2016, #121417 55%);
  border: 1px solid rgba(200, 255, 46, .25); box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 30px solid rgba(200, 255, 46, .05); pointer-events: none; }
.hero-haut { display: flex; align-items: center; gap: 16px; }
.hero-haut > div { flex: 1; }
.hero h2 { font-size: 28px; margin: 4px 0 6px; letter-spacing: -.035em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.meta > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texte);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--bord); padding: 6px 10px; border-radius: 999px; }
.meta span .ico { color: var(--accent); }
.anneau { position: relative; width: 74px; height: 74px; flex: none; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau .fond-a { stroke: rgba(255, 255, 255, .08); }
.anneau .val-a { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s ease; filter: drop-shadow(0 0 6px rgba(200, 255, 46, .45)); }
.anneau .txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.anneau .txt b { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.anneau .txt small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }

/* Tableau de bord */
.entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none; margin-top: 4px;
  font-size: 18px; font-weight: 850; color: var(--accent-ink); background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(200, 255, 46, .3); }
a.carte { display: block; color: var(--texte); }
.prochaine .droite, .histo .droite { color: var(--muted-2); }
.gros-chiffre { font-size: 44px; font-weight: 850; letter-spacing: -.05em; line-height: 1; margin: 6px 0 6px; font-variant-numeric: tabular-nums; }
.gros-chiffre span { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stats > div { position: relative; background: var(--fond-2); border: 1px solid var(--bord); border-radius: 14px; padding: 12px 10px; }
.stats b { display: block; font-size: 22px; font-weight: 850; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; font-weight: 700; color: var(--muted); }
.stats i { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.hausse { background: var(--accent-doux); color: var(--accent); }
.baisse { background: rgba(255, 93, 93, .12); color: var(--alerte); }
.barres { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 140px; margin: 16px 0 10px; }
.barres .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.barres .piste { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; background: rgba(255, 255, 255, .04); border-radius: 9px; overflow: hidden; }
.barres .remplie { width: 100%; min-height: 3px; border-radius: 9px; background: linear-gradient(180deg, #5d6b3a, #3f4a26); transition: height .6s ease; }
.barres .remplie.pleine { background: linear-gradient(180deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px rgba(200, 255, 46, .35); }
.barres .col span { font-size: 9px; font-weight: 700; color: var(--muted-2); white-space: nowrap; }
.barres .col.actuelle span { color: var(--accent); }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); vertical-align: -1px; }
.rang { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; flex: none; font-size: 12px; font-weight: 850;
  background: var(--fond-2); border: 1px solid var(--bord-fort); color: var(--accent); }

/* Liste d'exercices */
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: 12px 0; border-bottom: 1px solid var(--bord); }
.liste li:last-child { border-bottom: none; }
.carte.liste { padding: 4px 18px; }
.jour { display: grid; place-items: center; width: 50px; height: 54px; border-radius: 14px; flex: none; line-height: 1;
  background: var(--fond-2); border: 1px solid var(--bord-fort); }
.jour b { font-size: 20px; font-weight: 850; letter-spacing: -.03em; }
.jour small { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: -10px; }
.histo li { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.histo li > div { flex: 1; min-width: 0; }
.histo li .droite { color: var(--muted-2); }
.recap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 4px; }
.recap > div { background: linear-gradient(180deg, var(--carte-2), var(--carte)); border: 1px solid var(--bord); border-radius: 16px; padding: 14px 10px; text-align: center; }
.recap b { display: block; font-size: 24px; font-weight: 850; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.recap span { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.exos { list-style: none; padding: 0; margin: 14px 0 6px; counter-reset: n; }
.exos li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bord); counter-increment: n; }
.exos li::before { content: counter(n); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; flex: none;
  font-size: 13px; font-weight: 800; color: var(--accent); background: var(--accent-doux); }
.exos li .nom { flex: 1; font-weight: 600; }
.exos li .cib { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ligne { display: flex; gap: 10px; align-items: center; }
.ligne > * { flex: 1; }
.ligne > input[type=checkbox], .ligne > .rang, .ligne > .coche { flex: none; }

/* Formulaires */
label { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
label.ligne { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; color: var(--texte); }
input[type=text], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; font: 500 17px var(--police); padding: 15px 16px; border-radius: var(--rayon-s); border: 1px solid var(--bord-fort);
  background: var(--fond-2); color: var(--texte); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(200, 255, 46, .15); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--accent); }

/* Boutons */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px var(--police); letter-spacing: -.01em;
  padding: 15px 18px; border-radius: var(--rayon-s); border: 1px solid var(--bord-fort); background: var(--carte-3); color: var(--texte);
  cursor: pointer; text-align: center; touch-action: manipulation; transition: transform .08s ease, background .15s, box-shadow .15s;
}
button:active, .btn:active { transform: scale(.97); }
button:disabled { opacity: .45; }
.primaire { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 8px 24px rgba(200, 255, 46, .25), inset 0 1px 0 rgba(255, 255, 255, .4); }
.danger { background: rgba(255, 93, 93, .08); color: var(--alerte); border-color: rgba(255, 93, 93, .4); }
.plein { width: 100%; display: flex; margin: 10px 0; }
.lien { background: none; border: none; color: var(--accent); padding: 8px 0; font-weight: 600; box-shadow: none; }
.lien.erreur { color: var(--alerte); }
.secondaire { background: transparent; }

/* Puces */
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { padding: 10px 15px; border-radius: 999px; border: 1px solid var(--bord-fort); background: var(--fond-2); font-size: 15px; font-weight: 600; color: var(--texte); }
.puce.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 14px rgba(200, 255, 46, .25); }

.erreur { color: var(--alerte); font-weight: 600; }
.ok { color: var(--accent); font-weight: 600; }
.barre { height: 6px; background: rgba(255, 255, 255, .07); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.barre > div { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 99px; transition: width .4s ease; }
.etiquette { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 7px; background: var(--accent-doux); color: var(--accent); margin-left: 8px; }
.qr { background: #fff; padding: 12px; border-radius: 16px; display: inline-block; box-shadow: var(--ombre); }
.qr svg { display: block; width: 220px; height: 220px; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; word-break: break-all; background: var(--fond-2);
  padding: 12px; border-radius: 12px; border: 1px dashed var(--bord-fort); }
pre.bilan { white-space: pre-wrap; font: inherit; margin: 0; line-height: 1.6; color: #dfe4ea; }
ul:not(.liste):not(.exos) { padding-left: 20px; }
ul:not(.liste):not(.exos) li { margin: 6px 0; color: #cfd5dc; }

/* Connexion */
.marque { display: flex; align-items: center; gap: 12px; margin: 26px 0 8px; }
.logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 30px rgba(200, 255, 46, .35); }
.logo .ico { width: 30px; height: 30px; }
.marque b { font-size: 26px; font-weight: 850; letter-spacing: -.04em; }
.accroche { font-size: 40px; line-height: 1.02; font-weight: 850; letter-spacing: -.045em; margin: 26px 0 8px; }
.accroche em { font-style: normal; color: var(--accent); }
.separateur { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 13px; margin: 18px 0 4px; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--bord-fort); }

/* Navigation basse (verre dépoli) */
#nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; z-index: 5;
  max-width: 560px; margin: 0 auto; padding: 6px; border-radius: 22px; background: rgba(20, 23, 27, .72);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--bord-fort); box-shadow: 0 12px 40px rgba(0, 0, 0, .55); }
#nav[hidden], #bandeau[hidden] { display: none; }
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 16px;
  color: var(--muted); font-size: 11px; font-weight: 600; transition: color .15s, background .15s; }
#nav a .ico { width: 23px; height: 23px; }
#nav a.on { color: var(--accent); background: rgba(200, 255, 46, .09); }
#bandeau { position: sticky; top: 0; z-index: 6; background: rgba(255, 184, 0, .14); color: #ffd666; text-align: center;
  padding: 8px 14px; font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 184, 0, .25); }

/* Mode séance */
.seance-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.seance-tete .btn-terminer { padding: 10px 14px; font-size: 14px; border-radius: 12px; }
.progression-seance { display: flex; gap: 4px; margin: 14px 0 4px; }
.progression-seance i { flex: 1; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.progression-seance i.fait { background: var(--accent-2); }
.progression-seance i.encours { background: var(--accent); box-shadow: 0 0 10px rgba(200, 255, 46, .6); }
.exo-nom { font-size: 30px; line-height: 1.08; font-weight: 850; letter-spacing: -.04em; margin: 6px 0 8px; }
.cible { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.cible > span { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--bord); }
.sugg { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-doux); color: #e6ffb0; border: 1px solid rgba(200, 255, 46, .25);
  border-radius: 14px; padding: 11px 13px; margin: 12px 0; font-size: 14px; font-weight: 600; }
.sugg .ico { color: var(--accent); margin-top: 2px; }
.compteur { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 4px; }
.compteur b { font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.compteur span { color: var(--muted); font-size: 14px; }
.stepper { display: grid; grid-template-columns: 72px 1fr 72px; gap: 10px; align-items: center; margin: 12px 0; }
.stepper button { height: 72px; padding: 0; border-radius: 18px; background: var(--carte-3); }
.stepper button .ico { width: 26px; height: 26px; }
.stepper .val { text-align: center; }
.stepper input { text-align: center; font-size: 42px; font-weight: 850; letter-spacing: -.04em; padding: 6px; height: 72px; border-radius: 18px;
  background: var(--fond-2); font-variant-numeric: tabular-nums; }
.stepper .unite { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.valider { width: 100%; font-size: 20px; font-weight: 850; padding: 20px 16px; margin: 16px 0 6px; border-radius: 20px; letter-spacing: -.02em; white-space: nowrap; }
.valider .ico { width: 26px; height: 26px; }
.faites { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.faites > span { background: var(--fond-2); border: 1px solid var(--bord-fort); border-radius: 10px; padding: 7px 11px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nav-exo { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; }
.nav-exo button { font-size: 14px; padding: 14px 6px; border-radius: 14px; }
.plan-seance li { cursor: pointer; }
.plan-seance li.actif .nom { color: var(--accent); }
.coche { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bord-fort); flex: none; }
.coche.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.coche .ico { width: 14px; height: 14px; }

/* Minuteur de repos */
.repos { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: radial-gradient(600px 400px at 50% 40%, rgba(200, 255, 46, .12), transparent 70%), rgba(5, 6, 8, .97);
  animation: entree .25s ease both; }
.cadran { position: relative; width: 260px; height: 260px; margin: 10px 0 18px; }
.cadran svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cadran .fond-a { stroke: rgba(255, 255, 255, .07); }
.cadran .val-a { stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(200, 255, 46, .55)); transition: stroke-dashoffset .25s linear; }
.cadran .temps { position: absolute; inset: 0; display: grid; place-items: center; font-size: 76px; font-weight: 850; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.repos .suivant { font-size: 16px; font-weight: 600; color: var(--muted); margin-bottom: 22px; }
.repos .suivant b { color: var(--texte); }
.repos .boutons { display: flex; gap: 12px; width: 100%; max-width: 420px; }
.repos .boutons button { flex: 1; font-size: 20px; padding: 20px; border-radius: 18px; }

/* Fenêtre modale */
#modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
#modal .fenetre { background: var(--carte); width: 100%; max-width: 600px; max-height: 85vh; overflow: auto; border: 1px solid var(--bord-fort);
  border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: monte .25s ease both; }
@keyframes monte { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.choix { width: 100%; display: block; text-align: left; margin: 8px 0; font-weight: 700; background: var(--fond-2); border-radius: 16px; }
.choix small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; margin-top: 4px; line-height: 1.4; }
