:root {
  --fond: #EFEDE7;
  --encre: #111216;
  --gris: #45474F;
  --gris-clair: #9C9EA6;
  --texte-doux: #2E3038;
  --bord: #D5D2C9;
  --separateur: #E7E4DD;
  --segment: #E9E7E1;
  --pointille: #D6D3CB;
  --blanc: #FFFFFF;
  --course: #E8622C;
  --muscu: #5B3FD0;
  --natation: #1F6FB2;
  --sante: #1E7A45;
  --course-vif: #FF7A45;
  --accent: var(--encre);
  --bloc-fonce: #17181C;
  --barre: #DAD7CF;
  --muscu-pale: #F0ECFC;
  --tuile: #F3F1EC;
  --ombre: 0 1px 2px rgba(17, 18, 22, 0.06), 0 4px 14px rgba(17, 18, 22, 0.05);
  --vert: #1E7A45; --vert-pale: #E3F3E9; --orange: #B45309; --orange-pale: #FDF0DC; --rouge: #B42318; --rouge-pale: #FCE7E5;
  --mono: 'Chivo Mono', ui-monospace, monospace;
  --bas: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* Thème sombre (automatique de 20h à 7h, ou forcé dans Réglages). */
:root[data-theme="sombre"] {
  --fond: #0F1013;
  --encre: #ECEDEF;
  --gris: #9C9EA6;
  --gris-clair: #6B6E76;
  --texte-doux: #C9CBD1;
  --bord: #2A2C33;
  --separateur: #23252B;
  --segment: #1F2126;
  --pointille: #3A3C42;
  --blanc: #18191D;
  --course: #FF7A45;
  --muscu: #9581F2;
  --natation: #5AA3E0;
  --sante: #6FD3A0;
  --bloc-fonce: #22242A;
  --barre: #34363D;
  --muscu-pale: #2A2540;
  --tuile: #22242A;
  --ombre: none;
  --vert: #6FD3A0; --vert-pale: #13281D; --orange: #F5B25B; --orange-pale: #2E2414; --rouge: #FF8A80; --rouge-pale: #331716;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  transition: background-color 0.3s;
  background: var(--fond);
  color: var(--encre);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--encre); }
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

.sport-course { --accent: var(--course); }
.sport-muscu { --accent: var(--muscu); }
.sport-natation { --accent: var(--natation); }

/* ---------- Mise en page ---------- */
.vue { min-height: 100dvh; }
.ecran {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(108px + var(--bas));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ecran.plein {
  min-height: 100dvh;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 0;
  gap: 12px;
}
.ecran.plein main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pied {
  position: sticky;
  bottom: 0;
  margin: 0 -20px;
  padding: 12px 20px calc(20px + var(--bas));
  background: linear-gradient(to bottom, rgba(245, 244, 240, 0), var(--fond) 18px);
  display: flex;
  gap: 8px;
}

.entete { display: flex; justify-content: space-between; align-items: flex-end; }
.entete-seance { display: flex; justify-content: space-between; align-items: center; }
.sur-titre { margin: 0; font-size: 13px; color: var(--gris); }
.titre { margin: 2px 0 0; font-size: 32px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; }
.titre.moyen { font-size: 26px; }
.titre.petit { font-size: 24px; }
.marque { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.etiquette { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gris); }
.section-titre { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.texte-doux { margin: 0; font-size: 14px; line-height: 1.45; color: var(--texte-doux); }
.aide { margin: 0; font-size: 12px; color: var(--gris); line-height: 1.4; }

/* ---------- Boutons ---------- */
.rond {
  width: 44px; height: 44px; flex: none;
  border-radius: 22px; border: 1px solid var(--bord); background: var(--blanc);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.btn, .btn-sec {
  height: 52px; padding: 0 20px; border-radius: 26px;
  font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; border: none;
}
.btn { background: var(--encre); color: var(--blanc); flex: 1; }
.btn-sec { background: var(--blanc); color: var(--encre); border: 1px solid var(--bord); font-weight: 500; }
.btn.grand, .btn-sec.grand { height: 52px; border-radius: 16px; font-size: 16px; }
.btn.compact, .btn-sec.compact { height: 44px; border-radius: 22px; font-size: 14px; padding: 0 16px; }
.btn.accent { background: var(--accent); }
.btn:disabled, .btn-sec:disabled { opacity: 0.45; cursor: default; }
.actions { display: flex; gap: 8px; }

/* ---------- Cartes ---------- */
.carte {
  background: var(--blanc); border: 1px solid var(--bord); border-radius: 26px;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--ombre);
}
.carte.moyenne { border-radius: 18px; padding: 16px; gap: 12px; }
.carte.liste { padding: 6px 18px; gap: 0; }
.carte.accent { border: 1.5px solid var(--accent); }
.carte .ligne-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.carte h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.carte.moyenne h2 { font-size: 22px; }
.carte p { margin: 0; }
.date-accent { font-size: 12px; font-weight: 700; color: #FFFFFF; background: var(--accent); border-radius: 14px; padding: 5px 11px; white-space: nowrap; }
.petit-gris { font-size: 12px; color: var(--gris); }

.objectif {
  background: var(--bloc-fonce); color: #FFFFFF; border-radius: 26px;
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px;
}
.objectif .haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.objectif .nom { margin: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #B9BBC2; }
.objectif .cible { margin: 6px 0 0; font-size: 14px; color: #E6E7EA; }
.objectif .compte { margin: 0; font-family: 'Hanken Grotesk', sans-serif; font-size: 48px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.phases { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; }
.phases div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.phases i { height: 4px; border-radius: 2px; background: #33353C; }
.phases .passee i { background: var(--gris); }
.phases .actuelle i { background: #FFFFFF; }
.phases span { font-size: 11px; color: var(--gris-clair); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phases .actuelle span { color: #FFFFFF; font-weight: 600; }

.tuiles { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.tuile { background: var(--tuile); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.tuile p:first-child { font-size: 11px; color: var(--gris); }
.tuile p:last-child { margin-top: 4px; font-family: var(--mono); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.tuile.bordee { background: var(--blanc); border: 1px solid var(--bord); }
.tuile.bordee p:last-child { font-size: 15px; }

.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { font-family: var(--mono); font-size: 12px; background: var(--fond); border-radius: 8px; padding: 5px 8px; }

/* ---------- Routine ---------- */
.check {
  display: flex; align-items: center; gap: 12px; min-height: 48px;
  border-bottom: 1px solid var(--separateur); cursor: pointer;
}
.check:last-child { border-bottom: none; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--encre); flex: none; }
.check .nom { flex: 1; font-size: 15px; }
.check input:checked + .nom { color: var(--gris); text-decoration: line-through; }
.check .dose { font-family: var(--mono); font-size: 13px; color: var(--gris); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini {
  background: var(--blanc); border: 1px solid var(--bord); border-radius: 18px; padding: 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
}
.mini label, .mini .lib { font-size: 12px; color: var(--gris); }
.pesee { display: flex; align-items: baseline; gap: 4px; }
.pesee input {
  width: 84px; border: none; outline: none; background: transparent; padding: 0;
  font-family: var(--mono); font-size: 22px; font-weight: 500;
}
.pesee span { font-size: 13px; color: var(--gris); }
.mini .action { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.mini .etat { font-size: 12px; color: var(--gris); }

/* ---------- Séances ---------- */
.frise {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
  background: var(--blanc); border: 1px solid var(--bord); border-radius: 18px; padding: 10px 6px;
}
.frise div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.frise .j { font-size: 11px; color: var(--gris); }
.frise .n {
  width: 32px; height: 32px; border-radius: 16px; font-family: var(--mono); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.frise .auj .n { background: var(--encre); color: var(--blanc); }
.frise .points { display: flex; gap: 3px; height: 6px; }
.point { width: 6px; height: 6px; border-radius: 3px; background: var(--accent); display: inline-block; flex: none; }

.ligne {
  min-height: 52px; background: var(--blanc); border: 1px solid var(--bord); border-radius: 14px;
  padding: 8px 14px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--encre);
}
.ligne .quand { width: 52px; flex: none; font-size: 12px; color: var(--gris); }
.ligne .quoi { flex: 1; font-size: 15px; min-width: 0; }
.ligne .info { font-family: var(--mono); font-size: 12px; color: var(--gris); text-align: right; }
.ligne .info.texte { font-family: inherit; }
.ligne.faite .quoi { color: var(--gris); text-decoration: line-through; }
.chevron { flex: none; }

.statut-garmin {
  display: flex; align-items: center; gap: 10px; background: var(--fond); border-radius: 12px; padding: 10px 12px;
}
.statut-garmin .point { background: #B4B1A9; width: 8px; height: 8px; border-radius: 4px; }
.statut-garmin.ok .point { background: var(--natation); }
.statut-garmin span:nth-child(2) { flex: 1; font-size: 13px; color: var(--texte-doux); }
.statut-garmin span:last-child { font-family: var(--mono); font-size: 13px; font-weight: 500; }

/* ---------- Fiche laps ---------- */
.consigne {
  display: flex; align-items: center; gap: 10px; background: var(--blanc);
  border: 1px solid var(--bord); border-radius: 14px; padding: 10px 12px;
}
.consigne p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--texte-doux); }
.consigne strong { color: var(--encre); }
.bloc {
  background: var(--blanc); border: 1px solid var(--bord); border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.bloc.rep { border: 1.5px solid var(--accent); }
.bloc .tete { display: flex; justify-content: space-between; align-items: baseline; }
.bloc .tete p { margin: 0; font-size: 15px; font-weight: 600; }
.bloc .tete span { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--accent); }
.etape { display: flex; gap: 14px; align-items: center; }
.etape p { margin: 0; }
.etape .nom { font-size: 15px; font-weight: 500; }
.etape .detail { margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--gris); }
.lap {
  width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--fond);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1;
}
.lap.serre { font-size: 11px; }
.lap.effort { background: var(--encre); color: var(--blanc); }
.encadre { border: 1px dashed var(--pointille); border-radius: 14px; padding: 10px 12px; }
.encadre p:first-child { margin: 0; font-size: 11px; color: var(--gris); }
.encadre p:last-child { margin: 2px 0 0; font-size: 13px; }
.series { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--texte-doux); white-space: pre-line; }

/* ---------- Muscu ---------- */
.segment {
  display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 3px;
  background: var(--segment); border-radius: 12px; padding: 3px;
}
.segment button {
  min-height: 38px; border: none; border-radius: 10px; background: transparent;
  font-size: 14px; color: var(--gris); padding: 0 4px;
}
.segment button[aria-pressed="true"] { background: var(--blanc); font-weight: 600; color: var(--encre); }
.segment.petit button { font-size: 13px; }
.indication { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.indication label { font-size: 12px; color: var(--gris); line-height: 1.35; }
.indication span { font-size: 12px; font-weight: 600; color: var(--muscu); white-space: nowrap; }
textarea.notes {
  flex: 1; min-height: 46dvh; resize: none; width: 100%;
  border: 1px solid var(--bord); border-radius: 18px; background: var(--blanc);
  padding: 16px; font-size: 16px; line-height: 1.55; outline: none;
}
textarea.debrief {
  min-height: 86px; resize: vertical; width: 100%;
  border: 1px solid var(--bord); border-radius: 16px; background: var(--blanc);
  padding: 12px 14px; font-size: 16px; line-height: 1.45; outline: none;
}
textarea:focus, input:focus-visible { border-color: var(--gris-clair); }
.carre {
  width: 52px; height: 52px; flex: none; border-radius: 16px; border: 1px solid var(--bord); background: var(--blanc);
  display: inline-flex; align-items: center; justify-content: center;
}
.carre.actif { border-color: var(--muscu); background: var(--muscu-pale); }
.exo { padding: 10px 0; border-bottom: 1px solid var(--separateur); display: flex; flex-direction: column; gap: 4px; }
.exo:last-child { border-bottom: none; }
.exo .haut { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.exo .nom { font-size: 15px; font-weight: 500; }
.exo .prog { font-size: 12px; color: var(--gris); white-space: nowrap; }
.exo .prog.hausse { font-weight: 600; color: var(--muscu); }
.exo .seriesx { font-family: var(--mono); font-size: 12px; color: var(--gris); }
.exo .note { font-size: 12px; color: var(--texte-doux); line-height: 1.4; }
.remarque {
  margin: 0; font-size: 13px; line-height: 1.45; color: var(--texte-doux);
  background: var(--blanc); border: 1px solid var(--bord); border-radius: 12px; padding: 10px 12px;
}
.remarque.question { border-color: var(--muscu); }
.remarque.alerte { border-color: var(--course); }

/* ---------- Historique ---------- */
.filtres { display: flex; gap: 6px; flex-wrap: wrap; }
.filtres button {
  height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--bord);
  background: var(--blanc); font-size: 14px;
}
.filtres button[aria-pressed="true"] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.notes-seance { margin: 0; font-size: 14px; line-height: 1.5; color: var(--texte-doux); white-space: pre-line; overflow-wrap: anywhere; }
.notes-seance.repliee { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.lien-texte { align-self: flex-start; background: none; border: none; padding: 6px 0; font-size: 13px; font-weight: 600; color: var(--accent); min-height: 32px; }
.liste-hist { background: var(--blanc); border: 1px solid var(--bord); border-radius: 18px; padding: 4px 16px; }
.hist {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0;
  border-bottom: 1px solid var(--separateur);
}
.hist:last-child { border-bottom: none; }
.hist .quoi { flex: 1; min-width: 0; }
.hist .quoi p { margin: 0; }
.hist .quoi p:first-child {
  font-size: 15px; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hist .point { flex: none; }
.hist .quoi p:last-child { font-size: 12px; color: var(--gris); margin-top: 2px; }
.hist .info { font-family: var(--mono); font-size: 12px; color: var(--gris); text-align: right; max-width: 42%; }
.bientot { border-style: dashed; }

/* ---------- Analyse ---------- */
.badge { font-size: 13px; border: 1px solid var(--bord); background: var(--blanc); border-radius: 16px; padding: 6px 12px; }
.badge.noir { background: var(--encre); color: var(--blanc); border-color: var(--encre); font-weight: 600; }
.partie { display: flex; flex-direction: column; gap: 8px; }
.partie.separee { border-top: 1px solid var(--separateur); padding-top: 14px; }
.partie h3 { margin: 0; font-size: 16px; font-weight: 600; }
.carte .texte-doux + .texte-doux { margin-top: 10px; }
.tableau { padding: 4px 16px; }
.rang { display: grid; grid-template-columns: 44px 1fr 64px 76px; gap: 8px; align-items: center; min-height: 46px; border-bottom: 1px solid var(--separateur); font-size: 14px; }
.tableau.natation .rang { grid-template-columns: 1fr 70px 56px; }
.rang:last-child { border-bottom: none; }
.rang.tete { min-height: 38px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris); }
.rang .gris { color: var(--gris); font-size: 12px; }
.rang .fort { font-size: 16px; font-weight: 500; }
.rang.hors .fort, .rang.hors span:last-child, .rang .accent { color: var(--accent); font-weight: 600; }
.rang span:last-child { text-align: right; }
.strava { background: var(--bloc-fonce); color: #FFFFFF; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bloc-strava { display: flex; flex-direction: column; gap: 8px; }
.bloc-strava.separe { border-top: 1px solid #33353C; padding-top: 14px; }
.bloc-strava .ligne-haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bloc-strava .lib { font-size: 13px; color: #9C9EA6; }
.strava-titre { margin: 0; font-size: 17px; font-weight: 600; }
.strava-desc { margin: 0; font-size: 15px; line-height: 1.5; color: #E6E7EA; }
.copier { height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid #5E6068; background: transparent; color: #FFFFFF; font-size: 14px; }
.btn-blanc { height: 48px; border-radius: 14px; border: none; background: #FFFFFF; color: #17181C; font-size: 15px; font-weight: 600; }
.etapes { gap: 0; padding: 8px 18px; }
.etape-analyse { display: flex; align-items: center; gap: 12px; min-height: 52px; font-size: 15px; color: var(--gris); border-bottom: 1px solid var(--separateur); }
.etape-analyse:last-child { border-bottom: none; }
.etape-analyse.courante { color: var(--encre); font-weight: 600; }
.etape-analyse.faite { color: var(--encre); }
.puce-etape { width: 28px; height: 28px; flex: none; border-radius: 14px; background: var(--fond); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; }
.etape-analyse.faite .puce-etape { background: var(--encre); color: var(--blanc); }
.roue.petite { width: 16px; height: 16px; border-width: 2px; flex: none; }

/* ---------- Coach ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(96px + var(--bas)); z-index: 11;
  height: 48px; padding: 0 18px 0 14px; border-radius: 24px;
  background: var(--encre); color: var(--fond); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(23, 24, 28, 0.22);
}
.fil { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.bulle { max-width: 88%; border-radius: 18px; padding: 11px 14px; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.bulle.matt { align-self: flex-end; background: var(--encre); color: var(--fond); border-bottom-right-radius: 6px; }
.bulle.coach { align-self: flex-start; background: var(--blanc); border: 1px solid var(--bord); border-bottom-left-radius: 6px; }
.bulle.erreur { border-color: var(--course); }
.bulle .ecrit { display: flex; align-items: center; gap: 8px; color: var(--gris); }
.actions-coach { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.action-coach { font-size: 13px; border-radius: 10px; padding: 8px 10px; background: var(--fond); color: var(--texte-doux); text-decoration: none; display: flex; gap: 8px; align-items: center; }
.action-coach.ko { color: var(--course); }
.action-coach strong { color: var(--encre); }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions button {
  min-height: 40px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--bord);
  background: var(--blanc); font-size: 14px; text-align: left;
}
.saisie-coach { display: flex; gap: 8px; align-items: flex-end; }
.saisie-coach textarea {
  flex: 1; min-height: 52px; max-height: 160px; resize: none; border: 1px solid var(--bord); border-radius: 16px;
  background: var(--blanc); padding: 14px; font-size: 16px; line-height: 1.4; outline: none;
}

/* ---------- Divers ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  border-top: 1px solid var(--bord); background: var(--blanc);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
  padding: 8px 4px calc(10px + var(--bas));
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none; color: var(--gris); font-size: 11px; font-weight: 600;
}
.nav-icone {
  position: relative; width: 52px; height: 32px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.nav a[aria-current="page"] { color: var(--encre); font-weight: 600; }
.nav a[aria-current="page"] .nav-icone { background: transparent; color: var(--encre); }
.nav a[aria-current="page"] { color: var(--encre); font-weight: 800; }
.pastille {
  position: absolute; top: 3px; right: 12px; width: 9px; height: 9px; border-radius: 5px;
  background: var(--course); border: 2px solid var(--blanc);
}

.toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--bas)); transform: translateX(-50%); z-index: 20;
  max-width: calc(100% - 40px); background: var(--encre); color: var(--blanc);
  border-radius: 14px; padding: 12px 16px; font-size: 14px; line-height: 1.4;
  box-shadow: 0 6px 24px rgba(23, 24, 28, 0.18);
}

.attente { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 0; text-align: center; }
.roue {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid var(--bord); border-top-color: var(--accent);
  animation: tourne 0.9s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .roue { animation-duration: 3s; } }

.feuille-fond { position: fixed; inset: 0; z-index: 30; background: rgba(23, 24, 28, 0.35); display: flex; align-items: flex-end; justify-content: center; }
.feuille {
  width: 100%; max-width: 480px; background: var(--fond); border-radius: 22px 22px 0 0;
  padding: 20px 20px calc(20px + var(--bas)); display: flex; flex-direction: column; gap: 12px;
  max-height: 90dvh; overflow-y: auto;
}
.feuille h2 { margin: 0; font-size: 20px; font-weight: 600; }
.jours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.jours button {
  min-height: 48px; border-radius: 12px; border: 1px solid var(--bord); background: var(--blanc); font-size: 14px;
}
.jours button[aria-pressed="true"] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }

.connexion .btn { flex: none; }
.connexion { max-width: 380px; margin: 0 auto; min-height: 100dvh; padding: 0 24px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.connexion input {
  height: 52px; border-radius: 14px; border: 1px solid var(--bord); background: var(--blanc);
  padding: 0 16px; font-size: 18px; font-family: var(--mono); outline: none; width: 100%;
}
.erreur-texte { margin: 0; font-size: 13px; color: var(--course); }

/* Écran Coach dans un onglet : la zone de saisie reste au-dessus de la barre d'onglets. */
.ecran.plein.onglet { padding-bottom: calc(76px + var(--bas)); }
.ecran.plein.onglet .pied { bottom: calc(72px + var(--bas)); padding-bottom: 12px; }

/* ---------- Repas ---------- */
.jauge { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.piste { height: 8px; border-radius: 4px; background: var(--segment); overflow: hidden; }
.piste i { display: block; height: 100%; border-radius: 4px; background: var(--encre); }
.champ { height: 48px; border-radius: 14px; border: 1px solid var(--bord); background: var(--blanc); padding: 0 14px; font-size: 16px; outline: none; width: 100%; }
label.btn { color: var(--blanc); }

/* ---------- Accueil enrichi ---------- */
.perf { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid #2A2C33; padding-top: 10px; font-size: 13px; color: #C9CBD2; flex-wrap: wrap; }
.perf strong { font-family: var(--mono); color: #FFFFFF; font-weight: 600; }
.statut { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 3px 9px; white-space: nowrap; }
.statut.bon { color: var(--vert); background: var(--vert-pale); }
.statut.neutre { color: var(--gris); background: var(--tuile); }
.statut.attention { color: var(--orange); background: var(--orange-pale); }
.statut.alerte { color: var(--rouge); background: var(--rouge-pale); }
.objectif .statut.bon { color: #0E3B22; background: #7FE0A8; }
.objectif .statut.neutre { color: #FFFFFF; background: #33353C; }
.objectif .statut.attention { color: #3D2600; background: #F5B25B; }
.objectif .statut.alerte { color: #3B0B07; background: #FF8A80; }
.lien-discret { background: none; border: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--gris); min-height: 32px; }
.a-venir { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; text-decoration: none; color: var(--encre); }
.a-venir .quand { width: 58px; color: var(--gris); flex: none; white-space: nowrap; font-size: 13px; }
.a-venir .quoi { flex: 1; }
.a-venir .meteo { font-family: var(--mono); font-size: 12px; color: var(--gris); }
.tendance { font-size: 12px; }
.tendance.baisse { color: var(--vert); }
.tendance.hausse { color: var(--orange); }
.piste.petite { height: 6px; margin-top: 6px; }

.choix-metrique { text-align: left; font-family: inherit; color: inherit; cursor: pointer; }
.choix-metrique[aria-pressed="true"] { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
.choix-metrique .tendance { margin-top: 2px; font-family: inherit; font-size: 11px; font-weight: 400; color: var(--gris); }
.tuile.choix-metrique p:nth-child(2) { margin-top: 4px; font-family: var(--mono); font-size: 18px; font-weight: 600; }
.tuile.choix-metrique p.tendance { margin-top: 3px; font-family: inherit; font-size: 11px; font-weight: 400; color: var(--gris); }

button.hist, a.hist { width: 100%; background: none; border: none; border-bottom: 1px solid var(--separateur); text-align: left; font-family: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.liste-hist > :last-child { border-bottom: none; }

.suggestions.defilantes { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
.suggestions.defilantes::-webkit-scrollbar { display: none; }
.suggestions.defilantes button { flex: none; white-space: nowrap; min-height: 36px; padding: 6px 12px; font-size: 13px; }

.nav-plus {
  justify-self: center; align-self: center; width: 58px; height: 58px; border-radius: 29px; border: none;
  background: var(--encre); color: var(--fond); display: flex; align-items: center; justify-content: center;
  margin-top: -22px; box-shadow: 0 6px 18px rgba(17, 18, 22, 0.25);
}
.menu-plus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.menu-plus a { background: var(--blanc); border: 1px solid var(--bord); border-radius: 20px; padding: 16px; text-decoration: none; color: var(--encre); display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.menu-plus a strong { font-size: 16px; }
.menu-plus a span { font-size: 13px; color: var(--gris); }
.menu-plus .point { width: 10px; height: 10px; border-radius: 5px; }

.anneaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.anneau { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.anneau .valeur { position: absolute; top: 24px; left: 0; right: 0; margin: 0; font-family: var(--mono); font-size: 19px; font-weight: 700; line-height: 1.1; }
.anneau .valeur small { display: block; font-size: 10px; font-weight: 500; color: var(--gris); }
.anneau .nom { margin: 0; font-size: 13px; color: var(--gris); }
.perf .progression { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.barre-objectif { position: relative; height: 8px; border-radius: 4px; background: #33353C; }
.barre-objectif i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--course-vif); }
.barre-objectif b { position: absolute; right: 8px; top: -4px; width: 2px; height: 16px; background: #FFFFFF; }
.perf .progression .ligne-haut { gap: 10px; flex-wrap: wrap; }
.tuiles[style*="--n:3"] .tuile p:last-child { font-size: 14px; }

/* Listes de textes longs (rapport, aide de Matt) : pas de coupure à 2 lignes. */
.hist.libre { align-items: flex-start; }
.hist.libre .quoi p:first-child { display: block; overflow: visible; }
.hist.libre .quoi p:only-child { font-size: 15px; font-weight: 400; color: var(--encre); margin: 0; line-height: 1.45; }
.hist.libre .point { margin-top: 8px; }

/* ---------- Plan : calendrier par jour ---------- */
.cal-bande {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px; margin: 0 -4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cal-bande::-webkit-scrollbar { display: none; }
.cal-jour {
  flex: none; width: 48px; min-height: 72px; scroll-snap-align: center; border: 1px solid var(--bord); border-radius: 16px;
  background: var(--blanc); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: inherit; color: var(--encre); cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.cal-jour .j { font-size: 11px; color: var(--gris); }
.cal-jour .n { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.cal-jour .points { display: flex; gap: 3px; height: 6px; }
.cal-jour.auj .j { color: var(--encre); font-weight: 700; }
.cal-jour[aria-selected="true"] { background: var(--encre); border-color: var(--encre); color: var(--blanc); transform: translateY(-2px); }
.cal-jour[aria-selected="true"] .j { color: var(--blanc); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-nav p { margin: 0; font-size: 17px; font-weight: 700; text-align: center; flex: 1; }
.cal-contenu { display: flex; flex-direction: column; gap: 12px; transition: opacity .16s ease, transform .16s ease; touch-action: pan-y; }
.cal-contenu.sortie { opacity: 0; transform: translateX(var(--dx, 0)); }
.cal-carte { animation: cal-fondu .32s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
.cal-carte.faite { opacity: .6; }
@keyframes cal-fondu { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cal-contenu, .cal-jour { transition: none; }
  .cal-carte { animation: none; }
}

/* ---------- Météo de l'accueil (bandeau façon chaîne météo) ---------- */
.meteo-a { background: var(--blanc); border: 1px solid var(--bord); border-radius: 22px; overflow: hidden; box-shadow: var(--ombre); }
.m-fixe { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); align-items: center; padding: 12px 14px; gap: 0; }
.m-sep { height: 40px; background: var(--separateur); }
.m-bloc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-sep + .m-bloc { padding-left: 14px; }
.m-bloc > div { min-width: 0; }
.m-icone { width: 32px; height: 32px; flex: none; color: var(--encre); overflow: visible; }
.m-bloc p { margin: 0; font-size: 11px; color: var(--gris); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bloc strong { display: block; font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.m-bloc small { display: block; font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bloc small b { color: var(--natation); font-weight: 600; }
.m-defile { background: var(--bloc-fonce); color: #FFFFFF; height: 30px; display: flex; align-items: center; overflow: hidden; cursor: pointer; }
.m-marque { flex: none; height: 100%; display: flex; align-items: center; padding: 0 10px; font: 600 10px var(--mono); letter-spacing: 0.1em; background: var(--course); color: #FFFFFF; position: relative; z-index: 1; }
.m-piste { display: flex; white-space: nowrap; font: 500 12px var(--mono); letter-spacing: 0.03em; text-transform: uppercase; animation: m-defiler var(--duree, 24s) linear infinite; }
.m-piste span { display: inline-flex; align-items: center; }
.m-piste > span:not(.m-copie), .m-copie > span { padding-right: 18px; }
.m-piste > span:not(.m-copie)::before, .m-copie > span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #9C9EA6; margin: 0 12px 0 0; }
.m-defile.pause .m-piste { animation-play-state: paused; }
@keyframes m-defiler { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.m-goutte { animation: m-tomber 1.4s linear infinite; }
.m-goutte:nth-child(2) { animation-delay: 0.45s; }
.m-goutte:nth-child(3) { animation-delay: 0.9s; }
@keyframes m-tomber { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(5px); opacity: 0; } }
.m-nuage { animation: m-flotter 6s ease-in-out infinite; }
@keyframes m-flotter { 50% { transform: translateX(1.5px); } }
.m-soleil { transform-origin: 16px 16px; animation: tourne 40s linear infinite; }
.m-flocons { animation: m-tomber 2.4s linear infinite; }
.meteo-vide { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; text-decoration: none; color: var(--encre); font-size: 14px; border-radius: 22px; }
.m-badge { font-size: 12px; font-weight: 600; background: var(--tuile); border-radius: 8px; padding: 4px 8px; flex: none; }
.choix-ville { display: flex; gap: 8px; align-items: baseline; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--bord); border-radius: 12px; background: var(--blanc); color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.choix-ville[aria-pressed="true"] { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
#lieu-resultats { display: flex; flex-direction: column; gap: 6px; }
#lieu-resultats:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .m-piste, .m-goutte, .m-nuage, .m-soleil, .m-flocons { animation: none; }
  .m-defile { height: auto; padding-right: 10px; }
  .m-piste { white-space: normal; flex-wrap: wrap; padding: 6px 0 6px 10px; }
  .m-copie { display: none; }
}
.lieu .segment, #lieu-sports { display: flex; }
.lieu .segment button, #lieu-sports button { flex: 1; }
#lieu-ajouter { min-height: 48px; }
.m-fixe { padding: 12px; }
.m-bloc { gap: 8px; }
.m-sep + .m-bloc { padding-left: 12px; }
.m-icone { width: 28px; height: 28px; }

/* ---------- Animations (sobres, coupées si « Réduire les animations ») ---------- */
.entree .ecran > *, .entree .ecran > main > * { animation: monter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.entree .ecran > :nth-child(2), .entree .ecran > main > :nth-child(2) { animation-delay: 0.05s; }
.entree .ecran > :nth-child(3), .entree .ecran > main > :nth-child(3) { animation-delay: 0.1s; }
.entree .ecran > :nth-child(4), .entree .ecran > main > :nth-child(4) { animation-delay: 0.15s; }
.entree .ecran > :nth-child(5), .entree .ecran > main > :nth-child(5) { animation-delay: 0.2s; }
.entree .ecran > :nth-child(n+6), .entree .ecran > main > :nth-child(n+6) { animation-delay: 0.25s; }
.entree .ecran > main { animation: none; }
.entree .phases i { transform-origin: left; animation: remplir 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
@keyframes monter { from { opacity: 0.001; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes remplir { from { transform: scaleX(0); } }

.btn, .btn-sec, .rond, .segment button, .choix-ville { transition: transform 0.12s ease, background-color 0.2s, opacity 0.2s; }
.btn:active, .btn-sec:active, .rond:active, .segment button:active, .choix-ville:active { transform: scale(0.96); }

.check input { appearance: none; -webkit-appearance: none; border: 1.5px solid var(--bord); border-radius: 7px; background: var(--blanc); display: grid; place-items: center; transition: background-color 0.2s, border-color 0.2s; cursor: pointer; }
.check input::after { content: ""; width: 10px; height: 5px; border: solid var(--blanc); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); }
.check input:checked { background: var(--encre); border-color: var(--encre); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
.check .nom { transition: color 0.2s; }

.squelette { gap: 14px; }
.sq { border-radius: 22px; background: var(--segment); animation: respirer 1.4s ease-in-out infinite; }
@keyframes respirer { 50% { opacity: 0.5; } }

@media (prefers-reduced-motion: reduce) {
  .entree .ecran > *, .entree .ecran > main > *, .entree .phases i, .sq { animation: none; }
  .btn:active, .btn-sec:active, .rond:active, .segment button:active { transform: none; }
}

/* ---------- Lecteur musique (Spotify) ---------- */
body.avec-lecteur .vue { padding-bottom: 66px; }
.lecteur { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(78px + var(--bas)); z-index: 11; display: flex; justify-content: flex-end; pointer-events: none; }
.lecteur.sans-nav { bottom: calc(12px + var(--bas)); }
.lecteur > * { pointer-events: auto; }
.l-barre { position: relative; flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 6px; background: var(--blanc); border: 1px solid var(--bord); border-radius: 18px; padding: 6px; box-shadow: 0 6px 22px rgba(17, 18, 22, 0.14); overflow: hidden; animation: monter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.l-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: none; padding: 0; color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.l-jaq { width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; background: var(--segment); display: block; }
.l-jaq img { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-txt { min-width: 0; display: flex; flex-direction: column; }
.l-titre { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.l-artiste { font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; display: flex; align-items: center; gap: 6px; }
.l-btns { display: flex; align-items: center; flex: none; }
.l-b { width: 40px; height: 40px; border: none; border-radius: 20px; background: transparent; color: var(--encre); display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: transform 0.12s; padding: 0; }
.l-b:active { transform: scale(0.9); }
.l-b svg { width: 20px; height: 20px; }
.l-b.play { background: var(--encre); color: var(--blanc); }
.l-b.petit { width: 32px; color: var(--gris); }
.l-prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--encre); transition: width 0.8s linear; }
.l-bulle { width: 52px; height: 52px; border-radius: 26px; border: 2px solid var(--blanc); padding: 0; background: var(--bloc-fonce); box-shadow: 0 8px 22px rgba(17, 18, 22, 0.25); cursor: pointer; overflow: hidden; animation: monter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.l-bulle .l-jaq { width: 100%; height: 100%; border-radius: 50%; }
.lecteur.joue .l-bulle .tourne { animation: tourne 8s linear infinite; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; flex: none; }
.eq i { width: 3px; background: var(--course); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: 0.2s; }
.eq i:nth-child(3) { animation-delay: 0.45s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.l-grand { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 8px; }
.l-poignee { width: 44px; height: 5px; border-radius: 3px; background: var(--bord); border: none; padding: 0; margin-bottom: 4px; cursor: pointer; }
.l-pochette { width: min(72vw, 280px); aspect-ratio: 1; max-width: 100%; border-radius: 18px; overflow: hidden; background: var(--segment); box-shadow: 0 14px 34px rgba(17, 18, 22, 0.25); }
.l-pochette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-grand-txt { text-align: center; width: 100%; min-width: 0; }
.l-grand-txt .l-titre { font-size: 20px; white-space: normal; }
.l-grand-txt .l-artiste { justify-content: center; white-space: normal; font-size: 14px; }
.l-grand-prog { width: 100%; height: 4px; border-radius: 2px; background: var(--segment); overflow: hidden; }
.l-grand-prog span { display: block; height: 100%; background: var(--encre); }
.l-temps { width: 100%; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--gris); margin-top: -10px; }
.l-grand-btns { display: flex; align-items: center; gap: 22px; }
.l-grand-btns .l-b { width: 56px; height: 56px; border-radius: 28px; }
.l-grand-btns .l-b svg { width: 28px; height: 28px; }
.l-grand-btns .l-b.play { width: 72px; height: 72px; border-radius: 36px; }
.l-grand .btn-sec { width: 100%; display: flex; gap: 8px; align-items: center; justify-content: center; text-decoration: none; }
.l-grand .btn-sec svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .eq i, .lecteur.joue .l-bulle .tourne, .l-barre, .l-bulle { animation: none; } }

/* ---------- Guide Forerunner 55 ---------- */
.fr-montre { width: 100%; max-width: 300px; display: block; margin: 0 auto; }
.fr-duo .fr-montre { max-width: 170px; }
.fr-boitier { fill: var(--bloc-fonce); }
.fr-ecran { fill: #0B0C0E; stroke: #33353C; stroke-width: 1.5; }
.fr-etiquette { fill: #9C9EA6; font: 600 10px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.fr-valeur { fill: #FFFFFF; font: 600 24px var(--mono); }
.fr-sep { stroke: #33353C; stroke-width: 1; }
.fr-menu-titre { fill: var(--course); font: 700 13px 'Hanken Grotesk', sans-serif; }
.fr-menu { fill: #9C9EA6; font: 500 14px 'Hanken Grotesk', sans-serif; }
.fr-menu.sel { fill: #FFFFFF; font-weight: 700; }
.fr-bouton rect { fill: var(--gris-clair); }
.fr-bouton text { fill: var(--gris); font: 600 11px var(--mono); }
.fr-bouton.actif rect { fill: var(--course); }
.fr-bouton.actif text { fill: var(--course); }
.fr-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fr-duo figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fr-duo figcaption { font-size: 12px; color: var(--gris); text-align: center; line-height: 1.4; }
.fr-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }
.fr-etape { flex-direction: row; gap: 14px; align-items: flex-start; }
.fr-num { width: 32px; height: 32px; flex: none; border-radius: 16px; background: var(--encre); color: var(--blanc); display: grid; place-items: center; font: 600 14px var(--mono); }
.fr-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fr-corps p { font-size: 15px; line-height: 1.45; }
.fr-corps .fr-montre { max-width: 200px; }

/* ---------- Records (onglet Plan) ---------- */
.rec { gap: 14px; margin-top: 6px; }
.rec-titre-icone { width: 34px; height: 34px; border-radius: 17px; background: var(--tuile); display: grid; place-items: center; color: var(--course); }
.rec-titre-icone svg { width: 20px; height: 20px; }
.rec-groupe { display: flex; flex-direction: column; }
.rec-groupe > .etiquette { margin-bottom: 4px; }
.rec-ligne { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--separateur); }
.rec-icone { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tuile); }
.rec-icone svg { width: 20px; height: 20px; }
.rec-icone.sport-course { color: var(--course); }
.rec-icone.sport-natation { color: var(--natation); }
.rec-icone.sport-muscu { color: var(--muscu); }
.rec-quoi { flex: 1; min-width: 0; }
.rec-quoi p:first-child { font-size: 15px; font-weight: 600; }
.rec-quoi p:last-child { font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-valeur { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rec-valeur p:first-child { font-size: 17px; font-weight: 600; }
.rec-valeur p + p { font-size: 12px; color: var(--gris); }
.rec-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--course); }
.rec-badge svg { width: 13px; height: 13px; }
.rec-ligne.nouveau .rec-icone { background: var(--course); color: #FFFFFF; animation: rec-brille 2.4s ease-in-out 2; }
@keyframes rec-brille { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--course) 25%, transparent); } }
.rec-plus summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--gris); padding: 8px 0; list-style: none; }
.rec-plus summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { .rec-ligne.nouveau .rec-icone { animation: none; } }

/* ---------- Story de séance ---------- */
.btn-story { display: flex; align-items: center; justify-content: center; gap: 8px; }
.story-feuille { display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow-x: hidden; }
.story-feuille canvas { width: auto; height: min(52dvh, 520px); aspect-ratio: 9 / 16; max-width: 100%; align-self: center; border-radius: 16px; box-shadow: 0 10px 30px rgba(17, 18, 22, 0.25); background: var(--segment); }
.story-feuille label.btn-sec { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.story-feuille .btn, .story-feuille .btn-sec { min-height: 52px; flex: none; }

/* ---------- Fil des amis ---------- */
.bouton-amis { position: relative; }
.pastille-amis { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--course); color: #FFFFFF; font: 700 11px var(--mono); display: grid; place-items: center; padding: 0 4px; }
.post { gap: 12px; }
.post h2 { font-size: 22px; }
.post-tete { display: flex; align-items: center; gap: 10px; }
.post-tete .point { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.sport-course .post-tete .point { background: var(--course); }
.sport-muscu .post-tete .point { background: var(--muscu); }
.sport-natation .post-tete .point { background: var(--natation); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 20px; background: var(--tuile); display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.avatar.moi { background: var(--encre); color: var(--blanc); }
.post-qui { flex: 1; min-width: 0; }
.post-qui p:last-child { font-size: 12px; color: var(--gris); }
.post-coach { font-size: 14px; line-height: 1.45; border-left: 3px solid var(--course); padding-left: 10px; color: var(--texte-doux); }
.post-actions { display: flex; align-items: center; gap: 10px; }
.post-like { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--bord); background: var(--blanc); color: var(--encre); font: 600 14px var(--mono); cursor: pointer; transition: transform 0.15s; }
.post-like.on { color: var(--course); border-color: var(--course); }
.post-like.on svg { fill: currentColor; }
.post-like.pulse { transform: scale(1.15); }
.post-likes { font-size: 12px; color: var(--gris); }
.post-commentaires { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; border-top: 1px solid var(--separateur); padding-top: 10px; }
.post-ecrire { display: flex; gap: 8px; }
.post-ecrire .champ { height: 42px; font-size: 15px; }
.code-ami { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--tuile); border-radius: 14px; padding: 12px 14px; }
.code-ami .mono { font-size: 28px; font-weight: 700; letter-spacing: 0.15em; }
.choix-partage { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.choix-partage + .choix-partage { border-top: 1px solid var(--separateur); padding-top: 14px; }
.choix-partage.eteint { opacity: 0.45; pointer-events: none; }
.ligne-ami { display: flex; align-items: center; gap: 10px; }

/* ---------- Recherche de courses ---------- */
.lien-courses { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--encre); border-radius: 22px; }
.lien-courses svg:last-child { width: 18px; height: 18px; color: var(--gris); }
.champ-groupe { display: flex; flex-direction: column; gap: 6px; }
.puces-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.puce-choix { min-height: 38px; padding: 0 12px; border-radius: 19px; border: 1px solid var(--bord); background: var(--blanc); color: var(--encre); font: 500 14px inherit; font-family: inherit; cursor: pointer; }
.puce-choix[aria-pressed="true"] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.course-trouvee { gap: 10px; }
.date-course { font-size: 14px; color: var(--course); }
.a-confirmer { color: var(--orange); font-weight: 600; }
/* Aperçu de l'autocollant transparent : damier, pas dans l'image enregistrée. */
.story-feuille canvas.transparent { background: repeating-conic-gradient(#D5D2C9 0% 25%, #FFFFFF 0% 50%) 50% / 24px 24px; }
.story-feuille .story-png { width: auto; max-width: 100%; max-height: 60dvh; align-self: center; }
.story-png { width: 100%; border-radius: 14px; background: repeating-conic-gradient(#D5D2C9 0% 25%, #FFFFFF 0% 50%) 50% / 24px 24px; }

/* Centre de notifications */
.notifs .notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--separateur); }
.notifs .notif:last-child { border-bottom: none; }
.notif-icone { flex: none; width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--segment); color: var(--gris); }
.notif-corps { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-corps span { color: var(--gris); font-size: 14px; overflow-wrap: anywhere; }
.notif-corps small { color: var(--gris); font-size: 12px; }
.notif.non-lue strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--course); margin-left: 6px; vertical-align: middle; }

/* Signalements des testeurs */
.statut-retour { flex: none; align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 10px; background: var(--segment); color: var(--gris); }
.statut-retour.nouveau { background: var(--course); color: #FFFFFF; }
.statut-retour.en_cours { background: var(--natation); color: #FFFFFF; }
.retour-texte { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.retour-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.retour-vignette { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--segment); max-width: 100%; }
.retour-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.retour-vignette button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 14px; border: none; background: rgba(0,0,0,.6); color: #FFFFFF; font-size: 18px; line-height: 1; }
.retour-message { padding: 10px 0; border-bottom: 1px solid var(--separateur); }
.retour-message:last-child { border-bottom: none; }
