/* Ayur·Hermès v3 — compléments de styles, chargés après app.css */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1:focus { outline: none; }
.wrap.narrow { max-width: 720px; }
.wrap.still { animation: none; }
.lead.left { margin-left: 0; margin-right: 0; }
.loading { padding: 3rem 1rem; }
.narrow-btn { max-width: 280px; margin: 0 auto; }
.block { display: block; }
.tight { margin: 0 0 .6rem; }
.center { text-align: center; }
.date-title { font-size: 1.9rem; margin-top: .3rem; }
.el-text { margin-top: .9rem; }
.fine.present { color: var(--gold-2); }
.notice.warn { color: var(--gold-2); border: 1px solid var(--gold-line); border-radius: 12px; padding: .6rem .8rem; }
.copyright { margin-top: 1.5rem; }
.lang-switch { margin: 1.2rem 0 0; color: var(--muted-2); font-size: .9rem; }
.lang-switch button { background: none; border: 0; color: var(--muted); padding: .6rem .5rem; min-height: 44px; }
.lang-switch button[aria-current] { color: var(--gold-2); }
.back-link .arrow { display: inline-block; }
[dir="rtl"] .back-link .arrow, [dir="rtl"] .go { transform: scaleX(-1); display: inline-block; }
.go { color: var(--gold); font-size: .9rem; white-space: nowrap; }
a.card, a.resume-banner, a.streak-box { color: inherit; text-decoration: none; }
a.card:hover, a.resume-banner:hover { text-decoration: none; border-color: var(--gold); }
.resume-banner p { margin: 0; }
.resume-banner.plain { margin: .4rem 0 1rem; }
.kicker.pod { margin-top: 1rem; }
.btn[disabled] { opacity: .45; cursor: default; filter: grayscale(.4); }
.btn.checked { border-color: var(--ok); color: var(--ok); }
.btn.danger { color: var(--danger); border-color: rgba(213,146,130,.4); }
.btn.fav.on { color: var(--gold-2); border-color: var(--gold-2); background: var(--gold-dim); }
.btn.fav.on svg { fill: var(--gold-2); }
.sticky-cta {
  position: sticky; bottom: 0; padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom)); margin-top: 1rem; z-index: 5;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.opts { margin: .6rem 0 1rem; }
.card.framed::before { display: none; }

/* Portions */
.stepper { display: inline-flex; align-items: center; gap: .5rem; margin: .2rem 0 .8rem; }
.stepper .lab { color: var(--muted); font-size: .9rem; margin-right: .2rem; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-line); background: transparent;
  color: var(--gold); font-size: 1.3rem; line-height: 1;
}
.stepper button:hover:not([disabled]) { background: var(--gold-dim); border-color: var(--gold); }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper button:focus-visible, .swap:focus-visible, .day-chip:focus-visible, .tile:focus-visible, .meal-link:focus-visible,
.food-list button:focus-visible, .cal .day:focus-visible, .lang-switch button:focus-visible, .back-link:focus-visible {
  outline: 2px solid var(--gold-2); outline-offset: 2px;
}
.stepper output { min-width: 1.6rem; text-align: center; font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold-2); font-variant-numeric: lining-nums; }
.rec-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 1rem 0 .2rem; }
.rec-actions .stepper { margin: 0; }
.rec-hero .why { margin: 1rem 0; }
.rec-hero .hero-img { height: 260px; }

/* Repas : la carte est un lien, le bouton « changer » reste à part */
.meal { display: flex; align-items: stretch; gap: .2rem; padding: 0; cursor: default; }
.meal .meal-link {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 84px 1fr; gap: .9rem; align-items: center;
  padding: .9rem 1rem; color: inherit; text-decoration: none; border-radius: var(--radius);
}
.meal .meal-link:hover { text-decoration: none; }
.meal .thumb { width: 84px; height: 84px; }
.meal h3 { overflow-wrap: anywhere; }
.meal .swap {
  flex: none; align-self: center; width: 44px; height: 44px; margin-right: .6rem; border-radius: 50%;
  border: 1px solid var(--gold-line); background: transparent; color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
}
.meal .swap:hover { background: var(--gold-dim); border-color: var(--gold); }
.meal .swap svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.fav-dot { color: var(--gold-2); }

/* Semaine */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; margin: .3rem 0 1rem; }
.day-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 56px;
  border: 1px solid var(--gold-line); border-radius: 12px; color: var(--muted); text-decoration: none; background: var(--bg-2);
}
.day-chip:hover { text-decoration: none; border-color: var(--gold); }
.day-chip .dow { font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; }
.day-chip .num { font-family: var(--font-serif); font-size: 1.25rem; font-variant-numeric: lining-nums; color: var(--text); }
.day-chip.on { background: linear-gradient(160deg, var(--gold-2), var(--gold)); border-color: transparent; color: #140F08; }
.day-chip.on .num { color: #140F08; }

/* Tuiles d'accès */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.1rem 0 0; }
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(4, 1fr); } .wrap.narrow .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  display: flex; align-items: center; gap: .6rem; min-height: 56px; padding: .7rem .9rem; border-radius: 14px;
  border: 1px solid var(--gold-line); color: var(--text); background: var(--bg-2); text-decoration: none; font-size: .93rem; line-height: 1.25;
}
.tile:hover { border-color: var(--gold); text-decoration: none; }
.tile svg { flex: none; width: 22px; height: 22px; stroke: var(--gold); fill: none; stroke-width: 1.5; }

/* Suivi */
.streak-box.three { grid-template-columns: repeat(3, 1fr); }
.check.big span { font-size: 1.05rem; color: var(--text); }
.check.big input { width: 24px; height: 24px; }
.cal .day.done, .cal .day.missed { cursor: pointer; }

/* Courses, listes */
h3.aisle { margin: 1.1rem 0 .2rem; color: var(--gold); font-size: 1.15rem; }
h3.aisle:first-child { margin-top: 0; }
.food-list { list-style: none; margin: .3rem 0 1rem; padding: 0; }
.food-list li { border-bottom: 1px solid var(--gold-dim); }
.food-list button { width: 100%; text-align: left; background: none; border: 0; padding: .7rem 0; min-height: 44px; color: var(--text); }
.food-list button:hover { color: var(--gold-2); }
.pill.eff-apaise { border-color: var(--ok); color: var(--ok); }
.pill.eff-augmente { border-color: var(--danger); color: var(--danger); }
.pill.eff-neutre { color: var(--muted); }
.food-detail .pills { margin-top: .8rem; }

/* Sélection */
@media (min-width: 800px) { .prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; } }
.prod h3 { padding-right: 5.5rem; overflow-wrap: anywhere; }
.obj-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.obj-card p { margin: 0; }

/* Textes légaux */
.prose h2 { font-size: 1.25rem; color: var(--gold-2); margin: 1.1rem 0 .3rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 .5rem; color: var(--muted); }

/* Message bref avec action */
.toast { display: flex; align-items: center; gap: .8rem; max-width: calc(100% - 2rem); }
.toast button { background: #140F08; color: var(--gold-2); border: 0; border-radius: 999px; padding: .35rem .9rem; min-height: 36px; }

@media (prefers-reduced-motion: reduce) {
  .logo-ring, .toast { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* Impression : recettes et liste de courses sur fond blanc */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .nav, .topbar, .no-print, .banner, .stepper button, .swap, .week-strip, .tiles, .toast, .btn-row, .share-row { display: none !important; }
  .wrap { padding: 0; width: 100%; animation: none; }
  .card { background: #fff !important; border: 0; box-shadow: none; padding: 0; }
  h1, h2, h3, h3.aisle, .meal .type, .kicker { color: #000 !important; }
  .muted, .fine, .notice { color: #333 !important; }
  .check { border-color: #ccc; break-inside: avoid; }
  .meal { break-inside: avoid; border-bottom: 1px solid #ccc; border-radius: 0; }
  .meal .thumb { display: none; }
  .meal .meal-link { display: block; padding: .4rem 0; }
  .pill { border-color: #999; color: #333; background: none !important; }
}

/* Carte de partage affichée en plein écran (appli Android) */
.card-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10,9,8,.96); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.card-overlay img { max-height: 100%; max-width: 100%; border-radius: 14px; border: 1px solid var(--gold-line); }
