/* Onglet Exercices : catalogue, fiches et formulaires. */

/* En-tête avec un bouton à droite */
.ecran-tete-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.btn-ajout { display: flex; align-items: center; justify-content: center; flex: none; color: var(--encre); font-size: 26px; text-decoration: none; }

/* Champ de saisie commun */
.champ {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--trait-fort); border-radius: var(--rayon-petit); background: var(--panneau);
  font-family: var(--texte); font-size: 16px;
}
.champ:focus { outline: none; border-color: var(--teinte); }
textarea.champ { padding: 12px 14px; line-height: 1.45; resize: vertical; }
.champ-recherche { margin-bottom: 12px; }

/* Pastilles : filtres de groupe, variantes */
.pastilles { display: flex; gap: 8px; margin: 0 -18px; padding: 0 18px 4px; overflow-x: auto; scrollbar-width: none; }
.pastilles::-webkit-scrollbar { display: none; }
.pastille {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--trait-fort); border-radius: 22px; background: var(--panneau);
  color: var(--doux); font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  text-decoration: none; white-space: nowrap;
}
.pastille[aria-pressed="true"], .pastille[aria-current="true"] {
  border-color: transparent; background: var(--teinte); color: var(--sur-accent); font-weight: 700;
}

/* Catalogue */
.groupe-titre { display: flex; align-items: center; gap: 8px; }
.puce { width: 8px; height: 8px; border-radius: 50%; background: var(--teinte); }
.ligne-exo {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--trait); color: inherit; text-decoration: none;
}
.ligne-exo-nom { font-size: 15px; font-weight: 700; }
.ligne-exo-variantes { font-family: var(--texte); font-size: 13px; color: var(--doux); }

/* Barre du haut des sous-pages */
.barre-haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 14px; }
.lien-retour {
  display: inline-flex; align-items: center; min-height: 44px; padding-right: 8px;
  color: var(--doux); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}

/* Fiche exercice */
.lab-groupe { color: var(--teinte); }
.btn-fiche { width: auto; min-width: 88px; padding: 0 18px; color: var(--encre); text-decoration: none; }
.pastilles-variantes { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.pastille-ajout { border-style: dashed; color: var(--encre); }
.actions-perso { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; }
.btn-texte {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: none; background: none;
  color: var(--doux); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-danger { color: #FF8A80; }

/* Fiche technique */
.sous-titre { margin: 10px 0 0; font-family: var(--texte); font-size: 15px; color: var(--doux); }
.onglets-fiche {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--panneau);
}
.onglet-fiche {
  min-height: 44px; border: none; border-radius: var(--rayon-petit); background: none;
  color: var(--doux); font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
}
.onglet-fiche[aria-selected="true"] { background: var(--bouton); color: var(--encre); font-weight: 700; box-shadow: inset 0 -2px 0 var(--teinte); }
.titre-section { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.btn-crayon {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: none; border-radius: var(--rayon-petit); background: var(--bouton); color: var(--teinte);
}
.ligne-vide, .ligne-note { margin: 0; padding: 14px 0; font-family: var(--texte); font-size: 14px; line-height: 1.5; color: var(--doux); }
.ligne-note { white-space: pre-line; }
.muscles { margin: 0; }
.muscles dt { flex: none; width: 8.5em; margin: 0; }
.muscles dd { margin: 0; font-family: var(--texte); font-size: 14px; line-height: 1.45; }
.photo-machine { margin: 0 0 18px; }
.photo-machine img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: var(--rayon); background: var(--panneau); }
.photo-machine figcaption { margin-top: 8px; }
.etapes { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: etape; }
.etapes li {
  position: relative; padding: 11px 0 11px 40px; border-bottom: 1px solid var(--trait);
  font-family: var(--texte); font-size: 15px; line-height: 1.45; counter-increment: etape;
}
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 10px;
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--teinte); color: var(--sur-accent); font-family: var(--mono); font-size: 13px; font-weight: 700;
}

/* Onglet Technique (étape 9c) : un point = le geste, puis « Détails » repliés. */
.point-geste { margin: 0; }
.btn-details {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -2px 0 -10px; padding: 0 14px 0 0;
  border: none; background: none; color: var(--teinte);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.btn-details:focus-visible { outline: 2px solid var(--teinte); outline-offset: 2px; border-radius: 4px; }
.point-details {
  margin: 8px 0 2px; padding-left: 12px; border-left: 2px solid var(--trait-fort);
  font-family: var(--texte); font-size: 14px; line-height: 1.5; color: var(--doux);
}
.point-details[hidden] { display: none; }
.tech-liste { margin: 10px 0 0; padding: 0; list-style: none; }
.tech-liste li {
  position: relative; padding: 11px 0 11px 26px; border-bottom: 1px solid var(--trait);
  font-family: var(--texte); font-size: 15px; line-height: 1.45;
}
.tech-liste li::before {
  content: ''; position: absolute; left: 3px; top: 18px; width: 9px; height: 9px; border-radius: 3px; background: var(--teinte);
}
.tech-aEviter {
  padding: 14px 16px 6px; border-radius: var(--rayon);
  border: 1px solid #6B2E2E; border-left: 3px solid #FF8A80;
  background: color-mix(in srgb, #FF8A80 6%, transparent);
}
.tech-aEviter > .lab { color: #FF8A80; }
.tech-aEviter .tech-liste li:last-child { border-bottom: none; }
.tech-aEviter .tech-liste li::before {
  content: '✕' / ''; left: 0; top: 11px; width: auto; height: auto; border-radius: 0; background: none;
  color: #FF8A80; font-family: var(--mono); font-size: 13px; font-weight: 700;
}
.respiration {
  padding: 14px 16px; border-radius: var(--rayon);
  background: color-mix(in srgb, var(--teinte) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--teinte) 25%, transparent);
  font-family: var(--texte); font-size: 15px; line-height: 1.45;
}

/* Formulaires */
.formulaire { display: flex; flex-direction: column; gap: 16px; }
.etiquette {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--doux);
}
.champ-reglage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 44px; gap: 8px; align-items: center; }

/* Choix par pastilles (boutons radio) */
.choix { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: none; }
.choix legend { width: 100%; margin-bottom: 10px; padding: 0; }
.pastille-radio { position: relative; }
.pastille-radio input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pastille-radio span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--trait-fort); border-radius: 22px; background: var(--panneau);
  color: var(--doux); font-size: 12px; letter-spacing: .06em;
}
.pastille-radio input:checked + span { border-color: transparent; background: var(--teinte); color: var(--sur-accent); font-weight: 700; }
.pastille-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.facultatif { letter-spacing: 0; text-transform: none; }

.pastilles-variantes .pastille { max-width: 100%; white-space: normal; }

/* Fiche exercice : chiffres clés, courbe, tableau des séances (étape 5a, maquette validée) */
.chiffres.chiffres-fiche { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.chiffre.chiffre-fiche { min-width: 0; padding: 12px; }
.chiffre-fiche .lab { font-size: 9.5px; }
.chiffre-fiche .chiffre-valeur { font-size: 20px; white-space: nowrap; }
.chiffre-detail { font-family: var(--texte); font-size: 12px; line-height: 1.3; color: var(--doux); }

.carte-courbe { margin-top: 12px; padding: 14px 12px 6px; border-radius: 16px; background: var(--panneau); border: 1px solid var(--trait); }
.courbe-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.courbe-tete .lab { min-width: 0; font-size: 10px; }
.choix-courbe { flex: none; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; border: 1px solid var(--trait-fort); background: var(--fond); }
.choix-courbe button {
  min-width: 56px; min-height: 44px; padding: 0 8px; border: none; border-radius: 8px; background: none;
  color: var(--doux); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
}
.choix-courbe button[aria-pressed="true"] { background: var(--trait-fort); color: var(--encre); font-weight: 700; }
.courbe-svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.courbe-svg text { font-family: var(--mono); font-size: 10px; }
.courbe-lab { fill: var(--doux); }
.courbe-svg .courbe-mois { font-size: 9.5px; letter-spacing: .08em; }
.courbe-grille { stroke: var(--trait); stroke-width: 1; }
.courbe-mois-trait { stroke: var(--trait); stroke-width: 1; opacity: .6; }
.courbe-ligne { fill: none; stroke: var(--teinte); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe-point { fill: var(--teinte); }
.courbe-dernier { fill: var(--teinte); stroke: var(--panneau); stroke-width: 2; }
.courbe-svg .courbe-valeur { fill: var(--encre); font-size: 11px; font-weight: 700; }
.courbe-vide { margin: 14px 0 10px; font-family: var(--texte); font-size: 13px; color: var(--doux); }

.seances-variante { margin: 0; padding: 0; list-style: none; }
.seance-ligne {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 14px; column-gap: 10px; row-gap: 4px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--trait); color: inherit; text-decoration: none;
}
li.seance-ligne { grid-template-columns: 46px minmax(0, 1fr) auto; }
.seance-lien:active { background: rgba(255, 255, 255, .04); }
.seance-date { font-size: 12px; color: var(--doux); font-variant-numeric: tabular-nums; }
.seance-reps { font-size: 15px; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.seance-reps small { font-size: 11px; font-weight: 500; color: var(--doux); }
.seance-valeur { display: inline-flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seance-chevron { align-self: center; color: var(--doux); font-size: 18px; }
.seance-ressentis, .seance-note { grid-column: 2 / 4; font-family: var(--texte); font-size: 13px; line-height: 1.35; color: var(--doux); }
.seance-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--discret); }
.marque-rec {
  padding: 2px 5px; border: 1px solid var(--teinte); border-radius: 5px;
  color: var(--teinte); font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
}
