/* =============================================================================
   Solution Gombo — Espace membre
   Feuille de style unique (aucun framework). Tokens en :root.
   ============================================================================= */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-2: #F1EFE8;
  --border: #E3E0D7;
  --border-strong: #CBC7BB;

  --ink: #1C201E;
  --ink-2: #474C49;
  --ink-3: #6F7471;

  --green: #2E5E4E;
  --green-dark: #23483C;
  --green-soft: #E6F0EB;
  --green-text: #245244;

  --amber: #A8701C;
  --amber-soft: #FBF3E2;
  --red: #A94440;
  --red-soft: #FBEBE9;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 32, 30, 0.04), 0 8px 24px -12px rgba(28, 32, 30, 0.12);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;

  --sidebar-w: 264px;
  --container-w: 1040px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe, svg { max-width: 100%; display: block; }
a { color: var(--green-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
h1 { font-size: 36px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; font-family: var(--font-body); font-weight: 600; }

.icon {
  width: 1.2em; height: 1.2em;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: -0.22em;
  display: inline-block;
}

.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;
}
.muted { color: var(--ink-3); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hide-desktop { display: none; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 20px 18px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sidebar-brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { line-height: 1.15; }
.brand-text small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }

.sidebar nav { padding: 6px 12px; flex: 1; }
.nav-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding: 16px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500; font-size: 15.5px;
  transition: background 0.15s, color 0.15s;
}
.nav-item .icon { width: 20px; height: 20px; color: var(--ink-3); }
.nav-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-item.is-active { background: var(--green-soft); color: var(--green-text); }
.nav-item.is-active .icon { color: var(--green); }

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 16px 20px 20px;
}
.member-name { font-weight: 600; font-size: 15px; }
.member-progress { margin-top: 10px; }
.member-progress .progress { margin-top: 6px; }

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex; flex-direction: column;
}
.container {
  width: 100%; max-width: var(--container-w);
  margin: 0 auto;
  padding: 44px 40px 72px;
}
.container-narrow { max-width: 820px; }

.topbar {
  display: none;
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px; height: 60px;
  align-items: center; justify-content: space-between;
}
.topbar .sidebar-brand { padding: 0; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-2); }

.overlay {
  position: fixed; inset: 0; background: rgba(28, 32, 30, 0.45);
  z-index: 39; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
body.nav-open .overlay { opacity: 1; pointer-events: auto; }

.bottom-nav { display: none; }

.page-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  font-size: 13px; color: var(--ink-3);
  max-width: var(--container-w); margin-left: auto; margin-right: auto; width: 100%;
}

/* ---------- Page header & sections ---------- */
.page-header { margin-bottom: 36px; max-width: 720px; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-text); margin-bottom: 10px;
}
.lede { font-size: 18px; color: var(--ink-2); }

.section { margin-top: 56px; }
.section-head { margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { color: var(--ink-3); margin: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-pad-lg { padding: 32px; }
.card-soft { background: var(--surface-2); border-color: transparent; }
.card-link {
  display: flex; flex-direction: column; gap: 10px;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.card-link:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.card-link h3 { margin: 0; font-size: 19px; }
.card-link p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.card-link .card-cta {
  margin-top: auto; padding-top: 6px;
  display: flex; align-items: center; gap: 6px;
  color: var(--green-text); font-weight: 600; font-size: 15px;
}
.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center;
}
.card-icon .icon { width: 22px; height: 22px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15.5px; line-height: 1.2;
  border: 1px solid transparent; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--green-text); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--green-soft); }
.btn-lg { padding: 15px 26px; font-size: 17px; }
.btn-sm { padding: 8px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ---------- Badges, chips, callouts ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2);
}
.badge-green { background: var(--green-soft); color: var(--green-text); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
}
.chip:hover { background: var(--surface-2); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.callout {
  background: var(--surface-2);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  font-size: 15.5px;
}
.callout-title { font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.callout-warn { border-left-color: var(--amber); background: var(--amber-soft); }
.callout-danger { border-left-color: var(--red); background: var(--red-soft); }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 999px; background: #E6E3DA; overflow: hidden; }
.progress-bar { height: 100%; background: var(--green); border-radius: 999px; transition: width 0.4s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-3); margin-bottom: 6px; }

/* ---------- Steps & lists ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff; font-weight: 600; font-size: 15px;
  display: grid; place-items: center;
}
.step h4 { margin: 4px 0 4px; }
.step p { color: var(--ink-2); font-size: 15.5px; }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 15.5px; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green-soft);
  border: 1.5px solid var(--green);
}
.list-check li::after {
  content: ""; position: absolute; left: 4.5px; top: 10px;
  width: 4px; height: 7px;
  border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

dl.spec { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 15.5px; }
dl.spec dt { color: var(--ink-3); font-weight: 500; }
dl.spec dd { margin: 0; }

/* ---------- Media ---------- */
.video-frame {
  position: relative; aspect-ratio: 16 / 9;
  background: #0F1412; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.video-frame video, .video-frame iframe { width: 100%; height: 100%; }
.video-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-sm); background: #E6E3DA;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.video-thumb .play span {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.94); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.video-thumb .duration {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(15, 20, 18, 0.85); color: #fff;
  font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 5px;
}
.video-card { cursor: pointer; }
.video-card.is-done .video-thumb::after {
  content: "Vu"; position: absolute; left: 8px; top: 8px;
  background: var(--green); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, .select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px;
}
.input:focus, .select:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: 42px; }

/* ---------- Accordion ---------- */
details.acc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
details.acc summary {
  list-style: none; cursor: pointer;
  padding: 18px 22px; display: flex; align-items: center; gap: 14px;
  font-weight: 600; font-size: 16.5px;
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .icon-chev { margin-left: auto; color: var(--ink-3); transition: transform 0.2s; }
details.acc[open] summary .icon-chev { transform: rotate(180deg); }
details.acc .acc-body { padding: 0 22px 22px; color: var(--ink-2); font-size: 15.5px; }
details.acc .acc-body p:last-child { margin-bottom: 0; }
.acc-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
table.table th, table.table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.table th { background: var(--surface-2); font-weight: 600; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
table.table tr:last-child td { border-bottom: 0; }

/* ---------- KPI tiles ---------- */
.kpi { padding: 18px 20px; }
.kpi-label { font-size: 13.5px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.kpi-value { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; }
.kpi-value small { font-family: var(--font-body); font-size: 14px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.kpi-note { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }

/* ---------- Habits ---------- */
.habit {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.habit:hover { border-color: var(--border-strong); }
.habit input { position: absolute; opacity: 0; pointer-events: none; }
.habit .box {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; color: #fff;
}
.habit .box .icon { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.habit.is-done { background: var(--green-soft); border-color: var(--green); }
.habit.is-done .box { background: var(--green); border-color: var(--green); }
.habit.is-done .box .icon { opacity: 1; }
.habit .habit-time { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.habit .habit-title { font-weight: 600; margin: 2px 0; }
.habit .habit-desc { font-size: 14.5px; color: var(--ink-2); }

/* ---------- Breathing coach ---------- */
.breath {
  display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 0;
}
.breath-circle {
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--green-soft); border: 3px solid var(--green);
  display: grid; place-items: center; text-align: center;
  transition: transform 1s ease-in-out;
}
.breath-circle.is-in { transform: scale(1.25); }
.breath-circle.is-hold { transform: scale(1.25); }
.breath-circle.is-out { transform: scale(1); }
.breath-status { font-weight: 600; font-size: 17px; }
.breath-timer { font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1; margin-top: 4px; }
.breath-sub { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/* ---------- Testimonials ---------- */
.testimonial { padding: 22px; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green-soft); color: var(--green-text);
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
}
.testimonial blockquote { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(28, 32, 30, 0.55);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal.is-open { display: flex; }
.modal-box {
  background: var(--surface); border-radius: 14px;
  width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.4);
}
.modal-box.modal-wide { max-width: 960px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-close { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-3); }
.modal-close:hover { background: var(--surface-2); color: var(--ink); }

.copy-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); font-weight: 600; word-break: break-all;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; z-index: 60;
  display: flex; align-items: center; gap: 10px;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hero (accueil) ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 36px; overflow: hidden;
}
.hero-media { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 34px; }
.hero .lede { margin-bottom: 20px; }

.status-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}

/* ---------- Document (bonus) ---------- */
.doc-bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.doc-bar-inner {
  max-width: 900px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.doc {
  max-width: 900px; margin: 0 auto; padding: 40px 24px 80px;
}
.doc-head { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.doc h2 { margin-top: 40px; }
.doc-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-3); }

/* Recipe cards */
.recipe { display: flex; flex-direction: column; gap: 14px; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.recipe h3 { margin: 0; font-size: 20px; }
.recipe .timing { font-size: 14.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.recipe h4 { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin: 6px 0 6px; }
.recipe ol { padding-left: 1.3em; font-size: 15.5px; color: var(--ink-2); }
.recipe ol li { margin-bottom: 4px; }
.recipe .science { font-size: 14.5px; color: var(--ink-2); background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.recipe .science strong { color: var(--ink); }

/* Tracker (bonus 1) */
.tracker table.table td { padding: 8px 10px; }
.tracker .week-row td { background: var(--green-soft); color: var(--green-text); font-weight: 600; font-size: 14px; }
.pill-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.pill-group button { padding: 5px 10px; border: 0; background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.pill-group button + button { border-left: 1px solid var(--border); }
.pill-group button.is-active { background: var(--green); color: #fff; }
.star-group button { background: none; border: 0; font-size: 20px; color: #D8D4C8; padding: 0 1px; line-height: 1; }
.star-group button.is-active { color: var(--amber); }
.done-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.done-btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* Certificate */
.certificate {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 56px 48px; text-align: center; position: relative;
}
.certificate::before {
  content: ""; position: absolute; inset: 12px; border: 1px solid var(--border); border-radius: 4px; pointer-events: none;
}
.certificate h1 { font-size: 30px; margin-top: 12px; }
.certificate .name {
  font-family: var(--font-display); font-size: 40px; font-weight: 600;
  margin: 28px 0 8px; color: var(--green-text);
}
.certificate .sig { display: flex; justify-content: space-around; gap: 24px; margin-top: 44px; }
.certificate .sig div { border-top: 1px solid var(--border-strong); padding-top: 10px; min-width: 180px; font-size: 14px; color: var(--ink-3); }
.certificate .sig strong { display: block; color: var(--ink); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: none; width: min(300px, 86vw); }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,0.25); }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .container { padding: 28px 20px 110px; }
  .page-footer { padding: 20px 20px 96px; }
  .hide-mobile { display: none !important; }
  .hide-desktop { display: initial; }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 11.5px; font-weight: 500; color: var(--ink-3);
    background: none; border: 0; padding: 4px 8px; min-width: 56px;
  }
  .bottom-nav a .icon, .bottom-nav button .icon { width: 22px; height: 22px; }
  .bottom-nav a.is-active { color: var(--green-text); }
  .bottom-nav a:hover { text-decoration: none; }

  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero-media { order: -1; aspect-ratio: 16 / 9; }
  h1 { font-size: 30px; }
  .hero h1 { font-size: 28px; }
  h2 { font-size: 23px; }
}

@media (max-width: 639px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .status-strip { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid { grid-template-columns: 1fr; }
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 26px; }
  .card { padding: 20px; }
  .card-pad-lg { padding: 24px; }
  .container { padding: 22px 16px 110px; }
  h1 { font-size: 27px; }
  .hero h1 { font-size: 25px; }
  .btn-lg { padding: 14px 20px; font-size: 16px; }
  .certificate { padding: 36px 20px; }
  .certificate .name { font-size: 30px; }
  .certificate .sig { flex-direction: column; align-items: center; }
  .breath-circle { width: 150px; height: 150px; }
  .doc { padding: 24px 16px 60px; }
  dl.spec { grid-template-columns: 1fr; gap: 2px 0; }
  dl.spec dd { margin-bottom: 8px; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 12.5pt; }
  .sidebar, .topbar, .bottom-nav, .overlay, .doc-bar, .no-print, .page-footer, .modal, .toast { display: none !important; }
  .main { margin-left: 0; }
  .container, .doc { padding: 0; max-width: 100%; }
  .card, details.acc, .table-wrap { border-color: #ccc; break-inside: avoid; }
  details.acc { display: block; }
  details.acc summary .icon-chev { display: none; }
  details.acc:not([open]) .acc-body { display: block; }
  .certificate { border: 2px solid #999; padding: 48px; }
  a { color: inherit; text-decoration: none; }
}

/* =============================================================================
   Lecteur vidéo et couvertures
   ============================================================================= */
.cover {
  position: absolute; inset: 0; color: #fff;
  background: linear-gradient(135deg, #1B3A31 0%, #2E5E4E 58%, #3B7A67 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6% 6% 6.5%; overflow: hidden; text-align: left;
}
.cover::before {
  content: ""; position: absolute; right: -6%; top: -10%; width: 62%; aspect-ratio: 1;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/><path d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/></svg>") no-repeat center / contain;
  opacity: 0.14; pointer-events: none;
}
.cover.has-image { background: #10201B; }
.cover.has-image::before { display: none; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.cover.has-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,32,27,0.35) 0%, rgba(16,32,27,0.15) 40%, rgba(16,32,27,0.85) 100%);
}
.cover > * { position: relative; z-index: 1; }
.cover-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cover-brand { display: flex; align-items: center; gap: 6px; font-size: clamp(9px, 2.6cqw, 12px); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.cover-brand .brand-mark { width: clamp(16px, 4.5cqw, 24px); height: clamp(16px, 4.5cqw, 24px); border-radius: 5px; background: rgba(255,255,255,0.18); }
.cover-brand .brand-mark svg { width: 60%; height: 60%; }
.cover-badge { font-size: clamp(9px, 2.4cqw, 12px); font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.16); white-space: nowrap; }
.cover-title { font-family: var(--font-display); font-weight: 600; line-height: 1.15; font-size: clamp(15px, 5.2cqw, 30px); max-width: 78%; text-wrap: balance; }
.cover-meta { font-size: clamp(10px, 2.8cqw, 14px); opacity: 0.85; margin-top: 6px; }
.cover-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(44px, 13cqw, 68px); height: clamp(44px, 13cqw, 68px); border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3); transition: transform 0.15s;
}
.cover-play .icon { width: 45%; height: 45%; margin-left: 6%; }
.cover-state { position: absolute; left: 50%; top: calc(50% + clamp(34px, 9cqw, 48px)); transform: translateX(-50%); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0.9; }

.video-thumb { container-type: inline-size; }
.video-thumb .cover { border-radius: inherit; }
.video-thumb:hover .cover-play { transform: translate(-50%, -50%) scale(1.06); }

.player {
  position: relative; aspect-ratio: 16 / 9; background: #0F1412;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  container-type: inline-size; outline: none;
}
.player-media, .player-media iframe, .player-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-media iframe { pointer-events: none; border: 0; }
.player-media video { object-fit: contain; background: #000; }
.player .cover { cursor: pointer; transition: opacity 0.25s; }
.player.is-playing .cover { opacity: 0; pointer-events: none; }
.player.is-paused .cover, .player.is-ended .cover { opacity: 1; }
.player-tap { position: absolute; inset: 0; cursor: pointer; }
.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
  color: #fff; opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.player.is-playing.show-controls .player-controls, .player.is-paused .player-controls { opacity: 1; pointer-events: auto; }
.player-controls button { background: none; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.player-controls button:hover { background: rgba(255,255,255,0.15); }
.player-controls .icon { width: 20px; height: 20px; }
.player-time { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0.9; }
.player-seek { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); outline: none; cursor: pointer; }
.player-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.player-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.player-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; display: none; z-index: 2; }
.player.is-buffering .player-loading { display: block; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.player:fullscreen { border-radius: 0; border: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }

/* =============================================================================
   Parcours guidé
   ============================================================================= */
.journey-card { border-left: 4px solid var(--green); }
.phase-head { display: flex; align-items: baseline; gap: 12px; margin: 40px 0 14px; }
.phase-head h2 { margin: 0; }
.phase-head .badge { flex-shrink: 0; }
.day-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.day-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; transition: border-color 0.15s;
}
.day-row:hover { text-decoration: none; border-color: var(--border-strong); }
.day-row .day-num {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  background: var(--surface-2); color: var(--ink-2); border: 1.5px solid var(--border);
}
.day-row.is-done .day-num { background: var(--green); color: #fff; border-color: var(--green); }
.day-row.is-current { border-color: var(--green); background: var(--green-soft); }
.day-row.is-current .day-num { background: #fff; color: var(--green-text); border-color: var(--green); }
.day-row.is-upcoming { opacity: 0.72; }
.day-row .day-body { flex: 1; min-width: 0; }
.day-row .day-title { font-weight: 600; }
.day-row .day-sub { font-size: 14px; color: var(--ink-3); }
.day-row .day-count { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

.task-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.task {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.task.is-done { background: var(--green-soft); border-color: var(--green); }
.task .task-check {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; margin-top: 1px; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: #fff;
}
.task .task-check .icon { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.task.is-done .task-check { background: var(--green); border-color: var(--green); }
.task.is-done .task-check .icon { opacity: 1; }
.task .task-body { flex: 1; min-width: 0; }
.task .task-type { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.task .task-label { font-weight: 600; margin: 2px 0; }
.task .task-note { font-size: 14.5px; color: var(--ink-2); }
.task .task-auto { font-size: 12.5px; color: var(--green-text); margin-top: 4px; }
.task .btn { flex-shrink: 0; }
@media (max-width: 639px) {
  .task { flex-wrap: wrap; }
  .task .btn { width: calc(100% - 40px); margin-left: 40px; }
  .day-row { flex-wrap: wrap; }
  .day-row .day-count { width: 100%; padding-left: 56px; }
}
.day-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; }
.guide-text { font-size: 17px; }
.guide-text p + p { margin-top: 0.9em; }

/* Bandeau de titre du lecteur (premières secondes et au survol) */
.player-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; min-height: 19%;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px; color: #fff;
  background: linear-gradient(180deg, rgba(10,18,15,0.96) 0%, rgba(10,18,15,0.9) 55%, rgba(10,18,15,0) 100%);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.player-topbar .cover-brand { flex-shrink: 0; }
.player-topbar-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(13px, 3.2cqw, 18px); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player.is-playing.show-controls .player-topbar, .player.is-starting .player-topbar { opacity: 1; }
.player-controls { min-height: 20%; background: linear-gradient(0deg, rgba(10,18,15,0.94) 0%, rgba(10,18,15,0.7) 55%, rgba(10,18,15,0) 100%); align-items: flex-end; }
.player.is-starting .player-controls { opacity: 1; pointer-events: auto; }

/* YouTube : au repos, le clic sur la couverture atteint le bouton lecture de l'iframe
   (obligatoire sur mobile, où l'API ne peut pas démarrer la lecture seule). */
.player-yt.is-idle .player-media iframe { pointer-events: auto; }
.player-yt.is-idle .player-tap { pointer-events: none; }
.player-yt.is-idle .cover { pointer-events: none; }
.player-yt.is-idle .cover > .cover-top, .player-yt.is-idle .cover > div { pointer-events: auto; cursor: default; }
.player-loading { pointer-events: none; }

/* Habillage plus couvrant pendant le démarrage (cache le titre et le logo de l'iframe) */
.player.is-starting .player-topbar { background: linear-gradient(180deg, rgba(10,18,15,0.99) 0%, rgba(10,18,15,0.99) 62%, rgba(10,18,15,0) 100%); min-height: 24%; }
.player.is-starting .player-controls { background: linear-gradient(0deg, rgba(10,18,15,0.99) 0%, rgba(10,18,15,0.99) 60%, rgba(10,18,15,0) 100%); min-height: 24%; }
.player.is-paused .cover, .player.is-ended .cover { padding-bottom: 20%; }

/* ---------- Notification de résultats des membres (rotation périodique, en haut) ---------- */
.sp-toast {
  position: fixed; right: 16px; top: 16px; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  width: min(340px, calc(100vw - 32px)); padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 12px;
  box-shadow: 0 12px 30px -14px rgba(28, 32, 30, 0.35);
  transform: translateY(-140%); opacity: 0; pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}
.sp-toast.is-active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.sp-toast .avatar { width: 30px; height: 30px; font-size: 12px; background: linear-gradient(135deg, var(--green), #3E7C6A); color: #fff; }
.sp-toast .sp-body { flex: 1; min-width: 0; }
.sp-toast .sp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sp-toast .sp-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; color: var(--ink-2); }
.sp-toast .sp-name::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #10B981; animation: sp-pulse 1.4s ease-in-out infinite; }
@keyframes sp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.sp-toast .sp-metric { font-size: 13px; font-weight: 600; color: var(--green-text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-toast .sp-time { display: none; }
.sp-toast .sp-close { background: none; border: 0; color: var(--ink-3); padding: 0 2px; line-height: 1; font-size: 13px; }
.sp-toast .sp-close:hover { color: var(--ink); }
@media (max-width: 1023px) { .sp-toast { right: 12px; left: 12px; width: auto; top: 68px; } }
@media print { .sp-toast { display: none !important; } }

/* ---------- Widget de support flottant ---------- */
.sw-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 46;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px; border-radius: 999px; border: 0;
  background: var(--green); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px -8px rgba(28, 32, 30, 0.45);
  transition: background 0.15s, transform 0.15s;
}
.sw-launcher:hover { background: var(--green-dark); transform: translateY(-1px); }
.sw-launcher .icon { width: 22px; height: 22px; }
.sw-launcher .sw-dot { width: 9px; height: 9px; border-radius: 50%; background: #7CE0B0; box-shadow: 0 0 0 3px rgba(124, 224, 176, 0.3); }
.sw-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 47;
  width: min(380px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 24px 60px -18px rgba(28, 32, 30, 0.45);
  transform: translateY(12px) scale(0.98); opacity: 0; pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.sw-panel.is-open { transform: none; opacity: 1; pointer-events: auto; }
.sw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--green); color: #fff; }
.sw-head h3 { margin: 0; font-size: 17px; color: #fff; }
.sw-head p { margin: 2px 0 0; font-size: 13px; opacity: 0.9; }
.sw-head .modal-close { color: #fff; }
.sw-head .modal-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.sw-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.sw-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-badges .badge { gap: 6px; }
.sw-badges .icon { width: 14px; height: 14px; }
.sw-body textarea {
  width: 100%; min-height: 120px; resize: vertical;
  padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: 15.5px; line-height: 1.5;
}
.sw-body textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.sw-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sw-foot .tiny a { color: var(--green-text); }
@media (max-width: 1023px) {
  .sw-launcher { right: 12px; bottom: 84px; padding: 12px 14px; }
  .sw-launcher span.sw-label { display: none; }
  .sw-panel { right: 12px; bottom: 148px; }
}
@media print { .sw-launcher, .sw-panel { display: none !important; } }

/* =============================================================================
   Phase 1 : accueil « Aujourd'hui », bienvenue, installation, preuve sociale,
   mockups, bilan IPSS, résultats, dépannage, réglages
   ============================================================================= */

/* Texte plus grand (réglage) */
html.text-lg body { font-size: 19px; }
html.text-lg h1 { font-size: 40px; }
html.text-lg h2 { font-size: 29px; }
html.text-lg .btn { font-size: 17px; }
html.text-lg .nav-item { font-size: 17px; }

/* ---------- Tableau de bord du jour ---------- */
.today {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px;
}
.today-main { display: flex; flex-direction: column; gap: 16px; }
.ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .ring-bg { stroke: #E6E3DA; }
.ring .ring-fg { stroke: var(--green); transition: stroke-dasharray 0.6s ease; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-label strong { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.ring-label small { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.today-hero { display: flex; gap: 24px; align-items: center; }
.today-hero h1 { font-size: 30px; margin-bottom: 4px; }
.next-action { border-left: 4px solid var(--green); }
.next-action .eyebrow { margin-bottom: 4px; }
.moment { display: flex; gap: 14px; align-items: flex-start; }
.moment .card-icon { flex-shrink: 0; }
.tools-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 14px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); font-size: 13.5px; font-weight: 600; transition: border-color 0.15s, transform 0.15s;
}
.tool-btn:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.tool-btn .card-icon { width: 38px; height: 38px; }
.week-chart { display: flex; align-items: flex-end; gap: 8px; height: 90px; padding-top: 8px; }
.week-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-chart .bar i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: var(--green-soft); border: 1px solid rgba(46,94,78,0.25); min-height: 4px; }
.week-chart .bar.is-today i { background: var(--green); border-color: var(--green); }
.week-chart .bar span { font-size: 11px; color: var(--ink-3); }
.milestones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.milestone { text-align: center; padding: 14px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--ink-3); font-size: 13.5px; }
.milestone strong { display: block; font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.milestone.is-done { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green-text); }
.milestone.is-done strong { color: var(--green-text); }

/* ---------- Mockups (CSS uniquement) ---------- */
.book-wrap { perspective: 900px; display: flex; justify-content: center; padding: 12px 0; }
.book {
  position: relative; width: 150px; aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px;
  background: linear-gradient(160deg, #24493D 0%, #2E5E4E 55%, #3B7A67 100%); color: #fff;
  transform: rotateY(-18deg) rotateX(4deg); transform-style: preserve-3d;
  box-shadow: 14px 18px 30px -12px rgba(28,32,30,0.55), inset 6px 0 10px -6px rgba(0,0,0,0.5);
  padding: 16px 14px 14px 20px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.25s;
}
.book::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: rgba(255,255,255,0.25); }
.book::after { content: ""; position: absolute; right: -6px; top: 3px; bottom: 3px; width: 6px; background: linear-gradient(90deg, #F1EFE8, #D8D4C8); border-radius: 0 3px 3px 0; transform: translateZ(-1px); }
.card-link:hover .book, .book-wrap:hover .book { transform: rotateY(-10deg) rotateX(2deg); }
.book-brand { font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; display: flex; align-items: center; gap: 4px; }
.book-brand .icon { width: 11px; height: 11px; }
.book-num { font-family: var(--font-display); font-size: 34px; line-height: 1; opacity: 0.35; }
.book-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2; text-wrap: balance; }
.book-sub { font-size: 9.5px; opacity: 0.85; margin-top: 6px; line-height: 1.3; }
.book-foot { font-size: 8.5px; opacity: 0.7; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 6px; margin-top: 8px; }
.book.book-light { background: linear-gradient(160deg, #FFFFFF 0%, #F4F1E8 100%); color: var(--ink); }
.book.book-light .book-foot { border-color: var(--border); }
.book.book-light .book-brand { color: var(--green-text); }
.book.book-light .book-num { color: var(--green); opacity: 0.25; }

.boxset-wrap { perspective: 1000px; display: flex; justify-content: center; align-items: flex-end; padding: 12px 0 8px; position: relative; }
.boxset {
  position: relative; width: 190px; aspect-ratio: 4 / 3; border-radius: 8px;
  background: linear-gradient(150deg, #1B3A31 0%, #2E5E4E 60%, #3B7A67 100%); color: #fff;
  transform: rotateY(-16deg) rotateX(6deg); box-shadow: 16px 20px 34px -14px rgba(28,32,30,0.6);
  padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.boxset::before { content: ""; position: absolute; right: -8%; top: -12%; width: 60%; aspect-ratio: 1; opacity: 0.14;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/><path d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/></svg>") no-repeat center / contain; }
.boxset .book-title { font-size: 17px; }
.boxset .play-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; background: rgba(255,255,255,0.16); padding: 4px 8px; border-radius: 999px; }
.disc {
  position: absolute; right: 8%; bottom: -6px; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #FFFFFF 0%, #E6E3DA 30%, #CFCBBF 55%, #F1EFE8 70%, #D8D4C8 100%);
  box-shadow: 0 10px 20px -8px rgba(0,0,0,0.5); z-index: 1;
}
.disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; border-radius: 50%; transform: translate(-50%,-50%); background: var(--bg); border: 3px solid #CFCBBF; }
.phone-mock {
  width: 140px; aspect-ratio: 9 / 18; border-radius: 22px; background: #10201B; padding: 8px;
  box-shadow: 0 18px 30px -14px rgba(28,32,30,0.6); margin: 0 auto;
}
.phone-mock .screen { width: 100%; height: 100%; border-radius: 16px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; }
.phone-mock .screen .breath-circle { width: 74px; height: 74px; border-width: 2px; }
.phone-mock .screen .breath-status { font-size: 9px; }
.phone-mock .screen .breath-timer { font-size: 16px; }
.phone-mock .screen small { font-size: 9px; color: var(--ink-3); text-align: center; }

/* ---------- Preuve sociale (commentaires) ---------- */
.proof { margin-top: 32px; }
.proof-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.proof-head h3 { margin: 0; font-size: 18px; }
.proof-list { display: grid; gap: 10px; }
.proof-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.proof-item .avatar { flex-shrink: 0; }
.proof-item .who { font-size: 13.5px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proof-item .who .badge { font-size: 11.5px; padding: 2px 8px; }
.proof-item p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.card-soft .proof-item { background: var(--surface); }

/* ---------- Bienvenue (premier accès) ---------- */
.welcome .modal-box { max-width: 520px; }
.welcome-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.welcome-steps i { flex: 1; height: 4px; border-radius: 999px; background: var(--border); }
.welcome-steps i.is-on { background: var(--green); }
.welcome-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-bottom: 14px; }
.welcome-icon .icon { width: 32px; height: 32px; }
.welcome h2 { font-size: 26px; }
.welcome .first-actions { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.welcome .first-actions li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 15px; }
.welcome .first-actions .step-num { width: 26px; height: 26px; font-size: 13px; }

/* ---------- Bannière d'installation ---------- */
.install-banner {
  position: fixed; left: 20px; bottom: 20px; transform: translateY(140%); z-index: 48;
  width: min(520px, calc(100vw - 260px));
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 20px 50px -16px rgba(28,32,30,0.45);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.install-banner.is-visible { transform: translateY(0); }
.install-banner img { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.install-banner .ib-text { flex: 1; min-width: 0; }
.install-banner .ib-text strong { display: block; font-size: 15px; }
.install-banner .ib-text span { font-size: 13px; color: var(--ink-3); }
.install-banner .ib-actions { display: flex; align-items: center; gap: 6px; }
@media (max-width: 1023px) {
  .install-banner { left: 12px; right: 12px; width: auto; bottom: 150px; padding: 12px; }
  .install-banner .ib-text strong { font-size: 14px; }
}
@media (max-width: 639px) {
  .install-banner { flex-wrap: wrap; }
  .install-banner .ib-actions { width: 100%; justify-content: flex-end; }
}
.ios-steps { display: grid; gap: 10px; }
.ios-steps .step { align-items: center; }
.ios-share { display: inline-flex; width: 30px; height: 30px; border-radius: 7px; background: var(--surface-2); align-items: center; justify-content: center; }
.ios-share .icon { width: 18px; height: 18px; }

/* ---------- Bilan IPSS ---------- */
.ipss-q { padding: 18px 20px; }
.ipss-q .q-title { font-weight: 600; margin-bottom: 10px; display: flex; gap: 10px; }
.ipss-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ipss-opt { position: relative; }
.ipss-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ipss-opt label {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; text-align: center; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; line-height: 1.25; color: var(--ink-2);
}
.ipss-opt label strong { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.ipss-opt input:checked + label { background: var(--green-soft); border-color: var(--green); color: var(--green-text); }
.ipss-opt input:focus-visible + label { outline: 2px solid var(--green); }
.score-box { text-align: center; padding: 28px 20px; }
.score-box .score { font-family: var(--font-display); font-size: 56px; line-height: 1; }
.score-box .score small { font-size: 18px; color: var(--ink-3); }
.sev { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; margin-top: 8px; }
.sev-mild { background: var(--green-soft); color: var(--green-text); }
.sev-mod { background: var(--amber-soft); color: var(--amber); }
.sev-sev { background: var(--red-soft); color: var(--red); }
.hist-chart { display: flex; align-items: flex-end; gap: 14px; height: 160px; padding: 10px 0 0; }
.hist-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.hist-chart .bar i { display: block; width: 100%; max-width: 56px; border-radius: 8px 8px 3px 3px; background: var(--green); min-height: 4px; position: relative; }
.hist-chart .bar i::after { content: attr(data-v); position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: var(--ink); }
.hist-chart .bar span { font-size: 12px; color: var(--ink-3); text-align: center; }
.hist-chart .bar.alt i { background: var(--amber); }
@media (max-width: 639px) {
  .ipss-opts { grid-template-columns: repeat(3, 1fr); }
  .today { grid-template-columns: 1fr; }
  .today-hero { flex-direction: column; align-items: flex-start; }
  .tools-row { grid-template-columns: repeat(3, 1fr); }
  .milestones { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) and (min-width: 640px) { .today { grid-template-columns: 1fr; } }

/* ---------- Dépannage ---------- */
.tree-q { padding: 24px; }
.tree-q h3 { margin-bottom: 14px; }
.tree-opts { display: grid; gap: 8px; }
.tree-opts .btn { justify-content: flex-start; text-align: left; white-space: normal; }
.tree-path { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

/* ---------- Réglages ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .lbl strong { display: block; }
.setting-row .lbl span { font-size: 14px; color: var(--ink-3); }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); max-height: 120px; overflow: auto; }
