/* Composants propres à Respire (le reste vient de kit/kit.css). Tokens de theme.css uniquement. */

:root { --kit-gutter: 24px; }
html { font-variant-numeric: lining-nums; }

/* ---------- ciel étoilé, séance et soir ---------- */
.kit-app { position: relative; }
.kit-top, .kit-content, .kit-tabs { position: relative; z-index: 2; }
html[data-theme="dark"] .kit-app {
  background:
    radial-gradient(1.4px 1.4px at 14% 18%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 78% 10%, #fffc 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 88% 34%, #fffb 50%, transparent 52%),
    radial-gradient(1px 1px at 8% 52%, #fff9 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 62% 24%, #fffa 50%, transparent 52%),
    radial-gradient(1px 1px at 30% 8%, #fff8 50%, transparent 52%),
    radial-gradient(520px 380px at 50% 8%, #232a72 0, transparent 70%),
    linear-gradient(180deg, #0b1030 0, #0d1232 60%, #090c26 100%);
}
html[data-screen="seance"] .kit-app { background: #080b24 url("img/hero.jpg") 92% center / cover no-repeat; }
html[data-screen="seance"] .kit-app::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 9, 25, .55), rgba(6, 9, 25, .25) 40%, rgba(6, 9, 25, .85) 100%);
}
html[data-screen="soir"] .kit-app { background: #020308; }
html[data-screen="seance"] .kit-tabs { display: none; }

/* tamisage de l'écran (écran du soir) : un voile noir, la luminosité du téléphone n'est pas pilotable depuis le web */
.rs-dim { position: fixed; inset: 0; z-index: 70; background: #000; pointer-events: none; opacity: 0; transition: opacity .3s; }

/* ---------- en-tête, onglets ---------- */
.kit-title { font-size: 30px; letter-spacing: .01em; }
.kit-act { background: none; color: var(--kit-accent-strong); }
.kit-tabs { border-top: 1px solid var(--kit-line); }
.kit-tab { font-weight: 400; }
.kit-tab.is-on { font-weight: 500; color: var(--kit-accent-strong); }
.kit-tab.is-on .kit-tab-pill { background: none; }
.kit-tab.is-on .kit-ic { filter: drop-shadow(0 0 6px var(--kit-accent)); }
.kit-tab::after { content: ""; width: 4px; height: 4px; border-radius: 50%; margin-top: 1px; }
.kit-tab.is-on::after { background: var(--rs-moon); }
.kit-tab-pill { height: 28px; }

/* ---------- listes, interrupteurs, segmenté : plus légers, comme la maquette ---------- */
.kit-group-title { font-size: 15px; font-weight: 500; }
.kit-rows { background: none; border: 0; border-radius: 0; overflow: visible; }
.kit-row { border-top: 0; border-bottom: 1px solid var(--kit-line); min-height: 56px; padding: 0; }
.kit-row .kit-ic { color: var(--kit-accent-strong); }
.kit-row:has(.kit-toggle) em { font-family: var(--kit-font-display); font-weight: 600; font-size: 24px; color: var(--rs-moon); }
.kit-toggle { background: #232857; border: 1px solid var(--kit-line); width: 52px; height: 30px; }
.kit-toggle::after { top: 3px; left: 3px; width: 22px; height: 22px; background: var(--kit-muted); box-shadow: none; }
.kit-toggle[aria-checked="true"] { background: var(--kit-accent); border-color: var(--kit-accent); }
.kit-toggle[aria-checked="true"]::after { left: 25px; background: var(--kit-accent-fg); }
html[data-theme="light"] .kit-toggle { background: var(--kit-line); }
.kit-seg { background: none; border: 1px solid var(--kit-line); border-radius: 22px; padding: 3px; }
.kit-seg-opt { min-height: 36px; padding: 0 12px; border-radius: 18px; font-weight: 400; }
.kit-seg-opt[aria-checked="true"] { background: var(--kit-accent-strong); color: var(--rs-night); font-weight: 600; }
html[data-theme="light"] .kit-seg-opt[aria-checked="true"] { color: #fff; }
.kit-btn-main { background: linear-gradient(180deg, #eae3ff, #b9a9f6); color: var(--rs-night); box-shadow: 0 0 40px -6px rgba(185, 169, 246, .75); }
html[data-theme="light"] .kit-btn-main { background: var(--kit-accent); color: #fff; box-shadow: 0 8px 24px -10px var(--kit-accent); }
.kit-note { font-size: 14px; }
.rs-priv { display: flex; gap: 10px; font-size: 14px; color: var(--kit-muted); line-height: 1.4; margin-top: 6px; }
.rs-priv .kit-ic { width: 18px; height: 18px; margin-top: 1px; }

/* ---------- le point ---------- */
.rs-dot { position: relative; width: min(260px, 33dvh); height: min(260px, 33dvh); margin: 0 auto; display: grid; place-items: center; flex: none; }
.rs-breath { position: absolute; inset: 0; display: grid; place-items: center; transform: scale(.62); will-change: transform, opacity; }
.rs-halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle closest-side, var(--rs-halo) 0, rgba(185, 169, 246, .18) 60%, transparent 100%); }
.rs-ring { position: absolute; inset: 13%; border-radius: 50%; border: 1px solid rgba(220, 211, 252, .35); }
.rs-core {
  position: relative; width: 49%; height: 49%; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0, #ddd3ff 28%, #a592f0 68%, #7766d6 100%);
  box-shadow: 0 0 50px 10px rgba(185, 169, 246, .55), 0 0 120px 30px rgba(120, 100, 230, .35);
}
/* décor seul (bienvenue) : la séance, elle, est pilotée en JS */
.rs-breath.is-decor { animation: rs-breathe 19s ease-in-out infinite; animation-delay: -4s; }
@keyframes rs-breathe { 0% { transform: scale(.62); } 21% { transform: scale(1); } 58% { transform: scale(1); } 100% { transform: scale(.62); } }

/* ---------- accueil ---------- */
.rs-home { display: block; }
.rs-hello { font-family: var(--kit-font-display); font-size: 38px; line-height: 1.05; font-weight: 500; margin-top: 4px; }
.rs-hello-sub { color: var(--kit-muted); margin-top: 6px; }
.rs-label { font-size: 15px; color: var(--kit-accent); margin: 20px 0 8px; font-weight: 500; }
.rs-rhy {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 0 16px; margin-bottom: 10px;
  border-radius: 22px; border: 1px solid var(--kit-line); background: var(--kit-surface); text-align: left;
}
.rs-rhy svg.rs-wave { width: 64px; height: 24px; fill: none; stroke: var(--kit-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rs-rhy-t { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.rs-rhy-t b { font-family: var(--kit-font-display); font-size: 21px; font-weight: 600; }
.rs-rhy-t span { font-size: 14px; color: var(--kit-muted); }
.rs-rad { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--kit-muted); flex: none; }
.rs-rhy[aria-checked="true"] { border-color: var(--kit-accent); background: linear-gradient(90deg, var(--kit-accent-2), var(--kit-accent-soft)); box-shadow: 0 0 28px -8px var(--kit-accent); }
.rs-rhy[aria-checked="true"] svg.rs-wave { stroke: var(--rs-moon); }
.rs-rhy[aria-checked="true"] .rs-rad { border-color: var(--rs-moon); background: radial-gradient(circle, var(--rs-moon) 0 4px, transparent 5px); }
.rs-dur { display: flex; gap: 12px; }
.rs-dur button { flex: 1; min-height: 56px; border-radius: 28px; border: 1px solid var(--kit-line); font-size: 17px; font-weight: 500; }
.rs-dur small { font-size: 14px; color: var(--kit-muted); margin-left: 3px; }
.rs-dur button[aria-checked="true"] { background: var(--kit-accent-strong); color: var(--rs-night); border-color: transparent; }
html[data-theme="light"] .rs-dur button[aria-checked="true"] { color: #fff; }
.rs-dur button[aria-checked="true"] small { color: inherit; opacity: .75; }
.rs-go { margin-top: 20px; min-height: 64px; width: 100%; font-size: 17px; }
.rs-opts { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.rs-opt { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 12px; border-radius: 24px; color: var(--kit-muted); font-size: 15px; }
.rs-opt .kit-ic { width: 19px; height: 19px; }
.rs-opt[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }

/* ---------- séance ---------- */
.rs-seance { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 0; }
.rs-seance .rs-dot { margin-top: 22px; }
.rs-instr { font-family: var(--kit-font-display); font-size: 52px; line-height: 1; font-weight: 500; margin-top: 20px; min-height: 1em; }
.rs-instr em { font-style: italic; color: var(--rs-moon); margin-left: 8px; }
.rs-phases { display: flex; gap: 8px; margin-top: 20px; width: 100%; }
.rs-phases div { text-align: left; font-size: 14px; color: var(--kit-muted); border-top: 2px solid rgba(185, 169, 246, .25); padding-top: 7px; transition: border-color .3s, color .3s; }
.rs-phases div b { display: block; font-size: 17px; font-weight: 600; color: var(--kit-muted); }
.rs-phases div.is-on { border-color: var(--rs-moon); color: var(--kit-accent-strong); }
.rs-phases div.is-on b { color: var(--kit-fg); }
.rs-timer { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding-bottom: 18px; }
.rs-tm { flex: 1; text-align: left; font-family: var(--kit-font-display); font-size: 40px; line-height: 1; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.rs-tm span { display: block; font-family: var(--kit-font-body); font-size: 14px; color: var(--kit-muted); margin-top: 4px; font-variant-numeric: lining-nums; }
.rs-end { font-size: 16px; color: var(--kit-muted); min-height: 48px; padding: 0 8px; }
.rs-circ { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--kit-accent); display: grid; place-items: center; background: rgba(23, 29, 75, .6); color: var(--kit-accent-strong); flex: none; }
.rs-circ .kit-ic { width: 26px; height: 26px; }

/* ---------- fin de séance et suivi ---------- */
.rs-fin-title { font-family: var(--kit-font-display); font-weight: 500; font-size: 40px; line-height: 1.02; margin-top: 2px; }
.rs-pan { border-radius: 24px; border: 1px solid var(--kit-line); background: var(--kit-surface); padding: 14px 16px; }
.rs-pan h3 { font-size: 15px; font-weight: 600; color: var(--kit-accent); }
.rs-pan-head { display: flex; justify-content: space-between; align-items: center; }
.rs-big { font-family: var(--kit-font-display); font-size: 34px; font-weight: 600; line-height: 1; color: var(--kit-fg); }
.rs-big small { font-family: var(--kit-font-body); font-size: 15px; color: var(--kit-muted); font-weight: 400; margin-left: 5px; }
.rs-scale { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.rs-scale-nm { width: 50px; font-size: 15px; color: var(--kit-muted); flex: none; }
.rs-pts { display: flex; flex: 1; justify-content: space-between; max-width: 220px; }
.rs-pts button { width: 44px; height: 44px; display: grid; place-items: center; }
.rs-pts i { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(185, 169, 246, .4); display: block; transition: background .15s; }
.rs-pts i.is-f { background: var(--kit-accent); border-color: var(--kit-accent); box-shadow: 0 0 14px rgba(185, 169, 246, .7); }
.rs-pts i.is-g { background: var(--rs-moon); border-color: var(--rs-moon); box-shadow: 0 0 16px rgba(244, 223, 174, .7); }
.rs-scale-v { font-family: var(--kit-font-display); font-size: 22px; font-weight: 600; min-width: 16px; text-align: right; }
.rs-scale-v.is-g { color: var(--rs-moon); }
.rs-cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--kit-muted); margin: 0 0 0 60px; max-width: 220px; }
.rs-days { display: flex; justify-content: space-between; margin-top: 10px; }
.rs-days > div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--kit-muted); }
.rs-days i { width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed rgba(185, 169, 246, .3); display: grid; place-items: center; }
.rs-days i.is-done { background: var(--kit-accent); border: 0; color: var(--rs-night); box-shadow: 0 0 14px rgba(185, 169, 246, .55); }
.rs-days i.is-now { background: var(--rs-moon); border: 0; box-shadow: 0 0 16px rgba(244, 223, 174, .7); color: var(--rs-night); }
.rs-days i .kit-ic { width: 16px; height: 16px; stroke-width: 2.2; }
html[data-theme="light"] .rs-days i.is-done { color: #fff; }
.rs-chart .kit-chart-bar { fill: var(--kit-accent); }
.rs-chart .kit-chart-bar.is-current { fill: var(--rs-moon); }
.rs-chart .kit-chart .kit-chart-value { fill: var(--kit-fg); }
.rs-chart svg { margin-top: 4px; }
.rs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rs-stats .rs-pan { padding: 12px 8px; text-align: center; }
.rs-stats .rs-big { font-size: 38px; }
.rs-stats .rs-big small { display: block; margin: 4px 0 0; }
.rs-feel { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.rs-feel b { font-family: var(--kit-font-display); font-size: 30px; font-weight: 600; }
.rs-feel b.is-g { color: var(--rs-moon); }
.rs-feel span { font-size: 14px; color: var(--kit-muted); }
.rs-list .kit-row { min-height: 60px; }
.rs-list .kit-row-l { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.3; }
.rs-list .kit-row-l small { font-size: 14px; color: var(--kit-muted); }
.rs-list .kit-row em { font-size: 15px; font-family: var(--kit-font-body); font-weight: 500; color: var(--kit-muted); }
.rs-list .kit-row em b { color: var(--rs-moon); font-weight: 600; }
.rs-fin-go { margin-top: 4px; min-height: 56px; width: 100%; }

/* ---------- soir ---------- */
.rs-soir { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 0; }
.rs-soir .rs-dot { margin-top: 24px; }
.rs-soir .rs-breath { transform: scale(.8); }
.rs-soir .rs-halo { opacity: .55; }
.rs-soir .rs-core { background: radial-gradient(circle at 40% 34%, #b7a9ef 0, #6a5cc0 60%, #41378a 100%); box-shadow: 0 0 40px 6px rgba(106, 92, 192, .35); }
.rs-soir .rs-ring { border-color: rgba(160, 148, 230, .18); }
.rs-soir h1 { font-family: var(--kit-font-display); font-weight: 500; font-size: 40px; line-height: 1.05; margin-top: 26px; color: var(--kit-fg); }
.rs-soir p { color: var(--kit-muted); margin-top: 10px; max-width: 28ch; }
.rs-lum { width: 100%; display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--kit-muted); font-size: 14px; }
.rs-lum .kit-ic { width: 18px; height: 18px; flex: none; }
.rs-lum input { flex: 1; min-height: 48px; -webkit-appearance: none; appearance: none; background: transparent; }
.rs-lum input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #6a5cc0, #16153a); }
.rs-lum input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border: 0; border-radius: 50%; background: #c3baee; }
.rs-soir .kit-btn-main { background: #1b1946; color: #d9d2fa; box-shadow: none; border: 1px solid rgba(185, 169, 246, .3); margin-top: auto; min-height: 60px; width: 100%; }
.rs-skip { min-height: 48px; color: var(--kit-muted); font-size: 16px; margin: 6px 0 10px; padding: 0 12px; }

/* ---------- bienvenue (plein écran, sans onglets) ---------- */
.rs-onb {
  height: 100dvh; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 560px; margin: 0 auto;
  padding: env(safe-area-inset-top, 0px) var(--kit-gutter) max(18px, env(safe-area-inset-bottom, 0px));
  background: radial-gradient(420px 420px at 50% 34%, #2b2680 0, transparent 70%), linear-gradient(180deg, #0a0e2c, #0d1232);
}
.rs-onb-top { height: 56px; width: 100%; flex: none; display: flex; align-items: center; justify-content: space-between; }
.rs-onb-top h2 { font-family: var(--kit-font-display); font-weight: 600; font-size: 30px; }
.rs-onb-top button { width: 48px; height: 48px; display: grid; place-items: center; color: var(--kit-muted); }
.rs-onb .rs-dot { margin-top: 18px; }
.rs-onb h1 { font-family: var(--kit-font-display); font-size: 46px; line-height: 1; font-weight: 500; margin-top: 10px; }
.rs-onb p { color: var(--kit-muted); margin-top: 12px; max-width: 30ch; }
.rs-chips { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.rs-chips span { border: 1px solid var(--kit-line); border-radius: 999px; padding: 8px 14px; font-size: 15px; color: var(--kit-accent-strong); }
.rs-pager { display: flex; gap: 8px; margin-top: auto; margin-bottom: 18px; }
.rs-pager i { width: 8px; height: 8px; border-radius: 50%; background: rgba(185, 169, 246, .3); }
.rs-pager i.is-on { width: 26px; border-radius: 4px; background: var(--rs-moon); }
.rs-onb .kit-btn-main { width: 100%; min-height: 64px; }
.rs-onb .rs-skip { margin-bottom: 0; }
@media (max-height: 700px) { .rs-onb h1 { font-size: 38px; } .rs-onb p { margin-top: 8px; } .rs-chips { margin-top: 12px; } }

/* texte pour lecteurs d'écran seulement */
.rs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
