/* Popote : palette ratatouille (aubergine, tomate, basilic, jaune d'œuf) sur fond de faïence. */
@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #F2F5EE;
  --surface: #FFFFFF;
  --sunken: #E7ECE1;
  --ink: #2A1A2E;
  --ink-2: #65566A;
  --line: #D9DFD1;
  --primary: #4B2350;
  --on-primary: #FFFFFF;
  --yolk: #F2B705;
  --on-yolk: #2A1A2E;
  --danger: #B3261E;
  --ok: #2E7D4F;
  --display: 'Bricolage', 'Avenir Next Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pad: 20px;
  --tabs-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B131E;
    --surface: #281C2C;
    --sunken: #221726;
    --ink: #F4EEF3;
    --ink-2: #B9AABC;
    --line: #3D2D42;
    --primary: #F1DDF3;
    --on-primary: #2A1A2E;
    --danger: #FF8A80;
    --ok: #7BCB9B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.has-sheet { overflow: hidden; }
h1, h2, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { flex: none; }

/* ------------------------------------------------------------------ */
/* Pages                                                               */
/* ------------------------------------------------------------------ */
.page, .entry {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 18px) var(--pad) calc(var(--safe-b) + 32px);
  min-height: 100dvh;
  overflow-x: clip;
}
.shell.has-tabs .page { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 96px); }
.page-detail { padding-bottom: calc(var(--safe-b) + 108px); }

.page-head { margin-bottom: 18px; }
.page-head h1, .detail-head h1, .brand h1 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -0.015em;
  line-height: 0.98;
  text-wrap: balance;
}
.page-head h1 { font-size: 2.75rem; }
.page-sub { color: var(--ink-2); margin-top: 6px; }

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.375rem;
  line-height: 1.15;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -6px -8px 10px;
}
.topbar-title { font-weight: 600; }
.topbar-space { width: 44px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.icon-btn:active { background: var(--sunken); }

/* ------------------------------------------------------------------ */
/* Boutons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: transform 0.08s ease;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { border-color: var(--ink); color: var(--ink); }
.btn-quiet { background: var(--sunken); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger { color: #2A1A2E; } }
.btn-small { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 0.9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link { border: 0; background: none; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

.fab {
  position: fixed;
  right: max(var(--pad), calc(50vw - 280px + var(--pad)));
  bottom: calc(var(--tabs-h) + var(--safe-b) + 16px);
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: var(--yolk);
  color: var(--on-yolk);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 0 -2px rgba(42, 26, 46, 0.9), 0 10px 24px rgba(42, 26, 46, 0.18);
  z-index: 5;
}
.fab:active { transform: translateY(3px); box-shadow: 0 3px 0 -2px rgba(42, 26, 46, 0.9); }

/* ------------------------------------------------------------------ */
/* Onglets                                                             */
/* ------------------------------------------------------------------ */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 max(8px, calc(50vw - 280px)) var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tabs-h);
  font-size: 0.6875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
}
.tab.is-on { color: var(--ink); }
.tab-icon { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; }
.tab.is-on .tab-icon { background: var(--yolk); color: var(--on-yolk); }
.tab-badge {
  position: absolute;
  top: -3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  font: 700 0.625rem/17px var(--body);
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Listes de recettes                                                  */
/* ------------------------------------------------------------------ */
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
}
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); -webkit-appearance: none; appearance: none; }
.sort { flex: none; }
.sort select { padding: 0 8px 0 12px; max-width: 150px; }
.sort select, .field select {
  min-height: 46px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 12px;
}

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--pad) * -1) 6px; padding: 2px var(--pad) 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-todo:not(.is-on) { border-color: var(--yolk); background: color-mix(in srgb, var(--yolk) 18%, transparent); }

.rows > li + li { border-top: 1px solid var(--line); }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: none;
  text-align: left;
  text-decoration: none;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 650; font-size: 1.0625rem; line-height: 1.25; overflow-wrap: anywhere; }
.row-meta { color: var(--ink-2); font-size: 0.875rem; }
.nothing { color: var(--ink-2); padding: 12px 0; }

.photo { object-fit: cover; background: var(--sunken); }
.photo-thumb { width: 60px; height: 60px; border-radius: 16px; flex: none; }
.photo-hero { width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; }
.photo-wide { width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; margin-top: 10px; }
.photo-empty {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.75rem;
  color: #fff;
}
.photo-hero.photo-empty { font-size: 5rem; }
.tone-0 { background: #4B2350; }
.tone-1 { background: #C4472F; }
.tone-2 { background: #2E7D4F; }
.tone-3 { background: #B98300; }
.tone-4 { background: #3F5BB5; }

/* Le duo : une pastille par personne, avec sa note de goût. */
.duo { display: inline-flex; flex: none; }
.duo-dot {
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px dashed var(--c);
  font-weight: 800;
  font-size: calc(var(--s) * 0.47);
  color: #fff;
  box-shadow: 0 0 0 2px var(--bg);
}
.duo-dot + .duo-dot { margin-left: calc(var(--s) * -0.14); }
.duo-dot.is-set { background: var(--c); border-style: solid; }

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-weight: 800;
}

/* ------------------------------------------------------------------ */
/* Fiche recette                                                       */
/* ------------------------------------------------------------------ */
.detail-head { margin: 18px 0 8px; }
.detail-head h1 { font-size: 2.5rem; margin-top: 6px; overflow-wrap: anywhere; }
.kicker { color: var(--ink-2); font-size: 0.9375rem; }
.lead { margin-top: 10px; font-size: 1.0625rem; max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }
.facts dt { color: var(--ink-2); font-size: 0.8125rem; }
.facts dd { font-weight: 700; font-size: 1.0625rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { padding: 4px 10px; border-radius: 10px; background: var(--sunken); font-size: 0.875rem; }

.block { margin-top: 30px; }
.block > h2, .block-head { margin-bottom: 12px; }
.block > p { max-width: 62ch; }
.block > p + .btn-row, .block > p + .form, .block > p + .btn, .block > p + .code { margin-top: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.block-end { padding-top: 22px; border-top: 1px solid var(--line); }
.block-end .row-meta { margin-top: 12px; }

.reviews { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 359px) { .reviews { grid-template-columns: 1fr; } }
.review {
  background: var(--surface);
  border-radius: 18px;
  border-top: 5px solid var(--c);
  padding: 14px;
  min-width: 0;
}
.review-empty { background: transparent; border: 1.5px dashed var(--line); border-top: 5px solid var(--c); }
.review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 30px; }
.review-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-head .icon-btn { width: 34px; height: 34px; margin: -4px -6px -4px 0; }
.review .btn { width: 100%; padding: 0 8px; font-size: 0.875rem; }
.review-wait { color: var(--ink-2); font-size: 0.9375rem; }
.criteria > div + div { margin-top: 8px; }
.criteria dt { color: var(--ink-2); font-size: 0.8125rem; }
.criteria dd { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 0.9375rem; }
.criteria .yes { color: var(--ok); }
.criteria .no { color: var(--danger); }
.review-comment { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.9375rem; overflow-wrap: anywhere; }

.meter { display: inline-flex; gap: 3px; }
.meter i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--c); }
.meter i.is-on { background: var(--c); }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); }
.stepper button { width: 42px; height: 40px; border: 0; background: none; font-size: 1.25rem; font-weight: 600; }
.stepper button[disabled] { opacity: 0.3; }
.stepper span { min-width: 84px; text-align: center; font-weight: 600; font-size: 0.9375rem; }

.ingredients li + li { border-top: 1px solid var(--line); }
.ingredients label { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; }
.ingredients input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid var(--ink-2);
  border-radius: 7px;
  background: var(--surface);
}
.ingredients input:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2B705' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--ink); }
.ingredients .is-checked span { color: var(--ink-2); text-decoration: line-through; }

.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 6px; padding: 12px 0; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.875rem;
  line-height: 1;
  color: var(--ink);
}
.is-cooking .steps li { font-size: 1.1875rem; line-height: 1.5; padding: 16px 0; }
.notes { white-space: pre-line; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--yolk) 20%, var(--surface)); }
.source { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.source a { color: var(--ink); text-underline-offset: 3px; overflow-wrap: anywhere; }

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 18px max(var(--pad), calc(50vw - 280px + var(--pad))) calc(var(--safe-b) + 14px);
  background: linear-gradient(to top, var(--bg) 62%, transparent);
}
.actionbar .btn { width: 100%; }

/* ------------------------------------------------------------------ */
/* À tester et journal                                                 */
/* ------------------------------------------------------------------ */
.wish { padding: 6px 0 18px; }
.wish + .wish { border-top: 1px solid var(--line); padding-top: 12px; }
.wish-head { display: flex; align-items: center; gap: 14px; padding: 8px 0; text-decoration: none; }
.wish-text { margin: 2px 0 12px; max-width: 60ch; }
.wish .btn { margin-top: 12px; }

.reactions { display: flex; flex-wrap: wrap; gap: 8px; }
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 19px;
  border: 1.5px solid var(--line);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
}
.reaction-emoji { font-size: 1.125rem; line-height: 1; }
.reaction.has-any { background: var(--surface); }
.reaction.is-mine { border-color: var(--ink); }
.reaction-who { display: inline-flex; gap: 3px; }
.reaction-who i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

.month + .month { margin-top: 26px; }
.month-title { margin-bottom: 12px; color: var(--ink-2); }
.entry-card { background: var(--surface); border-radius: 20px; padding: 16px; }
.entry-card + .entry-card { margin-top: 12px; }
.entry-head { display: flex; align-items: center; gap: 10px; }
.entry-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry-head .icon-btn { width: 36px; height: 36px; margin: -4px -6px -4px 0; color: var(--ink-2); }
.entry-recipe {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.3125rem;
  line-height: 1.15;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.entry-note { margin-top: 10px; overflow-wrap: anywhere; }
.entry-card .reactions { margin-top: 12px; }

/* ------------------------------------------------------------------ */
/* Nous                                                                */
/* ------------------------------------------------------------------ */
.block + .people, .people + .block { margin-top: 22px; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.person { background: var(--surface); border-radius: 20px; padding: 16px; border-top: 5px solid var(--c); min-width: 0; }
.person strong { display: block; margin: 10px 0 8px; font-size: 1.0625rem; overflow-wrap: anywhere; }
.person dl > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 0.875rem; }
.person dt { color: var(--ink-2); }
.person dd { font-weight: 700; }
.tastes-line { font-size: 1.0625rem; }
.tastes { margin-top: 10px; }
.tastes li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--line); }
.tastes span { color: var(--ink-2); font-size: 0.8125rem; }
.tastes a { font-weight: 650; text-underline-offset: 3px; }
.code {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 100%;
  font-size: 2rem;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px dashed var(--ink-2);
  text-align: center;
  -webkit-user-select: all;
  user-select: all;
  margin-bottom: 14px;
}
.invite-alone, .demo-banner { padding: 18px; border-radius: 20px; background: color-mix(in srgb, var(--yolk) 22%, var(--surface)); }
.swatches { display: flex; gap: 12px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--c); }
.swatch.is-on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--ink); }
.import-list li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--line); }
.import-list small { color: var(--ink-2); font-size: 0.875rem; }
.import-list .is-dup span { color: var(--ink-2); text-decoration: line-through; }
.import-list + .btn { margin-top: 14px; width: 100%; }
.import-result { padding: 18px; border-radius: 20px; background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.import-result p { margin-bottom: 12px; }

/* ------------------------------------------------------------------ */
/* Formulaires                                                         */
/* ------------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-weight: 600; font-size: 0.9375rem; }
.field-hint { color: var(--ink-2); font-size: 0.8125rem; }
.field input:not([type='checkbox']), .field textarea, .field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  -webkit-appearance: none;
  appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365566A' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 34px; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yolk) 60%, transparent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-submit { position: sticky; bottom: 0; padding: 14px 0 calc(var(--safe-b) + 6px); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.form-submit .btn { width: 100%; }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.form-error { color: var(--danger); font-weight: 600; }
.note { color: var(--ink-2); font-size: 0.9375rem; }
.code-input { font-family: var(--display); font-weight: 700; font-size: 1.375rem !important; letter-spacing: 0.08em; text-transform: uppercase; }

.paste-cta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1.5px dashed var(--ink-2);
  border-radius: 16px;
  background: transparent;
  text-align: left;
}
.paste-cta span { color: var(--ink-2); font-size: 0.875rem; }

.photo-picker { display: flex; flex-direction: column; gap: 10px; }
.photo-picker-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-picker label.btn:focus-within { outline: 3px solid var(--yolk); outline-offset: 2px; }

.rating { display: flex; flex-direction: column; gap: 6px; }
.rating-dots { display: flex; gap: 10px; }
.rating-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--c);
  background: transparent;
  color: var(--c);
  font-weight: 800;
  font-size: 1.125rem;
}
.rating-dot.is-on { background: var(--c); color: #fff; }
.rating-word { color: var(--ink-2); font-size: 0.875rem; min-height: 1.3em; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; min-height: 50px; padding: 4px; border-radius: 14px; background: var(--sunken); }
.segmented button { border: 0; border-radius: 10px; background: transparent; font-weight: 600; }
.segmented button.is-on { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------------------------ */
/* Panneaux et messages                                                */
/* ------------------------------------------------------------------ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(27, 19, 30, 0.5);
  animation: fade 0.18s ease-out;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  outline: none;
  animation: rise 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px var(--pad); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px var(--pad) calc(var(--safe-b) + 24px); display: flex; flex-direction: column; gap: 14px; }
.sheet-context { font-weight: 600; color: var(--ink-2); }
.sheet-context small { font-weight: 400; }
.rows-pick .row { padding: 10px 0; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast-zone { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 12px); z-index: 40; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.toast { max-width: 480px; padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.9375rem; box-shadow: 0 8px 24px rgba(27, 19, 30, 0.25); animation: rise 0.2s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .toast-error { color: #2A1A2E; } }

/* ------------------------------------------------------------------ */
/* Entrée, états vides                                                 */
/* ------------------------------------------------------------------ */
.entry { display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.brand h1 { font-size: 4rem; margin-top: 14px; }
.brand p { margin-top: 8px; color: var(--ink-2); font-size: 1.0625rem; }
.brand-mark {
  display: block;
  width: 84px;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Ccircle cx='21' cy='20' r='18'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle cx='21' cy='20' r='18' fill='%23D8412F'/%3E%3Ccircle cx='39' cy='20' r='18' fill='%232E7D4F'/%3E%3Ccircle cx='39' cy='20' r='18' fill='%23F2B705' clip-path='url(%23a)'/%3E%3C/svg%3E") center / contain no-repeat;
}
.brand-mark i { display: none; }
.card { background: var(--surface); border-radius: 24px; padding: 22px; }
.loading { display: grid; place-items: center; }
.is-pulsing { animation: pulse 1.1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }

.empty { padding: 34px 0 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.empty h2 { font-size: 1.75rem; }
.empty p { color: var(--ink-2); max-width: 46ch; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; }

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