:root {
  --bg: #0b1020; --bg2: #10172e; --card: #151d38; --line: #26315a;
  --text: #e9ecf8; --muted: #98a1c6;
  --accent: #a99bff; --accent-2: #7fd6c8; --warn: #ffb86b; --danger: #ff8f8f;
  --radius: 18px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; background: radial-gradient(120% 55% at 50% -10%, #1d2652 0%, var(--bg) 60%) fixed; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 650; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }

/* Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--safe-t) + 10px) 18px 10px;
  background: rgba(11, 16, 32, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { color: var(--text); font-weight: 700; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.sos-pill {
  background: rgba(255, 143, 143, .14); color: #ffb3b3; border: 1px solid rgba(255, 143, 143, .35);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
main { max-width: 560px; margin: 0 auto; padding: 4px 16px calc(100px + var(--safe-b)); }
.hello { padding: 14px 4px 6px; }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin-bottom: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.link { font-size: 14px; font-weight: 600; }

/* Compteur principal */
.hero { background: linear-gradient(160deg, #232d5e 0%, #151d38 72%); border-color: #303c74; text-align: center; padding: 26px 18px 18px; }
.counter { display: flex; flex-direction: column; align-items: center; }
.big {
  font-size: 84px; font-weight: 750; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #c9c1ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.unit { font-size: 18px; color: var(--muted); margin-top: 4px; }
.hero .sub { font-variant-numeric: tabular-nums; color: #c8cdea; margin: 8px 0 16px; font-size: 15px; }
.progress { height: 8px; background: rgba(255, 255, 255, .07); border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .6s; }
.progress-label { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 0; }
.stats.left { justify-content: flex-start; }
.stats:empty { display: none; }
.stats span { background: rgba(255, 255, 255, .06); padding: 6px 12px; border-radius: 99px; font-size: 14px; }

/* Petits compteurs */
.mini { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.mini-num { text-align: center; }
.mini-num span { display: block; font-size: 40px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.mini-num small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.mini .btn-ghost.small { margin-top: 10px; }

/* Boutons */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  background: var(--accent); color: #15112f; font-weight: 700; border: 0; border-radius: 14px;
  padding: 14px 20px; font-size: 16px; font-family: inherit; cursor: pointer;
}
.btn:active, .btn-ghost:active { transform: scale(.98); }
.btn-ghost {
  display: inline-flex; justify-content: center; align-items: center;
  background: rgba(255, 255, 255, .06); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 18px; font-size: 15px; font-family: inherit; cursor: pointer;
}
.btn-ghost.small { padding: 7px 14px; font-size: 13.5px; margin-top: 14px; color: var(--muted); }
.small-btn { padding: 12px 16px; flex: none !important; }
.wide { width: 100%; margin-top: 12px; }
.danger { color: var(--danger) !important; border-color: rgba(255, 143, 143, .35) !important; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.row > * { flex: 1; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Accueil */
.done { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.done-emoji { font-size: 26px; }
.msg { font-size: 18px; line-height: 1.5; margin: 0; }
.msg-card { background: linear-gradient(160deg, rgba(169, 155, 255, .13), rgba(127, 214, 200, .05)); border-color: rgba(169, 155, 255, .28); }
.reasons { margin: 0; padding: 0; list-style: none; }
.reasons li { padding: 10px 0 10px 26px; position: relative; border-top: 1px solid var(--line); }
.reasons li:first-child { border-top: 0; padding-top: 2px; }
.reasons li::before { content: "✦"; position: absolute; left: 2px; color: var(--accent); }
.sos-big {
  display: block; text-align: center; margin: 18px 0 6px; padding: 16px; border-radius: var(--radius);
  background: rgba(255, 143, 143, .1); border: 1px solid rgba(255, 143, 143, .3); color: #ffc2c2; font-weight: 600;
}

/* Barre d'onglets */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(11, 16, 32, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; padding: 4px 0; }
.tabbar a.active { color: var(--accent); }
.tabbar svg { width: 24px; height: 24px; }
body.onboarding .topbar, body.onboarding .tabbar { display: none; }

/* Formulaires */
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.field.inline { display: flex; align-items: center; gap: 12px; }
.field.inline > span { margin: 0; white-space: nowrap; }
.field.inline.card { margin: 12px 0; }
input, select, textarea {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; font-family: inherit; color-scheme: dark;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(169, 155, 255, .55); border-color: transparent; }
input[type=date], input[type=datetime-local] { min-height: 46px; -webkit-appearance: none; appearance: none; }
.stack > .card:first-child { margin-top: 8px; }

.moods, .scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood, .scale-btn {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 2px; color: var(--text);
  font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.mood span { font-size: 28px; line-height: 1.1; }
.scale-btn b { font-size: 18px; }
.mood small, .scale-btn small { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.mood.on, .scale-btn.on { background: rgba(169, 155, 255, .18); border-color: var(--accent); }
.mood.on small, .scale-btn.on small { color: var(--text); }

.range {
  -webkit-appearance: none; appearance: none; height: 8px; padding: 0; border: 0; border-radius: 99px; margin: 10px 0 0;
  background: linear-gradient(90deg, var(--accent-2), var(--warn), var(--danger));
}
.range:focus { outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
h2 output { float: right; font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); padding: 8px 14px; border-radius: 99px;
  font-size: 14.5px; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center;
}
.chip.on { background: rgba(127, 214, 200, .16); border-color: var(--accent-2); }
.chip.static { cursor: default; padding-right: 6px; }
.chip .x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 6px; margin-left: 4px; cursor: pointer; }
.chips-edit { margin: 12px 0 0; }

.seg { display: flex; gap: 8px; }
.seg.vertical { flex-direction: column; }
.seg-btn {
  flex: 1; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 12px;
  padding: 12px 14px; font-family: inherit; font-size: 15px; cursor: pointer; text-align: left;
}
.seg:not(.vertical) .seg-btn { text-align: center; }
.seg-btn.on { border-color: var(--accent); background: rgba(169, 155, 255, .14); }
.seg-btn small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0;
  border-top: 1px solid var(--line); cursor: pointer; position: relative;
}
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { flex: none; width: 50px; height: 30px; border-radius: 99px; background: #2a3460; position: relative; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { transform: translateX(20px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }

.list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text);
  font-family: inherit; font-size: 15px; text-align: left; width: 100%; cursor: pointer;
}
.list-item.static { cursor: default; }
.chev { color: var(--muted); font-size: 22px; }
.badge { font-size: 11px; background: rgba(169, 155, 255, .2); color: var(--accent); padding: 2px 8px; border-radius: 99px; vertical-align: middle; font-weight: 600; }
.badge.off { background: rgba(255, 255, 255, .08); color: var(--muted); }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer; flex: none; }
.steps { margin: 6px 0 0; padding-left: 20px; font-size: 14.5px; }
.steps li { margin: 7px 0; }

/* Historique */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.grid2 .card { margin: 0; }
.stat-val { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.chart { width: 100%; height: auto; display: block; margin-top: 4px; }
.chart .grid { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart .l-mood { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .l-crav { fill: none; stroke: var(--warn); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.chart .d-mood { fill: var(--accent); }
.chart .d-crav { fill: var(--warn); }
.chart .relapse { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 3 3; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-mood::before { background: var(--accent); }
.lg-crav::before { background: var(--warn); }
.lg-relapse::before { background: var(--danger); border-radius: 2px; width: 3px; }
.bars { list-style: none; margin: 0 0 8px; padding: 0; }
.bars li { display: grid; grid-template-columns: 112px 1fr 24px; gap: 10px; align-items: center; font-size: 14px; margin: 9px 0; }
.bars .track { background: rgba(255, 255, 255, .06); border-radius: 99px; height: 8px; overflow: hidden; }
.bars .b { display: block; height: 100%; border-radius: 99px; background: var(--accent-2); }
.entry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.entry-date { font-weight: 650; }
.entry-mood { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: #cfd4ee; }
.tag.trig { background: rgba(127, 214, 200, .13); }
.tag.sym { background: rgba(255, 184, 107, .13); }
.note, .win { margin: 10px 0 0; white-space: pre-wrap; font-size: 15px; }
.win { color: #d9d3ff; }
.empty { text-align: center; padding: 28px 18px; }
.emoji-xl { font-size: 52px; line-height: 1.1; margin-bottom: 8px; }
.h-xl { font-size: 30px; margin: 4px 0 10px; }
.hint { font-size: 14.5px; background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; text-align: left; }

/* Fenêtre modale */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 18, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + var(--safe-b));
}
.modal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px;
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; animation: up .25s ease;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { .modal { align-items: center; } }
body.modal-open { overflow: hidden; }
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%);
  background: #2c3767; color: var(--text); padding: 10px 18px; border-radius: 99px; z-index: 60;
  font-size: 14.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); white-space: nowrap;
}

/* Trousse de secours */
.breath { position: relative; height: 220px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.breath-circle {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 155, 255, .55), rgba(127, 214, 200, .14) 70%);
  transform: scale(.55); transition: transform 1s ease;
}
.breath-circle.in { transform: scale(1); transition: transform 4s ease-in-out; }
.breath-circle.out { transform: scale(.55); transition: transform 6s ease-in-out; }
.breath-text { position: relative; font-size: 20px; font-weight: 600; }
.wave-time { font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.todo { margin: 0; padding-left: 20px; }
.todo li { margin: 6px 0; }
.help { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); }
.help:first-of-type { border-top: 0; }
.help-num { color: var(--accent); font-weight: 700; white-space: nowrap; }
.call { margin: 4px 0 0; }

/* Premier lancement */
.onb { padding-top: calc(var(--safe-t) + 28px); }
.onb h1 { margin-top: 14px; }
.onb-logo { border-radius: 18px; display: block; }
.reason-in { margin-top: 10px; }
.celebrate .emoji-xl { animation: pop .6s ease; }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ===== v2 ===== */
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; }
.sub-actions { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.sub-actions .btn-ghost.small { margin-top: 0; }
.btn-win {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(127, 214, 200, .14); color: #b9f0e6; border: 1px solid rgba(127, 214, 200, .4);
  border-radius: 14px; padding: 11px 18px; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer;
}
.btn-win span { font-size: 17px; }
.btn-win.wide { margin-top: 14px; }
.btn-win:active { transform: scale(.98); }

.mini { display: block; }
.mini-top { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.mini .stats { margin-top: 12px; }
.mini .sub-actions { justify-content: flex-start; }

.done-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.done-row .done { margin: 0; }
.week-cta { display: flex; justify-content: space-between; align-items: center; color: var(--text); border-color: rgba(169, 155, 255, .4); background: linear-gradient(160deg, rgba(169, 155, 255, .16), var(--card)); }
.banner { background: rgba(127, 214, 200, .12); border: 1px solid rgba(127, 214, 200, .3); color: #c4f2ea; border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 15px; }

/* Calendrier */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head .icon-btn:disabled { opacity: .25; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.cal-cell {
  position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .04);
  color: var(--muted); font: inherit; font-size: 13px; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
.cal-cell.empty { background: none; cursor: default; }
.cal-cell.filled { background: color-mix(in srgb, var(--c) 38%, transparent); color: #fff; font-weight: 650; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.future { opacity: .35; cursor: default; }
.cal-relapse { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--danger); display: block; }
.cal-win { position: absolute; top: 2px; right: 4px; font-size: 9px; font-style: normal; color: #b9f0e6; line-height: 1; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.cal-legend .cal-relapse, .cal-legend .cal-win { position: static; transform: none; }
.sw-mood { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #e5737a, #8c86c9, #7fe0c4); display: inline-block; }

/* Récompense & regagné */
.reward-name { font-size: 20px; font-weight: 700; margin: 2px 0 12px; }
.reward-card.ready { border-color: rgba(255, 207, 120, .5); background: linear-gradient(160deg, rgba(255, 207, 120, .14), var(--card)); }
.bar.gold { background: linear-gradient(90deg, #ffcf78, #ffb86b); }
.gains { list-style: none; margin: 0; padding: 0; }
.gains li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.gains li:first-child { border-top: 0; padding-top: 0; }
.gains li span:nth-child(2) { flex: 1; }
.gains small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.gain-check { width: 22px; height: 22px; border-radius: 50%; background: rgba(127, 214, 200, .18); color: var(--accent-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }

/* Parcours en étapes */
.wiz-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.wiz-dots span { width: 22px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.wiz-dots span.done { background: rgba(169, 155, 255, .5); }
.wiz-dots span.on { background: var(--accent); }
.wiz-title { font-size: 22px; margin-bottom: 6px; }
.wiz-body { margin: 16px 0 4px; }
.wiz-nav { margin-top: 18px; }
.big-choices { display: grid; gap: 10px; }
.big-choices.row3 { grid-template-columns: repeat(3, 1fr); }
.big-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--text); font: inherit; cursor: pointer;
}
.row3 .big-choice { align-items: center; text-align: center; padding: 16px 8px; }
.big-choice strong { font-size: 16.5px; }
.big-choice small { color: var(--muted); font-size: 13px; }
.big-choice.on { border-color: var(--accent); background: rgba(169, 155, 255, .16); }
.lvl { font-size: 14px; letter-spacing: 3px; color: var(--accent-2); }
.lvl-2 { color: var(--warn); } .lvl-3 { color: var(--danger); }
.still-here { display: block; margin-top: 14px; font-size: 14px; color: #ffb3b3; }
.chips.big .chip { padding: 12px 16px; font-size: 15.5px; }
.chips.readonly .chip { pointer-events: none; }
details.when { margin-top: 14px; }
details.when summary, .note-box summary { color: var(--muted); font-size: 14px; cursor: pointer; }
.note-box summary { font-size: 15px; color: var(--text); font-weight: 600; }
.note-box[open] summary { margin-bottom: 12px; }
.plan-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin: 14px 0 8px; }
.plan-pill { background: rgba(169, 155, 255, .12); border: 1px solid rgba(169, 155, 255, .3); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; margin: 10px 0 0; text-align: left; }
.adaptive { border-color: rgba(169, 155, 255, .35); }
.link-btn.expand { display: block; margin-top: 14px; }
.tag.why { background: rgba(169, 155, 255, .16); }
.tag.held { background: rgba(127, 214, 200, .2); }

/* Réglages */
.set-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.set-nav::-webkit-scrollbar { display: none; }
.set-nav .chip { white-space: nowrap; color: var(--text); font-size: 13.5px; padding: 7px 12px; }
.self-audio { width: 100%; margin: 10px 0 4px; }
.self-card { border-color: rgba(127, 214, 200, .4); background: linear-gradient(160deg, rgba(127, 214, 200, .12), var(--card)); }
.letter { white-space: pre-wrap; font-size: 16px; line-height: 1.55; margin: 8px 0 0; }
.rec-btn { width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgba(255, 143, 143, .6); background: none; margin: 18px auto 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rec-btn span { width: 56px; height: 56px; border-radius: 50%; background: var(--danger); transition: all .2s; }
.rec-btn.on span { width: 30px; height: 30px; border-radius: 8px; }
.rec-btn.on { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 143, 143, .4); } 50% { box-shadow: 0 0 0 12px rgba(255, 143, 143, 0); } }
.rec-time { color: var(--muted); font-size: 14px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }

/* Bilan de la semaine */
.week-bars { display: flex; justify-content: space-between; align-items: flex-end; height: 120px; gap: 6px; padding: 0 4px; }
.wb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.wb-bar { width: 100%; max-width: 30px; border-radius: 8px; background: var(--accent); }
.wb-bar.empty { background: rgba(255, 255, 255, .08); }
.wb span { font-size: 12px; color: var(--muted); }
.wb .cal-relapse { position: static; transform: none; }
.small-val { font-size: 18px; }

/* Verrouillage */
.lock { position: fixed; inset: 0; z-index: 100; background: radial-gradient(120% 60% at 50% 0%, #1d2652 0%, var(--bg) 65%); display: flex; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 20px); }
.lock-inner { text-align: center; width: 100%; max-width: 320px; }
.lock-logo { border-radius: 16px; margin-bottom: 12px; }
body.locked { overflow: hidden; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 20px 0 26px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); transition: background .1s; }
.pin-dots span.on { background: var(--accent); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; justify-content: center; margin-bottom: 18px; }
.key { width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--text); font: inherit; font-size: 26px; font-weight: 500; cursor: pointer; }
.key:active { background: rgba(169, 155, 255, .35); }

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