/* SkyMamMiam : carnet de recettes, pensé pour le téléphone d'abord.
   Direction visuelle « Cadran » : bleu nuit, jaune beurre pour ce qui se touche, corail pour la préparation. */

:root {
  /* Version claire, pour la cuisine en plein jour */
  --bg: #eef1fa;
  --surface: #ffffff;
  --surface-2: #dce3f6;
  --text: #141b33;
  --text-2: #4f5b80;
  --muted: #6b769a;
  --border: #dce3f6;
  --border-strong: #cbd3ec;
  --accent: var(--pal-light);
  --accent-hover: var(--pal-light-hover);
  --accent-soft: var(--pal-light-soft);
  --accent-ink: var(--pal-light-ink);
  --on-accent: var(--pal-light-on);
  --coral: #e8604c;
  --danger: #b3261e;
  --danger-soft: #fbe4e1;
  --success: #2f6b3a;
  --success-soft: #dff1e3;
  --info: #2f5b96;
  --info-soft: #e0e9f8;
  --warning: #85500e;
  --warning-soft: #fbeccf;

  --green-bg: #dff1e3; --green-fg: #2f6b3a;
  --amber-bg: #fbeccf; --amber-fg: #85500e;
  --rose-bg: #f9e1e8; --rose-fg: #983352;
  --blue-bg: #dfe8f8; --blue-fg: #255c8f;
  --violet-bg: #e9e5f8; --violet-fg: #5a44a0;
  --gray-bg: #e3e8f5; --gray-fg: #4f5b80;
  --red-bg: #f9dfdb; --red-fg: #a3302a;
  --teal-bg: #dcefec; --teal-fg: #1f6b62;

  --radius: 18px;
  --radius-lg: 26px;
  --font-title: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --tabbar-h: 68px;
  color-scheme: light;
}

/* Couleur principale choisie dans Moi > Apparence.
   -ink : la teinte quand elle colore du texte (le jaune beurre seul serait illisible sur fond clair) ;
   -on : la couleur du texte posé sur un bouton de cette teinte. */
:root, :root[data-palette="beurre"] {
  --pal-light: #ffc93c; --pal-light-hover: #f5b818; --pal-light-soft: #fff1c7; --pal-light-ink: #8a5a00; --pal-light-on: #241a00;
  --pal-dark: #ffd36e; --pal-dark-hover: #ffdd8c; --pal-dark-soft: #3a3523; --pal-dark-ink: #ffd36e; --pal-dark-on: #241a00;
}
:root[data-palette="terracotta"] {
  --pal-light: #c8643b; --pal-light-hover: #b0532d; --pal-light-soft: #f8e5da; --pal-light-ink: #b0532d; --pal-light-on: #ffffff;
  --pal-dark: #ff8a78; --pal-dark-hover: #ffa293; --pal-dark-soft: #43283a; --pal-dark-ink: #ff8a78; --pal-dark-on: #241a00;
}
:root[data-palette="sauge"] {
  --pal-light: #4f7a3a; --pal-light-hover: #41672f; --pal-light-soft: #e3eedb; --pal-light-ink: #41672f; --pal-light-on: #ffffff;
  --pal-dark: #9ccc7e; --pal-dark-hover: #b0d896; --pal-dark-soft: #233a33; --pal-dark-ink: #9ccc7e; --pal-dark-on: #0e1424;
}
:root[data-palette="framboise"] {
  --pal-light: #b83a5e; --pal-light-hover: #9e2f4f; --pal-light-soft: #f8dfe6; --pal-light-ink: #9e2f4f; --pal-light-on: #ffffff;
  --pal-dark: #f08aa6; --pal-dark-hover: #f5a3b9; --pal-dark-soft: #3e2641; --pal-dark-ink: #f08aa6; --pal-dark-on: #0e1424;
}
:root[data-palette="ocean"] {
  --pal-light: #2f6d9e; --pal-light-hover: #255a84; --pal-light-soft: #dfeaf5; --pal-light-ink: #255a84; --pal-light-on: #ffffff;
  --pal-dark: #82b6e6; --pal-dark-hover: #9cc6ee; --pal-dark-soft: #213656; --pal-dark-ink: #82b6e6; --pal-dark-on: #0e1424;
}
:root[data-palette="lavande"] {
  --pal-light: #6f55b5; --pal-light-hover: #5c449c; --pal-light-soft: #ebe5f8; --pal-light-ink: #5c449c; --pal-light-on: #ffffff;
  --pal-dark: #b6a2ef; --pal-dark-hover: #c7b7f4; --pal-dark-soft: #2e2a55; --pal-dark-ink: #b6a2ef; --pal-dark-on: #0e1424;
}
:root[data-palette="miel"] {
  --pal-light: #a8710f; --pal-light-hover: #8f5f0b; --pal-light-soft: #f8ebcf; --pal-light-ink: #8f5f0b; --pal-light-on: #ffffff;
  --pal-dark: #e9b85c; --pal-dark-hover: #f0c87a; --pal-dark-soft: #3a3523; --pal-dark-ink: #e9b85c; --pal-dark-on: #241a00;
}

/* Thème sombre « Nuit » : « Sombre » choisi, ou « Automatique » sur un téléphone réglé en sombre.
   Les deux blocs sont identiques : un sélecteur ne peut pas être à la fois dans et hors d'un @media. */
:root[data-theme="sombre"] {
  color-scheme: dark;
  --bg: #0e1424;
  --surface: #1a2342;
  --surface-2: #24305a;
  --text: #edeff7;
  --text-2: #a9b1cb;
  --muted: #8e97b3;
  --border: #222c4a;
  --border-strong: #2b3558;
  --accent: var(--pal-dark);
  --accent-hover: var(--pal-dark-hover);
  --accent-soft: var(--pal-dark-soft);
  --accent-ink: var(--pal-dark-ink);
  --on-accent: var(--pal-dark-on);
  --coral: #ff8a78;
  --danger: #ff8a78;
  --danger-soft: #43283a;
  --success: #9fdcae;
  --success-soft: #1f3a33;
  --info: #a9cbee;
  --info-soft: #213656;
  --warning: #ffd36e;
  --warning-soft: #3a3523;

  --green-bg: #1f3a33; --green-fg: #9fdcae;
  --amber-bg: #3a3523; --amber-fg: #ffd36e;
  --rose-bg: #3e2641; --rose-fg: #f5a8c0;
  --blue-bg: #213656; --blue-fg: #a9cbee;
  --violet-bg: #2e2a55; --violet-fg: #c9bbf2;
  --gray-bg: #24305a; --gray-fg: #c9d0e6;
  --red-bg: #43283a; --red-fg: #ff8a78;
  --teal-bg: #173b42; --teal-fg: #8fdad0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]):not([data-theme="sombre"]) {
    color-scheme: dark;
    --bg: #0e1424;
    --surface: #1a2342;
    --surface-2: #24305a;
    --text: #edeff7;
    --text-2: #a9b1cb;
    --muted: #8e97b3;
    --border: #222c4a;
    --border-strong: #2b3558;
    --accent: var(--pal-dark);
    --accent-hover: var(--pal-dark-hover);
    --accent-soft: var(--pal-dark-soft);
    --accent-ink: var(--pal-dark-ink);
    --on-accent: var(--pal-dark-on);
    --coral: #ff8a78;
    --danger: #ff8a78;
    --danger-soft: #43283a;
    --success: #9fdcae;
    --success-soft: #1f3a33;
    --info: #a9cbee;
    --info-soft: #213656;
    --warning: #ffd36e;
    --warning-soft: #3a3523;

    --green-bg: #1f3a33; --green-fg: #9fdcae;
    --amber-bg: #3a3523; --amber-fg: #ffd36e;
    --rose-bg: #3e2641; --rose-fg: #f5a8c0;
    --blue-bg: #213656; --blue-fg: #a9cbee;
    --violet-bg: #2e2a55; --violet-fg: #c9bbf2;
    --gray-bg: #24305a; --gray-fg: #c9d0e6;
    --red-bg: #43283a; --red-fg: #ff8a78;
    --teal-bg: #173b42; --teal-fg: #8fdad0;
  }
}


*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent-ink); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; margin: 0; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
}

body.auth .page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 32px;
}

.muted { color: var(--text-2); margin: 0; }
.small { font-size: 14px; }
.center { text-align: center; }
.hint { color: var(--text-2); font-size: 14px; margin: 6px 0 0; }

/* Titres */

.hello { margin: 12px 0 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hello .avatar-link { text-decoration: none; width: 44px; height: 44px; font-size: 16px; margin-top: 2px; }
.hello h1 { font-size: 30px; }
.subtitle { color: var(--text-2); margin: 6px 0 0; font-size: 17px; }

.page-title { font-size: 28px; margin: 8px 0 18px; display: flex; align-items: center; gap: 10px; }
.page-title .count {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px 10px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 700;
}

/* Messages */

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  margin: 0 0 16px;
  font-weight: 600;
}
.flash i { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--info-soft); color: var(--info); }

/* Recherche */

.search { position: relative; margin: 0 0 18px; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 44px; }

/* Tuiles de catégories */

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 112px;
  padding: 16px 10px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  text-align: center;
  transition: transform .12s ease;
}
.tile:active { transform: scale(.97); }
.tile i { font-size: 34px; }
.tile-label { font-weight: 800; font-size: 18px; }
.tile-count { font-size: 13px; opacity: .85; }

.tone-green { background: var(--green-bg); color: var(--green-fg); }
.tone-amber { background: var(--amber-bg); color: var(--amber-fg); }
.tone-rose { background: var(--rose-bg); color: var(--rose-fg); }
.tone-blue { background: var(--blue-bg); color: var(--blue-fg); }
.tone-violet { background: var(--violet-bg); color: var(--violet-fg); }
.tone-gray { background: var(--gray-bg); color: var(--gray-fg); }
.tone-red { background: var(--red-bg); color: var(--red-fg); }
.tone-teal { background: var(--teal-bg); color: var(--teal-fg); }

/* Sections et listes */

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.section-head h2 { font-size: 21px; }
.section-head a { font-weight: 700; text-decoration: none; }

.recipe-list { list-style: none; margin: 0; padding: 0; }
.recipe-list li + li { border-top: 1px dashed var(--border-strong); }

.recipe-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
}
.recipe-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recipe-row-title { font-family: var(--font-title); font-size: 19px; font-weight: 500; line-height: 1.25; }
.recipe-row-meta { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.recipe-row-chevron { color: var(--muted); font-size: 20px; }

.thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
}
.thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 28px; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 10px;
  padding: 0 16px 6px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.chip.active { background: var(--accent); border-color: var(--accent-ink); color: var(--on-accent); }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--accent-ink); }
.chip-check:has(input:focus-visible) { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.empty { text-align: center; padding: 32px 12px; color: var(--text-2); }
.empty > i { font-size: 48px; color: var(--muted); }
.empty p { margin: 8px 0 18px; }
.error-page { padding-top: 64px; }
.error-page .page-title { justify-content: center; }

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn i { font-size: 20px; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }

/* Formulaires */

.form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.sub-label { display: block; font-size: 14px; font-weight: 700; color: var(--text-2); margin: 0 0 4px; }

input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])), textarea, select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { opacity: .65; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.input-short { max-width: 140px; }

.has-error input, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 14px; font-weight: 700; margin: 6px 0 0; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 54px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 22px;
  cursor: pointer;
  border-radius: 10px;
}

.prefixed { display: flex; align-items: center; gap: 8px; }
.prefixed span { color: var(--text-2); font-weight: 700; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; cursor: pointer; border-radius: var(--radius); }
.choice:not([class*="tone-"]) { background: var(--surface); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-weight: 800;
}
.choice:not([class*="tone-"]) span { border-color: var(--border-strong); }
.choice span i { font-size: 22px; }
.choice input:checked + span { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.choice:not([class*="tone-"]) input:checked + span { border-color: var(--accent-ink); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.choice-list { display: grid; gap: 10px; }
.choice span small { margin-left: auto; color: var(--text-2); font-weight: 600; font-size: 14px; }

/* Pastilles de couleur de la page Apparence : chacune montre sa teinte dans le thème affiché */
.swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--sw-light); box-shadow: inset 0 0 0 2px rgb(0 0 0 / .08); }
.swatch-beurre { --sw-light: #ffc93c; --sw-dark: #ffd36e; }
.swatch-terracotta { --sw-light: #c8643b; --sw-dark: #ff8a78; }
.swatch-sauge { --sw-light: #4f7a3a; --sw-dark: #9ccc7e; }
.swatch-framboise { --sw-light: #b83a5e; --sw-dark: #f08aa6; }
.swatch-ocean { --sw-light: #2f6d9e; --sw-dark: #82b6e6; }
.swatch-lavande { --sw-light: #6f55b5; --sw-dark: #b6a2ef; }
.swatch-miel { --sw-light: #a8710f; --sw-dark: #e9b85c; }
:root[data-theme="sombre"] .swatch { background: var(--sw-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]):not([data-theme="sombre"]) .swatch { background: var(--sw-dark); }
}

.preview { display: grid; gap: 12px; margin-bottom: 20px; }
.preview-title { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: 18px; }
.preview .chips { margin: 0; }
.preview .btn { pointer-events: none; }

.times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.times input { text-align: center; }

.upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent-ink);
  font-weight: 800;
  cursor: pointer;
  position: relative;
}
.upload i { font-size: 26px; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload:has(input:focus-visible) { border-color: var(--accent-ink); }

.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo-grid:empty { display: none; }
.photo-preview { margin-top: 10px; }
.photo-item img, .photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.photo-option { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-top: 4px; cursor: pointer; }
.photo-option input { width: 18px; height: 18px; accent-color: var(--accent-ink); }

.form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* Connexion */

.auth-card { text-align: center; }
.auth-card .form { text-align: left; margin-top: 24px; }
.auth-logo { margin: 0 auto 12px; border-radius: 18px; }
.auth-title { font-size: 32px; }

/* Fiche recette */

.hero { margin: 4px 0 12px; }
.hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); background: var(--surface-2); }

.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 4px; }
.gallery img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }

.recipe-title { font-size: 30px; margin: 6px 0 12px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 700;
}
.pill i { font-size: 17px; }
.pill-soft { background: var(--accent-soft); color: var(--accent-ink); }

.total-time { color: var(--text-2); margin: 12px 0 0; display: flex; align-items: center; gap: 6px; }

.segmented {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 4px;
  margin: 22px 0 6px;
  position: sticky;
  top: 8px;
  z-index: 5;
}
.seg {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.seg.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }

.panel { margin-top: 18px; }
.panel-title { font-size: 22px; margin-bottom: 10px; }
.js-tabs .panel-title { display: none; }
.js-tabs .panel:not(.active) { display: none; }

.ingredients { list-style: none; margin: 0; padding: 0; font-size: 18px; }
.ingredients li { padding: 11px 0 11px 30px; border-bottom: 1px dashed var(--border-strong); position: relative; }
.ingredients li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 21px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; font-size: 18px; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 18px 50px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.note { margin-top: 24px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); }
.note h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note h2 i { color: var(--accent-ink); }
.note p { margin: 0; white-space: pre-line; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.actions > * { flex: 1; }
.actions form .btn { width: 100%; }

/* Compte et administration */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }

.profile { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-name { font-weight: 800; font-size: 18px; margin: 0; }

.avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu { list-style: none; margin: 0 0 20px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.menu li + li { border-top: 1px solid var(--border); }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 16px; color: var(--text); text-decoration: none; font-weight: 700; }
.menu a i { font-size: 22px; color: var(--accent-ink); }
.menu a .menu-chevron { margin-left: auto; color: var(--muted); font-size: 20px; }

.user-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.user-card.inactive { opacity: .7; }
.user-head { display: flex; align-items: center; gap: 12px; }
.user-info { flex: 1; min-width: 0; }
.user-info .muted { font-size: 14px; }
.user-card > .small { margin: 10px 0 0; }
.badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.credentials { margin: 16px 0; }
.credential { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 21px; font-weight: 700; margin: 0 0 14px; overflow-wrap: anywhere; user-select: all; }
.credential-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.credential-row .credential { margin: 0; }

/* Barre d'onglets */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 560px;
  margin: 0 auto;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
@media (min-width: 600px) {
  .tabbar { bottom: 12px; border: 1px solid var(--border); border-radius: 22px; height: var(--tabbar-h); padding-bottom: 0; }
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.tab i { font-size: 25px; }
.tab.active { color: var(--accent-ink); }

/* Petits boutons et mises en page communes */

.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row .page-title { margin-bottom: 18px; }
.title-row .btn { flex-shrink: 0; margin-top: -10px; }

.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-soft:hover { filter: brightness(.97); }
.btn-icon { width: 52px; min-height: 52px; padding: 0; flex-shrink: 0; }

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.link-button i { font-size: 19px; }
.muted-link { color: var(--text-2); font-weight: 700; text-decoration: underline; }

.section-title { font-size: 21px; margin-bottom: 10px; }

.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; min-width: 0; }

/* Rappel doux */

.reminder {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 0 0 18px;
  scroll-margin-top: 16px;
}
.reminder-kicker { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); font-weight: 700; font-size: 15px; }
.reminder-kicker i { color: var(--accent-ink); }
.reminder-recipe { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; color: inherit; text-decoration: none; }
.reminder-recipe > span:last-child { display: flex; flex-direction: column; }
.reminder-title { font-family: var(--font-title); font-size: 20px; font-weight: 600; line-height: 1.2; }
.reminder-since { color: var(--text-2); font-size: 14px; }
.reminder-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* « Je l'ai faite » */

.cook-box { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cook-form { flex: 1 1 100%; }
.cook-done { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--success); font-weight: 800; }
.cook-done i { font-size: 22px; }
.cook-stats { flex: 1 1 100%; margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.panel-action { margin-top: 16px; }

/* Frigo */

.pantry { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.pantry-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-left: 14px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green-fg);
  font-weight: 700;
}
.pantry-chip button {
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 17px;
  cursor: pointer;
  border-radius: 50%;
}

.match-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.match-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.match-ready { border-color: var(--green-fg); }
.match-almost { border-color: var(--amber-fg); }
.match-head { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.match-head .thumb { width: 52px; height: 52px; }
.match-title { flex: 1; min-width: 0; font-family: var(--font-title); font-size: 18px; font-weight: 500; line-height: 1.25; }
.match-status { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.status-ready { color: var(--green-fg); }
.status-almost { color: var(--amber-fg); }
.match-missing { margin: 8px 0 0; color: var(--text-2); font-size: 15px; }

/* Courses */

.shop-add { margin-bottom: 8px; }
.aisle-picker { margin-top: 8px; }
.aisle-picker summary { color: var(--text-2); font-size: 14px; font-weight: 700; cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.aisle-picker select { margin-top: 6px; }

.aisle { margin-top: 22px; }
.aisle-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.aisle-title i { font-size: 18px; }
.aisle-done { margin-top: 32px; }
.aisle-done form { margin-top: 12px; }

.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-item { display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.shop-toggle { flex: 1; min-width: 0; }
.shop-toggle button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.shop-box {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 18px;
  transition: background-color .12s ease;
}
.shop-text { display: flex; flex-direction: column; min-width: 0; }
.shop-name { font-size: 18px; font-weight: 600; }
.shop-note { font-size: 13px; color: var(--text-2); }
.shop-delete { width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 19px; cursor: pointer; border-radius: 50%; }
.shop-item.is-checked .shop-box { background: var(--accent); border-color: var(--accent-ink); color: var(--on-accent); }
.shop-item.is-checked .shop-name { color: var(--muted); text-decoration: line-through; }
/* « Que faire avec ? » : nombre de recettes qui utilisent l'article */
.shop-ideas {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  min-height: 36px; padding: 0 10px; margin-left: 6px;
  border-radius: 999px; background: var(--surface-2, var(--border)); color: var(--accent-ink);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.shop-ideas .ti { font-size: 17px; }
.shop-item.is-checked .shop-ideas { display: none; }

/* Idées et Découvertes */

.ideas-filters .chips { margin-bottom: 12px; }
.ideas-filters .search { margin-bottom: 14px; }
.segmented-static { position: static; margin: 0 0 14px; }
.segmented-static .seg { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ideas-count { margin: 0 0 10px; }

.idea-feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.idea-feature-link { display: block; color: inherit; text-decoration: none; }
.idea-feature-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.idea-feature-empty { display: flex; align-items: center; justify-content: center; font-size: 56px; }
.idea-feature-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px 0; }
.idea-kicker { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-size: 13px; font-weight: 800; }
.idea-feature-title { font-family: var(--font-title); font-size: 24px; font-weight: 600; line-height: 1.2; }
.idea-feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px 16px; }

.import-card { margin-top: 32px; }
.import-card .section-title { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.import-card .section-title i { color: var(--accent-ink); }
.import-card .inline-add { margin-top: 12px; }

.source-banner { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.source-banner p { margin: 0 0 10px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.source-banner p i { color: var(--accent-ink); font-size: 19px; }
.source-line { margin: -4px 0 12px; font-size: 14px; color: var(--text-2); }
.photo-credit { font-size: 12px; color: var(--text-2); margin-top: 4px; text-align: right; }
.photo-credit a { color: inherit; }

.stats { display: grid; grid-template-columns: 1fr 1fr; text-align: center; margin-bottom: 12px; }
.stats > div { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-title); font-size: 30px; font-weight: 600; }
.source-list { list-style: none; margin: 0 0 16px; padding: 0; }
.source-list li { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Liste à cocher (ingrédients vers les courses) */

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li + li { border-top: 1px dashed var(--border-strong); }
.check-row { display: flex; align-items: center; gap: 14px; min-height: 56px; cursor: pointer; font-size: 17px; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .check-box {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 18px;
}
.check-row input:checked + .check-box { background: var(--accent); border-color: var(--accent-ink); color: var(--on-accent); }
.check-row input:focus-visible + .check-box { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.check-text { display: flex; flex-direction: column; }
.check-hint { font-size: 13px; color: var(--text-2); }

/* Fiche recette : cœur, portions, mode cuisine, menu, notes */

.recipe-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recipe-head .recipe-title { flex: 1; min-width: 0; }
.fav-button {
  width: 48px; height: 48px; flex-shrink: 0; margin-top: 2px;
  border: 1.5px solid var(--border-strong); border-radius: 50%;
  background: var(--surface); color: var(--text-2); font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.fav-button .ti-heart-filled { display: none; }
.fav-button.is-on { border-color: var(--rose-fg); color: var(--rose-fg); background: var(--rose-bg); }
.fav-button.is-on .ti-heart { display: none; }
.fav-button.is-on .ti-heart-filled { display: inline; }
.row-heart { color: var(--rose-fg); font-size: 15px; }

.cook-start { margin-top: 16px; }
.plan-start { margin-top: 8px; }

.portions { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 6px; }
.portion-btn {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 22px; text-decoration: none;
}
.portion-btn.is-disabled { opacity: .35; }
.portion-value { min-width: 140px; text-align: center; font-size: 17px; }
.portion-value strong { font-family: var(--font-title); font-size: 26px; font-weight: 600; }
.portions-hint { text-align: center; margin: 0 0 8px; }

.timer-chip {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: baseline;
  margin: 0 2px; padding: 1px 10px 1px 8px; min-height: 32px;
  border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font: inherit; font-weight: 800; cursor: pointer;
}
.timer-chip i { font-size: 18px; }

.timers {
  position: fixed; left: 0; right: 0; z-index: 30; max-width: 560px; margin: 0 auto; padding: 0 12px;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  display: flex; flex-direction: column; gap: 6px;
}
@media (min-width: 600px) { .timers { bottom: calc(var(--tabbar-h) + 20px); } }
.cook-body .timers { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.has-timers .page { padding-bottom: calc(var(--tabbar-h) + 120px + env(safe-area-inset-bottom)); }
.timer {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: var(--text); color: var(--bg); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.timer-icon { font-size: 24px; }
.timer-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.timer-what { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-left { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-btn {
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; cursor: pointer;
  background: rgb(255 255 255 / .14); color: inherit; font: inherit; font-weight: 800; font-size: 14px;
}
.timer-stop { width: 40px; padding: 0; font-size: 20px; }
.timer.is-done { background: var(--accent); color: var(--on-accent); animation: ring 1s ease-in-out infinite; }
@keyframes ring { 50% { transform: scale(1.02); } }

.remarks { margin-top: 28px; }
.remarks .section-title { display: flex; align-items: center; gap: 8px; }
.remarks .section-title i { color: var(--accent-ink); }
.remark-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.remark { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; }
.remark-text { margin: 0; white-space: pre-line; }
.remark-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.remark-meta .link-button { font-size: 13px; }
.remark-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.remark-form textarea { width: 100%; }

/* Mode cuisine */

.cook-body .page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.cook-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cook-close {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text); font-size: 22px; text-decoration: none;
}
.cook-heading { flex: 1; min-width: 0; }
.cook-recipe { margin: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-progress { margin: 0; color: var(--text-2); font-size: 14px; }
.wake-state { color: var(--warning); font-size: 22px; }
.cook-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.cook-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }

.cook-screen { margin-bottom: 32px; }
.js-cook .cook-screen { display: none; margin: 0; }
.js-cook .cook-screen.active { display: block; }
.cook-screen-title { font-size: 26px; margin-bottom: 14px; }
.cook-step-num { margin: 0 0 12px; font-family: var(--font-title); font-size: 22px; font-weight: 600; color: var(--accent-ink); }
.cook-step-num span { color: var(--text-2); font-size: 17px; }
.cook-step-text { margin: 0; font-size: 26px; line-height: 1.5; }
.cook-step-text .timer-chip { min-height: 40px; font-size: 22px; padding: 2px 14px 2px 10px; }

.cook-ingredients { list-style: none; margin: 0; padding: 0; }
.cook-ing {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0;
  border: 0; border-bottom: 1px dashed var(--border-strong); background: none; color: var(--text);
  font: inherit; font-size: 20px; text-align: left; cursor: pointer;
}
.cook-ing i {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: transparent;
}
.cook-ing.is-used { color: var(--muted); text-decoration: line-through; }
.cook-ing.is-used i { background: var(--accent); border-color: var(--accent-ink); color: var(--on-accent); }

.cook-end { text-align: center; display: flex; flex-direction: column; gap: 12px; }
.cook-end > i { font-size: 56px; color: var(--accent-ink); }
.js-cook .cook-end.active { display: flex; }

.cook-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--border);
}
.cook-nav .btn { min-height: 56px; font-size: 18px; }
.cook-nav .btn:disabled { opacity: .4; }
.cook-nav .btn[hidden] { display: none; }
.cook-nav:has([data-cook-next][hidden]) { grid-template-columns: 1fr; }

/* Menu de la semaine */

.menu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 16px; margin-bottom: 18px; }
.menu-card .section-head { margin-bottom: 6px; }
.menu-card .section-head h2 { font-size: 19px; display: flex; align-items: center; gap: 6px; }
.menu-card .section-head h2 i { color: var(--accent-ink); }
.menu-card .section-head a { font-size: 15px; display: inline-flex; align-items: center; }
.menu-day { display: flex; gap: 10px; padding: 6px 0; align-items: baseline; }
.menu-day + .menu-day { border-top: 1px dashed var(--border-strong); }
.menu-day-label { margin: 0; width: 96px; flex-shrink: 0; font-weight: 800; font-size: 15px; }
.menu-day-list { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.menu-day-list a { color: var(--text); font-weight: 600; }
.menu-slot { display: inline-block; min-width: 40px; color: var(--text-2); font-size: 13px; font-weight: 700; text-transform: capitalize; }
.menu-day-empty { color: var(--text-2); font-size: 15px; }

.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.week-range { margin: 0; text-align: center; font-weight: 800; display: flex; flex-direction: column; }
.week-range span { font-weight: 600; color: var(--text-2); font-size: 14px; }
.week-shop { margin: 8px 0 4px; }
.week { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; }
.day.is-today { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.day.is-past { opacity: .6; }
.day-title { font-size: 20px; margin-bottom: 4px; }
.meal { padding: 6px 0; }
.meal + .meal { border-top: 1px dashed var(--border-strong); }
.meal-slot { margin: 0; color: var(--text-2); font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 4px; text-transform: uppercase; letter-spacing: .03em; }
.meal-list { list-style: none; margin: 0; padding: 0; }
.meal-item { display: flex; align-items: center; }
.meal-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--text); text-decoration: none; font-weight: 700; }
.meal-link .thumb { width: 44px; height: 44px; font-size: 20px; }
.meal-free i { width: 44px; text-align: center; color: var(--text-2); font-size: 20px; }
.meal-add { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; font-weight: 700; text-decoration: none; font-size: 15px; }

.free-meal { margin-bottom: 22px; }
.recipe-pick { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.recipe-pick .recipe-row-chevron { color: var(--accent-ink); font-size: 26px; }
.menu-shop-group + .menu-shop-group { margin-top: 18px; }

.fav-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.fav-strip::-webkit-scrollbar { display: none; }
.fav-card { width: 112px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; line-height: 1.25; }
.fav-card .thumb { width: 112px; height: 112px; }

/* Courses en direct */

.shop-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 0; flex-wrap: wrap; }
.live-hint { margin: 0; color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }

/* Recopier une fiche */

.ocr-start { margin-bottom: 18px; }
.tips ul { margin: 6px 0 0; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.tips-title { margin: 0; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.tips-title i { color: var(--accent-ink); }
.ocr-raw { margin-bottom: 16px; }
.ocr-raw summary { cursor: pointer; font-weight: 700; color: var(--text-2); min-height: 36px; }
.ocr-raw pre { white-space: pre-wrap; font-family: inherit; font-size: 14px; background: var(--surface-2); padding: 12px; border-radius: var(--radius); max-height: 320px; overflow: auto; }
.ocr-photo { display: flex; align-items: center; gap: 12px; }
.ocr-photo img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }

/* Idées : pays et recherche dans tout le catalogue */

a.pill { color: var(--text); text-decoration: none; }
.country-pick { position: relative; margin: 0 0 14px; }
.country-pick i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); pointer-events: none; }
.country-pick select { padding-left: 44px; }
.filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.more-button { margin-top: 14px; }
/* ============================================================
   Direction « Cadran » : typographies, formes et repères.
   Placé en dernier pour habiller les composants existants sans changer leur fonctionnement.
   ============================================================ */

body { font-size: 17px; letter-spacing: -.005em; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.01em; line-height: 1.05; }
h1 i, h2 i, .page-title i.accent { font-style: italic; color: var(--accent-ink); }

/* Repères en DM Mono, en capitales espacées */
.kick,
.aisle-title, .meal-slot, .menu-slot, .cook-progress, .cook-step-num span, .ideas-count,
.recipe-row-meta, .tile-count, .remark-meta, .week-range span, .check-hint, .shop-note,
.timer-what, .portions-hint, .live-hint, .stat-number + span, .source-line, .photo-credit,
.page-title .count, .sub-label {
  font-family: var(--font-mono);
  letter-spacing: .06em;
}
.kick { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.aisle-title, .meal-slot, .ideas-count, .cook-progress { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.recipe-row-meta, .tile-count, .remark-meta, .check-hint, .shop-note, .menu-slot { font-size: 12px; }

/* Titres en Instrument Serif */
.page-title { font-size: 40px; margin: 10px 0 20px; }
.page-title .count { font-size: 12px; font-weight: 500; padding: 4px 10px; background: var(--surface); }
.hello h1 { font-size: 40px; line-height: 1; }
.hello .kick { margin-bottom: 8px; }
.subtitle { font-size: 16px; }
.recipe-title { font-size: 40px; line-height: 1; }
.recipe-row-title { font-size: 22px; font-weight: 400; line-height: 1.1; }
.section-head h2, .section-title { font-size: 28px; }
.day-title { font-size: 26px; }
.cook-screen-title { font-size: 36px; }
.cook-step-num { font-family: var(--font-title); font-weight: 400; font-size: 26px; color: var(--accent-ink); }
.cook-step-text { font-size: 27px; }
.idea-feature-title, .reminder-title { font-weight: 400; }
.idea-feature-title { font-size: 30px; }
.reminder-title { font-size: 24px; }
.auth-title { font-size: 46px; }
.stat-number { font-weight: 400; font-size: 40px; }
.portion-value strong { font-weight: 400; font-size: 32px; }
.timer-left { font-family: var(--font-title); font-weight: 400; font-size: 28px; letter-spacing: 0; }

/* Boutons : pilules, action principale en jaune beurre */
.btn { border-radius: 999px; min-height: 54px; padding: 0 24px; font-weight: 600; font-size: 16px; }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 14px; }
.btn-primary { box-shadow: 0 8px 24px -14px var(--accent); }
.btn-secondary { background: var(--surface); border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-icon { width: 54px; min-height: 54px; }
.cook-nav .btn { min-height: 58px; }

/* Champs */
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])), textarea, select {
  border-radius: 16px;
  border-color: transparent;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
input:focus, textarea:focus, select:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.field > label, .field > legend { font-weight: 600; }

/* Puces : fond ardoise, jaune beurre quand elles sont choisies */
.chip { border: 0; background: var(--surface); font-weight: 500; font-size: 14px; min-height: 40px; border-radius: 16px; }
.chip.active, .chip-check:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.pill { background: var(--surface); font-weight: 500; font-size: 14px; border-radius: 14px; }
.pill-soft { background: var(--accent-soft); color: var(--accent-ink); }

/* Cartes et panneaux arrondis, sans bordure */
.card, .menu, .menu-card, .day, .idea-feature, .match-card { border: 0; border-radius: var(--radius-lg); }
.match-card { box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.match-ready { box-shadow: inset 0 0 0 1.5px var(--green-fg); }
.match-almost { box-shadow: inset 0 0 0 1.5px var(--amber-fg); }
.day.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tile { border-radius: var(--radius-lg); min-height: 120px; }
.tile-label { font-family: var(--font-title); font-weight: 400; font-size: 24px; }
.thumb { border-radius: 16px; }
.hero img, .idea-feature-img { border-radius: var(--radius-lg); }
.recipe-list li + li, .check-list li + li, .meal + .meal, .menu-day + .menu-day { border-top-style: solid; border-color: var(--border); }
.ingredients li { border-bottom-style: solid; border-color: var(--border); }
.ingredients li::before { background: var(--coral); }
.steps li::before { font-family: var(--font-title); font-weight: 400; }

/* Préparation en corail, cuisson en beurre (comme la légende du Cadran) */
.pill .ti-tools-kitchen { color: var(--coral); }
.pill .ti-flame { color: var(--accent-ink); }

/* Barre du bas : fond de page, icônes au pouce */
.tabbar { background: var(--bg); border-top: 1px solid var(--border); }
@media (min-width: 600px) { .tabbar { background: var(--surface); border: 0; } }
.tab { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.tab i { font-size: 24px; }
.tab.active { color: var(--accent-ink); }

/* Avatar et pastilles rondes */
.avatar { background: var(--surface); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.fav-button { border: 0; box-shadow: inset 0 0 0 1.5px var(--border-strong); background: var(--surface); }
.portion-btn { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.cook-close { background: var(--surface); }

/* Cadran : les petits cadrans à graduations (minuteurs, progression) */
.dial { display: block; flex: none; }
.dial line { stroke: var(--border-strong); stroke-linecap: round; }
.dial line.lit { stroke: var(--accent); }
.timer { background: var(--surface); color: var(--text); box-shadow: 0 16px 40px -18px rgb(0 0 0 / .55), inset 0 0 0 1px var(--border); border-radius: 22px; }
.timer-btn { background: var(--surface-2); }
.timer.is-done { background: var(--accent); color: var(--on-accent); }
.timer.is-done .dial line { stroke: var(--on-accent); opacity: .35; }
.timer.is-done .dial line.lit { opacity: 1; }
.timer-chip { border: 0; background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; }

/* Mode cuisine : segments d'étapes comme sur le Cadran */
.cook-segs { display: flex; gap: 4px; margin-bottom: 22px; }
.cook-segs i { flex: 1; height: 3px; border-radius: 2px; background: var(--border-strong); }
.cook-segs i.done { background: var(--accent); }
.cook-bar { display: none; }
.cook-ing { border-bottom-style: solid; border-color: var(--border); }
.cook-ing i { border-radius: 50%; }
.cook-ing.is-used i { background: var(--accent); border-color: var(--accent); }

/* Courses : cases rondes et compteur en cadran */
.shop-box, .check-row .check-box { border-radius: 50%; }
.shop-progress { display: flex; align-items: center; gap: 12px; }
.shop-progress-dial { position: relative; width: 64px; height: 64px; flex: none; }
.shop-progress-dial span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; }

/* Messages */
.flash { border-radius: 18px; font-weight: 500; }

/* Mode cuisine : minuteurs dans la page, comme sur le Cadran */
.cook-timers { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.cook-timers[hidden] { display: none; }
.timer.timer-main {
  flex-direction: column; gap: 14px; padding: 6px 0 4px;
  background: none; box-shadow: none; border-radius: 0;
}
.timer-face { position: relative; width: 232px; height: 232px; margin: 0 auto; }
.timer-face .dial { width: 100%; height: 100%; }
.timer-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px;
}
.timer-main .timer-left { font-size: 60px; line-height: 1; }
.timer-main .timer-what {
  margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-ink);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timer-actions { display: flex; justify-content: center; gap: 10px; }
.timer-actions .timer-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.timer.timer-main.is-done { background: none; color: var(--text); animation: none; }
.timer.timer-main.is-done .timer-left { font-size: 34px; color: var(--accent-ink); animation: ring 1s ease-in-out infinite; }
.timer.timer-main.is-done .dial line { stroke: var(--accent); opacity: 1; }
.timer.timer-card { padding: 12px 10px 12px 14px; gap: 12px; box-shadow: none; }
.timer-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-card .timer-what { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.timer-card.is-done .timer-what { color: inherit; }
.timer-card .timer-left { font-size: 30px; }
.timer-card .timer-stop { min-height: 36px; width: 36px; }
.timer-actions .timer-start { min-height: 48px; padding: 0 22px; font-size: 16px; }
.timer-main.is-ready .timer-left { color: var(--text-2); }

/* Mode cuisine : le cadran et ses boutons descendent près du pouce, juste au-dessus de Précédent / Suivant */
.js-cook {
  display: flex; flex-direction: column;
  min-height: calc(100vh - 126px);
  min-height: calc(100dvh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
.js-cook .cook-timers { margin-top: auto; padding-top: 26px; flex-direction: column-reverse; }

/* Minuteurs : demande d'activation du son */
.sound-unlock {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
  padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--coral, var(--accent)); color: #1f0d08; font: inherit; font-weight: 700; font-size: 16px;
  box-shadow: 0 10px 30px -14px rgb(0 0 0 / .6);
}
.sound-unlock i { font-size: 22px; }
.live-hint.is-offline { color: var(--warning); }

/* Sauvegardes */
.backup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.backup-list li { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--surface); border-radius: var(--radius); }
.backup-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.backup-day { font-weight: 700; font-size: 17px; }

/* Lisibilité : plus rien sous 13 px, gris assez foncé pour se lire en plein jour */
:root:not([data-theme="sombre"]) { --muted: #5d6789; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="clair"]) { --muted: #8e97b3; } }
:root[data-theme="sombre"] { --muted: #8e97b3; }

.kick { font-size: 13px; letter-spacing: .1em; }
.aisle-title, .meal-slot, .ideas-count, .cook-progress { font-size: 13px; letter-spacing: .08em; }
.recipe-row-meta, .tile-count, .remark-meta, .check-hint, .shop-note, .menu-slot,
.photo-credit, .badge, .live-hint, .page-title .count { font-size: 14px; }
.shop-progress-dial span { font-size: 14px; }
.remark-meta .link-button { font-size: 15px; }
.timer-main .timer-what { font-size: 13px; letter-spacing: .08em; }
.timer-card .timer-what { font-size: 13px; letter-spacing: .06em; }
.timer-what { font-size: 14px; }
/* Onglets du bas : texte normal, plus grand, sans capitales espacées */
.tab { font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }
/* Les textes très longs (adresse web collée dans une note…) passent à la ligne au lieu de déborder */
body { overflow-wrap: break-word; }

/* Zones à toucher : au moins 44 px */
.btn-small { min-height: 44px; }
.chip { min-height: 44px; }
.link-button { min-height: 44px; }
.timer-btn, .timer-stop { min-height: 44px; }
.timer-stop, .timer-card .timer-stop { width: 44px; min-height: 44px; }
.timer-chip { min-height: 40px; padding: 2px 12px 2px 10px; }
.cook-step-text .timer-chip { min-height: 44px; }
.aisle-picker summary { min-height: 44px; }
.photo-option { min-height: 44px; font-size: 15px; }
.photo-option input { width: 24px; height: 24px; }

/* Message « Annuler » en bas de l'écran */
.undo-toast {
  position: fixed; left: 12px; right: 12px; z-index: 40; max-width: 536px; margin: 0 auto;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px;
  background: var(--text); color: var(--bg); border-radius: 999px; box-shadow: 0 16px 40px -16px rgb(0 0 0 / .6);
  animation: toast-in .2s ease-out;
}
@media (min-width: 600px) { .undo-toast { bottom: calc(var(--tabbar-h) + 24px); } }
.undo-text { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.undo-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer;
}
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* Corbeille */
.trash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.trash-list li { background: var(--surface); border-radius: var(--radius-lg); padding: 12px; }
.trash-recipe { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.trash-recipe > span { display: flex; flex-direction: column; min-width: 0; }
.trash-title { font-family: var(--font-title); font-size: 22px; line-height: 1.1; }
.trash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.trash-banner { background: var(--warning-soft); }

/* Taille du texte (Moi > Apparence) : toute l'appli grossit d'un bloc, textes, boutons et marges */
:root { --zoom: 1; }
:root[data-text="grand"] { --zoom: 1.12; }
:root[data-text="tres-grand"] { --zoom: 1.25; }
body { zoom: var(--zoom); }
/* Les hauteurs « plein écran » se calculent avant le zoom : on les ramène à l'écran réel */
.js-cook { min-height: calc((100dvh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) / var(--zoom)); }
body.auth .page { min-height: calc(100dvh / var(--zoom)); }
.choice-sizes .choice span { display: inline-flex; align-items: center; gap: 10px; }
.size-sample { display: inline-grid; place-items: center; width: 40px; font-family: var(--font-title); line-height: 1; }
.size-normal { font-size: 20px; }
.size-grand { font-size: 25px; }
.size-tres-grand { font-size: 30px; }

/* Mode cuisine : bouton « + » (minuteur libre) et lecture à voix haute */
.cook-nav { grid-template-columns: 58px 1fr 1.4fr; }
.cook-nav:has([data-cook-next][hidden]) { grid-template-columns: 58px 1fr; }
.cook-nav:has([data-timer-picker-open][hidden]) { grid-template-columns: 1fr 1.4fr; }
.cook-add-timer {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-strong); font-size: 26px;
  display: grid; place-items: center;
}
.cook-add-timer[hidden] { display: none; }
.cook-speak {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text-2); font-size: 22px; display: grid; place-items: center;
}
.cook-speak[hidden] { display: none; }
.cook-speak.is-on { background: var(--accent); color: var(--on-accent); }
.timer-picker {
  width: min(420px, calc(100vw - 32px)); border: 0; border-radius: var(--radius-lg); padding: 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px -20px rgb(0 0 0 / .6);
}
.timer-picker::backdrop { background: rgb(5 8 18 / .6); }
.timer-picker-title { font-size: 28px; margin: 0 0 14px; }
.timer-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.timer-picker-btn {
  min-height: 56px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 18px; font-weight: 700;
}
.timer-picker-btn:active { background: var(--accent); color: var(--on-accent); }

/* Envoyer une recette */
.share { margin-top: 8px; }
.share-fallback { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-fallback[hidden], .share [hidden] { display: none; }
.share-fallback .btn { padding: 0 8px; font-size: 15px; }
.share-text[hidden] { display: none; }

/* Courses : articles souvent achetés */
.frequent { margin: 14px 0 6px; }
.frequent .kick { margin-bottom: 8px; }
.frequent-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.frequent-list::-webkit-scrollbar { display: none; }
.frequent-list form { flex: none; }
.frequent-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; cursor: pointer; color: var(--text); font: inherit; font-weight: 600; font-size: 15px; }

/* Accueil : le cadran du moment et son carrousel */
.moment { margin: 6px -16px 22px; }
.moment-dial { position: relative; width: min(300px, calc(100% - 32px)); margin: 0 auto; }
.moment-arc { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; }
.moment-arc[hidden] { display: none; }
.moment-arc line { stroke: var(--border-strong); stroke-linecap: round; }
.moment-arc line.lit { stroke: var(--accent); }
.moment-knob { fill: var(--accent); }
.moment-knob-dot { fill: var(--bg); }
.moment-arc:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: 16px; }
.moment-now {
  margin: 0; text-align: center; font-family: var(--font-title); font-style: italic; font-size: 40px; line-height: 1;
}
.js-moment .moment-now { position: absolute; left: 0; right: 0; top: 56%; transform: translateY(-50%); pointer-events: none; }
.moment-tabs { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.moment-tab {
  min-height: 44px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
}
.moment-tab.active { color: var(--accent-ink); font-weight: 500; }
/* Avec le cadran, les mots se placent au bout de l'arc (Matin à gauche, Midi en haut, Soir à droite) */
.js-moment .moment-tabs { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.js-moment .moment-tab { position: absolute; pointer-events: auto; }
.js-moment .moment-tab-matin { left: -14px; bottom: -40px; }
.js-moment .moment-tab-midi { left: 50%; top: -12px; transform: translateX(-50%); }
.js-moment .moment-tab-soir { right: -14px; bottom: -40px; }
.js-moment .moment-dial { margin-bottom: 40px; }
.moment-cards {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 6px; scroll-snap-type: x mandatory; scroll-padding-left: 16px;
  scrollbar-width: none;
}
.moment-cards::-webkit-scrollbar { display: none; }
.moment-cards[hidden] { display: none; }
.moment-card {
  flex: none; width: 176px; min-height: 220px; display: flex; flex-direction: column; padding: 10px;
  background: var(--surface); border-radius: var(--radius-lg); color: var(--text); text-decoration: none; scroll-snap-align: start;
}
.moment-pic {
  position: relative; height: 104px; border-radius: 18px; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center; color: var(--accent-ink); font-size: 40px;
}
.moment-pic img { width: 100%; height: 100%; object-fit: cover; }
.moment-planned {
  position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700;
}
.moment-title { margin: 10px 4px 0; font-family: var(--font-title); font-size: 22px; line-height: 1.05; }
.moment-meta { margin: auto 4px 2px; padding-top: 8px; color: var(--muted); font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; }
.moment-empty { margin: 0 16px; color: var(--text-2); }

/* Mode cuisine, texte agrandi : « Précédent » devient une simple flèche pour laisser la place */
.cook-nav .btn { white-space: nowrap; padding: 0 16px; }
:root[data-text="grand"] .cook-nav, :root[data-text="tres-grand"] .cook-nav { grid-template-columns: 58px 64px 1fr; }
:root[data-text="grand"] .cook-nav:has([data-cook-next][hidden]),
:root[data-text="tres-grand"] .cook-nav:has([data-cook-next][hidden]) { grid-template-columns: 58px 1fr; }
:root[data-text="grand"] [data-cook-prev] .nav-label, :root[data-text="tres-grand"] [data-cook-prev] .nav-label { display: none; }
:root[data-text="grand"] [data-cook-prev], :root[data-text="tres-grand"] [data-cook-prev] { padding: 0; }
:root[data-text="grand"] .timer-face { width: 210px; height: 210px; }
:root[data-text="tres-grand"] .timer-face { width: 186px; height: 186px; }
:root[data-text="tres-grand"] .timer-main .timer-left { font-size: 48px; }

/* Photo du plat depuis la fiche */
.photo-quick { margin-top: 8px; }
.photo-quick-btn { position: relative; overflow: hidden; cursor: pointer; }
.photo-quick-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-quick-btn.is-busy { opacity: .7; pointer-events: none; }
.photo-quick-btn:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* Recherche approchante */
.approx-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); font-size: 15px; font-weight: 600; }
.approx-hint i { font-size: 20px; flex: none; }

/* Menu : propositions de la semaine */
.propose-form { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 14px; }
.propose-all { color: var(--text-2); font-weight: 600; }
.proposal-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); }
.proposal-banner p { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cook-top .cook-speak + .cook-speak { margin-left: -4px; }
.cook-heard {
  position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30;
  margin: 0; padding: 8px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; white-space: nowrap;
}
.cook-heard[hidden] { display: none; }

.share-list { margin-top: 22px; }

.photo-remove { text-align: right; }
.photo-remove .link-button { font-size: 14px; }

/* Cartes des Idées (monde, France) */
.country-row { display: flex; gap: 8px; align-items: stretch; }
.country-row .country-pick { flex: 1; min-width: 0; }
.map-open { flex: none; min-height: 48px; padding: 0 16px; }
.map-box { position: relative; margin: 6px -16px 8px; }
.map-scroll { overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 16px; scrollbar-width: none; }
.map-scroll::-webkit-scrollbar { display: none; }
.map { display: block; width: 100%; height: auto; transition: width .2s ease; }
.map-area { fill: var(--surface-2); stroke: var(--bg); stroke-width: .6; stroke-linejoin: round; transition: fill .15s; }
.map-france .map-area { stroke-width: 1.5; }
.map-area.lvl-1 { fill: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.map-area.lvl-2 { fill: color-mix(in srgb, var(--accent) 40%, var(--surface-2)); }
.map-area.lvl-3 { fill: color-mix(in srgb, var(--accent) 60%, var(--surface-2)); }
.map-area.lvl-4 { fill: color-mix(in srgb, var(--accent) 80%, var(--surface-2)); }
.map-area.lvl-5 { fill: var(--accent); }
.map a .map-area { cursor: pointer; }
.map a:hover .map-area, .map a:focus .map-area { fill: var(--accent-ink); }
.map a:focus { outline: none; }
.map-zoom { position: absolute; right: 24px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-zoom[hidden] { display: none; }
.map-zoom-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--surface); color: var(--text); font-size: 20px; box-shadow: 0 6px 18px -8px rgb(0 0 0 / .5);
}
.map-zoom-btn:disabled { opacity: .4; }
.map-legend { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 4px 0 6px; color: var(--muted); font-size: 13px; }
.map-legend i { width: 22px; height: 10px; border-radius: 3px; background: var(--accent); }
.map-legend i.lvl-1 { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.map-legend i.lvl-2 { background: color-mix(in srgb, var(--accent) 40%, var(--surface-2)); }
.map-legend i.lvl-3 { background: color-mix(in srgb, var(--accent) 60%, var(--surface-2)); }
.map-legend i.lvl-4 { background: color-mix(in srgb, var(--accent) 80%, var(--surface-2)); }
.map-legend span { margin: 0 4px; }
.map-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-list a {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px 8px 12px;
  background: var(--surface); border-radius: 16px; color: var(--text); text-decoration: none;
}
.map-list-flag { font-size: 22px; line-height: 1; }
.map-list-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-list-count { font-family: var(--font-title); font-size: 22px; color: var(--accent-ink); }
.map-list a > .ti { color: var(--muted); }
.map-credit { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.region-card { background: var(--surface); border-radius: var(--radius-lg); padding: 6px 6px 10px; margin-bottom: 10px; }
.region-card:target { box-shadow: inset 0 0 0 2px var(--accent); }
.region-head { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 10px; color: var(--text); text-decoration: none; }
.region-name { font-family: var(--font-title); font-size: 24px; line-height: 1.05; flex: 1; }
.region-count { color: var(--muted); font-size: 14px; text-align: right; }
.region-specialties { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; }
.region-specialties .chip { min-height: 40px; font-size: 14px; background: var(--surface-2); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; padding: 0 12px; }
.region-specialties .chip-more { color: var(--accent-ink); font-weight: 700; }
.specialty-box { margin: 18px 0; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.specialty-box p { margin: 0; }
.specialty-kicker { color: var(--accent-ink); font-weight: 700; display: flex; align-items: center; gap: 6px; }
@media (max-width: 380px) { .map-list { grid-template-columns: 1fr; } }

.map-zoom { top: 4px; bottom: auto; right: 20px; flex-direction: row; }

/* Présentation ou « En bref » en haut des Découvertes */
.note.note-top { margin: 14px 0 16px; }

/* ---- v1.12 : corrections de la relecture ---- */
/* Minuteur qui sonne : boutons lisibles sur le fond coloré */
.timer.is-done .timer-btn { background: rgb(0 0 0 / .16); color: inherit; }
.timer.timer-main.is-done .timer-btn { background: var(--surface-2); color: var(--text); }
/* Grand bouton « Arrêter la sonnerie », seulement quand ça sonne */
.timer-ring-stop { display: none; }
.timer.is-done { flex-wrap: wrap; }
.timer.is-done .timer-ring-stop {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 0 100%; min-height: 56px;
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; font-size: 18px;
  background: var(--on-accent); color: var(--accent);
}
.timer.is-done .timer-ring-stop i { font-size: 22px; }
.timer.timer-main.is-done .timer-stop-main {
  order: -1; flex: 1 0 100%; justify-content: center; min-height: 56px; font-size: 18px;
  background: var(--accent); color: var(--on-accent);
}
/* Boutons du cadran : passent à la ligne au lieu de sortir de l'écran en grand texte */
.timer-actions { flex-wrap: wrap; }
/* « Je t'écoute… » : sur plusieurs lignes si besoin, jamais coupé */
.cook-heard { white-space: normal; max-width: calc(100% - 32px); width: max-content; text-align: center; }
/* Partage sans feuille du téléphone : les boutons passent à la ligne */
.share-fallback { display: flex; flex-wrap: wrap; }
.share-fallback .btn { flex: 1 1 auto; min-width: 0; }
/* Accueil : on peut faire défiler la page en posant le doigt sur le cadran */
.moment-arc { touch-action: pan-y; }
/* Zones à toucher : 44 px minimum partout */
.pantry-chip button { width: 44px; height: 44px; }
.region-specialties .chip, .meal-add, .timer-chip { min-height: 44px; }
.section-head a, .menu-card .section-head a { display: inline-flex; align-items: center; min-height: 44px; }
.menu-day-empty { display: inline-flex; align-items: center; min-height: 44px; }
/* « Annuler » : texte plus grand, sur deux lignes si besoin */
.undo-toast { padding: 10px 10px 10px 20px; border-radius: 24px; }
.undo-text { font-size: 17px; white-space: normal; }
.undo-btn { min-height: 48px; font-size: 17px; }
/* Message après « mise à la corbeille » : bouton Annuler */
.flash { flex-wrap: wrap; align-items: center; }
.flash-text { flex: 1 1 200px; }
.flash-undo { margin: 0; flex: none; }
.flash-undo .btn { min-height: 44px; padding: 0 16px; }
/* Accueil : « Réglages » écrit sous l'avatar, pour le trouver sans deviner */
.settings-link { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; text-decoration: none; color: var(--text-2); min-width: 56px; }
.settings-link .avatar { width: 44px; height: 44px; font-size: 16px; }
.settings-label { font-size: 13px; font-weight: 700; }
/* Titre de partie dans les ingrédients (« Pour le sirop : ») */
.ingredients li.ing-section { padding-left: 0; padding-top: 18px; font-weight: 800; color: var(--accent-ink); border-bottom: 0; }
.ingredients li.ing-section::before { display: none; }

.cook-ing-section { padding: 16px 0 4px; font-weight: 800; color: var(--accent-ink); }
/* Admin : foyers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.household-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.household-card { display: flex; flex-direction: column; gap: 8px; }
.household-card p { margin: 0; }
.household-rename { display: flex; gap: 8px; align-items: center; }
.household-rename input { flex: 1; min-width: 0; min-height: 44px; }
.household-new { margin: 16px 0 24px; }
/* Courses : le foyer avec qui on partage la liste */
.household-bar {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; min-height: 56px;
  border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--border);
}
.household-bar > i:first-child { font-size: 22px; color: var(--accent-ink); }
.household-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.household-bar-text .muted { font-size: 14px; }
.household-alert { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); }
.household-alert p { margin: 0 0 10px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.household-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.household-alert-actions form { margin: 0; }
.household-name { font-size: 20px; font-weight: 800; margin: 0; }
.household-people { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.household-people li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.household-people .avatar { width: 36px; height: 36px; font-size: 14px; }
.household-invite-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.household-invite-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.household-invite-list form { margin: 0; }

.household-card + .section-title, .household-list + .section-title { margin-top: 26px; }
/* Courses : ordre des rayons */
.aisle-order { list-style: none; margin: 12px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: rayon; }
.aisle-order li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--radius); background: var(--surface); counter-increment: rayon; scroll-margin-top: 80px; }
.aisle-order-name { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.aisle-order-name::before { content: counter(rayon); color: var(--muted); font-weight: 700; min-width: 1.4em; }
.aisle-order-name i { color: var(--accent-ink); font-size: 20px; }
.aisle-order-moves { display: flex; gap: 6px; flex: none; }
.aisle-order-moves form { margin: 0; }
.aisle-order-moves .btn-icon { width: 48px; height: 48px; }
.aisle-order-moves .btn-icon:disabled { opacity: .35; }

.origin-carnet { color: var(--accent-ink); font-weight: 700; }
/* Menu : historique */
.history-link { margin: 0 0 14px; }
.history-week { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.history-week-title { font-size: 18px; margin: 0 0 4px; }
.history-day { margin: 8px 0 2px; font-weight: 800; color: var(--accent-ink); font-size: 15px; }
.history-meals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history-meals li { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.history-meals .meal-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.history-again { flex: none; }
.history-reuse { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.history-reuse form { margin: 0; }
.history-classics { margin: 0 0 18px; }

.household-invited { display: flex; align-items: center; gap: 6px; }
.household-invited form { margin: 0; }
