/* IGUBENTO : ivoire, encre, rouge amour et vert pomme en touches. Épuré, tendre. */
:root {
  --bg: #FAF6F1;
  --paper: #FFFDFB;
  --ink: #211A1B;
  --ink-2: #6F6466;
  --ink-3: #A99E9D;
  --line: #EAE1D8;
  --line-2: #F3ECE5;
  --red: #C3343B;
  --red-ink: #9E232B;
  --blush: #F6E6E2;
  --blush-2: #FBF2EF;
  --green: #86A95A;
  --green-ink: #4E6B2C;
  --green-soft: #EEF3E5;
  --gold: #C9A46A;
  --gold-soft: #F5EDE0;
  --igu: #C3343B;
  --bento: #86A95A;
  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 1px 2px rgba(33, 26, 27, .04), 0 10px 30px -18px rgba(33, 26, 27, .18);
  --shadow-lg: 0 24px 60px -24px rgba(33, 26, 27, .35);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 450; line-height: 1.12; letter-spacing: -0.015em; font-optical-sizing: auto; }
b, strong { font-weight: 600; }
.ic { flex: none; }
.heart-on { color: var(--red); }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 16px) 20px calc(var(--tabbar-h) + var(--safe-b) + 36px);
}
body.immersive #app { padding-bottom: calc(var(--safe-b) + 32px); }
.screen { display: flex; flex-direction: column; gap: 18px; }
.view { display: flex; flex-direction: column; gap: 18px; animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- En-tête ---------- */
.brand-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand img { width: 28px; height: 28px; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 15px; letter-spacing: .26em; padding-left: .1em; }
.wordmark.big { font-size: 24px; }
.head-actions { display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 50%; color: var(--ink); border: 1px solid var(--line); background: var(--paper);
  transition: background .2s, transform .1s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.avatar {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-family: var(--serif); font-size: 17px; color: #fff; background: var(--igu); flex: none;
}
.avatar.bento { background: var(--bento); }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }
.avatar.lg { width: 76px; height: 76px; font-size: 32px; }

.page-head { display: flex; align-items: flex-start; gap: 12px; padding-top: 2px; }
.page-head > div { flex: 1; min-width: 0; }
.page-head h1 { font-size: 34px; }
.page-head p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.kicker { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-3); }
.kicker.red { color: var(--red); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.sec-title { font-family: var(--serif); font-size: 22px; font-weight: 450; margin: 8px 0 -6px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec-title small { font-family: var(--sans); font-size: 13px; color: var(--ink-3); font-weight: 500; }
.lead { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--ink); font-weight: 350; }
.sticky-head { position: sticky; top: 0; z-index: 5; margin: -16px -20px 0; padding: calc(var(--safe-t) + 10px) 20px 12px; background: var(--bg); border-bottom: 1px solid var(--line-2); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; line-height: 1.15; text-align: center; letter-spacing: .005em;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  transition: transform .1s, background .2s, opacity .2s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn.big { min-height: 56px; font-size: 16.5px; }
.btn.sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn.grow, .grow { flex: 1; }
.btn.dashed { border-style: dashed; background: transparent; color: var(--ink-2); }
.danger { color: var(--red-ink) !important; }
.armed { background: var(--red) !important; border-color: var(--red) !important; color: #fff !important; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 2px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.link-btn.center { display: flex; margin: 0 auto; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.row-btns > * { flex: 1 1 130px; }
.fab {
  position: fixed; right: max(20px, calc(50vw - 260px)); bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
}
.fab:active { transform: scale(.95); }

/* ---------- Cartes ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.soft { background: var(--blush-2); border-color: #F1E1DC; }
.card h2 { font-size: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.empty-card { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 34px 20px; color: var(--ink-2); }
.empty-card .ic { color: var(--ink-3); }
.empty-line { color: var(--ink-3); font-size: 14.5px; padding: 2px 2px 6px; }
.big-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--blush); color: var(--red); margin: 0 auto; }

/* ---------- Puces et segments ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.red { background: var(--blush); color: var(--red-ink); }
.chip.green { background: var(--green-soft); color: var(--green-ink); }
.chip.gold { background: var(--gold-soft); color: #7D6234; }
.chip.ink { background: var(--ink); color: var(--bg); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none; padding: 8px 15px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--paper); white-space: nowrap; transition: all .15s;
}
.chip-btn.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.segmented { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--line-2); }
.segmented a, .segmented button { flex: 1; text-align: center; padding: 9px 6px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: all .2s; white-space: nowrap; }
.segmented .on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(33, 26, 27, .1); }
.tag-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px; vertical-align: 1px; }

/* ---------- Accueil ---------- */
.hello h1 { font-size: 36px; }
.hello h1 em { font-style: italic; color: var(--red); }
.hello p { color: var(--ink-2); margin-top: 6px; }
.globe-card { position: relative; border-radius: 28px; padding: 4px 4px 16px; }
.globe-box { position: relative; aspect-ratio: 1 / 1; width: 100%; max-height: 520px; margin: 0 auto; }
.globe-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#globe-fx { touch-action: none; cursor: grab; }
#globe-fx:active { cursor: grabbing; }
.globe-loading { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--ink-3); font-size: 14px; }
.globe-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 14px; }
.globe-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.globe-actions { display: flex; gap: 10px; padding: 0 8px; }
.globe-actions .btn { flex: 1; padding-inline: 14px; }

.week-card { display: flex; flex-direction: column; gap: 14px; }
.week-card .why { font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.week-card .why b { color: var(--ink); font-weight: 600; }
.week-flag { font-size: 52px; line-height: 1; }
.week-row { display: flex; align-items: center; gap: 16px; }
.week-row h2 { font-size: 32px; }
.how { display: flex; flex-direction: column; gap: 10px; padding: 14px 0 2px; border-top: 1px solid var(--line-2); }
.how div { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.how div span:first-child { font-family: var(--serif); font-style: italic; color: var(--red); }
.thin-bar { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.thin-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--ink); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.thin-bar.red > i { background: var(--red); }
.thin-bar.green > i { background: var(--green); }
.thin-bar.over > i { background: var(--gold); }
.seg-line { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.seg-line i { height: 4px; border-radius: 2px; background: var(--line-2); }
.seg-line i.on { background: var(--green); }
.prog-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }

.progress-card .pc-num { font-family: var(--serif); font-size: 64px; line-height: .95; font-weight: 350; letter-spacing: -.03em; }
.progress-card .pc-num small { font-size: 22px; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.progress-card .pc-sub { color: var(--ink-2); font-size: 14.5px; margin: 8px 0 16px; }
.conts { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.cont-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.cont-line span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.menu-banner { display: flex; align-items: center; gap: 14px; border-color: #EFD2CD; background: var(--blush-2); }
.menu-banner > .ic { color: var(--red); }
.menu-banner small { display: block; color: var(--ink-2); }
.chev { margin-left: auto; color: var(--ink-3); }

/* ---------- Feuille du bas ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.sheet-root.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(33, 26, 27, .32); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 8px 22px calc(var(--safe-b) + 24px);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .9, .25, 1);
  box-shadow: var(--shadow-lg);
}
.sheet-wide { max-height: 94dvh; }
.sheet-root.in .sheet { transform: none; }
.sheet-root.in .sheet-backdrop { opacity: 1; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 6px auto 16px; cursor: pointer; }
.sheet-body { display: flex; flex-direction: column; gap: 16px; }
.sheet-body h2 { font-size: 28px; }
.sheet-actions { display: flex; flex-direction: column; gap: 10px; }
.cs-head { display: flex; align-items: center; gap: 16px; }
.cs-flag { font-size: 56px; line-height: 1; }
.draw-result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dr-flag { font-size: 84px; line-height: 1.1; animation: appear .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.draw-result h2 { font-size: 40px !important; }
@keyframes appear { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast et cœurs ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px); z-index: 80;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 500; font-size: 14.5px;
  max-width: calc(100vw - 40px); width: max-content; text-align: center; transition: all .3s ease; box-shadow: var(--shadow-lg);
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
body.immersive #toast { bottom: calc(var(--safe-b) + 96px); }
#confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; width: 100vw; height: 100vh; }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-b) + 10px); width: min(calc(100% - 28px), 500px); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px;
  background: rgba(255, 253, 251, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 12px 30px -16px rgba(33, 26, 27, .3);
  transition: transform .3s, opacity .3s;
}
body.immersive .tabbar { transform: translate(-50%, 150%); opacity: 0; pointer-events: none; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; color: var(--ink-3); font-size: 11px; font-weight: 500; transition: color .2s; }
.tab .ic { width: 23px; height: 23px; }
.tab.on { color: var(--ink); }
.tab.on::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--red); }
.tab-badge { position: absolute; top: 3px; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--paper); }

/* ---------- Listes ---------- */
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0 18px; color: var(--ink-3); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-height: 48px; font-size: 16px; color: var(--ink); }
.list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 13px 2px; border-bottom: 1px solid var(--line); background: none; }
.row:active { background: var(--line-2); }
.row .r-flag { font-size: 28px; line-height: 1; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-main b { display: block; font-weight: 500; }
.row .r-main small { display: block; color: var(--ink-3); font-size: 13.5px; }
.row .r-side { display: flex; gap: 6px; align-items: center; color: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.red { background: var(--red); }
.dot.green { background: var(--green); }
.dot.gold { background: var(--gold); }
.empty { text-align: center; padding: 30px; color: var(--ink-3); }

/* ---------- Fiche pays ---------- */
.fiche-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fiche-hero { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 4px; }
.fh-flag { font-size: 72px; line-height: 1; }
.fiche-hero h1 { font-size: 52px; font-weight: 400; }
.fh-sub { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 18px; }
.fh-hook { font-family: var(--serif); font-size: 20px; line-height: 1.45; font-weight: 350; margin-top: 4px; }
.fh-progress { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.chap-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.chap-row { display: flex; align-items: center; gap: 16px; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.chap-row:active { background: var(--line-2); }
.chap-num { font-family: var(--serif); font-size: 15px; color: var(--ink-3); width: 24px; font-variant-numeric: tabular-nums; }
.chap-title { flex: 1; font-size: 16.5px; }
.chap-state { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.chap-row.is-read .chap-state { background: var(--green); border-color: var(--green); color: #fff; }
.chap-row.is-read .chap-title { color: var(--ink-2); }
.chap-row.quiz .chap-title { font-family: var(--serif); font-size: 20px; }
.chap-row.quiz .chap-state { border-color: var(--red); color: var(--red); }
.chap-row.locked { opacity: .5; }
.taste-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.taste { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; transition: all .15s; text-align: left; }
.taste i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--ink-3); display: grid; place-items: center; font-style: normal; flex: none; color: transparent; }
.taste.on { background: var(--green-soft); border-color: #D2E0BE; color: var(--green-ink); }
.taste.on i { background: var(--green); border-color: var(--green); color: #fff; }
.taste small { display: none; }
.taste b { font-weight: 500; }
.vivre-list { display: flex; flex-direction: column; margin-top: 10px; }
.vivre { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.vivre > div { flex: 1; }
.vivre b { font-weight: 500; }
.vivre small { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.notes { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--paper); resize: vertical; outline: none; font-size: 16px; margin-top: 10px; }
.notes:focus { border-color: var(--ink-3); }
.fiche-actions { display: flex; flex-direction: column; gap: 10px; }
.sources { font-size: 12px; color: var(--ink-3); line-height: 1.5; }

/* ---------- Lecteur ---------- */
.reader { display: flex; flex-direction: column; gap: 18px; }
.reader-top { display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 5; margin: -16px -20px 0; padding: calc(var(--safe-t) + 10px) 20px 12px; background: var(--bg); }
.segments { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.segments a { height: 3px; border-radius: 2px; background: var(--line); }
.segments a.on { background: var(--green); }
.segments a.cur { background: var(--ink); }
.reader-flag { font-size: 22px; }
.reader-head { padding: 18px 0 6px; }
.rh-num { font-family: var(--serif); font-style: italic; color: var(--red); font-size: 18px; }
.reader-head h1 { font-size: 40px; margin-top: 4px; }
.rh-intro { font-family: var(--serif); font-size: 19px; font-weight: 350; color: var(--ink-2); margin-top: 12px; line-height: 1.5; }
.blocks { display: flex; flex-direction: column; gap: 16px; }
.b-p { font-size: 16.5px; line-height: 1.75; }
.b-h { font-family: var(--serif); font-size: 24px; font-weight: 450; margin-top: 18px; }
.b-facts { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 36% 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.f-k { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding-top: 3px; }
.f-v { font-size: 15.5px; line-height: 1.5; }
.b-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.b-list li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.65; }
.b-list li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--red); }
.b-cards { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mini-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.mini-card b { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.mini-card p { font-size: 15px; color: var(--ink-2); line-height: 1.6; margin-top: 3px; }
.b-time { list-style: none; position: relative; display: flex; flex-direction: column; padding-left: 4px; }
.b-time::before { content: ''; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.b-time li { position: relative; padding: 6px 0 14px 28px; }
.b-time li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--red); }
.tl-d { font-family: var(--serif); font-style: italic; color: var(--red); font-size: 15px; }
.b-time b { display: block; font-weight: 600; font-size: 16px; margin-top: 1px; }
.b-time p { font-size: 15px; color: var(--ink-2); line-height: 1.55; margin-top: 2px; }
.b-tip { border-left: 2px solid var(--red); padding: 4px 0 4px 18px; font-family: var(--serif); font-size: 18px; line-height: 1.55; font-weight: 350; }
.b-tip strong { font-weight: 550; }
.b-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { padding: 16px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--ink-2); line-height: 1.35; display: block; margin-top: 6px; }
.b-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.b-tags span { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.b-taste { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.b-taste .kicker { padding: 14px 0 4px; }
.b-taste .taste { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 13px 0; display: grid; grid-template-columns: 1fr 22px; grid-template-areas: 'b i' 's i'; gap: 2px 12px; }
.b-taste .taste b { grid-area: b; font-weight: 500; font-size: 16px; }
.b-taste .taste small { grid-area: s; display: block; font-size: 14px; color: var(--ink-2); }
.b-taste .taste i { grid-area: i; align-self: center; width: 22px; height: 22px; }
.b-taste .taste.on { background: none; color: var(--ink); }
.b-anec { display: flex; flex-direction: column; gap: 12px; }
.anec { position: relative; display: grid; perspective: 900px; text-align: left; }
.anec-front, .anec-back {
  grid-area: 1 / 1; border-radius: 20px; padding: 22px; min-height: 140px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform .6s cubic-bezier(.3, 1.1, .4, 1); display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.anec-front { background: var(--paper); border: 1px solid var(--line); }
.anec:nth-child(3n+2) .anec-front { background: var(--blush-2); border-color: #F1E1DC; }
.anec:nth-child(3n) .anec-front { background: var(--green-soft); border-color: #E1EAD3; }
.anec-back { background: var(--ink); color: var(--bg); transform: rotateY(180deg); }
.anec.flipped .anec-front { transform: rotateY(-180deg); }
.anec.flipped .anec-back { transform: rotateY(0); }
.an-num { font-family: var(--serif); font-style: italic; color: var(--red); font-size: 16px; }
.anec-front b { font-family: var(--serif); font-size: 22px; font-weight: 450; line-height: 1.2; }
.anec-front small { color: var(--ink-3); font-size: 13px; }
.anec-back p { font-size: 15.5px; line-height: 1.6; }
.b-big3 { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.big3 { padding: 22px 0; border-bottom: 1px solid var(--line); animation: fade .6s calc(var(--i) * .15s) both; }
.big3 b { display: block; font-family: var(--serif); font-size: 58px; line-height: 1; font-weight: 300; letter-spacing: -.02em; color: var(--red); }
.big3:nth-child(2) b { color: var(--green-ink); }
.big3:nth-child(3) b { color: var(--ink); }
.big3 span { font-size: 15.5px; display: block; margin-top: 8px; color: var(--ink-2); }
.reader-foot { position: sticky; bottom: calc(var(--safe-b) + 14px); display: flex; gap: 10px; margin-top: 12px; z-index: 4; }
.reader-foot .btn { box-shadow: 0 12px 28px -14px rgba(33, 26, 27, .5); }
.reader-foot .square { width: 50px; padding: 0; flex: none; background: var(--paper); }

/* ---------- Quiz ---------- */
.quiz { display: flex; flex-direction: column; gap: 18px; min-height: 80dvh; }
.quiz-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.quiz-bar div { height: 100%; background: var(--ink); transition: width .5s; }
.quiz-score { font-family: var(--serif); font-size: 16px; color: var(--ink-2); }
.quiz-q { font-size: 32px; padding: 6px 0; }
.quiz-choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 18px; min-height: 58px; border-radius: 18px; background: var(--paper); font-size: 16px; border: 1px solid var(--line); transition: all .2s; }
.choice:active:not(:disabled) { transform: scale(.99); }
.ch-l { font-family: var(--serif); font-style: italic; color: var(--ink-3); width: 18px; }
.choice.good { border-color: var(--green); background: var(--green-soft); }
.choice.good .ch-l { color: var(--green-ink); }
.choice.bad { border-color: var(--red); background: var(--blush-2); }
.choice.bad .ch-l { color: var(--red); }
.choice.dim { opacity: .45; }
.quiz-feedback { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; animation: fade .3s both; }
.quiz-feedback b { font-family: var(--serif); font-size: 22px; font-weight: 450; }
.quiz-feedback.ok b { color: var(--green-ink); }
.quiz-feedback.ko b { color: var(--red); }
.quiz-end { align-items: center; text-align: center; }
.quiz-end .reader-top { align-self: stretch; }
.qe-hearts { display: flex; gap: 8px; margin-top: 30px; color: var(--line); }
.qe-hearts .on { color: var(--red); animation: appear .5s calc(var(--i) * .15s) both; }
.qe-score { font-family: var(--serif); font-size: 26px; color: var(--ink-3); }
.qe-score b { font-size: 80px; font-weight: 300; color: var(--ink); }
.quiz-end h1 { font-size: 30px; }
.qe-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.celebrate { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 10px 0 6px; }
.cel-flag { font-size: 92px; line-height: 1.1; animation: appear .8s cubic-bezier(.2, .9, .3, 1.2) both; }
.celebrate h2 { font-size: 40px !important; }
.cel-count { color: var(--ink-2); margin-bottom: 10px; }

/* ---------- Notes ---------- */
.note-form { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line); background: var(--paper); border-radius: 22px; padding: 7px 7px 7px 16px; }
.note-form textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; line-height: 1.5; padding: 7px 0; max-height: 140px; min-height: 38px; }
.note-form .icon-btn { width: 38px; height: 38px; }
.note-form-wrap { display: flex; flex-direction: column; gap: 10px; }
.note-extra { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0 16px; color: var(--ink-2); }
.note-extra input { flex: 1; border: 0; outline: 0; background: transparent; min-height: 44px; font-size: 16px; }
.note-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.note-links .chip { gap: 5px; }
.segmented.sub { background: transparent; border: 1px solid var(--line); }
.segmented.sub .on { background: var(--ink); color: var(--bg); box-shadow: none; }
.note-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; }
.note-tags .chip-btn { padding: 6px 12px; font-size: 13px; }
.notes-list { display: flex; flex-direction: column; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 15px 2px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.note:first-child { border-top: 1px solid var(--line); }
.note-check { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--ink-3); display: grid; place-items: center; flex: none; margin-top: 1px; color: transparent; }
.note.done .note-check { background: var(--green); border-color: var(--green); color: #fff; }
.note.done .note-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.note-main { flex: 1; min-width: 0; }
.note-text { font-size: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.note-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.note-meta .who { display: inline-flex; align-items: center; gap: 5px; }
.note-meta .who::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--igu); }
.note-meta .who.bento::before { background: var(--bento); }
.note-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

/* ---------- Sorties ---------- */
.we-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.we-head h2 { font-size: 26px; }
.we-list { display: flex; flex-direction: column; }
.event { display: grid; grid-template-columns: 84px 1fr; gap: 14px; text-align: left; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; }
.event img, .event .ev-ph { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; background: var(--line-2); }
.event b { display: block; font-weight: 500; line-height: 1.35; }
.event small { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 3px; line-height: 1.4; }
.event .ev-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ev-detail img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 18px; }
.ev-detail p { font-size: 15.5px; color: var(--ink-2); line-height: 1.6; }
.source-links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.source-links a { display: flex; align-items: center; justify-content: space-between; padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.source-links a .ic { color: var(--ink-3); }
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.idea { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); min-height: 128px; position: relative; }
.idea .idea-cat { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-right: 24px; }
.idea b { font-family: var(--serif); font-weight: 450; font-size: 17.5px; line-height: 1.25; }
.idea .idea-meta { font-size: 12.5px; color: var(--ink-3); margin-top: auto; }
.idea.is-done { opacity: .55; }
.idea .idea-fav { position: absolute; top: 12px; right: 12px; color: var(--ink-3); }
.idea .idea-fav.on { color: var(--red); }
.slot { height: 88px; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.slot-reel { display: flex; flex-direction: column; transition: transform 1.6s cubic-bezier(.15, .85, .25, 1.02); }
.slot-reel span { height: 88px; display: grid; place-items: center; font-family: var(--serif); font-size: 21px; padding: 0 16px; text-align: center; }
.slot-result { text-align: center; display: flex; flex-direction: column; gap: 10px; animation: fade .35s both; }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; }
.field, .form label { display: flex; flex-direction: column; gap: 7px; }
.field > span, .form label > span { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.field small, .form label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.form input:not([type=radio]):not([type=checkbox]):not([type=file]), .form select, .form textarea, .field input:not([type=radio]):not([type=checkbox]), .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); outline: none; font-size: 16px; transition: border-color .15s;
}
.form textarea, .field textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink-3); }
.form label.grow { flex: 1; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { cursor: pointer; }
.chip-radio input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; color: var(--ink-2) !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.chip-radio input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg) !important; }
.seg { display: flex; background: var(--line-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg label { flex: 1; position: relative; }
.seg span { display: grid; place-items: center; min-height: 38px; border-radius: 999px; font-size: 14px; color: var(--ink-2) !important; cursor: pointer; text-align: center; padding: 0 8px; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.seg input:checked + span { background: var(--paper); color: var(--ink) !important; box-shadow: 0 1px 3px rgba(33, 26, 27, .1); }
.hint { font-size: 14.5px; color: var(--ink-2); }
.code-input { text-align: center; font-family: var(--serif) !important; font-size: 26px !important; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Menu du jour (rendez-vous) ---------- */
.menu-hero { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.menu-hero b { font-family: var(--serif); font-size: 21px; font-weight: 400; display: block; line-height: 1.2; }
.menu-hero small { opacity: .7; }
.menu-hero .ic { color: #F2B8B3; }
.menu-card { display: flex; align-items: center; gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.menu-card.todo .mc-date b { color: var(--red); }
.mc-date { width: 48px; text-align: center; line-height: 1; flex: none; }
.mc-date b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.mc-date small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.mc-main { flex: 1; min-width: 0; }
.mc-main b { display: block; font-weight: 500; }
.mc-main small { color: var(--ink-3); font-size: 13.5px; }
.status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.s-ok { background: var(--green-soft); color: var(--green-ink); }
.s-wait { background: var(--gold-soft); color: #7D6234; }
.s-old { background: var(--line-2); color: var(--ink-3); }
.s-todo { background: var(--red); color: #fff; }
.past summary { cursor: pointer; color: var(--ink-2); padding: 8px 0; font-size: 14.5px; }
.moment { display: flex; flex-direction: column; gap: 12px; }
.moment-head { display: flex; align-items: center; gap: 8px; }
.m-nom { flex: 1; min-width: 0; font-family: var(--serif); font-size: 22px; border: 0; border-bottom: 1px solid transparent; background: transparent; outline: none; padding: 4px 0; }
.m-nom:focus { border-bottom-color: var(--line); }
.moment-time { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
.m-heure { min-height: 38px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; outline: none; }
.opts { display: flex; flex-direction: column; }
.opt-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.opt-main { flex: 1; min-width: 0; text-align: left; }
.opt-main b { display: block; font-weight: 500; }
.opt-main small { color: var(--ink-3); font-size: 13px; }
.add-opt { display: flex; align-items: center; gap: 8px; min-height: 46px; color: var(--ink-2); font-size: 14.5px; border-top: 1px solid var(--line-2); width: 100%; }
.editor-foot { position: sticky; bottom: calc(var(--safe-b) + 14px); display: flex; gap: 10px; z-index: 4; }
.editor-foot .btn { box-shadow: 0 12px 28px -14px rgba(33, 26, 27, .5); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.pick b { font-weight: 500; }
.pick small { color: var(--ink-3); }
.pick.on { border-color: var(--ink); }
.idea-pick { display: flex; flex-direction: column; max-height: 46dvh; overflow-y: auto; margin-top: 4px; }
.ip-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; text-align: left; border-bottom: 1px solid var(--line); width: 100%; }
.ip-row > span:first-child { flex: 1; min-width: 0; }
.ip-row b { display: block; font-weight: 500; }
.ip-row small { color: var(--ink-3); font-size: 13px; }
.ip-row .ic { color: var(--ink-3); }
.tabs2 { display: flex; background: var(--line-2); border-radius: 999px; padding: 4px; }
.tabs2 button { flex: 1; min-height: 38px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.tabs2 button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(33, 26, 27, .1); }
.paper { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 30px 22px 20px; }
.paper::before { content: ''; position: absolute; inset: 7px; border: 1px solid var(--line-2); border-radius: 18px; pointer-events: none; }
.paper > * { position: relative; }
.paper-top { text-align: center; padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.paper-kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--red); }
.paper h2 { font-size: 34px; font-weight: 400; margin-top: 6px; }
.paper-date { color: var(--ink-2); margin-top: 4px; }
.paper-date::first-letter { text-transform: uppercase; }
.paper-by { font-family: var(--serif); font-style: italic; color: var(--ink-3); font-size: 15px; }
.paper-mot { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); margin-top: 12px; line-height: 1.45; }
.course { padding: 14px 0 4px; }
.course-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.course-head b { font-family: var(--serif); font-size: 21px; font-weight: 450; }
.course-head i { flex: 1; border-bottom: 1px dotted var(--ink-3); transform: translateY(-4px); }
.course-head em { font-style: normal; font-family: var(--serif); font-size: 16px; color: var(--red); }
.course-opts { display: flex; flex-direction: column; gap: 8px; }
.dish { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line-2); text-align: left; transition: all .2s; width: 100%; }
.dish-main { flex: 1; min-width: 0; }
.dish-main b { display: block; font-weight: 500; }
.dish-main small { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.dish-meta { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.dish-check { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid var(--ink-3); display: grid; place-items: center; color: transparent; }
.dish.sel { border-color: var(--red); background: var(--blush-2); }
.dish.sel .dish-check { background: var(--red); border-color: var(--red); color: #fff; }
.dish.dim { opacity: .5; }
.dish:disabled { cursor: default; }
.dish.skip { background: transparent; border-style: dashed; padding: 9px 14px; }
.answer-card { display: flex; flex-direction: column; gap: 14px; }
.timeline { list-style: none; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.tl-h { font-family: var(--serif); font-size: 18px; color: var(--red); }
.timeline b { display: block; font-weight: 500; }
.timeline small { color: var(--ink-3); display: block; font-size: 13.5px; }
.timeline .skip { opacity: .5; }
.tl-link { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); }
.wait-card { display: flex; align-items: center; gap: 14px; }
.wait-card > .ic { color: var(--gold); }
.wait-card small { display: block; color: var(--ink-2); }
.gcal summary { cursor: pointer; color: var(--ink-2); padding: 8px 0; text-align: center; font-size: 14.5px; }

/* ---------- Repas (nutrition) ---------- */
.gate { display: flex; flex-direction: column; gap: 14px; padding-top: 10px; }
.gate h1 { font-size: 40px; }
.who-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.who-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 12px 20px; border-radius: 24px; border: 1px solid var(--line); background: var(--paper); text-align: center; transition: transform .15s, border-color .2s; }
.who-card:active { transform: scale(.98); }
.who-card b { font-family: var(--serif); font-size: 24px; font-weight: 450; }
.who-card small { color: var(--ink-3); font-size: 13px; }
.who-card.ok small { color: var(--green-ink); }
.q-steps { display: flex; gap: 6px; }
.q-steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.q-steps i.on { background: var(--ink); }
.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper); }
.targets label { padding: 12px 10px; border-right: 1px solid var(--line); gap: 2px !important; }
.targets label:last-child { border-right: 0; }
.targets input { border: 0 !important; padding: 0 !important; min-height: 32px !important; font-family: var(--serif); font-size: 22px !important; background: transparent !important; width: 100%; border-radius: 0 !important; }
.targets span { font-size: 10px !important; }
.audit-group { display: flex; flex-direction: column; gap: 10px; }
.audit-group h3 { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.food { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14.5px; transition: all .15s; }
.food .ic { display: none; }
.food.love { background: var(--blush); border-color: #EFC9C3; color: var(--red-ink); }
.food.love .ic { display: block; }
.food.no { background: var(--line-2); color: var(--ink-3); text-decoration: line-through; }
.audit-legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; align-items: center; }
.audit-legend span { display: inline-flex; align-items: center; gap: 6px; }
.profile-strip { display: flex; align-items: center; gap: 12px; }
.profile-strip > div { flex: 1; min-width: 0; }
.profile-strip b { font-family: var(--serif); font-size: 20px; font-weight: 450; }
.profile-strip small { display: block; color: var(--ink-3); font-size: 13px; }
.macro-row { display: grid; grid-template-columns: 54px 1fr 74px; align-items: center; gap: 10px; font-size: 12.5px; }
.macro-row > span:first-child { color: var(--ink-2); }
.macro-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.day-plan { display: flex; flex-direction: column; }
.meal { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.meal:first-child { border-top: 1px solid var(--line); }
.meal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meal-head .kicker { color: var(--red); }
.meal-title { font-family: var(--serif); font-size: 21px; font-weight: 450; line-height: 1.25; text-align: left; }
.meal-portions { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--ink-2); }
.meal-portions > span { display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.meal-portions .avatar { margin-top: 1px; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.totals .card { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.totals .card > div:first-child { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.r-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.r-ing { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.r-ing div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.r-ing span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.r-steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.r-steps li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 15.5px; line-height: 1.55; }
.r-steps li::before { content: counter(s); font-family: var(--serif); font-style: italic; color: var(--red); font-size: 17px; }
.per-person { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.per-person > div { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--paper); }
.per-person .pp-who { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.per-person b { font-family: var(--serif); font-size: 22px; font-weight: 400; display: block; margin-top: 4px; }
.per-person small { color: var(--ink-3); font-size: 12.5px; display: block; }

/* ---------- Inspi outfit ---------- */
.inspi-grid { columns: 2; column-gap: 10px; }
.inspi { break-inside: avoid; margin-bottom: 10px; display: block; width: 100%; text-align: left; border-radius: 18px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); position: relative; }
.inspi img { width: 100%; height: auto; display: block; background: var(--line-2); }
.inspi .in-link { display: flex; flex-direction: column; gap: 8px; padding: 20px 14px; min-height: 140px; justify-content: center; background: var(--blush-2); font-size: 13.5px; color: var(--ink-2); word-break: break-all; }
.inspi .in-link .ic { color: var(--red); }
.inspi .in-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); }
.inspi .in-foot .hearts { margin-left: auto; }
.inspi .in-text { display: block; padding: 0 12px 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.inspi .to-rate { position: absolute; top: 10px; left: 10px; }
.hearts { display: inline-flex; gap: 1px; color: var(--line); }
.hearts .on { color: var(--red); }
.rate-row { display: flex; gap: 6px; }
.rate-row button { color: var(--line); padding: 2px; transition: transform .15s, color .15s; }
.rate-row button.on { color: var(--red); }
.rate-row button:active { transform: scale(1.2); }
.inspi-detail img { width: 100%; border-radius: 20px; }
.rating-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.rating-line > span:nth-child(2) { flex: 1; }
.rating-line small { display: block; color: var(--ink-2); font-size: 15px; font-style: italic; font-family: var(--serif); }
.photo-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; border: 1px dashed var(--ink-3); border-radius: 20px; color: var(--ink-2); cursor: pointer; overflow: hidden; position: relative; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Réglages ---------- */
.settings { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.set-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.set-row > span:nth-child(2) { flex: 1; }
.set-row b { display: block; font-weight: 500; }
.set-row small { color: var(--ink-3); font-size: 13.5px; }
.set-row > .ic:first-child { color: var(--ink-2); }
.sync-card { display: flex; flex-direction: column; gap: 14px; }
.sync-state { display: flex; align-items: flex-start; gap: 12px; }
.sync-state small { display: block; color: var(--ink-2); line-height: 1.45; }
.sync-state .dot { margin-top: 7px; background: var(--ink-3); }
.sync-state.on .dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.sync-state.err .dot { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.code-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; border-radius: 18px; background: var(--ink); color: var(--bg); }
.code-box small { opacity: .6; font-size: 12px; }
.code-box b { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: .1em; }
.code-box i { font-style: normal; font-size: 12px; opacity: .5; }
.advanced summary { cursor: pointer; color: var(--ink-3); padding: 12px 0; font-size: 14px; }
.advanced .form { margin-bottom: 12px; }
.kbd { display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--line-2); font-weight: 500; font-size: 14px; }
.install p { font-size: 15px; margin-bottom: 6px; }

/* ---------- Premier lancement ---------- */
.onb { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; transition: opacity .5s, transform .5s; }
.onb.out { opacity: 0; transform: scale(1.02); pointer-events: none; }
.onb-step { display: none; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-width: 420px; margin: 0 auto; padding: calc(var(--safe-t) + 40px) 24px calc(var(--safe-b) + 30px); min-height: 100dvh; justify-content: center; }
.onb-step.on { display: flex; animation: fade .6s both; }
.onb-logo { width: 84px; height: 84px; animation: appear 1s cubic-bezier(.2, .9, .3, 1.1) both; }
.onb-title { font-family: var(--serif); font-size: 44px; font-weight: 400; line-height: 1.05; }
.onb-title em { color: var(--red); }
.onb-lead { color: var(--ink-2); font-size: 16px; max-width: 320px; }
.onb-step .who-cards { width: 100%; margin-top: 14px; }

@media (min-width: 600px) {
  .ideas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inspi-grid { columns: 3; }
}
@media (max-width: 360px) {
  .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .targets label:nth-child(2) { border-right: 0; }
  .targets label:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Inspi : matcher ---------- */
.today-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.today-card p:not(.kicker) { font-size: 15px; }
.deck { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.swipe { position: relative; width: min(100%, 340px); aspect-ratio: 3 / 4; border-radius: 26px; overflow: hidden; background: var(--line-2); box-shadow: var(--shadow-lg); touch-action: pan-y; user-select: none; cursor: grab; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.swipe img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe .in-link.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; padding: 24px; text-align: center; color: var(--ink-2); background: var(--blush-2); word-break: break-all; }
.swipe-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px; background: linear-gradient(transparent, rgba(33, 26, 27, .55)); color: #fff; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.swipe-info:empty { display: none; }
.swipe-info .chip { background: rgba(255, 255, 255, .85); color: var(--ink); }
.stamp { position: absolute; top: 22px; padding: 6px 14px; border: 2px solid; border-radius: 10px; font-family: var(--serif); font-size: 22px; opacity: 0; transition: opacity .15s; background: rgba(255, 255, 255, .85); }
.stamp.like { left: 18px; color: var(--red); transform: rotate(-12deg); }
.stamp.nope { right: 18px; color: var(--ink-2); transform: rotate(12deg); }
.swipe.hint-like .stamp.like, .swipe.go-right .stamp.like { opacity: 1; }
.swipe.hint-nope .stamp.nope, .swipe.go-left .stamp.nope { opacity: 1; }
.swipe.go-right { transform: translateX(130%) rotate(18deg) !important; opacity: 0; }
.swipe.go-left { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; }
.swipe-btns { display: flex; gap: 28px; }
.swipe-btns .round { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .12s; }
.swipe-btns .round:active { transform: scale(.92); }
.swipe-btns .like { color: var(--red); }
.swipe-btns .nope { color: var(--ink-2); }
.verdict { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
.verdict.like { color: var(--red); }
.verdict.nope { color: var(--ink-2); }

/* ---------- Repas : page commune ---------- */
.targets.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.targets.six label { border-bottom: 1px solid var(--line); }
.targets.six label:nth-child(3n) { border-right: 0; }
.targets.six label:nth-child(n+4) { border-bottom: 0; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.duo-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.duo-head { display: flex; align-items: center; gap: 8px; }
.duo-head b { flex: 1; font-family: var(--serif); font-weight: 450; font-size: 17px; }
.duo-head .ic { color: var(--ink-3); }
.duo-line { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.duo-line b { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.now { display: flex; flex-direction: column; gap: 6px; }
.now-title { font-size: 40px; }
.segmented small { font-size: 11px; color: var(--ink-3); }
.props { display: flex; flex-direction: column; gap: 12px; }
.prop { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--paper); }
.prop-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.prop-time { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.chosen { display: flex; flex-direction: column; gap: 10px; border-color: #EFD2CD; background: var(--blush-2); }
.day-list { list-style: none; display: flex; flex-direction: column; margin: 8px 0 14px; }
.day-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.day-list li > span { color: var(--ink-3); }
.day-list button { text-align: right; font-weight: 500; }
.day-list button.muted { font-weight: 400; color: var(--ink-3); }

/* ---------- Photos de profil ---------- */
.avatar.has-photo { background-size: cover; background-position: center; color: transparent; }
.avatar.xl { width: 128px; height: 128px; font-size: 52px; box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--line); }
#onb-ph { display: block; margin-bottom: 6px; }
