@import url('/static/fonts/fonts.css');

:root {
  --bg: #06070f;
  --bg-2: #0a0b1c;
  --ink: #EFEBF5;
  --ink-2: #CFC7DC;
  --muted: #948CA6;
  --faint: #6B6478;
  --violet: #A78BFA;
  --violet-2: #7C6CF0;
  --cyan: #67E8F9;
  --pink: #F472B6;
  --line: rgba(255, 255, 255, .085);
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .07);
  --radius: 22px;
  --serif: 'Cormorant Garamond', ui-serif, Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 620px at 10% -8%, rgba(109, 76, 210, .40), transparent 62%),
    radial-gradient(760px 620px at 96% 8%, rgba(30, 120, 160, .30), transparent 60%),
    radial-gradient(1000px 700px at 50% 112%, rgba(80, 40, 150, .26), transparent 65%),
    linear-gradient(180deg, #080915 0%, #06070f 55%, #080912 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

::selection { background: rgba(232, 178, 122, .28); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 8px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
p { margin: 0 0 12px; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- GATE ---------- */
.gate {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
}
.gate-card {
  width: 100%; max-width: 430px; padding: 42px 34px 34px;
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
  border: 1px solid var(--line); border-radius: 28px;
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px);
  box-shadow: var(--shadow);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.gate-logo { width: 76px; height: 76px; border-radius: 22px; display: block; margin: 0 auto 22px; box-shadow: 0 18px 40px -18px rgba(167,139,250,.5); }
.gate h1 { font-family: var(--serif); font-size: 44px; text-align: center; line-height: 1; }
.gate .tag { text-align: center; color: var(--muted); font-size: 13.5px; margin: 12px 0 30px; }
.gate .fine { text-align: center; color: var(--faint); font-size: 11.5px; margin-top: 20px; line-height: 1.5; }

/* ---------- SHELL ---------- */
#app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; padding: 30px 20px 22px;
  display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand b { font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: .01em; display: block; line-height: 1; }
.brand small { display: block; color: var(--faint); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; transition: .22s ease; position: relative;
}
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.045); }
.nav-item.active { color: var(--ink); background: rgba(167,139,250,.10); border-color: rgba(167,139,250,.20); }
.nav-item.active::before {
  content: ""; position: absolute; left: -21px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--violet);
}
.nav-item .i { width: 19px; height: 19px; }
.side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.side-foot .mini { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.side-foot b { color: var(--ink-2); font-weight: 500; }

.topbar { display: none; }
.tabbar { display: none; }

.view { padding: 40px clamp(22px, 4vw, 52px) 90px; max-width: 1160px; width: 100%; margin: 0 auto; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.eyebrow { color: var(--violet); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
.view-head h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.02; }
.view-head .sub { color: var(--muted); font-size: 14px; margin-top: 9px; max-width: 520px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- CARTES ---------- */
.card {
  background: linear-gradient(165deg, rgba(255,255,255,.062), rgba(255,255,255,.022));
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 26px; box-shadow: var(--shadow);
}
.card.tight { padding: 20px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.card-title .i { width: 15px; height: 15px; color: var(--violet); }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1.15fr .85fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.stack { display: grid; gap: 18px; }

/* ---------- RING / AUJOURD'HUI ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-bottom: 18px; }
.hero-main { position: relative; overflow: hidden; padding: 32px; }
.hero-main::before {
  content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -160px;
  background: radial-gradient(circle, rgba(167,139,250,.20), transparent 68%);
  filter: blur(12px); pointer-events: none;
}
.hero-main h2 { font-family: var(--serif); font-size: 36px; line-height: 1.08; margin-bottom: 8px; }
.hero-main .lede { color: var(--muted); font-size: 14px; max-width: 340px; }
.streak { display: flex; align-items: center; gap: 26px; margin: 26px 0 24px; }
.ring-wrap { position: relative; width: 148px; height: 148px; flex: 0 0 auto; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.075); stroke-width: 7; }
.ring-fg { fill: none; stroke: url(#mainGrad); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,.2,1); filter: drop-shadow(0 0 7px rgba(167,139,250,.38)); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-txt b { font-family: var(--serif); font-size: 46px; line-height: .9; display: block; font-weight: 500; }
.ring-txt span { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; margin-top: 7px; }
.streak-meta .goal { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.streak-meta .goal b { color: var(--ink); font-weight: 600; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 18px; border-radius: 13px; border: 1px solid transparent;
  background: rgba(255,255,255,.06); color: var(--ink); font-size: 13.5px; font-weight: 500;
  transition: .2s ease; text-decoration: none; min-height: 44px;
}
.btn:hover { background: rgba(255,255,255,.10); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, #A78BFA, #7C6CF0); color: #150E2E; font-weight: 600; box-shadow: 0 12px 30px -14px rgba(167,139,250,.7); }
.btn.primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, #A78BFA, #7C6CF0); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: rgba(255,255,255,.2); }
.btn.danger { background: rgba(244,114,182,.12); border-color: rgba(244,114,182,.3); color: #FBCFE8; }
.btn.sage { background: rgba(103,232,249,.13); border-color: rgba(103,232,249,.3); color: #C7F5FF; }
.btn.sm { padding: 8px 12px; font-size: 12.5px; min-height: 38px; border-radius: 10px; }
.btn.icon { padding: 0; width: 44px; height: 44px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .i { width: 17px; height: 17px; }

/* ---------- CHECK-IN ---------- */
.mood-row { display: flex; gap: 8px; margin: 14px 0 20px; }
.mood {
  flex: 1; min-height: 62px; border-radius: 15px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); display: grid; place-items: center; gap: 2px;
  transition: .18s ease; padding: 7px 2px;
}
.mood:hover { background: rgba(255,255,255,.07); }
.mood.sel { border-color: rgba(167,139,250,.55); background: rgba(167,139,250,.12); box-shadow: 0 0 0 1px rgba(167,139,250,.2) inset; }
.mood .glyph { font-size: 19px; line-height: 1; }
.mood .lab { font-size: 9.5px; color: var(--muted); letter-spacing: .02em; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--violet); border: 3px solid #141024; box-shadow: 0 0 0 1px rgba(167,139,250,.5); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--violet); border: 3px solid #141024; cursor: pointer; }
.range-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.range-row .val { min-width: 58px; text-align: right; font-size: 12.5px; color: var(--muted); }
.range-row .val b { color: var(--violet); font-size: 15px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.input, textarea.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.22); color: var(--ink); outline: none; transition: .2s; font-size: 14px;
}
.input:focus { border-color: rgba(167,139,250,.5); box-shadow: 0 0 0 3px rgba(167,139,250,.10); }
textarea.input { resize: vertical; min-height: 140px; line-height: 1.7; }
textarea.big { min-height: 320px; font-size: 15.5px; }
.hint { font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- PROMPT ---------- */
.prompt-card { position: relative; overflow: hidden; border-color: rgba(167,139,250,.16); }
.prompt-card::after {
  content: "“"; position: absolute; right: 18px; top: -26px; font-family: var(--serif);
  font-size: 150px; line-height: 1; color: rgba(167,139,250,.10); pointer-events: none;
}
.prompt-text { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 29px); line-height: 1.32; margin: 4px 0 20px; max-width: 92%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--muted); font-size: 12px; transition: .18s;
  min-height: 34px;
}
.chip:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.chip.sel { color: #150E2E; background: var(--violet); border-color: var(--violet); font-weight: 600; }

/* ---------- LISTES ---------- */
.list { display: grid; gap: 10px; }
.entry {
  padding: 16px 18px; border-radius: 15px; border: 1px solid var(--line);
  background: rgba(255,255,255,.028); transition: .2s;
}
.entry:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.entry-cat { font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--violet); font-weight: 600; }
.entry-date { font-size: 11px; color: var(--faint); }
.entry-body { color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.entry .del { color: var(--faint); background: none; border: 0; padding: 4px; border-radius: 7px; }
.entry .del:hover { color: var(--pink); background: rgba(244,114,182,.1); }
.empty { text-align: center; color: var(--faint); padding: 40px 20px; font-size: 13.5px; }
.empty .i { width: 34px; height: 34px; margin-bottom: 10px; opacity: .5; }

/* ---------- PARCOURS ---------- */
.phase-head { display: flex; align-items: center; gap: 16px; margin: 30px 0 14px; }
.phase-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-family: var(--serif); font-size: 20px; color: var(--violet); }
.phase-head h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.phase-head p { color: var(--faint); font-size: 12px; margin: 2px 0 0; }
.pdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pday {
  text-align: left; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.025); transition: .2s; position: relative;
}
.pday:hover { background: rgba(255,255,255,.055); }
.pday .n { font-size: 10px; letter-spacing: .13em; color: var(--faint); text-transform: uppercase; padding-right: 18px; }
.pday .t { font-size: 13.5px; font-weight: 500; margin-top: 4px; color: var(--ink-2); }
.pday .k { font-size: 12px; color: var(--faint); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pday.done { border-color: rgba(103,232,249,.25); background: rgba(103,232,249,.06); }
.pday.done .t { color: #C7F5FF; }
.pday.done::after { content: "✓"; position: absolute; top: 12px; right: 13px; color: var(--cyan); font-size: 13px; }
.pday.current { border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.09); box-shadow: 0 0 0 1px rgba(167,139,250,.12) inset; }
.pday.current .n { color: var(--violet); }
.phase-bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,.07); overflow: hidden; margin: 6px 0 4px; }
.phase-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); border-radius: 5px; transition: width .8s ease; }

/* ---------- JARDIN ---------- */
.garden-card { padding: 0; overflow: hidden; position: relative; }
.garden-sky { position: relative; min-height: 250px; display: grid; place-items: end center;
  background: radial-gradient(600px 260px at 50% 100%, rgba(103,232,249,.14), transparent 70%),
              radial-gradient(420px 220px at 20% 10%, rgba(120,74,120,.18), transparent 70%),
              linear-gradient(180deg, rgba(10,9,16,.4), rgba(20,26,24,.55)); }
.garden-svg { width: 100%; max-width: 520px; max-height: 300px; display: block; }
.garden-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.gstat { padding: 16px; text-align: center; background: rgba(12,11,18,.6); }
.gstat b { display: block; font-family: var(--serif); font-size: 25px; font-weight: 500; color: var(--ink); }
.gstat span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* ---------- CHAT ---------- */
.chat-shell { display: grid; grid-template-rows: 1fr auto; height: calc(100dvh - 232px); min-height: 320px; padding: 0; overflow: hidden; }
.chat-log { overflow-y: auto; padding: 26px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.msg { max-width: 74%; padding: 14px 17px; border-radius: 18px; font-size: 14.2px; line-height: 1.65; white-space: pre-wrap; animation: rise .35s ease both; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(167,139,250,.92), rgba(201,143,85,.92)); color: #150E2E; border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,.055); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink-2); }
.msg.bot.thinking { color: var(--faint); font-style: italic; }
.chat-input { border-top: 1px solid var(--line); padding: 16px; display: flex; gap: 10px; align-items: flex-end; background: rgba(0,0,0,.16); }
.chat-input textarea { flex: 1; min-height: 48px; max-height: 140px; resize: none; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); outline: none; font-size: 14px; }
.chat-input textarea:focus { border-color: rgba(167,139,250,.4); }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 26px 16px; }
.suggest .chip { font-size: 11.5px; }

/* ---------- COMPRENDRE ---------- */
.cycle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cycle-item { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03); position: relative; }
.cycle-item b { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--violet); display: block; margin-bottom: 8px; }
.cycle-item p { font-size: 13px; color: var(--muted); margin: 0; }
.sign-list { display: grid; gap: 9px; }
.sign { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; text-align: left; transition: .18s; }
.sign:hover { background: rgba(255,255,255,.055); }
.sign.on { border-color: rgba(167,139,250,.4); background: rgba(167,139,250,.08); }
.box-check { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); flex: 0 0 auto; display: grid; place-items: center; margin-top: 1px; }
.sign.on .box-check { background: var(--violet); border-color: var(--violet); color: #150E2E; }
.box-check .i { width: 13px; height: 13px; stroke-width: 2.6; opacity: 0; }
.sign.on .box-check .i { opacity: 1; }
.sign span { font-size: 13.5px; color: var(--ink-2); }
.crisis { border-color: rgba(244,114,182,.3); background: rgba(244,114,182,.07); }

/* ---------- MODAL / TOAST ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5,4,8,.72); backdrop-filter: blur(6px); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .25s ease; }
.modal { width: 100%; max-width: 460px; padding: 28px; border-radius: 24px; background: linear-gradient(165deg, #17141f, #100e16); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 40px 80px -20px #000; animation: rise .35s cubic-bezier(.2,.7,.2,1); }
.modal h3 { font-family: var(--serif); font-size: 27px; font-weight: 500; margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 13.5px; }
.modal .actions { margin-top: 22px; justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 80; padding: 12px 20px; border-radius: 999px; background: rgba(28,24,36,.96); border: 1px solid var(--line); font-size: 13px; opacity: 0; pointer-events: none; transition: .3s; box-shadow: var(--shadow); max-width: calc(100vw - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ANIMATIONS ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.anim > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.anim > *:nth-child(2) { animation-delay: .05s; }
.anim > *:nth-child(3) { animation-delay: .1s; }
.anim > *:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .hero, .grid.two { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: 1fr; }
  .cycle { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px calc(12px); position: sticky; top: 0; z-index: 40;
    background: rgba(11,10,16,.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; gap: 9px; }
  .topbar .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .topbar .brand b { font-size: 22px; }
  .topbar .brand small { display: none; }
  .view { padding: 22px 16px 110px; }
  .view-head { margin-bottom: 22px; }
  .view-head h1 { font-size: 32px; }
  .head-actions { width: 100%; }
  .card { padding: 20px; border-radius: 19px; }
  .hero-main { padding: 24px 20px; }
  .hero-main h2 { font-size: 30px; }
  .streak { gap: 18px; }
  .ring-wrap { width: 122px; height: 122px; }
  .ring-txt b { font-size: 38px; }
  .actions .btn { flex: 1 1 auto; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(13,11,19,.9); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border-top: 1px solid var(--line);
  }
  .tab {
    flex: 1; display: grid; justify-items: center; gap: 4px; padding: 7px 2px 5px;
    color: var(--faint); font-size: 9.5px; letter-spacing: .01em; text-decoration: none;
    border-radius: 11px; border: 0; background: none;
  }
  .tab .i { width: 21px; height: 21px; }
  .tab.active { color: var(--violet); }
  .chat-shell { height: calc(100dvh - 210px); }
  .msg { max-width: 88%; }
  .chat-log { padding: 18px 16px; }
  .suggest { padding: 0 16px 14px; }
  .chat-input { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .garden-stats { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .pdays { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 420px) {
  .mood .lab { display: none; }
  .mood { min-height: 52px; }
  .streak { flex-direction: column; align-items: flex-start; }
}

/* ---------- COMPTES / QUESTIONNAIRE ---------- */
.gate-tabs { display: flex; gap: 6px; background: rgba(0,0,0,.25); padding: 5px; border-radius: 13px; margin-bottom: 22px; }
.gate-tab { flex: 1; padding: 10px 8px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 500; transition: .2s; }
.gate-tab.active { background: rgba(255,255,255,.09); color: var(--ink); box-shadow: 0 4px 14px -8px #000; }
.gate .tag { margin-bottom: 22px; }

.wizard { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.wiz-card { width: 100%; max-width: 680px; border: 1px solid var(--line); border-radius: 26px; padding: 26px 28px 22px;
  background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); backdrop-filter: blur(24px);
  box-shadow: var(--shadow); animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.wiz-brand { display: flex; align-items: center; gap: 9px; }
.wiz-brand img { width: 28px; height: 28px; border-radius: 8px; }
.wiz-brand span { font-family: var(--serif); font-size: 20px; }
.wiz-dots { display: flex; gap: 5px; }
.wiz-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.16); transition: .25s; }
.wiz-dots i.on { background: var(--violet); width: 18px; border-radius: 4px; }
.wiz-step-tag { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--violet); font-weight: 600; }
.wiz-card h2 { font-family: var(--serif); font-size: clamp(27px, 3.4vw, 36px); line-height: 1.1; margin: 9px 0 8px; font-weight: 500; }
.wiz-card .wsub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; max-width: 520px; }
.wiz-body { min-height: 210px; }
.wiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wiz-count { font-size: 11.5px; color: var(--faint); letter-spacing: .04em; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.opt { text-align: left; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.028); transition: .18s; color: var(--ink-2); font-size: 13.5px; }
.opt:hover { background: rgba(255,255,255,.06); }
.opt.sel { border-color: rgba(167,139,250,.75); background: rgba(167,139,250,.16); color: var(--ink); box-shadow: 0 0 0 1px rgba(167,139,250,.18) inset; }
.opt .oh { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.opt.sel .oh { color: rgba(167,139,250,.8); }
.chip.multi.sel { color: #150E2E; }
.wiz-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.wiz-inline .chip { min-height: 40px; display: inline-flex; align-items: center; }

.plan-card { border-color: rgba(103,232,249,.22); background: linear-gradient(160deg, rgba(103,232,249,.09), rgba(255,255,255,.02)); }
.plan-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.plan-tag { font-size: 11.5px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.055); border: 1px solid var(--line); color: var(--ink-2); }
.safety-banner { border-color: rgba(244,114,182,.34); background: rgba(244,114,182,.09); margin-bottom: 18px; }

@media (max-width: 640px) {
  .wiz-card { padding: 20px 17px 16px; border-radius: 20px; }
  .wiz-body { min-height: 180px; padding-bottom: 74px; }
  .opt-grid { grid-template-columns: 1fr; }
  .wiz-nav { position: sticky; bottom: 0; background: rgba(13,11,19,.9); backdrop-filter: blur(12px); margin: 20px -17px -16px; padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); }
  .gate-tabs { margin-bottom: 18px; }
}

/* ---------- FRÉQUENCE : composants ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1; }
.stat span { display: block; margin-top: 6px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

.orb-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 18px 0 6px; position: relative; min-height: 0; }
.orb { width: 186px; height: 186px; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: radial-gradient(circle at 38% 32%, rgba(196,181,253,.55), rgba(124,108,240,.28) 45%, rgba(103,232,249,.10) 70%, transparent 72%);
  box-shadow: 0 0 70px rgba(124,108,240,.35), inset 0 0 60px rgba(103,232,249,.16);
  transform: scale(.8); transition: transform 5s cubic-bezier(.4,0,.6,1); }
.orb::before, .orb::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(167,139,250,.22); }
.orb::after { inset: -32px; border-color: rgba(103,232,249,.12); }
.orb-core { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.14); backdrop-filter: blur(6px);
  box-shadow: inset 0 0 24px rgba(255,255,255,.25); }
.breath-label { position: static; text-align: center; }
.breath-label b { font-family: var(--serif); font-size: 25px; font-weight: 500; display: block; }
.breath-label span { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.breath-timer { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--faint); text-align: center; margin-top: 4px; }

.coh-ring { position: relative; width: 176px; height: 176px; margin: 4px auto 6px; }
.coh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.coh-ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.coh-ring .val b { font-family: var(--serif); font-size: 52px; font-weight: 500; line-height: .9; }
.coh-ring .val span { display: block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }

.sliders .row { display: grid; grid-template-columns: 92px 1fr 34px; gap: 10px; align-items: center; margin-bottom: 12px; }
.sliders label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sliders b { font-size: 14px; color: var(--violet); text-align: right; font-variant-numeric: tabular-nums; }

.heat { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,.05); display: block; }
.heat i.on { background: linear-gradient(135deg, #7C6CF0, #67E8F9); }
.heat i.mid { background: rgba(124,108,240,.45); }
.heat i.today { outline: 1px solid rgba(255,255,255,.5); outline-offset: 1px; }

.bars { display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: 110px; margin-top: 8px; }
.bars .b { flex: 1 1 0; max-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.bars .b i { width: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #A78BFA, #67E8F9); min-height: 2px; }
.bars .b span { font-size: 8.5px; color: var(--faint); }

.sign-item { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.028); }
.sign-item .top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.sign-item .body { font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }

.week-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.week-tabs button { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); font-size: 12px; }
.week-tabs button.on { background: rgba(167,139,250,.16); border-color: rgba(167,139,250,.45); color: var(--ink); }

.explain-grid { display: grid; gap: 10px; }
.explain-item { padding: 15px 17px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.028); }
.explain-item b { display: block; font-size: 13.5px; margin-bottom: 4px; color: var(--ink); }
.explain-item p { margin: 0; font-size: 13px; color: var(--muted); }
.warn-item { border-color: rgba(244,114,182,.25); background: rgba(244,114,182,.06); }

@media (max-width: 700px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .orb { width: 158px; height: 158px; }
  .coh-ring { width: 150px; height: 150px; }
  .coh-ring .val b { font-size: 44px; }
  .sliders .row { grid-template-columns: 80px 1fr 30px; }
}

@media (max-height: 740px) and (min-width: 861px) {
  .view-head h1 { font-size: 34px; }
  .view-head .sub { display: none; }
  .view-head { margin-bottom: 18px; }
  .orb { width: 150px; height: 150px; }
  .orb-stage { padding: 4px 0 2px; gap: 10px; }
  .card { padding: 20px; }
}
