/* my.topcoach.academy — charte Top Coach Academy (noir, or, Poppins / Montserrat) */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6b6760;
  --line: #e7e2d8;
  --control-border: #8e877d; /* bordures des champs et cases : 3,2:1 sur --bg (les séparateurs restent en --line) */
  --gold: #c9a227;
  --gold-soft: #f4ecd2;
  --gold-text: #755c0c;    /* or lisible en texte sur fond clair : 5,8:1 sur --bg */
  --muted-strong: #5a564f; /* gris des libellés posés sur --line : 5,65:1 */
  --blue: #045cb4;
  --danger: #b3261e;
  --danger-strong: #b3261e; /* fonds pleins (bouton Supprimer, micro en cours) */
  --radius: 18px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 6px 20px rgba(17, 17, 17, .05);
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --player-h: 84px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0f;
    --surface: #19191b;
    --ink: #f3f1ec;
    --muted: #a19d95;
    --line: #2b2a2d;
    --gold-soft: #2e2716;
    --blue: #6aa8ea;
    --gold-text: var(--gold);
    --muted-strong: var(--muted);
    --control-border: #7a766f;
    --danger: #f28b82;        /* texte rouge lisible sur fond sombre (8:1) */
    --danger-strong: #c62828; /* fonds pleins, texte blanc 5,6:1 */
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Fond du document = couleur du menu du bas : si iOS laisse un liseré sous l'app, il se fond dans le menu. */
html { height: 100%; background: var(--surface); -webkit-text-size-adjust: 100%; }

/*
 * Coquille d'app : la page elle-même ne défile jamais. Le haut, le bandeau coach et le menu du bas
 * sont dans le flux d'une colonne qui occupe tout l'écran ; seule la zone <main> défile.
 * Le menu reste ainsi ancré en bas quel que soit le navigateur (barre d'adresse mobile, rebond iOS).
 */
body {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-height, 100%); /* --app-height : correction iPhone écran d'accueil, voir app.js */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-family: Poppins, Montserrat, system-ui, sans-serif; font-weight: 600; line-height: 1.25; margin: 0; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.125rem; }
a { color: inherit; }
svg { width: 1em; height: 1em; flex: none; }
button { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.link { color: var(--blue); font-weight: 600; text-decoration: none; }

/* ---------------------------------------------------------------- Structure */

.topbar {
  position: relative; flex: none; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) calc(20px + var(--safe-right)) 0 calc(20px + var(--safe-left));
  background: var(--bg);
}
.brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 0; margin: 0;
  border: 0; background: none; color: inherit; text-decoration: none; cursor: pointer;
  font: 600 1rem Poppins, sans-serif;
}
.brand img { border-radius: 9px; }
.brand-caret { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.brand[aria-expanded="true"] .brand-caret { transform: rotate(180deg); }

/* ------------------------------------------------------------ Menu de l'app */

.app-menu-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .25); }
.app-menu {
  position: fixed; z-index: 45; left: calc(12px + var(--safe-left)); right: calc(12px + var(--safe-right)); top: calc(var(--topbar-h) + var(--safe-top) + 4px);
  max-width: 420px; padding: 8px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  animation: menu-in .15s ease-out;
}
@keyframes menu-in { from { transform: translateY(-6px); opacity: 0; } }
.app-menu-links a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; font-weight: 600; }
.app-menu-links a svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-menu-links a.active { background: var(--gold-soft); }
.app-menu-links a.active svg { stroke: var(--gold); }
.app-menu-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 12px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 600; cursor: pointer;
}
.app-menu-switch input {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 46px; height: 28px; margin: 0;
  border-radius: 999px; background: var(--line); cursor: pointer; transition: background .2s;
}
.app-menu-switch input::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.app-menu-switch input:checked { background: var(--gold); }
.app-menu-switch input:checked::after { transform: translateX(18px); }
.app-menu-logout {
  display: block; width: 100%; padding: 14px 12px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--danger); font: 600 .95rem Montserrat, sans-serif; text-align: left; cursor: pointer;
}

/* Hauteur du menu du bas telle que vue par les éléments fixés au-dessus (lecteur, toast, haut de page) : 0 quand il est masqué. */
body { --bottom-nav-h: var(--tabbar-h); }
body.tabbar-hidden, body.coach-picking, body.page-immersive, body.signed-out { --bottom-nav-h: 0px; }
body.tabbar-hidden .tabbar { display: none; }
body.tabbar-hidden main { padding-bottom: calc(var(--safe-bottom) + 28px); }
body.tabbar-hidden.has-player main { padding-bottom: calc(var(--player-h) + var(--safe-bottom) + 36px); }

/* ------------------------------------------------ Onglets Objectifs / Suivi */

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 8px 0 16px; border-radius: 14px; background: var(--line); }
.segmented a { padding: 9px; border-radius: 10px; text-align: center; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted-strong); }
.segmented a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented button { padding: 9px; border: 0; border-radius: 10px; background: none; color: var(--muted-strong); font: 600 .9rem Montserrat, sans-serif; cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented button small { color: var(--gold-text); font-weight: 700; }
.segmented-3 { grid-template-columns: repeat(3, 1fr); margin-top: 0; }

/* ------------------------------------------------------- Séance : en-tête et onglets */

.session-head { margin-bottom: 16px; }
.session-date {
  display: inline-block; margin-left: 6px; vertical-align: middle; white-space: nowrap;
  font: 600 .85rem Montserrat, sans-serif; color: var(--muted); letter-spacing: 0;
}
.session-panel.report-wrap { margin: 0; }
.panel-empty { margin: 18px 0; text-align: center; }
.eval-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.eval-score { font: 600 .9rem Poppins, sans-serif; color: var(--muted); white-space: nowrap; }
.eval-score strong { margin-right: 1px; font-size: 1.7rem; color: var(--ink); }
.eval-range { display: block; width: 100%; margin: 12px 0 2px; accent-color: var(--gold); }
.eval-ticks { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .7rem; color: var(--muted); }
.eval-list { margin-top: 18px; }
.tl-score-line { font-weight: 600; }
.tl-score-line strong { font: 700 1.05rem Poppins, sans-serif; color: var(--gold-text); }
.tl-score-line a { color: var(--blue); text-decoration: none; }
.session-head .goal-tools { align-items: center; margin-top: 10px; }
.video-link { margin-bottom: 18px; }
.row.is-draft .row-main { opacity: .75; }

/* ------------------------------------------------------------------ Suivi */

.journal-label { font-weight: 600; font-size: .9rem; }
.journal-compose textarea {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; resize: vertical;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--control-border); border-radius: 12px;
}
.journal-compose textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.journal-recorder { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.rec-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .9rem Montserrat, sans-serif;
}
.rec-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rec-btn.is-recording { background: var(--danger-strong); border-color: var(--danger-strong); color: #fff; animation: rec-pulse 1.2s infinite; }
@keyframes rec-pulse { 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, .18); } }
.rec-time { font: 600 .9rem Poppins, sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.rec-preview { display: flex; align-items: center; gap: 6px; width: 100%; }
.rec-preview audio { flex: 1; min-width: 0; height: 40px; }
.journal-empty { text-align: center; margin: 24px 0; }

.tl-day { margin-top: 22px; }
.tl-day-title { margin-bottom: 10px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--gold-soft); }
.tl-dot svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tl-note .tl-dot { background: var(--ink); }
.tl-note .tl-dot svg { stroke: var(--gold); }
.tl-note.is-coach .tl-dot { background: var(--gold); }
.tl-note.is-coach .tl-dot svg { stroke: #111; }
.tl-body { flex: 1; min-width: 0; padding-top: 5px; }
.tl-body p { margin: 0 0 4px; overflow-wrap: anywhere; }
.tl-body small { color: var(--muted); font-size: .76rem; }
.tl-note .tl-body { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tl-audio { display: block; width: 100%; height: 40px; margin: 4px 0; }
.tl-item > .icon-btn { margin-top: 2px; }

/* ------------------------------------------------ Accueil : carte objectifs */

.goals-home-head { display: flex; align-items: center; gap: 14px; }
.goals-home-head .ring, .goals-home-head .ring svg { width: 58px; height: 58px; }
.goals-home-head .ring span { font-size: .9rem; }
.goals-home-text { flex: 1; min-width: 0; }
.goals-home-text p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.scale-mini { display: grid; gap: 10px; list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.scale-mini li { display: grid; grid-template-columns: minmax(0, 1fr) 64px 44px; align-items: center; gap: 10px; font-size: .88rem; }
.scale-mini-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scale-mini-bar { height: 6px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.scale-mini-bar span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.scale-mini strong { text-align: right; font: 600 .9rem Poppins, sans-serif; font-variant-numeric: tabular-nums; }
.scale-mini strong small { color: var(--muted); font-size: .7rem; font-weight: 500; }
.scale-mini li.is-empty strong { color: var(--muted); }
.scale-mini-more { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--bg); font: 600 .95rem Poppins, sans-serif; text-decoration: none;
}

main {
  flex: 1; min-height: 0; width: 100%;
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 8px max(calc(20px + var(--safe-right)), calc((100% - 600px) / 2)) 28px max(calc(20px + var(--safe-left)), calc((100% - 600px) / 2));
  outline: none;
}
body.has-player main { padding-bottom: calc(var(--player-h) + 36px); }

.tabbar {
  position: relative; flex: none; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600; letter-spacing: .01em;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { stroke: var(--gold); }

body.signed-out .topbar, body.signed-out .tabbar, body.signed-out .player { display: none; }
body.signed-out main { padding-bottom: 40px; }

/* ------------------------------------------------------------------ Cartes */

.page-title { margin: 12px 0 4px; }
.page-sub { margin: 0 0 18px; }
.hello { margin: 12px 0 20px; }
.hello p { margin: 4px 0 0; }

.card {
  display: block; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; text-decoration: none;
}
.card p { margin: 6px 0 0; }
a.card:active, a.row:active { transform: scale(.99); }

.eyebrow { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.card-session { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-session .eyebrow { color: var(--gold); }
.card-session h2 { font-size: 1.3rem; margin-bottom: 14px; }


.ring { position: relative; width: 72px; height: 72px; flex: none; }
.ring svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-track { stroke: var(--gold-soft); }
.ring-value { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 1.05rem Poppins, sans-serif; }
.ring small { font-size: .65rem; margin-left: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: var(--gold-soft); color: var(--ink); font-size: .72rem; font-weight: 600;
}
.chip svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.chip-dark { background: rgba(255, 255, 255, .12); color: #fff; padding: 7px 12px; font-size: .8rem; }

.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }

/* ------------------------------------------------------------------ Listes */

.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; text-decoration: none; box-shadow: var(--shadow);
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { font-weight: 600; }
.row-main small { color: var(--muted); font-size: .82rem; }
.row-main .chips { margin-top: 6px; }
.row-end svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.row-badge {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: var(--ink); color: var(--gold); font: 600 1.05rem Poppins, sans-serif;
}

/* Formation : icône académique au trait, sans fond (le titre garde la place) */
.row-icon {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px;
  border: 1.5px solid var(--ink); border-radius: 12px; color: var(--ink);
}
.row-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

.play {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none;
  border: 0; background: var(--gold); color: #111; cursor: pointer;
}
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play.is-playing { background: var(--ink); color: var(--gold); }

/* --------------------------------------------------------------- Objectifs */

.goal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.goal-desc { color: var(--muted); font-size: .92rem; }
.goal-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 12px 0 8px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.badge { padding: 3px 10px; border-radius: 999px; background: var(--gold); color: #111; font-size: .72rem; font-weight: 700; white-space: nowrap; }

.bar { height: 6px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .4s ease; }

.steps { list-style: none; margin: 14px 0 0; padding: 0; }
.steps li + li { border-top: 1px solid var(--line); }
.step {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 12px 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.box {
  display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; flex: none;
  border: 2px solid var(--control-border); border-radius: 8px; transition: background .15s, border-color .15s;
}
.box svg { width: 16px; height: 16px; fill: none; stroke: #111; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: .15s; }
.step.is-done .box { background: var(--gold); border-color: var(--gold); }
.step.is-done .box svg { opacity: 1; transform: none; }
.step.is-done .step-label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--gold); }
.goal-achieved { border-color: var(--gold); }

/* ----------------------------------------------------------------- Séances */

.back { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 10px -4px; color: var(--muted); font-weight: 600; text-decoration: none; }
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Pleine largeur d'écran sur mobile (déborde du padding de 20px de main) */
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 -20px 22px; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 640px) { .video { max-width: 100%; margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; } }

.report-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

.report { font-size: .96rem; overflow-wrap: anywhere; }
.report h1, .report h2, .report h3 { margin: 1.4em 0 .5em; }
.report h1 { font-size: 1.3rem; }
.report h2 { font-size: 1.12rem; padding-top: 1em; border-top: 1px solid var(--line); }
.report > h2:first-child, .report > h1:first-child { margin-top: .4em; padding-top: 0; border-top: 0; }
.report h3 { font-size: 1rem; }
.report p { margin: .6em 0; }
.report ul, .report ol { padding-left: 1.25em; margin: .6em 0; }
.report li { margin: .35em 0; }
.report li::marker { color: var(--gold); }
.report blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 12px 12px 0; font-style: italic; }
.report table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .88rem; margin: 1em 0; }
.report th, .report td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.report img { max-width: 100%; height: auto; }
.report a { color: var(--blue); }

/* ------------------------------------------------------------------ Lecteur */

.player {
  position: fixed; z-index: 25; left: calc(12px + var(--safe-left)); right: calc(12px + var(--safe-right));
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 10px);
  max-width: 616px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 18px;
  background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
@media (prefers-color-scheme: dark) { .player { background: #26241f; } }
.player-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: #111; cursor: pointer; flex: none; }
.player-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.player-body { flex: 1; min-width: 0; }
.player-title { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-seek { width: 100%; height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.player-times { display: flex; justify-content: space-between; font-size: .68rem; opacity: .7; font-variant-numeric: tabular-nums; }
.player-speed, .player-close { border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 10px; height: 44px; min-width: 44px; cursor: pointer; font-weight: 600; font-size: .8rem; }
.player-close { font-size: 1.2rem; line-height: 1; }

/* ---------------------------------------------------------------- Connexion */

.login { max-width: 400px; margin: 0 auto; padding: calc(8vh + var(--safe-top)) 0 0; text-align: center; }
.login-logo { border-radius: 20px; margin-bottom: 20px; }
.login h1 { margin-bottom: 6px; }
.login form { text-align: left; margin: 28px 0 18px; }
.login label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 14px; }
.login input {
  display: block; width: 100%; margin-top: 6px; padding: 14px 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--control-border); border-radius: 14px;
}
.login input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }

.form-error { color: var(--danger); font-size: .88rem; margin: 0 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border: 0; border-radius: 14px;
  background: var(--ink); color: var(--bg); font: 600 1rem Poppins, sans-serif; text-decoration: none; cursor: pointer;
}
.btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:disabled { opacity: .6; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--danger); border: 1px solid var(--line); margin-top: 8px; }
.card .btn { margin-top: 12px; }

/* ------------------------------------------------------------------- États */

.empty { text-align: center; padding: 12vh 12px 0; }
.empty h1, .empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 34ch; margin: 0 auto 18px; }

.skeleton { padding-top: 14px; }
.skeleton div { height: 96px; border-radius: var(--radius); margin-bottom: 14px; background: linear-gradient(90deg, var(--line) 0%, var(--surface) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; opacity: .6; }
.skeleton div:first-child { height: 44px; width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 18px);
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.is-visible { opacity: 1; pointer-events: auto; }
body.has-player .toast { bottom: calc(var(--bottom-nav-h) + var(--player-h) + var(--safe-bottom) + 24px); }

/* -------------------------------------------------------------- Mode coach */

.coach-bar {
  position: relative; flex: none; z-index: 19;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 20px; background: var(--gold); color: #111; font-size: .85rem;
}
.coach-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coach-bar a { font-weight: 700; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: rgba(17, 17, 17, .12); }

body.coach-picking .tabbar { display: none; }
body.coach-picking main { padding-bottom: 40px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head .page-title { margin-bottom: 4px; }
.hello.page-head { align-items: flex-end; margin-bottom: 6px; }
.inline-icon { width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-small { padding: 9px 14px; font-size: .85rem; border-radius: 12px; white-space: nowrap; }
.btn-small svg { width: 16px; height: 16px; stroke-linecap: round; stroke-linejoin: round; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--danger-strong); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border: 1px solid var(--line); }

.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { background: var(--gold-soft); }
.icon-danger { color: var(--danger); }
.icon-add { background: var(--ink); color: var(--bg); }
.icon-btn:disabled { opacity: .5; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; min-height: 40px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 600 .78rem Montserrat, sans-serif; cursor: pointer;
}
.chip-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip-danger { color: var(--danger); }
.goal-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.steps li.step-row { display: flex; align-items: center; gap: 8px; }
.steps li.step-row .step { flex: 1; min-width: 0; }
.step-add { display: flex; gap: 8px; margin-top: 10px; }
.step-add input {
  flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--control-border); border-radius: 12px;
}
.step-add input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.step-add .icon-btn { width: 44px; height: 44px; border-radius: 12px; }

.badge-muted { background: var(--line); color: var(--muted); }
.goal-archived { opacity: .8; }
details.archived { margin-top: 22px; }
details.archived > summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 8px 0; margin-bottom: 8px; }

.client-row { padding: 0; gap: 0; }
.client-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.client-open.is-archived { cursor: default; opacity: .7; }
.client-row > .icon-btn { margin-right: 8px; }
.client-row .row-badge { font-size: .95rem; }
.row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-tools { display: flex; gap: 8px; margin-left: -8px; }
.audio-row.is-hidden .row-main { opacity: .7; }
.chip-alert { background: #fcecc4 !important; }

/* ------------------------------------------------ Étapes curseur sur 10 */

.steps li.step-scale { display: flex; align-items: flex-start; gap: 8px; padding: 12px 0; }
.step-scale-body { flex: 1; min-width: 0; }
.scale-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.scale-head .step-label { overflow-wrap: anywhere; }
.scale-value { font: 600 .85rem Poppins, sans-serif; color: var(--muted); white-space: nowrap; }
.scale-value strong { font-size: 1.45rem; color: var(--ink); margin-right: 1px; }
.step-scale.is-empty .scale-value strong { color: var(--muted); }
.scale-input {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 10px; margin: 14px 0 8px;
  border-radius: 999px; outline: none; cursor: pointer; touch-action: pan-y;
  background: linear-gradient(to right, var(--gold) 0 var(--pct, 50%), var(--gold-soft) var(--pct, 50%) 100%);
}
.step-scale.is-empty .scale-input { background: var(--gold-soft); }
.scale-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.scale-foot small { font-size: .74rem; }
.steps li.step-scale .icon-btn { margin-top: -6px; }
.step-add select {
  flex: none; max-width: 42%; padding: 0 10px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
.scale-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.scale-input::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.scale-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--gold), 0 2px 8px rgba(0, 0, 0, .25); }
.scale-input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--gold), 0 2px 8px rgba(0, 0, 0, .25); }
.scale-input:disabled { opacity: .5; cursor: default; }
.sheet-form input[type=range] { display: block; width: 100%; padding: 0; margin-top: 12px; border: 0; background: none; accent-color: var(--gold); }

/* --------------------------------------------------------- PDF de séance */

.pdf-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow);
}
.pdf-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); flex: none; }
.pdf-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pdf-card .row-main strong { overflow-wrap: anywhere; }
.pdf-actions { display: flex; gap: 8px; width: 100%; }
.pdf-actions .btn { flex: 1; }

/* ------------------------------------------------ Navigation entre séances */

.session-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 10px; }
.session-top .back { margin: 0 0 0 -4px; }
.session-arrows { display: flex; align-items: center; gap: 6px; }
.session-count { min-width: 3em; text-align: center; font: 600 .85rem Poppins, sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.arrow-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.arrow-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arrow-btn:active { background: var(--gold-soft); }
.arrow-btn.is-disabled { opacity: .35; box-shadow: none; }


/* ------------------------------------------------- Feuille (formulaires) */

body.sheet-open { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); }
.sheet {
  width: 100%; max-width: 640px; max-height: 92%; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(20px + var(--safe-bottom));
  animation: sheet-in .2s ease-out;
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 22px; } }

.sheet-form h2 { margin-bottom: 16px; }
.sheet-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 14px; }
.sheet-form label small { font-weight: 400; color: var(--muted); }
.sheet-form input:not([type=checkbox], [type=range]), .sheet-form textarea, .sheet-form select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--control-border); border-radius: 12px;
}
.sheet-form input:focus, .sheet-form textarea:focus, .sheet-form select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.sheet-form input:disabled { opacity: .6; }
.sheet-form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.sheet-form label.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold); flex: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.sheet-actions .btn-ghost { color: var(--ink); margin-top: 0; }
.sheet-danger { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.progress { height: 6px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; margin: 4px 0 12px; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }

/* ------------------------------------------------------------ Partages */

.share-field { margin: 0 0 14px; padding: 12px 14px 4px; border: 1px solid var(--line); border-radius: 12px; }
.share-field legend { padding: 0 6px; font-size: .85rem; font-weight: 600; }
.share-field label.check { margin-bottom: 10px; }
.share-field small { color: var(--muted); font-weight: 400; }
.sheet-choices { display: grid; gap: 10px; margin-top: 8px; }
.sheet-choices .btn-ghost { color: var(--ink); margin-top: 0; }
.chip-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------- Ennéagramme */

body.page-wide main { padding-left: max(16px, calc((100% - 1160px) / 2)); padding-right: max(16px, calc((100% - 1160px) / 2)); }

.ennea-badge {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--c, var(--gold)); color: var(--c-ink, #fff); font: 700 1.05rem Poppins, sans-serif; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--gold)) 25%, transparent);
}
.ennea-badge.is-empty { background: var(--gold-soft); color: var(--ink); box-shadow: none; }
.ennea-badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ennea-home { display: flex; align-items: center; gap: 14px; }
.ennea-home-badges { display: flex; gap: 6px; }
.ennea-home-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ennea-home-text .eyebrow { margin-bottom: 2px; }
.ennea-home-text small { color: var(--muted); font-size: .85rem; }
.ennea-main-badges { display: flex; gap: 6px; }

.ennea-chart { margin: 4px -16px 16px; }
.ennea-chart svg { display: block; width: 100%; height: auto; max-height: calc(var(--app-height, 100dvh) - 150px); margin: 0 auto; }
.ennea-chart .en-node:hover .en-pill { filter: brightness(1.08); }
.ennea-history { margin: -4px 0 10px; }
.ennea-layout { display: grid; gap: 4px; }
@media (min-width: 640px) { .ennea-chart { margin: 4px 0 16px; } }
@media (min-width: 960px) {
  .ennea-layout { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
  .ennea-side { position: sticky; top: 8px; }
}

.ennea-detail-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.ennea-detail-head h2 { font-size: 1.2rem; }
.ennea-focus p { margin: 8px 0 0; }
.ennea-arrows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ennea-arrows span { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.ennea-arrows small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.ennea-arrows b { font-size: .92rem; }

.ennea-bars-title { font-size: 1rem; margin-bottom: 8px; }
.ennea-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ennea-bars li { display: grid; grid-template-columns: 142px minmax(0, 1fr) 28px; align-items: center; gap: 10px; font-size: .88rem; }
.ennea-bars li.is-focus .ennea-bar-label { font-weight: 700; }
.ennea-bar-label { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.ennea-bar-label b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: var(--c-ink, #fff); font-size: .72rem; flex: none; }
.ennea-bar { height: 8px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.ennea-bar span { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.ennea-bars strong { text-align: right; font: 600 .9rem Poppins, sans-serif; font-variant-numeric: tabular-nums; }

.ennea-intro p:first-child { margin-top: 0; }
.ennea-types { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ennea-types li { display: flex; gap: 12px; align-items: flex-start; }
.ennea-types li > span:last-child { display: flex; flex-direction: column; }
.ennea-types small { color: var(--muted); font-size: .85rem; }

/* Test : une affirmation par écran, plein écran */
body.page-immersive .topbar, body.page-immersive .tabbar, body.page-immersive .coach-bar { display: none; }
body.page-immersive main { padding: calc(var(--safe-top) + 10px) max(calc(18px + var(--safe-right)), calc((100% - 760px) / 2)) calc(var(--safe-bottom) + 14px) max(calc(18px + var(--safe-left)), calc((100% - 760px) / 2)); }
body.page-immersive.has-player main { padding-bottom: calc(var(--player-h) + var(--safe-bottom) + 36px); } /* le mini-lecteur plaqué en bas ne couvre pas les réponses */
.ennea-test { min-height: 100%; display: flex; flex-direction: column; }
.ennea-test-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ennea-test-close svg { width: 22px; height: 22px; }
.ennea-test-count {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: 500 .95rem Poppins, sans-serif;
}
.ennea-test-count strong { color: var(--ink); font-size: 1.1rem; }
.ennea-test-count svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ennea-test-answered { min-width: 44px; text-align: right; color: var(--muted); font-size: .8rem; }
.ennea-test-bar { margin: 12px 0 0; }
.ennea-test-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 5vh, 48px); padding: 24px 0; }
.ennea-test-q { margin: 0; font: 600 clamp(1.3rem, 2.2vw + .9rem, 2.15rem)/1.3 Poppins, sans-serif; letter-spacing: -.01em; text-align: center; text-wrap: balance; }
.ennea-test-choices { display: grid; gap: 10px; }
.ennea-choice {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: clamp(58px, 8.5vh, 76px); padding: 0 18px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink);
  font: 600 1.1rem Montserrat, sans-serif; text-align: left; transition: transform .1s, background .15s, border-color .15s;
}
.ennea-choice:active { transform: scale(.98); }
.ennea-choice.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ennea-choice-label { flex: 1; }
.ennea-choice-dots { display: flex; gap: 5px; }
.ennea-choice-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.ennea-choice-dots i.off { background: var(--line); }
.ennea-choice.is-on .ennea-choice-dots i.off { background: rgba(255, 255, 255, .25); }
.ennea-choice kbd { padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: 600 .75rem Poppins, sans-serif; }
@media (pointer: coarse) { .ennea-choice kbd { display: none; } }
.ennea-test-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-top: 6px; }
.ennea-test-nav .btn { justify-self: center; }
.ennea-test-hint { text-align: center; color: var(--muted); font-size: .8rem; }
.arrow-lg { width: 58px; height: 58px; cursor: pointer; }
.arrow-lg svg { width: 26px; height: 26px; }
.arrow-btn:disabled { opacity: .3; box-shadow: none; cursor: default; }
.slide-next .ennea-test-body { animation: ennea-next .22s ease-out; }
.slide-prev .ennea-test-body { animation: ennea-prev .22s ease-out; }
@keyframes ennea-next { from { opacity: 0; transform: translateX(32px); } }
@keyframes ennea-prev { from { opacity: 0; transform: translateX(-32px); } }
.ennea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; margin: 14px 0; }
.ennea-grid button { height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); font: 600 .85rem Poppins, sans-serif; cursor: pointer; }
.ennea-grid button.is-done { background: var(--gold-soft); border-color: transparent; color: var(--ink); }
.ennea-grid button.is-current { outline: 2px solid var(--ink); outline-offset: 1px; }
.ennea-grid-sheet .btn-ghost { color: var(--ink); }

/* Cartes des centres */
.ennea-centers { display: grid; gap: 12px; margin-bottom: 14px; }
.ennea-center { margin-bottom: 0; }
.ennea-center.is-top { border-color: var(--gold); }
.ennea-center-score { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font: 500 .95rem Poppins, sans-serif; }
.ennea-center-score strong { color: var(--ink); font-size: 1.9rem; }
.ennea-center-score .badge { margin-left: auto; align-self: center; }
.ennea-center-bar { height: 8px; margin: 8px 0; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.ennea-center-bar span { display: block; height: 100%; border-radius: inherit; }
.ennea-center p { margin: 0 0 10px; font-size: .85rem; }
.ennea-center-types { display: flex; flex-wrap: wrap; gap: 6px; }
.ennea-center-types span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--bg); font-size: .8rem; font-weight: 600; }
.ennea-center-types b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: var(--c-ink, #fff); font-size: .7rem; }
.ennea-center-types em { font-style: normal; color: var(--muted); }

/* ------------------------------------------------------ Séances à venir */

.upcoming-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 14px; }
.switch-2 { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--line); }
.switch-2 button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 9px; background: none; color: var(--muted-strong); font: 600 .85rem Montserrat, sans-serif; cursor: pointer; }
.switch-2 button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.switch-2 svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appt-day .tl-day-title { margin: 16px 0 8px; }
.appt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 12px 14px 16px; margin-bottom: 10px; }
.appt-time { flex: none; min-width: 60px; display: flex; flex-direction: column; padding-right: 12px; border-right: 2px solid var(--gold); }
.appt-time strong { font: 600 1.1rem Poppins, sans-serif; }
.appt-time small { color: var(--muted); font-size: .75rem; }
.appt-main { flex: 1; min-width: 0; }
.appt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appt-head h3 { font-size: 1rem; }
.appt-notes { color: var(--muted); font-size: .88rem; }
.appt-tools { margin-top: 10px; align-items: center; }
.card .appt-tools .btn, .card-next .btn { margin-top: 0; }
.appt-coach { display: flex; flex-direction: column; margin: -6px -4px 0 0; }
.appt.is-live, .card-next.is-live { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.appt.is-cancelled h3, .appt.is-cancelled .appt-time strong { text-decoration: line-through; color: var(--muted); }
.appt.is-cancelled .appt-time { border-color: var(--line); }
.appt.is-past { opacity: .6; }
.appt-empty { margin: 4px 0 12px; }
.cal { padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font: 600 1.05rem Poppins, sans-serif; }
.cal-head .arrow-btn { width: 38px; height: 38px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays span { padding-bottom: 4px; text-align: center; color: var(--muted); font-size: .72rem; font-weight: 600; }
.cal-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; aspect-ratio: 1; min-height: 40px;
  border: 0; border-radius: 12px; background: none; color: var(--ink); font: 500 .92rem Poppins, sans-serif; cursor: pointer;
}
.cal-cell.is-empty { cursor: default; }
.cal-cell.has-items { background: var(--gold-soft); font-weight: 700; }
.cal-cell.is-today span:first-child { text-decoration: underline 2px var(--gold); text-underline-offset: 3px; }
.cal-cell.is-selected { background: var(--ink); color: var(--bg); }
.cal-dots { display: flex; gap: 2px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
@media (min-width: 640px) { .cal-cell { aspect-ratio: auto; min-height: 56px; } }
.booking { padding: 28px 22px; text-align: center; }
.booking-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border: 1.5px solid var(--ink); border-radius: 16px; }
.booking-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.booking .btn { margin-top: 16px; }
.card-next .goal-tools { margin-top: 12px; align-items: center; }

/* ------------------------------------------- Exercices, Mes tests, Offres */

.exercise-text { margin-bottom: 14px; }
.exercise-audio { display: grid; gap: 4px; }
.exercise-audio audio { width: 100%; height: 40px; }
.tests, .offers { display: grid; gap: 12px; }
@media (min-width: 720px) { .offers { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.test-card, .offer { margin-bottom: 0; }

/*
 * Offres : onglets des rubriques (icône + libellé, soulignement doré qui glisse d'un onglet à l'autre). La barre défile
 * à l'horizontale (bord droit estompé = il y en a d'autres), reste collée en haut pendant la lecture et déborde dans
 * les marges de <main> pour aller d'un bord à l'autre.
 */
.offer-nav {
  position: sticky; top: -8px; z-index: 6; /* -8px : marge haute de <main>, sinon les cartes dépassent au-dessus */
  margin: 6px -20px 20px; padding-top: 8px;
  background: var(--bg);
  box-shadow: inset 0 -1px 0 var(--line);
}
.offer-tabs {
  position: relative; display: flex;
  padding: 0 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 36px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 36px), transparent);
}
.offer-tabs::-webkit-scrollbar { display: none; }
.offer-tab {
  position: relative; flex: none; scroll-snap-align: center;
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 14px; border: 0; border-radius: 12px 12px 0 0;
  background: none; color: var(--muted); cursor: pointer;
  font: 600 .92rem/1 Montserrat, sans-serif; white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.offer-tab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: color .2s ease; }
.offer-tab.is-active { color: var(--ink); background: var(--surface); }
.offer-tab.is-active svg { color: var(--gold); }
/* Soulignement sans JavaScript (avant le premier placement de .offer-ink) */
.offer-tab::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--gold); opacity: 0;
}
.offer-tab.is-active::after { opacity: 1; }
.offer-tabs.has-ink .offer-tab::after { display: none; }
.offer-ink {
  position: absolute; left: 0; bottom: 0; width: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--gold); pointer-events: none;
  transition: transform .34s cubic-bezier(.2, .8, .2, 1), width .34s cubic-bezier(.2, .8, .2, 1);
}
.offer-ink.is-instant { transition: none; }
@media (hover: hover) { .offer-tab:not(.is-active):hover { color: var(--ink); } }
.offer-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }

.offer-panel-head { margin: 0 0 14px; }
.offer-panel-head h2 { font-size: 1.2rem; }
.offer-panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.offer-panel.is-entering { animation: offer-in .34s cubic-bezier(.2, .8, .2, 1) both; }
.offer-panel.is-entering.from-left { --offer-dx: -18px; }
@keyframes offer-in { from { opacity: 0; transform: translateX(var(--offer-dx, 18px)); } }
.test-head, .offer-head { display: flex; align-items: center; gap: 12px; }
.test-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offer-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.test-desc, .offer-desc { margin-top: 10px; color: var(--muted); font-size: .92rem; }
.test-desc p, .offer-desc p { margin: 0 0 8px; }
.test-status { font-weight: 600; font-size: .88rem; }
.test-card .btn svg, .offer .btn svg { width: 16px; height: 16px; }
.offer { display: flex; flex-direction: column; }
.offer .btn-block { margin-top: auto; }
.offer-desc { margin-bottom: 14px; }
.offer-logo { width: 48px; height: 48px; flex: none; border-radius: 14px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.offer-initials { display: grid; place-items: center; background: var(--ink); color: var(--gold); border-color: var(--ink); font: 600 1rem Poppins, sans-serif; }
.offer-code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 10px 12px;
  border: 1px dashed var(--gold); border-radius: 12px; background: var(--gold-soft);
}
.offer-code span { display: flex; flex-direction: column; min-width: 0; }
.offer-code small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.offer-code strong { font: 600 1.05rem Poppins, sans-serif; letter-spacing: .04em; overflow-wrap: anywhere; }

/* --------------------------------------------------------- Questionnaires */

.quiz-kicker { margin: 6px 0 2px; color: var(--gold-text); }
.quiz-title { margin-top: 0; }
.quiz-title span { color: var(--gold-text); }
.quiz-intro p:first-child { margin-top: 0; }
.or-sep { display: flex; align-items: center; gap: 12px; margin: 12px 0 !important; color: var(--muted); font-size: .85rem; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.quiz-verdict { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.quiz-verdict .eyebrow { color: var(--gold); }
.quiz-verdict h2 { font-size: 1.6rem; color: var(--bg); }
.quiz-combo { margin-top: 10px !important; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: .9rem; }
.quiz-scores { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .quiz-scores { grid-template-columns: repeat(3, 1fr); } }
.quiz-score { margin-bottom: 0; }
.quiz-score.is-dominant { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.quiz-score-head { display: flex; align-items: center; gap: 10px; }
.quiz-letter { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--ink); color: var(--gold); font: 700 1.1rem Poppins, sans-serif; }
.quiz-score-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quiz-score-name small { color: var(--muted); font-size: .8rem; }
.quiz-score-value { font: 500 .9rem Poppins, sans-serif; color: var(--muted); white-space: nowrap; }
.quiz-score-value b { font-size: 1.5rem; color: var(--ink); }
.quiz-bar { height: 8px; margin-top: 12px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--gold)); }
.quiz-level { margin-top: 10px !important; font-size: .85rem; color: var(--muted); }
.quiz-legend ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.quiz-legend li { display: grid; grid-template-columns: 64px 92px 1fr; gap: 8px; align-items: baseline; font-size: .88rem; }
.quiz-legend small { color: var(--muted); }
@media (max-width: 520px) { .quiz-legend li { grid-template-columns: 64px 1fr; } .quiz-legend small { grid-column: 1 / -1; } }
.quiz-interp { margin-top: 10px; padding: 4px 0 4px 12px; border-left: 3px solid var(--line); }
.quiz-interp.is-dominant { border-left-color: var(--c, var(--gold)); }
.quiz-interp h3 { font-size: .98rem; }
.quiz-interp p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.quiz-interp.is-dominant p { color: var(--ink); }
.quiz-quote { margin-top: 16px !important; text-align: center; font-style: italic; color: var(--gold-text); }
.quiz-actions { margin-top: 14px; }
.quiz-test .ennea-test-body { gap: clamp(14px, 3vh, 30px); }
.quiz-section { align-self: center; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); font: 600 .8rem Montserrat, sans-serif; }
.ennea-test-q.quiz-q-long { font-size: clamp(1.15rem, 1.5vw + .85rem, 1.7rem); }
.quiz-examples { display: grid; gap: 6px; max-width: 640px; margin: -6px auto 0; padding: 0 0 0 1.1em; color: var(--muted); font-size: .95rem; }
.quiz-examples li::marker { color: var(--gold); }
.quiz-choice-num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--gold-soft); color: var(--ink); font: 700 .9rem Poppins, sans-serif; }
.ennea-choice.is-on .quiz-choice-num { background: var(--gold); color: #111; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------- Vidéo d'ambiance */

/* Écran plein écran d'une méditation : vidéo en boucle derrière le titre et les commandes (toujours sombre). */
.ambience { position: fixed; inset: 0; z-index: 48; background: #000; color: #fff; overflow: hidden; }
body.has-ambience { overflow: hidden; }
.ambience-media { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease, filter .8s ease; pointer-events: none; }
.ambience.is-ready .ambience-media { opacity: 1; }
.ambience.is-ready.is-paused .ambience-media { opacity: .5; filter: blur(10px) brightness(.8); }
/* L'iframe garde le format de la vidéo (--ratio) et déborde pour couvrir l'écran ; ses 90 px du haut et du bas
   (barre de commandes du lecteur intégré) restent hors champ. */
.ambience-media iframe {
  --h: max(calc(100vh + 180px), calc((100vw + 20px) / var(--ratio, 1.7778)));
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: var(--h); width: calc(var(--h) * var(--ratio, 1.7778)); border: 0;
}
.ambience-ui {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 18px calc(var(--safe-bottom) + 26px);
  background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .78) 100%);
}
.ambience-top { display: flex; justify-content: flex-start; }
.ambience-collapse, .ambience-skip {
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .22); color: #fff;
}
.ambience-collapse { width: 44px; height: 44px; }
.ambience-collapse svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ambience-bottom { width: 100%; max-width: 560px; margin: 0 auto; }
.ambience-title { font: 600 1.35rem Poppins, sans-serif; line-height: 1.25; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.ambience-desc { margin: 6px 0 0; color: rgba(255, 255, 255, .82); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ambience-controls { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 24px 0 10px; }
.ambience-toggle {
  display: grid; place-items: center; width: 76px; height: 76px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--gold); color: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.ambience-toggle svg { width: 30px; height: 30px; fill: currentColor; }
.ambience-skip { width: 50px; height: 50px; }
.ambience-skip svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ambience-skip svg text { fill: currentColor; stroke: none; font: 700 7px Poppins, sans-serif; }
.ambience-seek { width: 100%; height: 20px; margin: 0; accent-color: var(--gold); }
.ambience-times { display: flex; justify-content: space-between; font-size: .75rem; opacity: .85; font-variant-numeric: tabular-nums; }
.player-expand { display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 10px; height: 44px; min-width: 44px; cursor: pointer; }
.player-expand svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.audio-row .chips { margin-top: 4px; }

/* ---------------------------------------------------------- Polices locales */

/* Montserrat (variable 400-600) et Poppins (500/600/700), sous-ensembles latin et latin étendu : plus de domaine tiers,
   premier rendu immédiat et lisible hors ligne (fichiers dans fonts/, mis en cache par le service worker). */
@font-face { font-family: Montserrat; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-var-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-var-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ------------------------------------------------------ Réseau et hors ligne */

/* Bandeau sous la barre du haut (et le bandeau coach) : hors ligne, serveur injoignable, mise à jour, envois en attente. */
.net-banner {
  flex: none; z-index: 18; padding: 6px 20px; text-align: center;
  font: 600 .8rem/1.3 Montserrat, sans-serif; color: var(--ink); background: var(--gold-soft); border-bottom: 1px solid var(--line);
}
.net-banner.is-offline { background: var(--ink); color: var(--bg); }
.net-banner.is-stale { background: #fcecc4; color: #111; }
@media (prefers-color-scheme: dark) { .net-banner.is-stale { background: #3a2f12; color: var(--ink); } }
.net-banner.is-syncing { color: var(--muted); }
/* Commandes qui exigent le réseau : grisées hors ligne (le clic prévient, voir app.js) */
body.is-offline [data-needs-net] { opacity: .45; }
/* Étape ou curseur en attente d'envoi (hors ligne) */
.steps li.is-pending .step-label, .steps li.is-pending .scale-head { position: relative; }
.steps li.is-pending .box { border-style: dashed; }
.pending-note { font-weight: 500; color: var(--muted); font-size: .78rem; }
.ennea-test-answered { white-space: nowrap; }
.ennea-unsaved { font-style: normal; color: var(--gold); }
/* Écran d'erreur : boutons de sortie */
.empty .error-actions { max-width: 380px; margin: 0 auto; }
.empty .error-actions:has(> :only-child) { grid-template-columns: 1fr; }
.error-actions .btn-outline { color: var(--ink); }

/* Puce-bouton dans la ligne d'un audio : « Garder hors ligne » / « Gardé hors ligne » */
.chip-btn-plain { border: 0; cursor: pointer; font: inherit; font-size: .72rem; font-weight: 600; }
.chip-btn-plain svg { width: 12px; height: 12px; }
.chip-btn-plain.is-kept { background: var(--ink); color: var(--gold); }
.chip-btn-plain:disabled { opacity: .7; cursor: default; }

/* ---------------------------------------------------------------- Divers */

.rec-btn:disabled { opacity: .6; cursor: default; }
.player-expand:disabled { opacity: .5; cursor: default; }
.appt-tz { color: var(--muted); font-size: .78rem; margin: 2px 0 0; }
.chip-btn { text-decoration: none; }
/* Menu déroulant : jamais plus haut que l'écran (paysage, petits téléphones) */
.app-menu { max-height: calc(var(--app-height, 100dvh) - var(--topbar-h) - var(--safe-top) - 16px); overflow-y: auto; }
/* Carte « Dernière séance » : toujours sombre, même en mode sombre où --ink devient clair */
.card-session { background: #111; border-color: #111; }
.card-session h2, .card-session .chip-dark { color: #fff; }

/* Outils interactifs (à venir) : page plein écran, module monté dans .tool-root */
.tool-page {
  /* Univers des maquettes (toujours sombre, quel que soit le thème de l'app) : jetons scopés, réutilisés par tools/<slug>.js */
  --tool-ink: #0b1020; --tool-ink-2: #10172b; --tool-panel: #141b31; --tool-line: #2b3553; --tool-text: #f4f0e8; --tool-muted: #aab1c6;
  --tool-gold: #d8b45c; --tool-gold-hi: #f3d68a; --tool-gold-ink: #1a1405; color-scheme: dark;
  min-height: 100%; display: flex; flex-direction: column; background: var(--tool-ink); color: var(--tool-text);
}
.tool-page .muted { color: var(--tool-muted); }
@media (prefers-reduced-motion: reduce) { .tool-page * { animation-duration: .01ms !important; } }
.tool-title { flex: 1; text-align: center; font: 600 1rem Poppins, sans-serif; }
.tool-root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Mode sombre : la puce d'alerte (séances à valider) garde un texte foncé sur son fond jaune */
.chip-alert { color: #111 !important; }

/* Accessibilité (audit 2026-09-25) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, .form-error[tabindex="-1"]:focus { outline: none; } /* focus programmatique : pas d'anneau sur un titre ou un message */
.tabbar a.active span { text-decoration: underline 2px var(--gold); text-underline-offset: 4px; } /* page active : pas seulement par la couleur */
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Audit 2026-09-25 : césure du texte libre du coach, paysage, impression, barre d'état iOS, retour en haut */
.step-label, .goal-desc, .appt-notes, .test-desc, .offer-desc, .hello h1, .goal-head h2, .appt-head h3, .row-main strong,
.session-head h1, .card-session h2, .test-title h2, .offer-title h2 { overflow-wrap: anywhere; }
.step-label { min-width: 0; }
@media (min-width: 900px) { .ambience-collapse, .ambience-skip { background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } }
@media (orientation: landscape) and (max-height: 450px) {
  :root { --tabbar-h: 52px; --topbar-h: 48px; }
  .tabbar a { flex-direction: row; gap: 8px; }
}
/* iPhone écran d'accueil : barre d'état translucide à glyphes blancs (black-translucent). En mode clair, bande sombre
   sous la barre d'état, comme la barre qu'Android peint déjà d'après le theme-color. 0 px ailleurs (--safe-top = 0). */
@media (prefers-color-scheme: light) {
  body::before { content: ''; position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: var(--safe-top); background: #111; pointer-events: none; }
}
/* Retour en haut : <main> seul défile, le geste iOS « toucher la barre d'état » ne l'atteint pas. Affiché après 2 écrans (app.js). */
.to-top {
  position: fixed; z-index: 24; right: calc(16px + var(--safe-right)); bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 18px);
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); cursor: pointer; display: grid; place-items: center;
}
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.has-player .to-top { bottom: calc(var(--bottom-nav-h) + var(--player-h) + var(--safe-bottom) + 24px); }
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #bbb; --gold-soft: #eee; --shadow: none; }
  html, body { position: static !important; height: auto !important; overflow: visible !important; display: block; background: #fff; color: #000; }
  main { overflow: visible; padding: 0 4mm; }
  .topbar, .tabbar, .player, .coach-bar, .toast, .app-menu, .app-menu-backdrop, .sheet-backdrop, .ambience, .segmented, .session-arrows,
  .back, .video, .btn, .chip-btn, .icon-btn, .goal-tools, .to-top, .net-banner, .journal-compose { display: none !important; }
  .session-panel[hidden] { display: block !important; }
  .card, .report-wrap, .row, .pdf-card { box-shadow: none; }
  .row, .pdf-card, .tl-item, .report tr, .card { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
