/* PDM Training — charte Punchlines du Mental (Banide Studio, 07.11.23).
   Quatre couleurs, deux polices, des blocs pleins. Rien d'autre.
   Une seule adaptation, signalée : sur fond noir, les boutons n'ont pas d'ombre dure
   (une ombre noire sur du noir ne se voit pas). Le « déclic » passe par l'enfoncement. */

/* ---------- Polices auto-hébergées ---------- */
@font-face {
  font-family: "Heading Now";
  src: url("fonts/HeadingNow66-Bold.woff2") format("woff2");
  font-weight: 700 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Heading Now";
  src: url("fonts/HeadingNow66-BoldItalic.woff2") format("woff2");
  font-weight: 700 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-italic.woff2") format("woff2");
  font-weight: 400 900; font-stretch: 62% 125%; font-style: italic; font-display: swap;
}

/* ---------- Jetons ---------- */
/* Quatre couleurs. Chaque écran a UN fond plein parmi elles, et le rythme alterne
   comme une suite de stories : blanc → blanc → noir → bleu → vert. C'est la charte,
   et c'est aussi la réponse à « le noir, c'est sombre » : on n'éclaircit pas le noir,
   on change de fond. La séance reste noire, pour le vestiaire et le coucher. */
:root {
  --green: #00FF00;
  --black: #000000;
  --white: #FFFFFF;
  --blue:  #0000FF;

  --head: "Heading Now", "Archivo", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
  --stretch: 76%;

  --gutter: 16px;
  --radius: 999px;
  --tap: 48px;
  --duree: .18s;
}

/* Fond noir — séance, réglages */
[data-fond="noir"] {
  --fond: var(--black); --texte: var(--white);
  --texte-doux: rgba(255,255,255,.72); --filet: rgba(255,255,255,.22);
  --cle: var(--green);
  --btn-bg: var(--green); --btn-fg: var(--black); --btn-bord: 0; --btn-ombre: none; --btn-ombre-bas: none;
  --flag-bg: var(--green); --flag-fg: var(--black);
  --logo-pill: var(--green); --logo-dot: var(--black);
  --theme: #000000;
}
/* Fond blanc — accueil, fiches, progresser, mon rythme, à propos */
[data-fond="blanc"] {
  --fond: var(--white); --texte: var(--black);
  --texte-doux: rgba(0,0,0,.64); --filet: rgba(0,0,0,.16);
  --cle: var(--black);
  --btn-bg: var(--green); --btn-fg: var(--black);
  --btn-bord: 3px solid var(--black); --btn-ombre: 0 5px 0 var(--black); --btn-ombre-bas: 0 1px 0 var(--black);
  --flag-bg: var(--green); --flag-fg: var(--black);
  --logo-pill: var(--black); --logo-dot: var(--white);
  --theme: #FFFFFF;
}
/* Fond vert — fin de séance, avertissement */
[data-fond="vert"] {
  --fond: var(--green); --texte: var(--black);
  --texte-doux: rgba(0,0,0,.7); --filet: rgba(0,0,0,.26);
  --cle: var(--black);
  --btn-bg: var(--black); --btn-fg: var(--green);
  --btn-bord: 0; --btn-ombre: none; --btn-ombre-bas: none;
  --flag-bg: var(--black); --flag-fg: var(--green);
  --logo-pill: var(--black); --logo-dot: var(--green);
  --theme: #00FF00;
}
/* Fond bleu — mon profil */
[data-fond="bleu"] {
  --fond: var(--blue); --texte: var(--white);
  --texte-doux: rgba(255,255,255,.82); --filet: rgba(255,255,255,.34);
  --cle: var(--green);
  --btn-bg: var(--green); --btn-fg: var(--black);
  --btn-bord: 0; --btn-ombre: none; --btn-ombre-bas: none;
  --flag-bg: var(--green); --flag-fg: var(--black);
  --logo-pill: var(--green); --logo-dot: var(--blue);
  --theme: #0000FF;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--fond);
  color: var(--texte);
  transition: background var(--duree) linear;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}
body {
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 14px)
    calc(env(safe-area-inset-right) + var(--gutter))
    calc(env(safe-area-inset-bottom) + 20px)
    calc(env(safe-area-inset-left) + var(--gutter));
  overflow-x: hidden;
}

p { text-wrap: pretty; }

/* ---------- Titrage drapeau ---------- */
.flag {
  font-family: var(--head);
  font-stretch: var(--stretch);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.34;
  text-wrap: balance;
  margin: 0;
  font-size: clamp(30px, 9vw, 42px);
  hyphens: none;
}
.flag span {
  background: var(--flag-bg);
  color: var(--flag-fg);
  padding: .1em .22em .12em .13em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.flag--sm { font-size: clamp(22px, 6.4vw, 28px); }

h2, h3 {
  font-family: var(--head);
  font-stretch: var(--stretch);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0 0 8px;
}
h2 { font-size: 21px; }
h3 { font-size: 16px; }

/* ---------- Logo ---------- */
.logo { width: 54px; height: auto; display: block; }
.logo .pill { fill: var(--logo-pill); }
.logo .dot  { fill: var(--logo-dot); }
/* Logo d'accueil avec la pastille TRAINING : plus large que l'autre, sinon le mot est illisible. */
.logo--training { width: 104px; }
/* iPhone SE et écrans courts : à 104 px le logo dépasse la hauteur de l'en-tête (48 px) et l'accueil
   se remet à défiler de 18 px. 75 px = 48 px de haut, l'accueil tient de nouveau sans défilement. */
@media (max-height: 700px) { .logo--training { width: 75px; } }
.logo--training .mot { font-family: "Heading Now", "Arial Black", sans-serif; font-weight: 700; font-style: normal; font-size: 176px; letter-spacing: 0; }

/* ---------- En-tête ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; min-height: var(--tap);
}
.bar__title {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 18px; margin: 0;
}

/* ---------- Boutons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 56px; padding: 12px 20px;
  border: var(--btn-bord); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: var(--btn-ombre);
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 19px; letter-spacing: .01em;
  cursor: pointer; text-decoration: none;
  transition: transform var(--duree) ease, box-shadow var(--duree) ease;
}
.btn:active { transform: translateY(4px); box-shadow: var(--btn-ombre-bas); }

.btn--ghost {
  background: transparent; color: var(--texte);
  border: 2px solid var(--filet); box-shadow: none;
}
.btn--ghost:active { box-shadow: none; }
.btn--white { background: var(--white); color: var(--black); }
.btn--sur-clair { border: 3px solid var(--black); box-shadow: 0 5px 0 var(--black); }
.btn--sur-clair:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--black); }
.btn--sm { min-height: var(--tap); font-size: 15px; padding: 8px 16px; width: auto; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap);
  border: 0; background: transparent; color: var(--texte);
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-size: 14px; text-transform: uppercase;
  cursor: pointer; border-radius: var(--radius); padding: 0 10px;
}
.btn-icon:active { transform: translateY(2px); }

.row-btn { display: flex; gap: 10px; }
.row-btn .btn { flex: 1; }

/* ---------- Accueil : blocs pleins ---------- */
.question {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(26px, 8vw, 34px); line-height: 1.15;
  text-wrap: balance; margin: 4px 0 20px;
}

.cards { display: grid; gap: 6px; margin-bottom: 8px; }

/* Hauteur de carte : l'accueil doit tenir en entier sur un écran de téléphone,
   barres du navigateur comprises. 56 px laisse le titre, le sous-titre et une
   cible tactile bien au-dessus du minimum de 48 px. */
.card {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 10px; width: 100%; min-height: 56px;
  padding: 9px 16px; border: 0; border-radius: 18px;
  background: var(--green); color: var(--black);
  text-align: left; cursor: pointer;
  transition: transform var(--duree) ease;
}

/* Les deux entrées secondaires — le test de départ et le mode libre — tiennent
   côte à côte : elles gagnent une ligne entière à la grille principale. */
.cards--duo { grid-template-columns: 1fr 1fr; }
.cards--duo .card { grid-template-columns: 1fr; align-content: center; gap: 2px; padding: 9px 14px; }
/* Sur un téléphone de 320 px, « Mon rythme » passait sur deux lignes : la taille suit la largeur. */
.cards--duo .card__t { font-size: clamp(15px, 4.8vw, 18px); white-space: nowrap; }
.cards--duo .card__s { display: none; }
.cards--duo .card__d { font-size: 13px; margin-top: 3px; }

/* Pied de l'accueil : les liens discrets, sur une seule ligne. */
.liens-pied {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin: 10px 0 0; font-size: 13px;
}
.liens-pied a { color: var(--texte-doux); min-height: 32px; display: inline-flex; align-items: center; }
.card:active { transform: translateY(3px); }
.card > span:first-child { min-width: 0; }
.card__t {
  display: block;
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 20px; line-height: 1.05;
}
.card__s { display: block; font-size: 12.5px; line-height: 1.25; opacity: .78; margin-top: 2px; }
.card__d {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-size: 14px; text-transform: uppercase;
  white-space: nowrap; opacity: .85;
}
.card--invert { background: var(--texte); color: var(--fond); }
.card--invert .card__s { opacity: .8; }
.card--bleu { background: var(--blue); color: var(--white); }
.card--bleu .card__s { opacity: .85; }
.card--ghost {
  background: transparent; color: var(--texte);
  border: 2px solid var(--filet);
}
.card--ghost .card__s { opacity: .7; }

/* ---------- Adresse de l'app, à recopier ou à dicter ---------- */
.adresse {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-size: 17px; letter-spacing: .01em;
  background: var(--green); color: var(--black);
  display: inline-block; padding: 7px 12px; margin: 10px 0 0;
  word-break: break-all;
}

/* ---------- Fiche technique ---------- */
.lede { font-size: 16px; color: var(--texte-doux); margin: 0 0 18px; }
.bloc { margin: 0 0 20px; }
.bloc__k {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; text-transform: uppercase; font-size: 13px;
  letter-spacing: .06em; color: var(--cle); margin-bottom: 10px;
}
.bloc p:not(.bloc__k) { margin: 0; }

.encart {
  border: 2px solid var(--filet); border-radius: 18px;
  padding: 14px 16px; margin: 0 0 20px;
}
.encart--vert { background: var(--green); color: var(--black); border: 0; }
.encart--vert .bloc__k { color: var(--black); opacity: .7; }

.grille { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.grille th, .grille td {
  text-align: left; padding: 8px 0; border-bottom: 1px solid var(--filet);
}
.grille td:last-child {
  text-align: right; font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-size: 16px; white-space: nowrap;
}
.grille .ok  { color: var(--cle); }
.grille .non { color: var(--fond); background: var(--texte); padding: 0 8px; border-radius: 6px; }
.note { font-size: 12.5px; color: var(--texte-doux); margin: 8px 0 0; }

details { margin: 0 0 18px; }
summary {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; text-transform: uppercase; font-size: 14px;
  cursor: pointer; min-height: var(--tap); display: flex; align-items: center;
  color: var(--cle); gap: 10px;
}
summary::-webkit-details-marker { display: none; }
.ref { border-top: 1px solid var(--filet); padding: 12px 0; }
.ref__tag {
  display: inline-block; background: var(--texte); color: var(--fond);
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  text-transform: uppercase; font-size: 11px; padding: 2px 9px;
  border-radius: var(--radius); margin-bottom: 6px;
}
.ref__t { font-size: 14.5px; margin: 0 0 6px; }
.ref__s { font-size: 12.5px; color: var(--texte-doux); margin: 0; }
.ref__p { font-size: 12.5px; color: var(--texte-doux); margin: 4px 0 0; font-style: italic; }

/* ---------- Séance ---------- */
.seance {
  min-height: calc(100svh - 60px);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.seance__haut { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); }
.seance__scene {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 10px 0;
}
.scene__zone {
  width: min(70vw, 260px); height: min(70vw, 260px);
  display: grid; place-items: center;
}
.disque {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--green);
  transform: scale(.34);
  will-change: transform;
}
.phase {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(26px, 8vw, 34px); line-height: 1; text-align: center;
  min-height: 1.1em;
}
.compte {
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  font-size: 15px; text-transform: uppercase; color: var(--texte-doux);
  letter-spacing: .04em;
}
.seance__bas { width: 100%; display: grid; gap: 10px; }
.seance--sombre .disque { opacity: .14; }
.seance--sombre .phase { opacity: .3; }

.decompte {
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  font-size: 52px; line-height: 1; color: var(--texte);
  font-variant-numeric: tabular-nums; min-height: 1em;
}

/* ---------- Réglages, profil ---------- */
.ligne {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--filet);
}
.ligne > span:first-child { min-width: 0; }
.ligne__t { display: block; font-weight: 700; font-size: 16px; }
.ligne__a { display: block; font-size: 13px; color: var(--texte-doux); margin-top: 3px; }

.switch {
  position: relative; flex: 0 0 auto;
  width: 62px; height: 34px; border-radius: var(--radius);
  border: 2px solid var(--filet); background: transparent;
  cursor: pointer; padding: 0;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--texte);
  transition: transform var(--duree) ease, background var(--duree) ease;
}
.switch[aria-checked="true"] { background: var(--green); border-color: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(28px); background: var(--black); }

.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix button {
  min-height: var(--tap); padding: 8px 16px; border-radius: var(--radius);
  border: 2px solid var(--filet); background: transparent; color: var(--texte);
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  text-transform: uppercase; font-size: 14px; cursor: pointer;
}
.choix button[aria-pressed="true"] {
  background: var(--green); border-color: var(--green); color: var(--black);
}

.onglets { display: flex; gap: 8px; margin-bottom: 18px; }
.onglets button {
  flex: 1; min-height: var(--tap); border-radius: var(--radius);
  border: 2px solid var(--filet); background: transparent; color: var(--texte);
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  text-transform: uppercase; font-size: 13px; cursor: pointer; padding: 6px 4px;
}
.onglets button[aria-selected="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }

.chiffre {
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  font-size: 46px; line-height: 1; color: var(--cle);
}
.chiffre--blanc { color: var(--texte); }
.chiffre__u { font-size: 14px; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .05em; }

.regle { display: flex; align-items: center; gap: 10px; }
.regle input[type="range"] { flex: 1; accent-color: var(--green); height: var(--tap); }
.regle__v {
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  font-size: 19px; min-width: 56px; text-align: right;
}

.histo { font-size: 14px; }
.histo div { padding: 10px 0; border-bottom: 1px solid var(--filet); display: flex; justify-content: space-between; gap: 12px; }
.histo span { color: var(--texte-doux); }

/* ---------- Avertissement bloquant ---------- */
.modale {
  position: fixed; inset: 0; z-index: 40;
  background: var(--green); color: var(--black);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 28px) 22px calc(env(safe-area-inset-bottom) + 28px);
  overflow-y: auto;
}
.modale h2 { font-size: 26px; font-style: italic; }
.modale p { font-size: 17px; margin: 0 0 12px; font-weight: 600; }
.modale .btn { background: var(--black); color: var(--green); margin-top: 12px; }
.modale .btn--ghost { background: transparent; color: var(--black); border: 2px solid var(--black); }

/* ---------- Pied ---------- */
.mention {
  font-size: 12.5px; color: var(--texte-doux);
  border-top: 1px solid var(--filet); padding-top: 14px; margin-top: 26px;
}
.pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }

/* ---------- Accessibilité ---------- */
:focus-visible { outline: 3px solid var(--texte); outline-offset: 3px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .disque { transform: scale(.72) !important; }
}

/* ---------- Pictogrammes de la charte ---------- */
.picto {
  width: 34px; height: 34px; border-radius: 9px;
  flex: 0 0 auto; display: block;
}
.picto--lg { width: 52px; height: 52px; border-radius: 13px; }
.bloc__k, summary { display: flex; align-items: center; gap: 10px; }
.bloc__k .picto { width: 28px; height: 28px; border-radius: 8px; }

/* ---------- À propos : auteur ---------- */
.auteur { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
/* Portrait tel que fourni : aucun recadrage, aucun masque. Le blanc de l'image
   se fond dans le fond blanc de la page, il ne reste que le disque vert. */
.auteur img { width: 108px; height: auto; flex: 0 0 auto; display: block; }
.auteur { align-items: center; gap: 10px; }
.auteur__n {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 22px; line-height: 1.05;
}
.auteur__r { font-size: 13px; color: var(--texte-doux); margin-top: 4px; }
.lien {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--tap); text-decoration: none; color: var(--texte);
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; text-transform: uppercase; font-size: 15px;
}
.etapes { counter-reset: e; margin: 0; padding: 0; list-style: none; }
.etapes li {
  counter-increment: e; display: grid; grid-template-columns: 34px 1fr;
  gap: 14px; align-items: start; padding: 10px 0;
}
.etapes li::before {
  content: counter(e);
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--green); color: var(--black);
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-size: 17px;
}

/* ---------- Carte : sous-titre sur une seule ligne ---------- */
.card__s {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Test : règles et débrief ---------- */
.regles { margin: 0 0 22px; padding: 0; list-style: none; }
.regles li {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px;
  align-items: start; padding: 9px 0; font-size: 16px;
}
.regles li::before {
  content: "";
  width: 18px; height: 18px; margin-top: 4px; border-radius: 5px;
  background: var(--green); border: 2px solid var(--texte);
}
.zone-tap {
  width: 100%; min-height: 180px; border-radius: 26px;
  border: var(--btn-bord); background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: var(--btn-ombre);
  display: grid; place-items: center; gap: 6px; padding: 18px;
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 19px; text-align: center; cursor: pointer; line-height: 1.1;
  transition: transform .08s ease;
}
.zone-tap:active { transform: scale(.985) translateY(3px); box-shadow: var(--btn-ombre-bas); }
.zone-tap__n { font-size: 64px; font-style: normal; line-height: 1; font-variant-numeric: tabular-nums; }
.debrief { text-align: center; margin: 10px 0 24px; }
.debrief .chiffre { font-size: 92px; }
.delta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 14px; color: var(--texte-doux);
}

.tagline {
  font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; text-transform: uppercase; font-size: 13px;
  letter-spacing: .05em; color: var(--texte-doux);
  margin: 0 0 8px; text-wrap: balance;
}

.debrief .chiffre { margin: 0; }
.debrief .bloc__k { margin: 6px 0 0; }
.debrief .delta { margin-top: 14px; }

/* Un libellé portant un pictogramme est plus haut qu'une simple ligne de texte :
   il lui faut plus d'air avant le paragraphe, sinon la première phrase colle au picto. */
.bloc__k:has(.picto) { margin-bottom: 15px; }
.encart .bloc__k:has(.picto) { margin-bottom: 16px; }
summary:has(.picto) { gap: 12px; }

/* ---------- Bouton principal collant ----------
   Sur les écrans longs — fiche technique, Progresser, Mon rythme — le bouton
   reste visible pendant qu'on fait défiler le contenu. Fond plein, pas de dégradé :
   la charte n'en veut pas, et un filet suffit à détacher la barre du texte. */
.barre-action {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 18px calc(var(--gutter) * -1) 0;
  padding: 12px var(--gutter) calc(env(safe-area-inset-bottom) + 12px);
  background: var(--fond);
  border-top: 2px solid var(--filet);
}
.barre-action .btn { margin: 0; }

/* ---------- Séance : le téléphone a coupé le son ----------
   Visible sans être agressif : l'athlète respire, il ne lit pas. Le bandeau
   n'apparaît que si le son a réellement été coupé en cours de route. */
.alerte-son {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--green); color: var(--black);
  font-size: 13.5px; line-height: 1.3; text-align: center;
}


/* ============================================================
   VISUALISER — onglets, séances audio, Sur mesure
   ============================================================ */

/* Un bloc repliable se signale : un « + » à droite quand il est fermé, un « − » quand il est ouvert.
   Sans ça, un bloc fermé ressemble à un titre sans contenu. */
.repli > summary::after { content: '+'; margin-left: auto; font-size: 22px; line-height: 1; }
.repli[open] > summary::after { content: '−'; }

/* Un titre présent pour les lecteurs d'écran, invisible à l'œil */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Le sélecteur Respirer / Visualiser, en tête de l'accueil */
.onglets { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 10px;
  border: 3px solid var(--black); border-radius: 999px; padding: 3px; }
.onglet {
  min-height: 42px; border: 0; border-radius: 999px; background: transparent; color: var(--black); cursor: pointer;
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: 17px;
}
.onglet[aria-selected="true"] { background: var(--black); color: var(--green); }

/* Carte de visualisation : la même carte, avec une voix */
.card--voix { background: var(--black); color: var(--white); }
.card--voix .card__t { color: var(--green); }

/* Écoute */
.ecoute { min-height: calc(100svh - 60px); display: flex; flex-direction: column; justify-content: space-between; }
.ecoute__scene { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.ecoute__disque {
  width: min(52vw, 200px); height: min(52vw, 200px); border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green); color: var(--black);
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: 24px;
  transition: transform var(--duree) ease;
}
.ecoute__disque:active { transform: scale(.96); }
.ecoute__disque[data-etat="lecture"] { animation: souffle 6s ease-in-out infinite; }
@keyframes souffle { 0%,100% { transform: scale(1); } 50% { transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { .ecoute__disque[data-etat="lecture"] { animation: none; } }
.chapitres { display: grid; gap: 4px; width: 100%; margin: 4px 0 6px; }
.chapitre { border: 0; background: transparent; color: var(--texte); padding: 0; cursor: pointer; text-align: left; min-height: 40px; }
.chapitre__barre { display: block; height: 6px; border-radius: 3px; background: var(--filet); overflow: hidden; }
.chapitre__barre i { display: block; height: 100%; width: 0; background: var(--green); }
.chapitre__nom {
  display: block; margin-top: 6px; font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; color: var(--texte-doux);
}
.chapitre[aria-current="true"] .chapitre__nom { color: var(--green); }
/* Le premier chapitre est court : on centre le libellé du milieu et on cale le dernier à droite,
   sinon les trois mots se touchent. */
.chapitre { min-width: 0; }
.chapitre__nom { white-space: nowrap; }
.chapitre:nth-child(2) .chapitre__nom { text-align: center; }
.chapitre:nth-child(3) .chapitre__nom { text-align: right; }
.temps { display: flex; justify-content: space-between; width: 100%;
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-size: 14px; color: var(--texte-doux); }
.sauts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Sur mesure : formulaire et script */
.champ { margin: 0 0 18px; }
.champ__k { display: block; font-family: var(--head); font-stretch: var(--stretch); font-weight: 800;
  text-transform: uppercase; font-size: 13px; letter-spacing: .06em; margin: 0 0 8px; }
.champ__aide { display: block; font-size: 12.5px; color: var(--texte-doux); margin: 6px 0 0; }
.champ input[type="text"] {
  width: 100%; min-height: 50px; padding: 10px 16px; border: 3px solid var(--black); border-radius: 18px;
  background: var(--white); color: var(--black); font: inherit; font-size: 16px;
}
.champ input[type="range"] { width: 100%; accent-color: var(--black); min-height: 36px; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce {
  min-height: 44px; padding: 8px 15px; border: 3px solid var(--black); border-radius: 999px; cursor: pointer;
  background: var(--white); color: var(--black);
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: 15px;
}
.puce[aria-pressed="true"] { background: var(--black); color: var(--green); }
.script p { margin: 0 0 4px; font-size: 18px; line-height: 1.5; }
.script .pause { display: block; margin: 2px 0 14px; font-family: var(--head); font-stretch: var(--stretch);
  font-weight: 800; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-doux); }
.script .dit { background: var(--green); box-shadow: 0 0 0 4px var(--green); }
.regles { margin: 0; padding: 0 0 0 18px; font-size: 14.5px; }
.regles li { margin: 0 0 8px; }

.hors-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hors-ligne .btn--sm { flex: none; }
/* La note de 1 à 6 tient toujours sur une ligne, quelle que soit la largeur du téléphone. */
#smNote { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
#smNote .puce { min-width: 0; padding-left: 0; padding-right: 0; text-align: center; justify-content: center; }

/* ============================================================
   CONNECTER, pages « Pourquoi », guide « Bien respirer »
   ============================================================ */

/* Trois onglets au lieu de deux : même pilule, lettres un peu plus petites */
.onglets--3 { grid-template-columns: repeat(3, 1fr); }
.onglets--3 .onglet { font-size: 14px; padding: 0 2px; }

/* La pastille « Pourquoi » : une ligne, en tête de chaque onglet, avant les exercices */
.pastille { display: flex; align-items: center; gap: 9px; width: 100%; margin: 0 0 8px; cursor: pointer;
  background: var(--white); color: var(--black); border: 2px solid var(--black); border-radius: 999px; padding: 4px 14px 4px 5px;
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; text-transform: uppercase; font-size: 13px; text-align: left; white-space: nowrap; }
.pastille::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--green); border: 2px solid var(--black); }
.pastille__d { margin-left: auto; white-space: nowrap; }

/* Les durées et les trois réponses de fin tiennent toujours sur une ligne */
.cx-durees, .cx-decroche { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.cx-durees .puce, .cx-decroche .puce { min-width: 0; padding-left: 0; padding-right: 0; font-size: 14px; white-space: nowrap; }

/* La carte « exercice du jour » : une consigne, rien d'autre */
.consigne { border: 3px solid var(--black); border-radius: 22px; padding: 16px 18px; margin: 18px 0 14px; }
.consigne__t { font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: 24px; line-height: 1.05; margin: 0 0 8px; }
.consigne__c { font-size: 18px; line-height: 1.4; margin: 0; }
.autre { display: block; width: 100%; background: none; border: 0; padding: 12px 0 0; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--texte-doux); text-decoration: underline; text-align: center; }

/* Les trois temps de la connexion longue : titre, durée, ce qu'on y fait.
   (.temps et .etapes existent déjà plus haut, pour autre chose.) */
.cxtemps { list-style: none; counter-reset: cxtemps; margin: 0; padding: 0; }
.cxtemps li { counter-increment: cxtemps; padding: 10px 0; border-top: 1px solid var(--filet); }
.cxtemps li:first-child { border-top: 0; padding-top: 0; }
.cxtemps__t { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px;
  font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 19px; line-height: 1.1; }
.cxtemps__t::before { content: counter(cxtemps) " ·"; }
.cxtemps__d { margin-left: auto; font-style: normal; font-size: 13px; white-space: nowrap; }
.cxtemps__c { margin: 0; font-size: 16px; line-height: 1.4; }

/* Le chrono : un anneau qui se vide, pas un écran à regarder */
.chrono { min-height: calc(100svh - 60px); display: flex; flex-direction: column; justify-content: space-between; }
.chrono__scene { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.anneau { width: min(56vw, 210px); height: min(56vw, 210px); }
.anneau circle { fill: none; stroke-width: 9; }
.anneau .piste { stroke: var(--filet); }
.anneau .avance { stroke: var(--green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.chrono__c { font-size: 19px; line-height: 1.4; max-width: 26ch; margin: 0; color: var(--texte); }
.chrono__phase { font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: 30px; line-height: 1; margin: 0; color: var(--texte); }

/* Les repères du guide « Bien respirer » : un dessin qui bouge, une phrase */
.repere { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--filet); }
.repere__t { font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; text-transform: uppercase;
  font-size: 15px; letter-spacing: .03em; margin: 0 0 4px; }
.repere__c { font-size: 15px; line-height: 1.4; margin: 0; }
.repere__s { font-size: 12px; color: var(--texte-doux); margin: 6px 0 0; }
.dessin { width: 86px; height: 86px; border: 3px solid var(--black); border-radius: 22px; background: var(--green);
  position: relative; overflow: hidden; }
.dessin i { position: absolute; display: block; background: var(--black); }
/* ventre : le rond du bas grossit, celui du haut ne bouge pas */
.d-ventre .haut { width: 22px; height: 22px; border-radius: 50%; left: 32px; top: 14px; background: transparent; border: 3px solid var(--black); }
.d-ventre .bas { width: 30px; height: 30px; border-radius: 50%; left: 28px; top: 44px; animation: ventre 10s ease-in-out infinite; }
@keyframes ventre { 0%, 100% { transform: scale(.7); } 50% { transform: scale(1.25); } }
/* lent : une barre qui se remplit en 5 s et se vide en 5 s */
.d-lent .barre, .d-long .barre { left: 14px; right: 14px; bottom: 14px; height: 58px; border-radius: 12px; background: transparent; border: 3px solid var(--black); }
.d-lent .niveau { left: 17px; right: 17px; bottom: 17px; height: 52px; border-radius: 9px; transform-origin: bottom; animation: lent 10s linear infinite; }
@keyframes lent { 0%, 100% { transform: scaleY(.06); } 50% { transform: scaleY(1); } }
/* long : 4 s pour monter, 8 s pour descendre */
.d-long .niveau { left: 17px; right: 17px; bottom: 17px; height: 52px; border-radius: 9px; transform-origin: bottom; animation: long 12s linear infinite; }
@keyframes long { 0%, 100% { transform: scaleY(.06); } 33.3% { transform: scaleY(1); } }
/* nez : l'air entre par le haut */
.d-nez .tete { width: 40px; height: 48px; border-radius: 20px 20px 16px 16px; left: 23px; top: 22px; background: transparent; border: 3px solid var(--black); }
.d-nez .air { width: 6px; height: 16px; border-radius: 3px; left: 40px; top: 4px; animation: air 5s ease-in-out infinite; }
@keyframes air { 0% { transform: translateY(-14px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
/* légère : trois traits qui s'effacent */
.d-silence i { height: 5px; border-radius: 3px; left: 20px; animation: silence 6s ease-in-out infinite; }
.d-silence .s1 { top: 28px; width: 46px; } .d-silence .s2 { top: 40px; width: 34px; animation-delay: .3s; } .d-silence .s3 { top: 52px; width: 22px; animation-delay: .6s; }
@keyframes silence { 0%, 20% { opacity: 1; } 70%, 100% { opacity: .12; } }
@media (prefers-reduced-motion: reduce) { .dessin i { animation: none !important; } }

/* ============ « CRÉE LA TIENNE » : le mode d'emploi de Visualiser ============ */

/* Une étape avec son titre : un mot d'ordre, puis une phrase */
.etapes--titres b { display: block; font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: 18px; line-height: 1.15; margin: 5px 0 3px; white-space: nowrap; }
.etapes--titres span { display: block; font-size: 15.5px; line-height: 1.4; }

/* La trame à compléter : des lignes à trous, comme sur une feuille */
.trame { list-style: none; margin: 0; padding: 0; }
.trame li { padding: 9px 0; border-top: 1px solid var(--filet); font-size: 16px; line-height: 1.4; }
.trame li:first-child { border-top: 0; padding-top: 0; }
.trame i { font-style: normal; color: var(--texte-doux); font-size: 13.5px; }
.trame u { text-decoration: none; display: inline-block; min-width: 54px; border-bottom: 2px solid var(--texte); margin: 0 4px; height: 1em; }

/* Les idées de contexte : une liste à lire, rien à cocher */
.idees { margin: 0 0 4px; padding: 0 0 0 18px; }
.idees li { font-size: 15.5px; line-height: 1.4; padding: 3px 0; }
.repli > p.note { margin: 0 0 10px; }

/* Les trois contextes prioritaires : deux champs, gardés sur le téléphone */
.champ textarea { display: block; width: 100%; min-height: 50px; padding: 12px 16px; border: 3px solid var(--black); border-radius: 18px;
  background: var(--white); color: var(--black); font: inherit; font-size: 16px; resize: none; }
.champ--suite { margin-top: -10px; }

/* Le bloc « écrit pour toi » : le seul endroit qui parle de l'accompagnement */
.pourtoi { border: 3px solid var(--black); border-radius: 22px; padding: 16px 18px 18px; margin: 30px 0 0; }
.pourtoi p { margin: 0 0 12px; font-size: 16px; line-height: 1.45; }
.pourtoi .btn { display: grid; place-items: center; text-decoration: none; margin: 4px 0 0;
  font-size: clamp(13px, 4.1vw, 17px); white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.pourtoi .note { margin: 12px 0 0; text-align: center; }
.rappel { margin: 26px 0 0; text-align: center; font-size: 14px; color: var(--texte-doux); }
.rappel a { color: inherit; }

/* ============ « OUVRE TON NAVIGATEUR » : dans le navigateur d'une autre app ============ */

/* La page : un bouton, puis la marche à suivre à la main, puis l'adresse à copier. */
.ouvrir-btn { font-size: clamp(14px, 4.6vw, 19px); white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.ouvrir-sinon { font-family: var(--head); font-stretch: var(--stretch); font-weight: 800; text-transform: uppercase; font-size: 15px; margin: 26px 0 12px; }
.points { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: 2px solid currentColor; border-radius: 8px;
  font-style: normal; font-weight: 800; font-size: 15px; line-height: 1; letter-spacing: 1px; vertical-align: 1px; }
.ouvrir-copie { margin: 10px 0 0; }
.ouvrir-copie .adresse { display: block; width: fit-content; margin: 0 0 10px; white-space: nowrap; font-size: clamp(13px, 4.3vw, 18px); max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  -webkit-user-select: text; user-select: text; }
.ouvrir-copie .puce { white-space: nowrap; }
