/* ============================================================
   Mijo — Mon carnet de recettes
   Charbon & céladon · Mobile-first, responsive desktop
   ============================================================ */

:root {
  /* Palette principale: Charbon & Céladon */
  --bg: #f5f3ee;             /* ivoire */
  --bg-2: #ecebe5;           /* ivoire foncé */
  --paper: #fafaf7;          /* papier */
  --ink: #1d1f1e;            /* charbon */
  --ink-2: #2c2f2d;
  --ink-soft: #4a4d4a;
  --muted: #8a8d89;
  --line: rgba(29, 31, 30, 0.08);
  --line-2: rgba(29, 31, 30, 0.14);

  --celadon: #9bb8ac;        /* vert d'eau */
  --celadon-deep: #6e8c81;
  --celadon-pale: #d6e0db;
  --celadon-tint: #eef2ef;

  --hanko: #b3503e;          /* sceau rouge profond, accent rare */
  --gold:  #e0a615;          /* doré chaud, utilisé pour les étoiles de notation */

  /* Type */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-display: "Manrope", var(--font-sans);

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Layers */
  --shadow-sm: 0 1px 2px rgba(29,31,30,.04), 0 1px 1px rgba(29,31,30,.03);
  --shadow-md: 0 6px 24px rgba(29,31,30,.08);
  --shadow-lg: 0 18px 48px rgba(29,31,30,.18);

  --safe-bottom: max(env(safe-area-inset-bottom), 12px);

  /* Mobile design width baseline */
  --app-max: 440px;
}

/* Theme variants */
[data-theme="sumi"] {
  --bg: #f7f3ec;
  --bg-2: #ece6db;
  --paper: #fbf8f1;
  --ink: #141312;
  --ink-2: #221f1c;
  --ink-soft: #4a4641;
  --muted: #8a857d;
  --line: rgba(20,19,18,.09);
  --line-2: rgba(20,19,18,.16);
  --celadon: #b48a5b;
  --celadon-deep: #8a6334;
  --celadon-pale: #e8d9c3;
  --celadon-tint: #f1e7d6;
  --hanko: #a4382b;
}

[data-theme="matcha"] {
  --bg: #f1efe6;
  --bg-2: #e3e1d4;
  --paper: #f7f5ec;
  --ink: #1f2520;
  --ink-2: #2b322b;
  --ink-soft: #50574d;
  --muted: #898d80;
  --line: rgba(31,37,32,.09);
  --line-2: rgba(31,37,32,.16);
  --celadon: #7c8c5b;
  --celadon-deep: #5b6a3d;
  --celadon-pale: #cdd5b3;
  --celadon-tint: #e6ead6;
  --hanko: #9a4830;
}

[data-theme="lavande"] {
  --bg: #f3edfa;             /* lavande très pâle */
  --bg-2: #e7defb;
  --paper: #fdfaff;          /* presque blanc, soupçon de lilas */
  --ink: #3a2c5e;            /* prune profond, contraste suffisant */
  --ink-2: #483766;
  --ink-soft: #6a5a8c;
  --muted: #9990ad;
  --line: rgba(58,44,94,.08);
  --line-2: rgba(58,44,94,.15);
  --celadon: #c0a8e4;        /* lavande moyenne (rôle "accent") */
  --celadon-deep: #9270cf;   /* violet vif (accent principal) */
  --celadon-pale: #dccef0;
  --celadon-tint: #ede4f6;
  --hanko: #d35ea0;          /* rose chaud (sceau / danger) */
}
/* Lavande : léger dégradé de fond pour l'effet rêveur. */
[data-theme="lavande"] body {
  background: linear-gradient(160deg, #f3edfa 0%, #f7e8f2 55%, #f3edfa 100%);
  background-attachment: fixed;
}
[data-theme="lavande"] .app-frame { background: transparent; }

[data-theme="peche"] {
  --bg: #f7e0ce;             /* pêche clair */
  --bg-2: #ead0b9;           /* pêche un cran plus profond */
  --paper: #fdf3ec;          /* ivoire pêché pour les cards */
  --ink: #1c1a22;            /* encre profonde (CTA noirs très contrastés) */
  --ink-2: #2c2733;
  --ink-soft: #5a4a44;
  --muted: #a89486;
  --line: rgba(28,26,34,.08);
  --line-2: rgba(28,26,34,.15);
  --celadon: #f0b39a;        /* pêche / saumon */
  --celadon-deep: #d97558;   /* corail vif — accent secondaire des titres */
  --celadon-pale: #fbd9c6;
  --celadon-tint: #fbe9de;
  --hanko: #c84a3e;          /* terre cuite — sceau / danger en accord pêche */
}
/* Pêche : dégradé chaud pêche clair → pêche saturé, sans aucune teinte violette. */
[data-theme="peche"] body {
  background: linear-gradient(165deg, #fce8d5 0%, #f3c9a8 100%);
  background-attachment: fixed;
}
[data-theme="peche"] .app-frame { background: transparent; }

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
}
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ============================================================
   App shell — mobile-first, responsive desktop
   ============================================================ */
.app-frame {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* On desktop we constrain to phone width, but switch to a richer 2-column "magazine" on wide screens for the home/recipes pages. We do this only via the parent layout; individual screens are still phone-sized internally. */
@media (min-width: 900px) {
  body {
    background:
      radial-gradient(1200px 600px at 80% -10%, var(--celadon-tint), transparent 60%),
      radial-gradient(900px 500px at -10% 110%, var(--bg-2), transparent 60%),
      var(--bg);
  }
  .desktop-stage {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 440px 1fr;
    gap: 0;
    align-items: stretch;
  }
  .desktop-stage .app-frame {
    grid-column: 2;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--bg);
    overflow: hidden;
  }
  .desktop-side {
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--ink-soft);
    overflow: hidden;
  }
  .desktop-side .side-logo {
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-weight: 300;
    color: var(--ink);
    margin: 0 0 8px;
  }
  .desktop-side .side-logo em {
    font-style: italic;
    font-weight: 200;
    color: var(--celadon-deep);
  }
  .desktop-side__mascot {
    position: absolute;
    bottom: -4%;
    right: -8%;
    width: 70%;
    max-width: 360px;
    pointer-events: none;
    user-select: none;
    opacity: 0.95;
    filter: drop-shadow(0 14px 28px rgba(0,0,0,.18));
  }
  .desktop-side small {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* On mobile we don't show the desktop sides */
@media (max-width: 899px) {
  .desktop-side { display: none; }
  .desktop-stage { display: block; }
}

/* ============================================================
   Top header
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.app-header.scrolled { border-bottom-color: var(--line); }
.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
}
.app-header__brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  letter-spacing: -0.02em;
}
.app-header__brand .mark {
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}
.app-header__brand .mark em {
  font-style: italic;
  font-weight: 300;
  color: var(--celadon-deep);
}
.app-header__brand .brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--celadon-deep);
  opacity: 0.7;
}
.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn--ghost { color: var(--ink-soft); }

.icon-cluster { display: flex; gap: 2px; }

/* ============================================================
   Bottom nav
   ============================================================ */
.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 50;
  margin-top: auto;
  padding: 8px 14px var(--safe-bottom);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--line);
}
.bottom-nav__inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  position: relative;
}
.bottom-nav__btn {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 6px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 14px;
  position: relative;
  transition: color .25s ease;
}
.bottom-nav__btn .lab {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.bottom-nav__btn.is-active { color: var(--ink); }
.bottom-nav__btn .ind {
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--celadon-deep);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: center;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1);
}
.bottom-nav__btn.is-active .ind { opacity: 1; transform: scaleX(1); }

/* FAB — flottant en bas à droite, juste au-dessus de la bottom nav */
.fab-central {
  position: absolute;
  right: 16px;
  bottom: calc(100% + 14px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(29,31,30,.28), 0 2px 6px rgba(29,31,30,.12);
  border: 0;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.9,.3,1), box-shadow .25s ease;
  z-index: 60;
}
.fab-central:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(29,31,30,.32), 0 2px 6px rgba(29,31,30,.14); }
.fab-central:active { transform: scale(.94); }

/* ============================================================
   Page transitions
   ============================================================ */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: page-in .42s cubic-bezier(.2,.8,.2,1) both;
  min-height: 0;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 160px;
}
.page__scroll::-webkit-scrollbar { width: 0; }

/* ============================================================
   Typography utilities
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.h-display {
  font-size: 38px;
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-weight: 300;
  margin: 0;
}
.h-display em {
  font-style: italic;
  font-weight: 200;
  color: var(--celadon-deep);
}
.h-section {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
}
.kanji-decor {
  font-family: "Noto Serif JP", serif;
  font-weight: 300;
  color: var(--ink);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  position: absolute;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.005em;
  transition: transform .18s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--ink-2); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn--celadon {
  background: var(--celadon-deep);
  color: var(--paper);
}
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 12.5px; }

/* ============================================================
   Lot A — Fluidité & matière
   ============================================================ */

/* Révélation progressive des images (blur-up) : floue et légèrement zoomée
   à l'arrivée, nette une fois chargée. Les images en cache sautent l'effet
   (is-loaded posé dès le montage via img.complete). */
.img-reveal {
  opacity: 0;
  filter: blur(12px);
  transform: scale(1.03);
  transition: opacity .3s ease, filter .5s ease, transform .5s ease;
}
.img-reveal.is-loaded {
  opacity: 1;
  filter: none;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .img-reveal { opacity: 1; filter: none; transform: none; transition: none; }
}

/* View Transitions natives : fondu rapide entre vues ; le morph photo
   carte → hero utilise le nom partagé "recipe-hero" (posé au clic). */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .22s;
}
::view-transition-group(recipe-hero) {
  animation-duration: .32s;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}

/* ============================================================
   CTA Premium — bouton d'achat de la modal "Cuisine sans limites"
   ============================================================ */
.premium-cta {
  position: relative;
  width: 100%;
  /* flex-shrink 0 : la modal Premium est une colonne flex bornée à 92vh —
     sans ça le bouton se fait compresser et son contenu est rogné
     (overflow:hidden nécessaire au reflet animé). */
  flex-shrink: 0;
  min-height: 66px;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(120deg,
    var(--celadon-deep) 0%,
    color-mix(in srgb, var(--celadon-deep) 55%, var(--hanko)) 55%,
    var(--hanko) 100%);
  box-shadow:
    0 14px 32px -10px color-mix(in srgb, var(--celadon-deep) 65%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .28);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
}
.premium-cta:active { transform: scale(.98); }
.premium-cta:disabled { opacity: .72; cursor: default; }
/* Reflet qui balaie le bouton par intervalles — l'œil est attiré sans clignoter. */
.premium-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.3) 50%, transparent 58%);
  transform: translateX(-130%);
  animation: premium-cta-sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes premium-cta-sheen {
  0%, 55%   { transform: translateX(-130%); }
  80%, 100% { transform: translateX(130%); }
}
.premium-cta__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* overflow hidden : rien ne doit jamais chevaucher la pastille flèche. */
.premium-cta__body { flex: 1; min-width: 0; overflow: hidden; }
.premium-cta__title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}
.premium-cta__title em {
  font-family: "Noto Serif JP", serif;
  font-style: italic;
  font-weight: 300;
  font-size: 16.5px;
}
.premium-cta__sub {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  /* Interlettrage minimal : le libellé complet doit être ENTIÈREMENT visible
     sans ellipse. Lisibilité d'abord — les libellés longs sont raccourcis
     côté JSX plutôt que d'écraser la taille. Cran @media sous 380px. */
  letter-spacing: .02em;
  white-space: nowrap;
  text-transform: uppercase;
  opacity: .88;
}
/* Palier mobile : la zone de texte du CTA est plus étroite dans la modal
   (padding de carte en plus) — le palier couvre jusqu'à 399px et réduit
   AUSSI le prix en gras, sinon lui seul suffit à faire déborder la ligne. */
@media (max-width: 399px) {
  .premium-cta__sub { font-size: 8.5px; letter-spacing: 0; }
  .premium-cta__sub strong { font-size: 9.5px; letter-spacing: 0; }
}
/* Le prix vit dans la sous-ligne, en gras (voir .premium-cta__sub strong). */
.premium-cta__sub strong {
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .01em;
}
.premium-cta__arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--celadon-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}
.premium-cta:hover .premium-cta__arrow { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .premium-cta::after { animation: none; }
}

/* ── Variante "Offrir Premium" ──────────────────────────────────
   Même famille que le CTA d'achat mais inversée : fond papier, liseré
   dégradé céladon→hanko, pas de reflet animé — clairement un geste
   différent (offrir ≠ acheter pour soi), hiérarchie sous le CTA principal. */
.premium-cta--gift {
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    linear-gradient(120deg, var(--celadon-deep), var(--hanko)) border-box;
  border: 1.5px solid transparent;
  color: var(--ink);
  box-shadow: 0 8px 22px -14px color-mix(in srgb, var(--celadon-deep) 55%, transparent);
}
.premium-cta--gift::after { display: none; }
.premium-cta--gift .premium-cta__icon {
  background: linear-gradient(135deg, var(--celadon-deep) 0%, var(--hanko) 100%);
  border: 0;
  color: #fff;
}
.premium-cta--gift .premium-cta__title { color: var(--ink); }
.premium-cta--gift .premium-cta__title em { color: var(--celadon-deep); }
.premium-cta--gift .premium-cta__sub { color: var(--muted); opacity: 1; }
.premium-cta--gift .premium-cta__arrow {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

/* ============================================================
   Lot B — Le carnet qui vit
   ============================================================ */

/* Tampon hanko "fait le …" — encre rouge, pose légèrement de travers sur la
   photo du détail recette, avec un pop d'apparition façon coup de tampon. */
@keyframes hanko-in {
  0%   { transform: rotate(-5deg) scale(1.7); opacity: 0; }
  55%  { transform: rotate(-5deg) scale(.93); opacity: 1; }
  100% { transform: rotate(-5deg) scale(1); opacity: 1; }
}
.hanko-stamp {
  position: absolute;
  right: 16px;
  /* .detail-body chevauche le bas du hero de 28px (margin-top:-28 + z-index
     supérieur) : le tampon doit rester AU-DESSUS de cette zone, sinon il est
     à moitié recouvert par l'arrondi du corps de page. */
  bottom: 44px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px 7px;
  border: 2px solid color-mix(in srgb, var(--hanko) 80%, #fff);
  border-radius: 7px;
  color: #fff;
  background: color-mix(in srgb, var(--hanko) 84%, transparent);
  transform: rotate(-5deg);
  font-family: var(--font-mono);
  text-transform: uppercase;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.35);
  animation: hanko-in .4s cubic-bezier(.2,.8,.3,1.15) .15s both;
  pointer-events: none;
}
.hanko-stamp__top  { font-size: 8.5px; letter-spacing: .22em; opacity: .92; }
.hanko-stamp__date { font-size: 15px; font-weight: 600; letter-spacing: .08em; margin-top: 1px; }
.hanko-stamp__count {
  position: absolute;
  top: -9px; right: -11px;
  background: var(--paper);
  color: var(--hanko);
  border: 1.5px solid var(--hanko);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  transform: rotate(5deg);
  letter-spacing: .04em;
}
@media (prefers-reduced-motion: reduce) {
  .hanko-stamp { animation: none; }
}

/* Notes manuscrites — l'annotation personnelle au crayon dans le carnet :
   police manuscrite sur lignes discrètes. */
.notes-hand {
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: 19px;
  line-height: 28px;
  color: var(--ink-2);
  white-space: pre-wrap;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 27px,
    color-mix(in srgb, var(--line) 75%, transparent) 27px 28px
  );
}

/* ============================================================
   Chips / pills
   ============================================================ */
.chip {
  appearance: none;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all .22s ease;
  position: relative;
}
/* Zone de hit étendue à ~45px de haut (cible tactile) sans changer le visuel.
   Verticale uniquement : les chips sont côte à côte dans les filtres. */
.chip::before {
  content: "";
  position: absolute;
  inset: -6px 0;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.chip--soft {
  background: var(--celadon-tint);
  border-color: transparent;
  color: var(--celadon-deep);
}

/* ============================================================
   Card shapes (controlled by data-card)
   ============================================================ */
[data-card="rounded"] .recipe-card,
[data-card="rounded"] .friend-card,
[data-card="rounded"] .menu-card { border-radius: var(--r-lg); }
[data-card="rounded"] .recipe-card .ph,
[data-card="rounded"] .menu-card .ph { border-radius: var(--r-lg); }

[data-card="square"] .recipe-card,
[data-card="square"] .friend-card,
[data-card="square"] .menu-card { border-radius: 6px; }
[data-card="square"] .recipe-card .ph,
[data-card="square"] .menu-card .ph { border-radius: 6px; }

[data-card="asym"] .recipe-card { border-radius: 28px 6px 28px 6px; }
[data-card="asym"] .recipe-card .ph { border-radius: 28px 6px 28px 6px; }
[data-card="asym"] .menu-card { border-radius: 6px 28px 6px 28px; }
[data-card="asym"] .friend-card { border-radius: 28px; }

/* ============================================================
   Scroll snap horizontal lists
   ============================================================ */
.h-scroll {
  display: flex;
  gap: 12px;
  padding: 4px 20px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ============================================================
   Image placeholder — ribbed monospace
   ============================================================ */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px 14px),
    color-mix(in srgb, var(--celadon-tint) 80%, var(--bg));
  overflow: hidden;
  isolation: isolate;
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 10px 8px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.55;
}

/* Real image variant */
.ph--img {
  background: var(--bg-2);
}
.ph--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s cubic-bezier(.2,.6,.2,1);
}
.ph--img.kenburns img { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1.05) translate(-1%, -0.5%); }
  to   { transform: scale(1.18) translate( 2%,  1%); }
}

/* ============================================================
   Hero (Accueil)
   ============================================================ */
.hero {
  position: relative;
  height: 78dvh;
  min-height: 540px;
  max-height: 720px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.78);
  transform: scale(1.06);
  animation: heroZoom 9s ease-in-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to   { transform: scale(1.16); }
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.7) 100%);
}
.hero__content {
  position: absolute;
  inset: auto 0 30px 0;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}
.hero__eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--celadon-pale); }
.hero__title {
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 300;
  margin: 0;
  max-width: 90%;
}
.hero__title em {
  font-style: italic;
  font-weight: 200;
}
.hero__meta {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,.85);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 6px; }

.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px;
  pointer-events: none;
}
.hero__nav button {
  pointer-events: auto;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.18);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease;
}
.hero__nav button:hover { background: rgba(0,0,0,.4); }
.hero__nav button:active { transform: scale(.94); }

.hero__bullets {
  position: absolute;
  bottom: 0;
  left: 19px;
  display: flex;
  z-index: 2;
}
/* Chaque bullet est un vrai bouton (saut direct vers la slide) avec une zone
   de hit généreuse ; le trait de 14×2 reste le seul visuel. */
.hero__bullets button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 22px 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: flex-end;
}
.hero__bullets button span {
  width: 14px; height: 2px; background: rgba(255,255,255,.3); border-radius: 1px;
  transition: background .3s ease, width .35s ease;
}
.hero__bullets button.is-active span { background: var(--paper); width: 28px; }

/* Hero mascot — illustration de chef qui dépasse du bas droit du hero */
.hero__mascot {
  position: absolute;
  bottom: 0;
  right: -18px;
  height: 78%;
  max-height: 360px;
  width: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,.35));
  z-index: 2;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 92%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 92%, transparent 100%);
}
@media (max-width: 480px) {
  .hero__mascot { height: 62%; right: -22px; max-height: 280px; }
}

.hero__corner-mark {
  position: absolute;
  top: 22px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
  display: flex;
  gap: 6px;
  align-items: center;
}
.hero__corner-mark .num {
  font-variant-numeric: tabular-nums;
  color: var(--celadon-pale);
}

/* ============================================================
   Recipe cards
   ============================================================ */
.recipe-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.recipe-card .ph {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-md);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.recipe-card__body {
  padding: 12px 14px 14px;
}
.recipe-card__title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}
.recipe-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.recipe-card__cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 5px 9px;
  border-radius: 999px;
}
.recipe-card__fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  transition: transform .2s ease;
}
/* Étend la zone de hit du cœur à 44×44 (le visuel reste 32×32). */
.recipe-card__fav::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
}
.recipe-card__fav.is-on { color: #e0245e; background: rgba(255,255,255,.92); }
.recipe-card__fav.is-on .icon-svg { fill: currentColor; stroke: currentColor; }
.recipe-card__fav:active { transform: scale(.9); }
.icon-btn.is-fav { color: #e0245e !important; }
.icon-btn.is-fav .icon-svg { fill: currentColor; stroke: currentColor; }

/* Featured / wide card */
.recipe-card--wide .ph {
  aspect-ratio: 16 / 11;
}

/* Tilt variant — effet 3D au survol (cartes "Mes recettes") */
.recipe-card--tilt {
  overflow: visible;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(0);
  transition: transform .35s cubic-bezier(.2,.85,.2,1), box-shadow .35s ease;
  will-change: transform;
}
.recipe-card--tilt:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-3px);
  box-shadow: 0 22px 44px -14px rgba(29,31,30,.22), 0 4px 14px rgba(29,31,30,.08);
  transition: transform .07s linear, box-shadow .25s ease;
}
.recipe-card--tilt .ph,
.recipe-card--tilt .recipe-card__body {
  transform: translateZ(18px);
  transition: transform .35s cubic-bezier(.2,.85,.2,1);
}
.recipe-card--tilt .recipe-card__body { transform: translateZ(14px); }
.recipe-card--tilt .recipe-card__cat { transform: translateZ(38px); }
/* .recipe-card__hot vit dans .ph (overflow hidden) → 3D aplati, translateZ inopérant. */
.recipe-card--tilt .recipe-card__fav { transform: translateZ(46px); }
.recipe-card--tilt:hover .ph { transform: translateZ(24px); }

@media (prefers-reduced-motion: reduce) {
  .recipe-card--tilt,
  .recipe-card--tilt:hover {
    transform: none;
  }
  .recipe-card--tilt .ph,
  .recipe-card--tilt .recipe-card__body,
  .recipe-card--tilt .recipe-card__cat,
  .recipe-card--tilt .recipe-card__fav,
  .recipe-card--tilt:hover .ph { transform: none; }
}

/* Editorial — large card with side text */
.recipe-card--editorial {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
  align-items: stretch;
}
.recipe-card--editorial .ph {
  aspect-ratio: auto;
  height: 100%;
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.recipe-card--editorial .recipe-card__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 18px 16px;
}

/* Mosaic */
.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
}

/* ============================================================
   Detail / Recipe page
   ============================================================ */
.detail-hero {
  position: relative;
  height: 42dvh;
  min-height: 300px;
  max-height: 420px;
  background: var(--ink);
  overflow: hidden;
  flex-shrink: 0;
}
.detail-hero img {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 22s ease-in-out infinite alternate;
}
.detail-hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 40%);
  pointer-events: none;
}
.detail-hero__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 14px 16px;
  z-index: 5;
}
.detail-hero__top .icon-btn {
  background: rgba(255,255,255,.18);
  color: var(--paper);
  backdrop-filter: blur(10px);
}
.detail-hero__title-block {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0 24px 22px;
  color: var(--paper);
  z-index: 4;
}
.detail-hero__title {
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 300;
  margin: 0;
  color: var(--ink);
  text-wrap: pretty;
}
.detail-hero__title em {
  font-style: italic;
  font-weight: 200;
  color: var(--celadon-deep);
}
.detail-hero__cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--celadon-deep);
  margin-bottom: 8px;
  display: inline-block;
}

.detail-body {
  background: var(--bg);
  padding: 24px 24px 170px;
  position: relative;
  z-index: 3;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  margin-top: -28px;
  flex-shrink: 0;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 0;
  margin-top: 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 5;
}
.metrics-row .metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 0 4px;
  min-width: 0;
  position: relative;
}
.metrics-row .metric + .metric::before {
  content: "";
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: var(--line);
}
.metric .lab {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.metric .val {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section */
.section { margin-top: 28px; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 14px;
}
.section__head .h-section { flex: 1; min-width: 0; }
.section__head .eyebrow { color: var(--celadon-deep); }

/* Servings slider */
.servings {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 18px 22px;
}
.servings__top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
}
.servings__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.servings__count {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.servings__count .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0;
}
.servings__slider {
  position: relative;
  margin-top: 18px;
  height: 30px;
}
.servings__track {
  position: absolute;
  top: 14px;
  left: 0; right: 0;
  height: 2px;
  background: var(--line-2);
  border-radius: 1px;
}
.servings__fill {
  position: absolute;
  top: 14px;
  left: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: width .25s cubic-bezier(.2,.8,.2,1);
}
.servings__ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.servings__ticks span {
  width: 1px; height: 6px; background: var(--line-2); align-self: center;
}
.servings__thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 4px 12px rgba(29,31,30,.18);
  cursor: grab;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .2s;
}
.servings__thumb::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--ink);
}
.servings__thumb:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.08); }
input[type=range].servings__input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  background: transparent;
  outline: none;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.servings__nums {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}
.servings__nums span.is-active { color: var(--ink); }

/* Ingredients */
.ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ingredients li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.ingredients li:last-child { border-bottom: 0; }
.ingredients .qty {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.ingredients .qty .u {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.ingredients .name {
  font-size: 14.5px;
  letter-spacing: -0.005em;
  color: var(--ink-2);
}
.ingredients .qty.flash {
  animation: qtyFlash .5s cubic-bezier(.2,.8,.2,1);
}
@keyframes qtyFlash {
  0% { color: var(--celadon-deep); transform: translateY(-1px); }
  100% { color: var(--ink); transform: translateY(0); }
}

/* Steps */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.step:last-child { border-bottom: 0; }
.step__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--celadon-deep);
  font-variant-numeric: tabular-nums;
}
.step__num strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.step__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Tags row */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  background: var(--celadon-tint);
  color: var(--celadon-deep);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, transform .15s ease;
}
.tag:hover { background: color-mix(in srgb, var(--celadon-tint) 70%, var(--celadon-deep) 18%); }
.tag:active { transform: scale(0.96); }

/* Source link */
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  font-size: 13.5px;
  transition: border-color .2s;
}
.source-link:hover { border-color: var(--ink); }

/* Notes block */
.notes {
  background: var(--celadon-tint);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  position: relative;
  border-left: 2px solid var(--celadon-deep);
}
.notes .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--celadon-deep);
  margin-bottom: 8px;
  display: block;
}

/* Rating stars */
.stars { display: inline-flex; gap: 4px; }
.stars .s {
  color: var(--line-2);
  transition: color .25s ease;
}
.stars .s.on { color: var(--gold); }
/* Étoiles "on" : remplies en jaune (au lieu du simple contour). */
.stars .s.on .icon-svg { fill: currentColor; stroke: currentColor; }

/* Urgence : bandeau "Dernière place !" sur PremiumModal qui pulse doucement. */
@keyframes premium-last-pulse {
  0%, 100% { transform: rotate(3deg) scale(1); }
  50%      { transform: rotate(3deg) scale(1.07); }
}

/* ============================================================
   Friends
   ============================================================ */
.friend-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.friend-card:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); }
.friend-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--celadon-tint);
  color: var(--celadon-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 16px;
  overflow: hidden;
  position: relative;
}
.friend-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.friend-avatar--lg { width: 96px; height: 96px; font-size: 28px; }
.friend-card__body { flex: 1; min-width: 0; }
.friend-card__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.friend-card__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.friend-list { display: flex; flex-direction: column; gap: 8px; padding: 0 20px; }

/* Friend stack on menus */
.friend-stack {
  display: inline-flex;
}
.friend-stack > * + * { margin-left: -10px; }
.friend-stack .friend-avatar {
  width: 28px; height: 28px;
  font-size: 11px;
  border: 2px solid var(--paper);
}

/* ============================================================
   Menus
   ============================================================ */
.menu-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.menu-card__cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}
.menu-card__cover .ph { border-radius: 0; }
.menu-card__body { padding: 14px 16px 16px; }
.menu-card__date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--celadon-deep);
}
.menu-card__title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
  line-height: 1.2;
}
.menu-card__people {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 0 20px 0 56px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 38px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--line);
}
.timeline__item {
  position: relative;
  padding: 8px 0 22px;
}
.timeline__dot {
  position: absolute;
  left: -22px;
  top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.timeline__date {
  position: absolute;
  left: -56px;
  top: 12px;
  width: 30px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  line-height: 1.1;
}
.timeline__date small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================================
   Search modal
   ============================================================ */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  animation: search-in .35s cubic-bezier(.2,.8,.2,1) both;
}
.search-modal__inner {
  width: 100%;
  max-width: var(--app-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}
@keyframes search-in {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(20px); }
}
.search-modal__head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.search-modal__field {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-modal__field input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.search-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 40px;
}
.search-section + .search-section { margin-top: 22px; }
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  animation: result-in .3s ease both;
}
@keyframes result-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-result__thumb {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--celadon-tint);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 18px;
  color: var(--celadon-deep);
}
.search-result__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-result__body { flex: 1; min-width: 0; }
.search-result__title {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.search-result__sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.search-result mark {
  background: var(--celadon-pale);
  color: var(--ink);
  border-radius: 3px;
  padding: 0 2px;
}

/* ============================================================
   Sheet (bottom modal) for forms / detail dialogs
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.42);
  z-index: 90;
  animation: backdrop-in .25s ease both;
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sheet {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  max-height: 92dvh;
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  animation: sheet-in .42s cubic-bezier(.2,.85,.2,1) both;
  box-shadow: 0 -10px 30px rgba(0,0,0,.18);
}
@keyframes sheet-in {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}
.sheet__handle {
  width: 36px; height: 4px;
  background: var(--line-2);
  border-radius: 4px;
  margin: 10px auto 4px;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
}
.sheet__head h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 28px;
}
.sheet__foot {
  padding: 12px 20px calc(var(--safe-bottom) + 12px);
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  gap: 10px;
}
.sheet__foot .btn { flex: 1; }

/* ============================================================
   Form fields
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }

/* ── Listes d'items de FriendForm (allergies, favs, likes…) ───────── */
.fl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fl-list:empty { display: none; }
.fl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  /* Teinte celadon douce : différencie clairement les tags "enregistrés"
     du champ input vide (qui reste blanc paper). */
  background: color-mix(in srgb, var(--celadon-deep) 8%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--celadon-deep) 25%, var(--line));
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.fl-item.fl-item--hanko {
  /* Variante hanko : contraintes négatives (allergies, n'aime pas). */
  background: color-mix(in srgb, var(--hanko) 10%, var(--paper));
  border-color: color-mix(in srgb, var(--hanko) 30%, var(--line));
  color: var(--hanko);
}
.fl-item-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fl-item-del {
  flex-shrink: 0; width: 26px; height: 26px;
  border: 0; border-radius: 999px;
  background: transparent;
  /* Toujours en hanko : suggère immédiatement "retirer/supprimer". */
  color: var(--hanko);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.fl-item-del:hover {
  background: color-mix(in srgb, var(--hanko) 15%, transparent);
}
.fl-addrow { display: flex; gap: 6px; align-items: stretch; }
.fl-addrow input { flex: 1; min-width: 0; }
.fl-addrow .icon-btn { flex-shrink: 0; }
.field__lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.field input[type=text],
.field input[type=url],
.field input[type=number],
.field input[type=date],
.field textarea,
.field select {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  letter-spacing: -0.005em;
  outline: none;
  color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
  background: var(--paper);
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; font-family: inherit; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; margin-top: 14px; }
.row-2 + .field, .row-3 + .field { margin-top: 14px; }

/* Layout 2 lignes :
   ┌────────┬────────┬─────┐
   │  Qté   │ Unité  │  ⊗  │   ← ligne 1
   ├────────┴────────┴─────┤
   │     Ingrédient        │   ← ligne 2 pleine largeur
   └───────────────────────┘
   Plus de débordement possible : le nom d'ingrédient a sa propre ligne. */
.ing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "qty unit del"
    "name name name";
  column-gap: 8px;
  row-gap: 8px;
  align-items: center;
}
.ing-row + .ing-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ing-row > input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.ing-cell--qty  { grid-area: qty; }
.ing-cell--unit { grid-area: unit; }
.ing-cell--name { grid-area: name; }
.ing-row > .del-mini { grid-area: del; align-self: center; }
.step-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.step-row + .step-row { margin-top: 10px; }
/* Même fix qu'ing-row : empêche le textarea de déborder à droite quand
   on tape un texte long sur une seule ligne. */
.step-row > textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
/* Poignée de réordonnancement (appui long sur le numéro puis glisser).
   touch-action:none = le navigateur ne démarre JAMAIS un scroll depuis le
   numéro — condition pour que le geste reste interceptable pendant le drag.
   Le scroll de la page reste possible depuis tout le reste de la ligne. */
.step-row__num--grab {
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.step-row--dragging {
  background: color-mix(in srgb, var(--celadon-deep) 10%, var(--paper));
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
}
.step-row--dragging .step-row__num { cursor: grabbing; }
.step-row__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--celadon-deep);
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  padding-top: 14px;
}

.del-mini {
  appearance: none;
  border: 0;
  background: transparent;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.del-mini:hover { color: var(--hanko); background: var(--bg-2); }

/* Add button (linkish) */
.add-line {
  appearance: none;
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: 12px;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
  transition: border-color .2s, color .2s;
}
.add-line:hover { color: var(--ink); border-color: var(--ink); }

/* Difficulty pills */
.diff-pills { display: flex; gap: 6px; }
.diff-pill {
  appearance: none;
  border: 1px solid var(--line-2);
  background: transparent;
  border-radius: 12px;
  padding: 9px 12px;
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.diff-pill.is-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Inline-edit name */
.inline-edit {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
  border-bottom: 1px dashed transparent;
  padding: 1px 0;
  transition: border-color .2s;
  width: 100%;
}
.inline-edit:hover { border-bottom-color: var(--line-2); }
.inline-edit:focus { border-bottom-color: var(--ink); }

/* Empty states */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 30px;
  color: var(--muted);
  gap: 14px;
}
.empty__icon {
  color: var(--ink);
  opacity: 0.18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.empty__icon .icon-svg { width: auto; height: auto; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 170px);
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: -0.005em;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  animation: toast-in .35s cubic-bezier(.2,.8,.2,1) both, toast-out .35s ease 1.6s both;
  box-shadow: var(--shadow-lg);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translate(-50%, -8px); }
}

/* Section header decoration: small JP kanji + line */
.sec-deco {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}
.sec-deco__icon {
  display: inline-flex;
  align-items: center;
  color: var(--celadon-deep);
  font-weight: 300;
}
.sec-deco .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sec-deco .num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Category pills horizontal */
.cat-rail {
  display: flex;
  gap: 8px;
  padding: 4px 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }

/* Stat tiles for dashboard */
.stat-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.stat:hover { border-color: var(--ink-soft); }
.stat:active { transform: scale(0.985); }
.stat .lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat .val {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat .sub {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.stat .stat__icon-bg {
  position: absolute;
  right: -8px;
  bottom: -10px;
  color: var(--ink);
  opacity: 0.07;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stat .stat__icon-bg .icon-svg { width: auto; height: auto; stroke-width: 1.2; }

/* Featured rail bigger */
.featured-rail {
  display: flex;
  gap: 14px;
  padding: 4px 20px 16px 20px;
  scroll-padding-left: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.featured-rail::-webkit-scrollbar { display: none; }
.featured-rail .recipe-card {
  width: 220px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Tab bar variants for sub-pages (recipes filters etc) */
.subtabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.subtab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 14px 12px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  letter-spacing: -0.005em;
}
.subtab.is-active { color: var(--ink); }
.subtab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px 1px 0 0;
}

/* Misc utilities */
.flex-row { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; } .gap-20 { gap: 20px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.mt-6 { margin-top: 6px; } .mt-10 { margin-top: 10px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; }
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }

/* ============================================================
   Categories editor row
   ============================================================ */
.cat-edit-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.cat-edit-row + .cat-edit-row { margin-top: 8px; }
.cat-emoji {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--celadon-tint);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Noto Serif JP", serif;
  color: var(--celadon-deep);
  font-size: 18px;
  flex-shrink: 0;
}

/* ============================================================
   Icon style toggle (line vs filled)
   ============================================================ */
[data-icon="filled"] .icon-svg { fill: currentColor; stroke: none; }
[data-icon="line"] .icon-svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   Animations on enter
   ============================================================ */
.stagger > * { opacity: 0; transform: translateY(6px); animation: stag .5s cubic-bezier(.2,.8,.2,1) both; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .10s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .22s; }
.stagger > *:nth-child(5) { animation-delay: .28s; }
.stagger > *:nth-child(6) { animation-delay: .34s; }
.stagger > *:nth-child(7) { animation-delay: .40s; }
.stagger > *:nth-child(8) { animation-delay: .46s; }
@keyframes stag {
  to { opacity: 1; transform: translateY(0); }
}

/* Ripple-like wash */
.wash {
  position: relative;
  overflow: hidden;
}
.wash::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 90%);
  pointer-events: none;
}

/* Avatar color seeds (deterministic) */
.av-1 { background: #d8d3c3; color: #5a5443; }
.av-2 { background: #c8d4cb; color: #455550; }
.av-3 { background: #d3c8d4; color: #5b4d5b; }
.av-4 { background: #cccfb9; color: #4f5340; }
.av-5 { background: #c4cdd4; color: #44505a; }
.av-6 { background: #d8c9bd; color: #5b4a3d; }

/* Prep mode start button (in RecipeDetail) — CTA mis en valeur :
   fond celadon léger + bordure colorée + élévation, pour qu'il sorte du flux
   des actions ghost qui suivent (Modifier / Exporter / Email / Supprimer). */
.prep-start {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 22px;
  padding: 14px 16px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--celadon-deep) 10%, var(--paper)) 0%,
    color-mix(in srgb, var(--celadon-deep) 4%, var(--paper)) 100%
  );
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--celadon-deep) 38%, var(--line));
  border-radius: var(--r-md);
  box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--celadon-deep) 35%, transparent);
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, border-color .15s ease;
}
.prep-start::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    color-mix(in srgb, var(--celadon-deep) 18%, transparent) 0%,
    transparent 60%
  );
  opacity: 0.6;
  pointer-events: none;
}
.prep-start:hover {
  transform: translateY(-1px);
  border-color: var(--celadon-deep);
  box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--celadon-deep) 50%, transparent);
}
.prep-start:active { transform: translateY(0); }
.prep-start__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--celadon-deep);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -2px color-mix(in srgb, var(--celadon-deep) 55%, transparent);
  position: relative;
  z-index: 1;
}
.prep-start__icon .icon-svg { fill: #fff; stroke: none; }
.prep-start__body {
  flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0;
  position: relative; z-index: 1;
}
.prep-start__title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.prep-start__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--celadon-deep);
  font-weight: 500;
}
.prep-start > .icon-svg { color: var(--celadon-deep); flex-shrink: 0; position: relative; z-index: 1; }

/* Prep mode (fullscreen) */
.prep {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: prep-in .3s cubic-bezier(.2,.85,.2,1) both;
}
@keyframes prep-in {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}
.prep__head {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.prep__title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.prep__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
}
.prep__progress { display: flex; gap: 4px; }
.prep__dot {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  transition: background .25s ease;
}
.prep__dot.is-done { background: color-mix(in srgb, var(--celadon-deep) 60%, transparent); }
.prep__dot.is-current { background: var(--celadon-deep); }
.prep__counter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--celadon-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prep__body {
  flex: 1;
  overflow-y: auto;
  padding: 36px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.prep__step {
  max-width: 640px;
  width: 100%;
  animation: prep-step-in .35s cubic-bezier(.2,.85,.2,1) both;
}
@keyframes prep-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.prep__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--celadon-deep);
  margin-bottom: 22px;
}
.prep__text {
  font-size: 30px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-weight: 300;
  margin: 0;
}
@media (max-width: 480px) { .prep__text { font-size: 24px; } .prep__body { padding: 28px 22px; } .prep__eyebrow { font-size: 12px; margin-bottom: 18px; } }

/* Inline timer button (within step text) */
.prep-timer-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px 4px;
  margin: 0 3px;
  background: color-mix(in srgb, var(--celadon-deep) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--celadon-deep) 32%, var(--line));
  color: var(--celadon-deep);
  border-radius: 999px;
  font: inherit;
  font-size: 0.65em;
  font-weight: 500;
  cursor: pointer;
  vertical-align: middle;
  letter-spacing: 0;
  transition: background .15s ease, transform .15s ease;
  white-space: nowrap;
  line-height: 1.3;
}
.prep-timer-inline:hover { background: color-mix(in srgb, var(--celadon-deep) 22%, transparent); transform: translateY(-1px); }
.prep-timer-inline.is-active { background: var(--celadon-deep); color: var(--paper); border-color: var(--celadon-deep); }
.prep-timer-inline .icon-svg { stroke-width: 2; }

/* Active timers floating panel — flow horizontal qui remplit une rangée
   avant de descendre (max 2 timers par ligne tant qu'on est en mode plein) */
.prep__timers {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 84px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  z-index: 112;
  width: calc(100% - 40px);
  max-width: 780px;          /* élargi pour permettre 2 timers de ~380px côte-à-côte */
  pointer-events: none;
}
.prep-timer-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  pointer-events: auto;
  /* flex-basis 50% mais grow:1 → 1 timer = pleine largeur,
     2 timers = côte à côte, 3 timers = 2+1 (orphelin pleine largeur) */
  flex: 1 1 calc(50% - 3px);
  min-width: 200px;
  max-width: 380px;
  animation: prep-timer-in .3s cubic-bezier(.2,.85,.2,1) both;
  transition: padding .4s ease, opacity .4s ease, box-shadow .4s ease,
              gap .4s ease, font-size .4s ease, flex-basis .4s ease,
              background-color .3s ease, transform .3s ease;
}
.prep-timer-card.is-shrunk {
  grid-template-columns: auto auto auto;
  /* override le flex auto-grow : taille intrinsèque, plusieurs cartes peuvent
     se ranger sur la même ligne sans s'étirer */
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  padding: 5px 10px 5px 12px;
  gap: 7px;
  opacity: 0.55;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.prep-timer-card.is-shrunk:hover { opacity: 0.95; }
.prep-timer-card.is-shrunk .prep-timer-card__label { display: none; }
.prep-timer-card.is-shrunk .prep-timer-card__time {
  font-size: 12.5px;
  letter-spacing: .02em;
}
.prep-timer-card.is-shrunk button {
  width: 18px;
  height: 18px;
}
@keyframes prep-timer-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.prep-timer-card.is-done {
  background: var(--hanko);
  animation: prep-timer-pulse 1.2s ease infinite;
}
@keyframes prep-timer-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(179,80,62,.5); }
  50% { box-shadow: 0 10px 36px rgba(179,80,62,.85); }
}
.prep-timer-card .icon-svg { stroke: currentColor; }
.prep-timer-card__label { font-size: 12px; opacity: .82; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-timer-card__time {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  white-space: nowrap;
}
.prep-timer-card button {
  background: rgba(255,255,255,.18);
  border: 0;
  color: inherit;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Bottom condensed ingredients panel — toujours visible pendant la prép */
.prep__ings-panel {
  flex-shrink: 0;
  max-height: 32dvh;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--paper) 92%, var(--bg));
  border-top: 1px solid var(--line);
}
.prep__ings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 6px;
}
.prep__ings-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.prep__ings-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  color: var(--celadon-deep);
}
.prep__ings-list {
  list-style: none;
  margin: 0;
  padding: 0 14px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.prep__ings-list::-webkit-scrollbar { width: 4px; }
.prep__ings-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 2px; }
.prep__ing-row {
  display: grid;
  grid-template-columns: 18px 60px 1fr;
  gap: 8px;
  align-items: center;
  padding: 5px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s ease, opacity .12s ease;
}
.prep__ing-row:hover { background: color-mix(in srgb, var(--celadon-tint) 30%, transparent); }
.prep__ing-row.is-checked { opacity: .48; }
.prep__ing-row.is-checked .prep__ing-name,
.prep__ing-row.is-checked .prep__ing-qty { text-decoration: line-through; }
.prep__ing-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.4px solid var(--line-2);
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--celadon-deep);
}
.prep__ing-row.is-checked .prep__ing-check { background: var(--celadon-tint); border-color: var(--celadon-deep); }
.prep__ing-qty {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prep__ing-qty .u { font-size: 10px; color: var(--muted); margin-left: 1px; }
.prep__ing-name {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer nav (Précédent / Suivant) — boutons plus gros */
.prep__foot {
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.prep__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.prep__nav .btn {
  padding: 16px 18px;
  font-size: 15px;
  justify-content: center;
  border-radius: 12px;
}
.prep__nav .btn:disabled { opacity: .35; cursor: not-allowed; }

/* Hot recipe marker (small flame badge on recipe card image) */
.recipe-card__hot {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
  pointer-events: none;
}
.recipe-card__hot .icon-svg { stroke: var(--hanko); fill: none; }

/* Hot pill (in RecipeDetail near rating) */
.hot-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hanko) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--hanko) 28%, var(--line));
  color: var(--hanko);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hot-pill .icon-svg { stroke: var(--hanko); fill: none; }

/* Stats — small line tile (Repères) */
.stat-line {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.stat-line__lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-line__val {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.stat-line__val .u {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 500;
}
.stat-line__val .icon-svg { stroke: currentColor; fill: none; transform: translateY(2px); }
.stat-line__val--hot .icon-svg { stroke: var(--hanko); }
.stat-line__sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Ranking list (Top recettes / amis) */
.ranking {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ranking__row {
  display: grid;
  grid-template-columns: 32px 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.ranking__row:hover { border-color: var(--ink-soft); }
.ranking__row:active { transform: scale(.99); }
.ranking__rank {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--celadon-deep);
  text-align: center;
  font-weight: 600;
}
.ranking__img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
}
.ranking__body {
  min-width: 0;
}
.ranking__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranking__sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.ranking__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--celadon-tint);
  color: var(--celadon-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}
.ranking__badge .icon-svg { stroke: var(--hanko); fill: none; }

/* Category bar (Répartition) */
.cat-bar {
  display: grid;
  grid-template-columns: 22px 1fr 1fr 30px;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.cat-bar:last-child { border-bottom: 0; }
.cat-bar__bullet {
  font-size: 9px;
  color: var(--celadon-deep);
  text-align: center;
  font-weight: 300;
}
.cat-bar__name {
  font-size: 13px;
  letter-spacing: -0.005em;
}
.cat-bar__track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.cat-bar__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--celadon-deep), color-mix(in srgb, var(--celadon-deep) 70%, var(--ink)));
  border-radius: 999px;
  transition: width .4s cubic-bezier(.2,.8,.2,1);
}
.cat-bar__count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

/* Insight card (Relances douces) */
.insight-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.insight-card:hover { border-color: var(--celadon-deep); }
.insight-card:active { transform: scale(.99); }
.insight-card .icon-svg { color: var(--muted); }

/* Shopping CTA card (in MenuDetail) */
.shopping-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px 14px 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--celadon-tint) 70%, var(--paper)) 0%, var(--paper) 100%);
  border: 1px solid color-mix(in srgb, var(--celadon-deep) 26%, var(--line));
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition: transform .18s cubic-bezier(.2,.85,.2,1), border-color .18s ease, box-shadow .18s ease;
  position: relative;
  overflow: hidden;
}
.shopping-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 0% 50%, color-mix(in srgb, var(--celadon-deep) 14%, transparent) 0%, transparent 65%);
  pointer-events: none;
}
.shopping-cta:hover {
  border-color: var(--celadon-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.shopping-cta:active { transform: scale(.99); }
.shopping-cta__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--celadon-deep);
  background: color-mix(in srgb, var(--celadon-deep) 14%, var(--paper));
  flex-shrink: 0;
  position: relative;
}
.shopping-cta__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  position: relative;
}
.shopping-cta__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shopping-cta__title {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.shopping-cta__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--celadon-deep);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.shopping-cta__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.shopping-cta__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  overflow: hidden;
}
.shopping-cta__chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--celadon-deep) 8%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--celadon-deep) 18%, var(--line));
  font-size: 11.5px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shopping-cta__more {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: transparent;
  border: 1px dashed color-mix(in srgb, var(--celadon-deep) 22%, var(--line));
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--celadon-deep);
  letter-spacing: .04em;
}
.shopping-cta__chev {
  flex-shrink: 0;
  color: var(--celadon-deep);
  display: inline-flex;
  align-items: center;
  position: relative;
  transition: transform .2s ease;
}
.shopping-cta:hover .shopping-cta__chev { transform: translateX(2px); }

/* Recipe-card variant in shopping page (X button) */
.recipe-card--shopping { position: relative; }
.recipe-card__remove {
  align-self: stretch;
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--hanko) 18%, var(--line));
  /* Teinte subtile en permanence (pas seulement au hover) pour signaler la zone destructive */
  background: color-mix(in srgb, var(--hanko) 6%, transparent);
  color: color-mix(in srgb, var(--hanko) 75%, var(--muted));
  cursor: pointer;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  transition: background .15s ease, color .15s ease;
}
.recipe-card__remove:hover {
  background: color-mix(in srgb, var(--hanko) 18%, transparent);
  color: var(--hanko);
}

/* Slider "attaché" sous la carte recette (page courses) — visuellement
   relié par même bg + corner radius en bas + bordure continue */
.shopping-row {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .15s ease;
}
.shopping-row .recipe-card--shopping {
  border-radius: 0;
  border: 0;
  background: transparent;
}
.shopping-row .recipe-card--shopping .ph--img {
  border-radius: 0;
}
.shopping-row__slider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, var(--ink-soft));
  background: color-mix(in srgb, var(--celadon-deep) 4%, transparent);
}
.shopping-row__slider-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.shopping-row__slider-label strong {
  color: var(--ink);
  display: inline-block;
  animation: qtyFlash .4s cubic-bezier(.2, .8, .2, 1);
}
.shopping-row__slider input[type="range"] {
  flex: 1;
  accent-color: var(--celadon-deep);
  height: 22px;
}
/* Titre clampé à 2 lignes max (évite la casse de mise en page sur titres longs) */
.shopping-row__title {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}

/* Attempts gallery (recipe photo album) */
.attempts-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.attempts-rail::-webkit-scrollbar { height: 0; }
.attempt-add,
.attempt-thumb {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  scroll-snap-align: start;
  position: relative;
  padding: 0;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.attempt-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--celadon-deep);
  border-style: dashed;
}
.attempt-add span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.attempt-add:hover { border-color: var(--celadon-deep); }
.attempt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.attempt-thumb:active { transform: scale(.97); }
.attempt-thumb__date {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 8px 6px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.6));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: backdrop-in .2s ease both;
}
.lightbox img {
  max-width: 96vw;
  max-height: 80dvh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.lightbox__close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 14px;
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}
.lightbox__bar {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 18px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  color: #fff;
}
.lightbox__bar .icon-btn {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
}
.lightbox__date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Alert banner (menu conflicts) */
.alert-banner {
  background: color-mix(in srgb, var(--hanko) 7%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--hanko) 22%, var(--line));
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.alert-banner--soft {
  background: var(--paper);
  border-color: var(--line);
}
.alert-banner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.alert-banner__pill {
  font-size: 10.5px;
  font-family: var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hanko);
  font-weight: 600;
}
.alert-banner__pill--soft {
  color: var(--muted);
}
.alert-banner__count {
  font-size: 10.5px;
  font-family: var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.alert-banner__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.alert-banner__why {
  color: var(--hanko);
  font-weight: 500;
}
.alert-banner__hits {
  color: var(--muted);
}

/* Shopping list */
.shopping-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shopping-item {
  display: grid;
  grid-template-columns: 24px 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: opacity .2s ease;
  /* Appui long = déplacement de rayon : pas de sélection de texte ni de
     callout iOS pendant le geste. */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
/* Article "décollé" pendant un drag de rayon */
.shopping-item.is-lifted {
  opacity: .35;
  outline: 1.5px dashed color-mix(in srgb, var(--celadon-deep) 45%, var(--line));
  outline-offset: -1px;
  border-radius: 10px;
}
/* Regroupement par rayon de magasin */
.shopping-aisle { margin-bottom: 16px; border-radius: 12px; transition: background .15s ease, box-shadow .15s ease; }
.shopping-aisle:last-child { margin-bottom: 0; }
/* Rayon survolé pendant un drag : prêt à recevoir l'article */
.shopping-aisle.is-drop-target {
  background: color-mix(in srgb, var(--celadon-deep) 8%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--celadon-deep) 45%, transparent);
}
.shopping-aisle__head {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--celadon-deep);
  padding: 0 2px 4px;
  border-bottom: 1.5px solid var(--celadon-tint);
  margin-bottom: 2px;
}
/* Zone de dépôt pour un rayon vide (affichée uniquement pendant un drag) */
.shopping-dropzone {
  padding: 10px 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: 10px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--muted);
  transition: all .15s ease;
}
.shopping-dropzone.is-drop-target {
  border-color: var(--celadon-deep);
  background: color-mix(in srgb, var(--celadon-deep) 10%, transparent);
  color: var(--celadon-deep);
}
/* Fantôme sous le doigt pendant le drag */
.shopping-drag-ghost {
  position: fixed;
  z-index: 400;
  transform: translate(-50%, -140%);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 28px -8px rgba(0,0,0,.4);
  pointer-events: none;
  white-space: nowrap;
  max-width: 70vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shopping-item:last-child { border-bottom: 0; }
.shopping-item__check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--celadon-deep);
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.shopping-item__qty {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: 15px;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.shopping-item__qty .u {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.shopping-item__name {
  font-size: 14.5px;
  letter-spacing: -0.005em;
  color: var(--ink-2);
}
.shopping-item.is-checked {
  opacity: 0.42;
}
.shopping-item.is-checked .shopping-item__check {
  background: var(--celadon-tint);
  border-color: var(--celadon-deep);
}
.shopping-item.is-checked .shopping-item__name,
.shopping-item.is-checked .shopping-item__qty {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--muted);
}