/* ==========================================================================
   app.css : tout le style de l'app.
   Les couleurs sont des variables : un thème ou le mode sombre ne change
   que ce bloc, jamais les composants.
   ========================================================================== */

/* ---------- Couleurs : thème Île Merveilleuse, clair ---------- */
:root {
  --bg: #FFF0F7; --card: #FFFFFF; --text: #C80F76; --soft: #C0237D; --line: #FFC2DF; --card-line: #FFB0D6; --focus: #6B003E;
  --page-a: #FF5AAE; --page-b: #FF8CC8; --page-flat: #FF6FB9;
  --nav-bg: linear-gradient(180deg, #DB1A85, #CC1079); --nav-fg: #FFFFFF; --nav-on-bg: #FFFFFF; --nav-on-fg: #DB1A85;
  --pri: #DB1A85; --pri-fg: #FFFFFF; --pri-strong: #C80F76; --pri-tint: #FFE3EF; --pri-mid: #FF1493;
  --hero1: #E6208A; --hero2: #FF5CAD;
  --a2: #C80F76; --a2-fg: #FFFFFF; --a2-bg: #FFE1F0; --a2-mid: #FF69B4;
  --lav: #C80F76; --lav-bg: #FFE8F3;
  --gold: #A86200; --gold-bg: #FFEEF6; --gold-line: #F2B8A0;
  --nacre: linear-gradient(135deg, #FFFFFF 0%, #FFF0F6 38%, #F1FAFF 72%, #FFFFFF 100%);
  --sky: linear-gradient(180deg, #FFE6F1 0%, #D6F5FF 68%);
  --shadow: 0 12px 28px rgba(196, 18, 122, .12);
  --shadow-sm: 0 6px 16px rgba(196, 18, 122, .10);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --script: 'Allura', 'Snell Roundhand', 'Apple Chancery', cursive;
  --hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;
  color-scheme: light;
}
/* Thème Dream House : la lavande et l'or rosé prennent la place du lagon. */
:root[data-univers="dream"] {
  --hero1: #EC22A0; --hero2: #FF6BC1;
  --page-a: #FF5CB8; --page-b: #FF93D0;
  --sky: linear-gradient(180deg, #FFE0F0 0%, #E9DBFF 70%);
  --nacre: linear-gradient(135deg, #FFFFFF 0%, #FFF0F6 38%, #F6EEFF 72%, #FFFFFF 100%);
}
/* Mode sombre rose. */
:root[data-dark="1"] {
  --bg: #26091D; --card: #3A122E; --text: #FFEAF4; --soft: #E9B3D0; --line: #5A2147; --card-line: #6A2553; --focus: #FFFFFF;
  --page-a: #33102A; --page-b: #26091D; --page-flat: #26091D;
  --nav-bg: #3A122E; --nav-fg: #E9B3D0; --nav-on-bg: linear-gradient(180deg, #FF69B4, #FF7ABD); --nav-on-fg: #2B0A20;
  --pri: #FF7ABD; --pri-fg: #2B0A20; --pri-strong: #FFB3D7; --pri-tint: #4E1A3D; --pri-mid: #FF69B4;
  --hero1: #C2127A; --hero2: #E0218A;
  --a2: #9BE3FF; --a2-fg: #10222A; --a2-bg: #143A47; --a2-mid: #7FDBFF;
  --lav: #CDB4FF; --lav-bg: #2E1F52;
  --gold: #F2C4AE; --gold-bg: #4A2A2A; --gold-line: #B98A74;
  --nacre: linear-gradient(135deg, #3A122E 0%, #45173A 45%, #33203F 100%);
  --shadow: 0 12px 28px rgba(0, 0, 0, .35);
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
:root[data-dark="1"][data-univers="dream"] { --a2: #CDB4FF; --a2-bg: #2E1F52; --a2-mid: #B388FF; --lav: #F2C4AE; --lav-bg: #4A2A2A; --hero1: #C014A0; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(77px + env(safe-area-inset-top, 0px)); }
body { margin: 0; background: var(--page-flat); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
body.has-sheet { overflow: hidden; }
h1, h2, h3, p, ul { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: var(--pri); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; display: block; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; padding-top: calc(69px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 520px) {
  body { background: linear-gradient(160deg, #FF8CC8 0%, #FFB6DC 100%) fixed; }
  :root[data-dark="1"] body { background: linear-gradient(160deg, #1B0614 0%, #2A0C3A 100%) fixed; }
  #app { background: var(--bg); box-shadow: 0 0 60px rgba(74, 18, 56, .18); }
}
#view.enter { animation: viewIn .32s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stack { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid2.tight { gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.center { text-align: center; align-items: center; }
.push { margin-top: auto; }
.block { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }

/* ---------- Texte ---------- */
.cap::first-letter { text-transform: uppercase; }
.h1 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 30px; line-height: 1.15; }
.h2 { font-family: var(--script); font-weight: 400; font-size: 31px; line-height: 1.05; }
.h3 { font-family: var(--script); font-weight: 400; font-size: 26px; line-height: 1.1; }
.p { font-size: 16px; }
.small { font-size: 14px; line-height: 1.4; }
.muted { font-size: 14px; color: var(--soft); }
.serif-i { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; }
.serif-i.lg { font-size: 20px; line-height: 1.3; }
.serif-i.xl { font-size: 30px; font-weight: 500; }
.big { font-size: 15px; }
.big b { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.link { color: var(--pri); font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.tint-a2 .link { color: var(--a2); } .tint-lav .link { color: var(--lav); }
.link-btn { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--pri); font-weight: 600; font-size: 15px; }
.link-btn.center { justify-content: center; width: 100%; }
.link-btn.on-dark { color: #FFFFFF; }
.disclaimer { display: flex; gap: 8px; font-size: 13px; color: var(--soft); align-items: flex-start; }
.disclaimer .ic { margin-top: 2px; }
.list { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.list li::marker { color: var(--pri-mid); }
.list.plain { list-style: none; padding: 0; margin-top: 12px; font-size: 14px; }
.list.plain b { font-weight: 600; color: var(--soft); margin-right: 6px; }

/* ---------- En-tête de l'accueil ---------- */
.hero { position: relative; overflow: hidden; padding: 18px 20px 26px; border-radius: 0 0 40px 40px; background: linear-gradient(175deg, var(--hero1) 0%, var(--hero2) 100%); color: #FFFFFF; display: flex; flex-direction: column; gap: 6px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.hero-date { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.hero-date span::first-letter { text-transform: uppercase; }
.greeting { font-family: var(--script); font-weight: 400; font-size: clamp(50px, 15vw, 62px); line-height: 1; margin-top: 4px; position: relative; text-wrap: balance; }
.hero-sub { font-size: 15px; position: relative; }
.arch-wrap { position: relative; margin-top: 20px; }
.hero::before, .card.look::before { content: ""; position: absolute; inset: 0; opacity: .17; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132' fill='%23fff'%3E%3Cpath d='M20 22c-2.5-4-8-1-5 3l5 5 5-5c3-4-2.5-7-5-3z'/%3E%3Cpath d='M92 30c.6 4.2 3.8 7.4 8 8-4.2.6-7.4 3.8-8 8-.6-4.2-3.8-7.4-8-8 4.2-.6 7.4-3.8 8-8z'/%3E%3Cpath d='M44 88c-6-8-12-7-12 0s6 8 12 0zm0 0c6-8 12-7 12 0s-6 8-12 0z'/%3E%3Ccircle cx='108' cy='98' r='3'/%3E%3Ccircle cx='64' cy='48' r='2'/%3E%3C/svg%3E"); }
.hero-sub, .hero-date, .card.look .p, .card.look .small { text-shadow: 0 1px 3px rgba(140, 0, 80, .6); font-weight: 500; }
.hero-loc { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; margin-top: 4px; border-radius: 999px; background: rgba(255, 255, 255, .22); color: #FFFFFF; font-size: 14px; font-weight: 500; position: relative; }
.hero-loc b { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-st { position: absolute; width: 46px; height: 46px; z-index: 2; filter: drop-shadow(0 3px 4px rgba(74, 18, 56, .28)); pointer-events: none; }
.hero-st svg { width: 100%; height: 100%; display: block; }
.hero-st.a { left: 50%; top: -14px; margin-left: -24px; width: 48px; height: 48px; transform: rotate(-6deg); }
.hero-st.b { left: -8px; bottom: -12px; transform: rotate(-14deg); }
.hero-st.c { right: -6px; bottom: -14px; transform: rotate(12deg); }

.arch { height: 168px; border-radius: 175px 175px 26px 26px / 130px 130px 26px 26px; overflow: hidden; background: var(--sky); border: 3px solid #FFF7FB; box-shadow: 0 0 0 1.5px #E8B4A0, 0 14px 30px rgba(74, 18, 56, .28); position: relative; }
.arch svg { width: 100%; height: 100%; display: block; }
.spark { position: absolute; color: #FFFFFF; animation: twinkle 3.6s ease-in-out infinite; }
.spark .ic { fill: currentColor; stroke: none; }
.spark.s1 { right: 4px; top: 2px; z-index: 1; }
.spark.s2 { right: 34px; top: -6px; z-index: 1; color: #FFD9E8; animation-delay: 1.2s; }
.spark.s3 { left: 6px; top: 8px; z-index: 1; color: #7FDBFF; animation-delay: 2.1s; }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
.sc-palm { animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
.sc-waves { animation: drift 5s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(5px); } }

/* ---------- En-tête des autres écrans ---------- */
.page-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; min-height: 62px; }
.page-head .h1 { flex: 1; min-width: 0; }
.head-right { display: flex; align-items: center; gap: 8px; }

/* ---------- Cartes ---------- */
.card { background: var(--card); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.center { align-items: center; }
.card.tint-a2 { background: var(--a2-bg); box-shadow: none; }
.card.tint-lav { background: var(--lav-bg); box-shadow: none; }
.card.tint-gold { background: var(--gold-bg); box-shadow: none; }
.card.nacre { background: var(--nacre); }
.grid2 > .card { padding: 16px; gap: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mini-head { display: flex; align-items: center; gap: 8px; }
.tint-a2 .mini-head .ic { color: var(--a2); } .tint-lav .mini-head .ic { color: var(--lav); } .card:not(.tint-a2):not(.tint-lav) .mini-head .ic { color: var(--pri); }
.swatches { display: flex; }
.swatches i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(74, 18, 56, .2); }
.swatches i + i { margin-left: -8px; }
.pearls { display: flex; gap: 4px; }
.pearls i { flex: 1 1 0; max-width: 13px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--a2); }
.pearls i.on { background: var(--a2); }

.note-love { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 22px; background: var(--pri-tint); }
.note-love-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; flex: none; color: var(--pri-mid); }
.note-love-ic .ic { fill: currentColor; stroke: none; }
.note-love-l { font-size: 13px; font-weight: 500; color: var(--pri-strong); }
.quote { padding: 8px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.quote-ic { color: var(--gold-line); } .quote-ic .ic { fill: currentColor; stroke: none; }
.crowns { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 28px; background: linear-gradient(120deg, var(--gold-bg) 0%, var(--pri-tint) 100%); color: var(--text); }
.crowns-ic, .row-ic, .crown-big { width: 48px; height: 48px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 1.5px var(--gold-line); display: flex; align-items: center; justify-content: center; flex: none; color: var(--gold); }
.crown-big { width: 84px; height: 84px; }
.crowns-b, .row-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.row-b { gap: 1px; }
.prog { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; width: 100%; }
.prog i { display: block; height: 100%; border-radius: 999px; background: var(--pri); transition: width .5s var(--ease); }
.prog.lg { height: 12px; max-width: 260px; }
.row-link { flex-direction: row; align-items: center; gap: 14px; color: var(--text); }
.row-link.flat { box-shadow: none; padding: 8px 0; border-radius: 0; width: 100%; background: none; display: flex; min-height: 60px; }
.row-link .row-ic { box-shadow: none; background: var(--pri-tint); color: var(--pri); }
.row-link > .ic { color: var(--soft); }
.shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shortcut { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 14px 6px; min-height: 96px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow-sm); color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.2; }
.shortcut-ic { color: var(--pri); }

/* ---------- Pastilles, boutons ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; padding: 5px 12px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill-a2 { color: var(--a2); background: var(--a2-bg); }
.tint-a2 .pill-a2 { background: var(--card); }
.pill-rose { color: var(--pri-strong); background: var(--pri-tint); }
.pill-gold { color: var(--gold); background: var(--card); }
.pill-soft { color: var(--soft); background: var(--bg); }
.btn { min-height: 46px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform .16s var(--ease), opacity .16s; }
.btn:active, .btn-icon:active, .check:active, .mood:active, .chip:active { transform: scale(.96); }
.btn-primary { background: var(--pri); color: var(--pri-fg); }
.btn-soft { background: var(--pri-tint); color: var(--pri-strong); }
.btn-ghost { background: transparent; color: var(--pri); box-shadow: inset 0 0 0 1.5px var(--pri); }
.btn-a2 { background: var(--a2); color: var(--a2-fg); }
.btn-white { background: #FFFFFF; color: #E0218A; }
.btn-outline { color: #FFFFFF; box-shadow: inset 0 0 0 1.5px #FFFFFF; }
.btn[disabled] { opacity: .6; }
.row-btns { display: flex; gap: 10px; }
.row-btns > .btn { flex: 1; }
.row-btns.wrap { flex-wrap: wrap; }
.row-btns.wrap > .btn { flex: 1 1 auto; }
.btn-icon { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--text); transition: transform .16s var(--ease); }
.btn-icon.frost { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.btn-icon.soft { background: var(--pri-tint); color: var(--pri-strong); }
.btn-icon.solid { background: var(--pri); color: var(--pri-fg); box-shadow: 0 8px 18px rgba(196, 18, 122, .3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--pri); color: var(--pri-strong); background: var(--card); font-weight: 600; font-size: 14px; }
.chip.on { background: var(--pri); color: var(--pri-fg); }
.seg { display: flex; background: var(--pri-tint); border-radius: 999px; padding: 4px; gap: 2px; }
.seg-btn { flex: 1; min-height: 40px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--pri-strong); text-align: center; padding: 0 6px; white-space: nowrap; }
.seg-btn.on { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(74, 18, 56, .14); }

/* ---------- Tâches, cases, habitudes ---------- */
.task { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.check { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--pri-mid); color: transparent; display: flex; align-items: center; justify-content: center; flex: none; transition: transform .16s var(--ease), background .2s; }
.check .ic { stroke-width: 2.4; }
.check.on { background: var(--pri); color: var(--pri-fg); box-shadow: none; animation: pop .3s var(--ease); }
@keyframes pop { from { transform: scale(.9); } to { transform: scale(1); } }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; min-height: 44px; justify-content: center; }
.task-t { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.task-c { font-size: 13px; color: var(--soft); }
.task.done .task-t { color: var(--soft); text-decoration: line-through; }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--pri-mid); }

/* ---------- Humeur ---------- */
.moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 68px; border-radius: 18px; background: var(--bg); transition: transform .16s var(--ease); }
.mood.on { background: var(--pri-tint); box-shadow: inset 0 0 0 2px var(--pri); }
.mood-e { font-size: 26px; line-height: 1.1; }
.mood-l { font-size: 13px; }
.mood-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mood-day { aspect-ratio: 1; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.mood-day .mood-e { font-size: 18px; min-height: 20px; }
.mood-d { font-size: 11px; color: var(--soft); font-variant-numeric: tabular-nums; }
.mood-day.today { box-shadow: inset 0 0 0 2px var(--pri); }

/* ---------- Cycle ---------- */
.wheel-wrap { width: 210px; max-width: 70%; }
.wheel { width: 100%; height: auto; display: block; }
.wheel-dot { fill: var(--card); stroke: var(--text); stroke-width: 3; }
.wheel-n { font-family: var(--serif); font-size: 26px; fill: var(--text); }
.wheel-p { font-family: var(--sans); font-size: 13px; fill: var(--soft); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13px; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.glasses { display: grid; gap: 8px; }
.glass { width: 100%; height: 52px; border-radius: 16px; background: var(--card); color: var(--a2); display: flex; align-items: center; justify-content: center; opacity: .75; transition: transform .16s var(--ease); }
.glass.on { background: var(--a2); color: var(--a2-fg); opacity: 1; }
.glass.on .ic { fill: currentColor; }

/* ---------- Assiette ---------- */
.meal { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 4px 0; }
.meal-ph { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: var(--pri-tint); flex: none; }
.ph-empty { display: flex; align-items: center; justify-content: center; color: var(--pri); }
.meal-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.meal > .ic { color: var(--soft); }
.macros { display: flex; flex-direction: column; gap: 8px; }
.macro { display: grid; grid-template-columns: 84px 1fr 56px; align-items: center; gap: 10px; font-size: 14px; }
.macro b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Assiette : objectifs du jour, repas par moment, fiche d'un repas */
.goals { display: flex; flex-direction: column; gap: 12px; }
.goal { display: flex; flex-direction: column; gap: 6px; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; }
.goal-top b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog.grad { height: 12px; }
.prog.grad i { background: linear-gradient(90deg, #FF4FA8, #A45BFF); }
.slot { display: flex; flex-direction: column; gap: 2px; }
.slot + .slot { padding-top: 12px; border-top: 1.5px solid var(--line); }
.slot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.slot-head b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--pri-strong); }
.card-head > .link { flex: none; white-space: nowrap; }
.slot-head .h3 { color: var(--pri-strong); }
.foods { display: flex; flex-direction: column; gap: 10px; }
.food { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 20px; background: var(--pri-tint); transition: opacity .2s; }
.food.busy { opacity: .5; pointer-events: none; }
.food .input { background: var(--card); }
.food-top { display: flex; align-items: center; gap: 8px; }
.food-top > .input { flex: 1; min-width: 0; }
.food-q { position: relative; flex: none; width: 88px; }
.food-q .input { padding-right: 28px; }
.food input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.food input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.food-q span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--soft); pointer-events: none; }
.food-vals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.food-vals label { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--soft); text-align: center; }
.food-vals .input { min-height: 44px; padding: 6px 4px; text-align: center; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }
.inline-form .btn { flex: none; }
.ask { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; border: 1.5px dashed var(--pri); }
.ask .p { font-weight: 600; color: var(--pri-strong); }
.meal-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 12px 16px; border-radius: 18px; background: linear-gradient(90deg, #FF4FA8, #A45BFF); color: #FFFFFF; }
.meal-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.meal-total .small { flex-basis: 100%; color: #FFFFFF; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-v { font-size: 11px; color: var(--soft); min-height: 14px; font-variant-numeric: tabular-nums; }
.bar-t { width: 100%; max-width: 28px; height: 90px; border-radius: 10px; background: var(--bg); display: flex; align-items: flex-end; overflow: hidden; }
.bar-f { width: 100%; border-radius: 10px; background: linear-gradient(180deg, var(--pri-mid), var(--pri)); min-height: 0; }
.bar-l { font-size: 12px; color: var(--soft); }

/* ---------- Dressing ---------- */
.loc { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); min-height: 44px; text-align: left; width: 100%; }
.loc span { flex: 1; min-width: 0; }
.loc b { color: var(--pri); font-weight: 600; }
.card.look { position: relative; overflow: hidden; background: linear-gradient(170deg, var(--hero1) 0%, var(--hero2) 100%); color: #FFFFFF; border-radius: 32px; padding: 20px; box-shadow: 0 16px 32px rgba(196, 18, 122, .28); }
.card.look > * { position: relative; }
.look-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.look-grid.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.look-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.look-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; text-align: center; line-height: 1.25; }
.look-tile, .wd-tile { width: 100%; aspect-ratio: 1 / 1.1; border-radius: 18px; background: #FFD9E8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.look-tile img, .wd-tile img { width: 100%; height: 100%; object-fit: cover; }
.pals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pal { display: flex; flex-direction: column; gap: 8px; }
.pal-c { display: flex; }
.pal-c i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(74, 18, 56, .2); }
.pal-c i + i { margin-left: -8px; }
.wd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wd-item { display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0; }
.wd-item .small { overflow-wrap: anywhere; line-height: 1.25; font-size: 13px; }
.wd-tile { background: var(--pri-tint); }
.wd-add { aspect-ratio: 1 / 1.1; border-radius: 18px; border: 1.5px dashed var(--pri); color: var(--pri); font-weight: 600; font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; align-self: start; }
.wd-photo { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.wd-prev { width: 150px; height: 170px; object-fit: cover; border-radius: 22px; background: var(--pri-tint); }
.wd-photo .row-btns { width: 100%; }

/* ---------- Carnet vintage ---------- */
.searchbar { height: 48px; border-radius: 999px; background: var(--card); display: flex; align-items: center; gap: 10px; padding: 0 16px; box-shadow: var(--shadow-sm); color: var(--soft); }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; height: 44px; outline: none; color: var(--text); }
.searchbar input::placeholder, .input::placeholder { color: var(--soft); opacity: 1; }
.searchbar:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.nb-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; padding-top: 4px; }
.nb-card { position: relative; min-height: 172px; padding: 20px 12px 12px 22px; border-radius: 6px 16px 16px 6px; background-color: var(--paper); background-image: linear-gradient(90deg, transparent 13px, #FF8CC6 13px, #FF8CC6 14.5px, transparent 14.5px), repeating-linear-gradient(180deg, transparent 0 23px, var(--rule) 23px 24px); background-position: 0 0, 0 20px; box-shadow: 4px 5px 0 #FFD3E4, 0 10px 20px rgba(74, 18, 56, .18); color: #C80F76; display: flex; flex-direction: column; overflow: hidden; }
.nb-card.tilt-l { transform: rotate(-1.2deg); } .nb-card.tilt-r { transform: rotate(1deg); }
.nb-card-t { font-family: var(--hand); font-weight: 700; font-size: 22px; line-height: 24px; color: #DB1A85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nb-card-b { font-family: var(--hand); font-size: 18px; line-height: 24px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; opacity: .9; }
.nb-card-s { margin-top: auto; display: flex; justify-content: flex-end; gap: 2px; min-height: 30px; }
.nb-card-s svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(74, 18, 56, .2)); }

.nb-wrap { position: relative; margin: 6px 0 4px 6px; }
.nb-under { position: absolute; left: 8px; top: 8px; right: -4px; bottom: -4px; background: #FFD3E4; border-radius: 8px 22px 22px 8px; transform: rotate(1.2deg); box-shadow: 0 10px 22px rgba(74, 18, 56, .16); }
.nb-page { position: relative; min-height: 468px; border-radius: 8px 22px 22px 8px; overflow: hidden; padding: 30px 18px 44px 62px; color: #C80F76; background-color: var(--paper); background-image: repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px); background-position: 0 30px; box-shadow: 0 14px 30px rgba(74, 18, 56, .22), inset 0 0 26px rgba(196, 18, 122, .10); }
.nb-margin { position: absolute; left: 50px; top: 0; bottom: 0; width: 2px; background: #FF8CC6; opacity: .85; }
.nb-holes { position: absolute; left: 16px; top: 22px; bottom: 0; width: 14px; background: radial-gradient(circle at 7px 16px, #C99BC4 0, #E3C2E0 6.5px, transparent 7.5px) 0 0 / 14px 32px repeat-y; }
.nb-page::after { content: ""; position: absolute; right: 0; bottom: 0; width: 36px; height: 36px; background: linear-gradient(315deg, #FFD3E4 0 49%, rgba(74, 18, 56, .18) 49% 54%, #FFF9FC 54% 100%); border-top-left-radius: 8px; box-shadow: -2px -2px 5px rgba(74, 18, 56, .10); pointer-events: none; }
.nb-tape { position: absolute; top: -3px; right: 34px; width: 112px; height: 26px; transform: rotate(-5deg); box-shadow: 0 2px 4px rgba(74, 18, 56, .15); }
.nb-title { display: block; width: 100%; height: 32px; border: 0; background: transparent; padding: 0; font-family: var(--hand); font-weight: 700; font-size: clamp(22px, 7.4vw, 30px); line-height: 32px; color: #DB1A85; outline: none; position: relative; top: 3px; }
.nb-body { display: block; width: 100%; min-height: 256px; border: 0; background: transparent; padding: 0; resize: none; overflow: hidden; font-family: var(--hand); font-weight: 500; font-size: 23px; line-height: 32px; color: #C80F76; outline: none; position: relative; top: 4px; }
.nb-title::placeholder, .nb-body::placeholder { color: #A36A8C; opacity: 1; }
.nb-title:focus-visible, .nb-body:focus-visible { outline: none; }
.nb-rings { position: absolute; left: -9px; top: 22px; bottom: 14px; overflow: hidden; display: flex; flex-direction: column; pointer-events: none; }
.nb-rings i { flex: none; height: 32px; display: flex; align-items: center; }
.nb-rings i::before { content: ""; width: 34px; height: 10px; border-radius: 6px; border: 2.5px solid #C98A6B; border-top-color: #E8B4A0; }
.sticker { position: absolute; width: 62px; height: 62px; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); filter: drop-shadow(0 3px 3px rgba(74, 18, 56, .22)); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.sticker svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.sticker.drag { cursor: grabbing; filter: drop-shadow(0 8px 8px rgba(74, 18, 56, .3)); z-index: 3; }
.sticker.sel { outline: 2px dashed #DB1A85; outline-offset: 2px; border-radius: 12px; z-index: 2; }
.st-x { display: none; position: absolute; right: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; background: #C80F76; color: #FFFFFF; align-items: center; justify-content: center; }
.sticker.sel .st-x { display: flex; }
.tools { gap: 6px; padding: 14px 16px; }
.tool { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.tool.col { flex-direction: column; align-items: stretch; gap: 4px; }
.tool.col .tool-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); justify-items: center; gap: 4px 0; }
.st-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.st-btn svg { width: 28px; height: 28px; }
.sw-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px var(--line); }
.sw-btn.on { box-shadow: inset 0 0 0 2px var(--pri); }
.sw-btn i { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(74, 18, 56, .2); display: flex; align-items: center; justify-content: center; color: var(--soft); }

/* ---------- Repas, événements, couronnes, réglages ---------- */
.plan { display: flex; align-items: flex-end; gap: 8px; }
.plan-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.recipes { display: flex; flex-direction: column; background: var(--card); border-radius: 28px; padding: 6px 18px; box-shadow: var(--shadow); }
.recipe { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; width: 100%; }
.recipe + .recipe { border-top: 1px solid var(--line); }
.rank { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--soft); }
.rank .task-t { flex: 1; }
.rank.ok, .rank.cur { color: var(--text); }
.rank-ic { color: var(--line); display: flex; }
.rank.ok .rank-ic, .rank.cur .rank-ic { color: var(--gold); }
.rank.cur .task-t { font-weight: 600; }
.crown-big .ic { stroke-width: 1.3; }
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.theme { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border-radius: 20px; background: var(--bg); font-size: 14px; font-weight: 600; text-align: center; box-shadow: inset 0 0 0 2px transparent; }
.theme.on { box-shadow: inset 0 0 0 2px var(--pri); }
.theme-s { display: block; height: 74px; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #FFE6F1 0%, #D6F5FF 68%); }
.theme-s svg { width: 100%; height: 100%; display: block; }

/* ---------- États vides, chargement ---------- */
.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 16px; }
.empty-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--pri-tint); color: var(--pri); display: flex; align-items: center; justify-content: center; }
.empty .muted { max-width: 30ch; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0 10px; text-align: center; }
.loader { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--pri-tint); border-top-color: var(--pri); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-l { font-size: 14px; font-weight: 500; color: var(--soft); }
.field-h { font-size: 13px; color: var(--soft); }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; -webkit-appearance: none; appearance: none; }
textarea.input { resize: vertical; line-height: 1.45; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus-visible { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-tint); }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { flex: 1 1 auto; position: relative; }
.radio input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.radio span { min-height: 44px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--pri-strong); background: var(--pri-tint); white-space: nowrap; }
.radio input:checked + span { background: var(--pri); color: var(--pri-fg); }
.radio input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; margin: 0; cursor: pointer; }
.switch input::before { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 4px rgba(74, 18, 56, .25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--pri); }
.switch input:checked::before { transform: translateX(20px); }
.colors { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.color { position: relative; aspect-ratio: 1; }
.color input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.color span { position: absolute; inset: 3px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(74, 18, 56, .25); }
.color input:checked + span { box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--pri); }
.color input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 4px; }
.results { display: flex; flex-direction: column; }
.result { display: flex; align-items: center; gap: 10px; min-height: 54px; width: 100%; color: var(--text); }
.result span { display: flex; flex-direction: column; }
.result small { font-size: 13px; color: var(--soft); }
.result .ic { color: var(--pri); }

/* ---------- Fenêtre du bas ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#sheet-root.open { pointer-events: auto; }
.sheet-back { position: absolute; inset: 0; background: rgba(150, 0, 85, .45); opacity: 0; transition: opacity .25s; }
.sheet { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; transform: translate(-50%, 100%); transition: transform .34s var(--ease); background: var(--card); color: var(--text); border-radius: 30px 30px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(42, 10, 32, .25); }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 8px; }
#sheet-root.open .sheet-back { opacity: 1; }
#sheet-root.open .sheet { transform: translate(-50%, 0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Messages et cœurs ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 20px; }
.toast { background: #C80F76; color: #FFFFFF; border-radius: 18px; padding: 12px 16px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; max-width: 420px; box-shadow: 0 10px 24px rgba(42, 10, 32, .3); animation: toastIn .3s var(--ease) both; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
#fx { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.fx-heart { position: absolute; margin: -8px 0 0 -8px; opacity: 0; animation: heart 1s var(--ease) forwards; }
@keyframes heart { 0% { opacity: 0; transform: translate(0, 0) scale(.5) rotate(0deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(var(--r)); } }

/* ---------- Barre du bas ---------- */
#nav { position: fixed; left: 50%; top: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: calc(9px + env(safe-area-inset-top, 0px)) 8px 6px; background: var(--card); border-radius: 0 0 24px 24px; box-shadow: 0 8px 24px rgba(196, 18, 122, .12); }
.nav-i { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; color: var(--soft); font-size: 12px; font-weight: 500; border-radius: 16px; }
.nav-i.on { color: var(--pri); font-weight: 600; }
.nav-i.on .ic { fill: var(--pri-tint); }

/* ---------- Barbie partout : le même décor sur tous les écrans ---------- */
#app { background-color: var(--page-b); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132' fill='%23fff' fill-opacity='.24'%3E%3Cpath d='M20 22c-2.5-4-8-1-5 3l5 5 5-5c3-4-2.5-7-5-3z'/%3E%3Cpath d='M92 30c.6 4.2 3.8 7.4 8 8-4.2.6-7.4 3.8-8 8-.6-4.2-3.8-7.4-8-8 4.2-.6 7.4-3.8 8-8z'/%3E%3Cpath d='M44 88c-6-8-12-7-12 0s6 8 12 0zm0 0c6-8 12-7 12 0s-6 8-12 0z'/%3E%3Ccircle cx='108' cy='98' r='3'/%3E%3Ccircle cx='64' cy='48' r='2'/%3E%3C/svg%3E"), linear-gradient(180deg, var(--page-a) 0%, var(--page-b) 100%); }
.page-head { position: relative; padding: 16px 20px 24px; min-height: 0; border-radius: 0 0 34px 34px; background: linear-gradient(175deg, var(--hero1) 0%, var(--hero2) 100%); color: #FFFFFF; box-shadow: 0 10px 24px rgba(219, 26, 133, .22); }
.page-head::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .17; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132' fill='%23fff'%3E%3Cpath d='M20 22c-2.5-4-8-1-5 3l5 5 5-5c3-4-2.5-7-5-3z'/%3E%3Cpath d='M92 30c.6 4.2 3.8 7.4 8 8-4.2.6-7.4 3.8-8 8-.6-4.2-3.8-7.4-8-8 4.2-.6 7.4-3.8 8-8z'/%3E%3Cpath d='M44 88c-6-8-12-7-12 0s6 8 12 0zm0 0c6-8 12-7 12 0s-6 8-12 0z'/%3E%3Ccircle cx='108' cy='98' r='3'/%3E%3Ccircle cx='64' cy='48' r='2'/%3E%3C/svg%3E"); }
.page-head > * { position: relative; }
.page-head .h1 { font-family: var(--script); font-style: normal; font-weight: 400; font-size: clamp(34px, 10vw, 42px); line-height: 1.08; padding-top: 4px; text-shadow: 0 2px 6px rgba(120, 0, 70, .28); }
.page-head .btn-icon.soft { background: rgba(255, 255, 255, .24); color: #FFFFFF; }
.page-head .btn-icon.solid { background: #FFFFFF; color: var(--hero1); box-shadow: 0 6px 14px rgba(120, 0, 70, .25); }
.page-head .pill-a2 { background: #FFFFFF; color: #C80F76; }
.page-head .head-st { position: absolute; right: 22px; bottom: -20px; width: 50px; height: 50px; transform: rotate(10deg); filter: drop-shadow(0 3px 4px rgba(74, 18, 56, .28)); pointer-events: none; z-index: 2; }
.head-st svg { width: 100%; height: 100%; display: block; }
.page-head + .stack { padding-top: 30px; }
.hero { box-shadow: 0 10px 24px rgba(219, 26, 133, .22); }
.stack::after { content: ""; height: 36px; margin-top: 4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='%23FF4FA8' stroke='%23FFFFFF' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M24 24 C14 10 5 12 5 24 C5 36 14 38 24 24Z'/%3E%3Cpath d='M24 24 C34 10 43 12 43 24 C43 36 34 38 24 24Z'/%3E%3Cpath d='M21 27 L15 42 L24 36 L33 42 L27 27Z'/%3E%3C/g%3E%3Ccircle cx='24' cy='24' r='5' fill='%23E0218A' stroke='%23FFFFFF' stroke-width='1.5'/%3E%3C/svg%3E") center / 36px no-repeat; }
.card { border: 1.5px solid var(--card-line); box-shadow: 0 5px 0 rgba(200, 15, 118, .22), 0 16px 30px rgba(170, 0, 95, .22); }
/* Rien n'est écrit directement sur le fond rose vif : chaque texte a sa surface claire. */
.quote, .disclaimer, .empty, .block, .stack > .row-btns, .stack > .muted, #nb-list-wrap > .muted, .loc, .crowns, .note-love { background-color: var(--card); border: 1.5px solid var(--card-line); box-shadow: 0 5px 0 rgba(200, 15, 118, .18); }
.quote, .empty, .block { border-radius: 28px; padding: 18px; }
.block { margin-top: 0; }
.block .recipes { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.disclaimer, .stack > .muted, #nb-list-wrap > .muted { border-radius: 18px; padding: 12px 14px; }
.stack > .row-btns { border-radius: 26px; padding: 12px; }
.loc { border-radius: 22px; padding: 6px 14px; }
.note-love { background-color: var(--pri-tint); }
.btn-ghost { background: var(--card); }
.card.look { border: 0; }
.recipes, .searchbar, .shortcut { border: 1.5px solid var(--card-line); }
.card-head .h2, .sheet-head .h2 { color: var(--pri-strong); }
.card-head .h2::before, .sheet-head .h2::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: 1px; background: var(--pri-mid); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c.6 5.2 4.8 9.4 10 10-5.2.6-9.4 4.8-10 10-.6-5.2-4.8-9.4-10-10 5.2-.6 9.4-4.8 10-10z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c.6 5.2 4.8 9.4 10 10-5.2.6-9.4 4.8-10 10-.6-5.2-4.8-9.4-10-10 5.2-.6 9.4-4.8 10-10z'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn-primary, .btn-icon.solid { background: linear-gradient(180deg, var(--pri) 0%, var(--pri-strong) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px rgba(219, 26, 133, .28); }
.seg { background: var(--card); border: 1.5px solid var(--card-line); }
.seg-btn.on { background: var(--pri); color: var(--pri-fg); box-shadow: 0 4px 10px rgba(219, 26, 133, .28); }
.toast { background: var(--card); color: var(--text); border: 1.5px solid var(--card-line); box-shadow: 0 10px 24px rgba(140, 0, 80, .32); }
.empty-ic { width: 76px; height: 76px; }
.empty-ic svg:not(.ic) { width: 48px; height: 48px; filter: drop-shadow(0 3px 3px rgba(74, 18, 56, .2)); }
#nav { background: var(--nav-bg); box-shadow: 0 8px 24px rgba(170, 0, 95, .28); }
.nav-i, .nav-i.on { color: var(--nav-fg); font-weight: 600; }
.nav-i.on .ic { box-sizing: content-box; padding: 7px; margin: -4px 0 -3px; border-radius: 50%; background: var(--nav-on-bg); color: var(--nav-on-fg); fill: none; box-shadow: 0 6px 14px rgba(120, 0, 70, .3); }

.card.look { background: linear-gradient(170deg, #DB1A85 0%, #D4147F 100%); }
.btn-white { color: #C80F76; }
.hero-loc { background: #FFFFFF; color: #C80F76; font-weight: 600; box-shadow: 0 4px 10px rgba(140, 0, 80, .22); }
.hero-sub, .hero-date { font-weight: 600; }
.row-btns.wrap > .btn { white-space: normal; min-width: 0; line-height: 1.2; padding-block: 8px; text-align: center; }

/* ---------- iPhone ouvert dans Safari, sans installation ----------
   La barre d'adresse de Safari flotte en bas et recouvre ce qui s'y trouve.
   Le menu passe donc en haut, et tout ce qui était collé en bas remonte. */
:root[data-tab="1"] #app { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
:root[data-tab="1"] .sheet { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); max-height: 92vh; max-height: 92dvh; }
:root[data-tab="1"] #toast-root { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
:root[data-tab="1"] .hero { border-radius: 0 0 40px 40px; }

/* ---------- Survol : seulement avec une vraie souris ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .chip:hover, .btn-icon:hover { opacity: .88; }
  .nb-card:hover { transform: rotate(0deg) translateY(-2px); transition: transform .25s var(--ease); }
  .shortcut:hover { transform: translateY(-2px); transition: transform .2s var(--ease); }
}

/* ---------- Mouvements réduits ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .spark { opacity: .9; }
}
