/* Qu'est-ce qu'on mange aujourd'hui ? — feuille de style */

:root {
  --fond: #fffaf3;
  --surface: #ffffff;
  --surface-2: #fdf3e7;
  --texte: #2b1d14;
  --texte-doux: #6b5a4e;
  --bord: #eaded2;
  --accent: #c2410c;
  --accent-fonce: #9a3412;
  --accent-pale: #ffedd5;
  --sur-accent: #ffffff;
  --vert: #166534;
  --vert-pale: #dcfce7;
  --ambre: #92400e;
  --ambre-pale: #fef3c7;
  --rouge: #b91c1c;
  --ombre: 0 1px 2px rgba(60, 30, 10, .06), 0 4px 16px rgba(60, 30, 10, .06);
  --rayon: 14px;
  --titres: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --corps: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1a1310;
    --surface: #241b16;
    --surface-2: #2c211b;
    --texte: #f6ece2;
    --texte-doux: #c9b8a9;
    --bord: #3e3028;
    --accent: #fb8a4c;
    --accent-fonce: #fdba8c;
    --accent-pale: #3b2418;
    --sur-accent: #1a1310;
    --vert: #86efac;
    --vert-pale: #14301f;
    --ambre: #fcd34d;
    --ambre-pale: #3a2b0e;
    --rouge: #fca5a5;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 1rem;
  line-height: 1.55;
}
h1, h2, h3 { font-family: var(--titres); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw + .5rem, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 1.5vw + 1rem, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-fonce); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.enveloppe { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* ---------- Bandeau ---------- */
.bandeau { border-bottom: 1px solid var(--bord); background: var(--fond); }
.bandeau__interieur { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.marque { display: flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none; font-family: var(--titres); font-weight: 700; font-size: 1.05rem; }
.marque:hover { color: var(--texte); }
.marque__logo { width: 34px; height: 34px; flex: none; display: block; }
.logo__rond { fill: var(--accent); }
.logo__couverts { stroke: var(--sur-accent); }
.logo__lame { fill: var(--sur-accent); }
.bandeau__nav { display: flex; align-items: center; gap: 20px; }
.bandeau__lien { font-size: .9rem; color: var(--texte-doux); text-decoration: none; white-space: nowrap; }
.bandeau__lien:hover { color: var(--accent); text-decoration: underline; }
.bandeau__menu { font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bandeau__menu:hover { text-decoration: underline; }
.texte-court { display: none; }
.marque { white-space: nowrap; }
@media (max-width: 720px) {
  .bandeau__lien { display: none; }
}
@media (max-width: 560px) {
  .texte-long { display: none; }
  .texte-court { display: inline; }
}
@media (max-width: 560px) {
  .marque__fin { display: none; }
}

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--sur-accent); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: var(--sur-accent); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton--contour { background: transparent; color: var(--accent); }
.bouton--contour:hover { background: var(--accent-pale); color: var(--accent-fonce); border-color: var(--accent); }
.bouton--discret { background: var(--surface); color: var(--texte); border: 1px solid var(--bord); font-weight: 500; }
.bouton--discret:hover { background: var(--surface-2); color: var(--texte); border-color: var(--texte-doux); }
.bouton--petit { min-height: 36px; padding: 0 14px; font-size: .9rem; }

/* ---------- Accueil ---------- */
.accueil { padding: 40px 0 28px; }
.accueil__surtitre { font-size: .85rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; margin-bottom: .6em; }
.accueil__intro { font-size: 1.15rem; color: var(--texte-doux); max-width: 38em; }
.accueil__semaine { font-weight: 600; }
.accueil__semaine a { text-decoration: none; }
.accueil__semaine a:hover { text-decoration: underline; }
.accueil--compact { padding-bottom: 12px; }

.recherche {
  position: relative; margin-top: 24px; padding: 20px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.recherche__etiquette { display: block; font-weight: 700; margin-bottom: 8px; }
.recherche__champ {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 54px; padding: 6px 8px; border: 2px solid var(--bord); border-radius: 12px; background: var(--fond); cursor: text;
}
.recherche__champ:focus-within { border-color: var(--accent); }
.recherche__champ input {
  flex: 1 1 180px; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--texte);
  font: inherit; font-size: 1.05rem; padding: 8px 6px;
}
.recherche__message { margin: 8px 0 0; color: var(--ambre); font-size: .92rem; }
.recherche__message:empty { display: none; }

.puces { display: contents; list-style: none; margin: 0; padding: 0; }
.puce {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px;
  background: var(--accent-pale); color: var(--accent-fonce); border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.puce__retirer {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit;
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.puce__retirer:hover { background: rgba(194, 65, 12, .15); }

.propositions {
  position: absolute; left: 20px; right: 20px; z-index: 5; margin: 4px 0 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; box-shadow: var(--ombre);
  max-height: 300px; overflow-y: auto;
}
.propositions li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.propositions li[aria-selected="true"], .propositions li:hover { background: var(--accent-pale); color: var(--accent-fonce); }

.idees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.idees__titre { font-size: .9rem; color: var(--texte-doux); margin-right: 2px; }
.idee {
  min-height: 34px; padding: 0 12px; border: 1px dashed var(--bord); border-radius: 999px; background: transparent;
  color: var(--texte); font: inherit; font-size: .9rem; cursor: pointer;
}
.idee:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }

.options { margin-top: 14px; }
.case { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.case--petite { font-size: .88rem; color: var(--texte-doux); margin-top: 12px; }

.filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--bord); }
.segments { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.segments label { position: relative; }
.segments input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segments span { display: block; padding: 9px 14px; font-size: .92rem; cursor: pointer; }
.segments input:checked + span { background: var(--accent); color: var(--sur-accent); font-weight: 600; }
.segments input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.case--pastille { align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--bord); border-radius: 10px; font-size: .92rem; }
.case--pastille input { margin: 0; width: 18px; height: 18px; }
.case--pastille:has(input:checked) { border-color: var(--accent); background: var(--accent-pale); }
.choix--surprise { margin-left: auto; }
@media (max-width: 560px) {
  .recherche { padding: 16px; }
  .propositions { left: 16px; right: 16px; }
  .choix--surprise { margin-left: 0; width: 100%; }
  #surprise { flex: 1; }
  .segments { width: 100%; }
  .segments label { flex: 1; text-align: center; }
  .segments span { padding: 9px 6px; }
}

/* ---------- Résultats ---------- */
.resultats { padding: 12px 16px 40px; }
.resultats__resume { color: var(--texte-doux); }
.resultats__plus { text-align: center; margin-top: 20px; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.carte {
  display: flex; flex-direction: column; gap: 6px; padding: 16px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  color: var(--texte); text-decoration: none; box-shadow: var(--ombre);
  transition: transform .15s, border-color .15s;
}
.carte:hover { color: var(--texte); border-color: var(--accent); transform: translateY(-2px); }
.carte__cat {
  align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--texte-doux);
}
.carte__cat--dessert { background: #fce7f3; color: #9d174d; }
.carte__cat--entree { background: #e0f2fe; color: #075985; }
@media (prefers-color-scheme: dark) {
  .carte__cat--dessert { background: #3b1a2b; color: #f9a8d4; }
  .carte__cat--entree { background: #0f2a3a; color: #7dd3fc; }
}
.carte__titre { margin: 2px 0 0; font-size: 1.2rem; }
.carte__meta { margin: 0; font-size: .88rem; color: var(--texte-doux); }
.carte__etat { margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; font-size: .88rem; }
.carte__etat--ok { background: var(--vert-pale); color: var(--vert); font-weight: 600; }
.carte__etat--manque { background: var(--ambre-pale); color: var(--ambre); }
.carte__compte { margin: 0; font-size: .8rem; color: var(--texte-doux); }
@media (prefers-reduced-motion: reduce) { .carte { transition: none; } .carte:hover { transform: none; } }

/* ---------- Encart restaurateurs ---------- */
.encart-resto {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 40px; padding: 24px 16px; border-radius: var(--rayon); background: var(--accent-pale);
}
.encart-resto > div { flex: 1 1 320px; }
.encart-resto h2 { margin-bottom: .3em; }
.encart-resto p { margin: 0; color: var(--texte-doux); }
@media (min-width: 1112px) { .encart-resto { padding: 24px 28px; } }

/* ---------- Catalogue ---------- */
.catalogue { padding-bottom: 48px; }
.catalogue__colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; }
.catalogue h3 { font-size: 1.05rem; color: var(--accent); margin-top: .8em; }
.catalogue ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.catalogue li { padding: 3px 0; font-size: .95rem; }
.catalogue a { color: var(--texte); text-decoration: none; }
.catalogue a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Fiche recette ---------- */
.recette { padding-top: 20px; padding-bottom: 48px; }
.fil { font-size: .92rem; }
.fil a { text-decoration: none; }
.recette__entete { margin-bottom: 24px; }
.recette__entete h1 { margin-top: 10px; }
.recette__desc { font-size: 1.15rem; color: var(--texte-doux); max-width: 40em; }
.recette__meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.recette__meta li {
  display: flex; flex-direction: column; padding: 8px 14px; min-width: 100px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 10px;
}
.recette__meta span { font-size: .75rem; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .04em; }
.recette__meta .recette__vege { justify-content: center; background: var(--vert-pale); border-color: transparent; color: var(--vert); }

.recette__corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 820px) { .recette__corps { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } }
.recette__ingredients, .recette__etapes {
  padding: 20px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
}
.recette__ingredients ul { margin: 0; padding: 0; list-style: none; }
.recette__ingredients li { padding: 8px 0 8px 22px; border-bottom: 1px solid var(--bord); position: relative; }
.recette__ingredients li:last-child { border-bottom: 0; }
.recette__ingredients li::before { content: ""; position: absolute; left: 4px; top: 1em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.recette__etapes ol { margin: 0; padding: 0; list-style: none; counter-reset: etape; }
.recette__etapes li { counter-increment: etape; position: relative; padding: 4px 0 16px 48px; }
.recette__etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-pale); color: var(--accent-fonce); font-weight: 700;
}

.recette__actions--seul { grid-template-columns: minmax(0, 640px) !important; }
.recette__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; align-items: start; }
@media (max-width: 360px) { .recette__actions { grid-template-columns: minmax(0, 1fr); } }
.boite { padding: 20px; border-radius: var(--rayon); background: var(--surface); border: 2px solid var(--accent); }
.boite--resto { border-color: var(--bord); background: var(--surface-2); }
.boite label[for] { display: block; font-weight: 600; margin-bottom: 6px; }
.ligne-champ { display: flex; flex-wrap: wrap; gap: 8px; }
.ligne-champ input {
  flex: 1 1 200px; min-width: 0; min-height: 44px; padding: 0 12px;
  border: 2px solid var(--bord); border-radius: 10px; background: var(--fond); color: var(--texte); font: inherit;
}
.ligne-champ input:focus { outline: none; border-color: var(--accent); }
.mention { font-size: .8rem; color: var(--texte-doux); margin: 12px 0 0; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.retour { margin: 12px 0 0; font-size: .92rem; }
.retour:empty { display: none; }
.retour--ok { color: var(--vert); font-weight: 600; }
.retour--erreur { color: var(--rouge); font-weight: 600; }

.restos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.resto { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; }
.resto div { display: flex; flex-direction: column; min-width: 0; }
.resto__ville, .resto__accroche { font-size: .85rem; color: var(--texte-doux); }

.autres { margin-top: 40px; }
.page-simple { padding: 48px 16px; }

/* ---------- Infobulles ---------- */
.choix { display: inline-flex; align-items: center; gap: 4px; }
.choix--large { display: flex; align-items: flex-start; }
.choix--large .aide { margin-top: 1px; }
.aide { position: relative; display: inline-flex; flex: none; }
.aide__bouton {
  width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte-doux);
  font: inherit; font-size: .78rem; font-weight: 700; line-height: 1; cursor: help;
}
.aide__bouton:hover, .aide--ouverte .aide__bouton { border-color: var(--accent); color: var(--accent); }
/* Zone tactile plus large que le rond visible */
.aide__bouton::after { content: ""; position: absolute; inset: -10px; }
.aide__bulle {
  --decalage: 0px;
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 20;
  width: max-content; max-width: min(280px, calc(100vw - 24px));
  padding: 10px 12px; border-radius: 10px;
  background: var(--texte); color: var(--fond);
  font-size: .85rem; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  transform: translateX(calc(-50% + var(--decalage)));
  display: none;
  pointer-events: none;
}
.aide--dessous .aide__bulle { bottom: auto; top: calc(100% + 8px); }
.aide--ouverte .aide__bulle { display: block; }

/* ---------- Menu de la semaine ---------- */
.reglages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.reglages__ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.reglages__titre { font-weight: 700; min-width: 150px; }
.reglages__frigo { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--vert-pale); color: var(--vert); font-size: .9rem; }
.reglages__actions { padding-top: 14px; border-top: 1px solid var(--bord); }
@media (max-width: 560px) {
  .reglages__titre { min-width: 0; width: 100%; }
  .reglages__actions .bouton { width: 100%; }
}

.menu { padding-top: 24px; padding-bottom: 32px; scroll-margin-top: 12px; }
.semaine { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.jour { padding: 14px 16px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.jour--weekend { background: var(--surface-2); }
.jour__nom { margin: 0 0 6px; font-size: 1.25rem; }
.repas + .repas { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--bord); }
.repas__moment { margin: 0 0 2px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.repas__liste { list-style: none; margin: 0; padding: 0; }
.plat-ligne { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.plat-ligne__corps { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plat-ligne__titre { color: var(--texte); font-weight: 600; text-decoration: none; line-height: 1.3; }
.plat-ligne__titre:hover { color: var(--accent); text-decoration: underline; }
.plat-ligne__meta { font-size: .8rem; color: var(--texte-doux); }
.plat-ligne__cat { font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; }
.plat-ligne__cat--entree { color: #0369a1; }
.plat-ligne__cat--plat { color: var(--accent); }
.plat-ligne__cat--dessert { color: #be185d; }
@media (prefers-color-scheme: dark) {
  .plat-ligne__cat--entree { color: #7dd3fc; }
  .plat-ligne__cat--dessert { color: #f9a8d4; }
}
.changer {
  flex: none; min-height: 32px; padding: 0 10px; border: 1px solid var(--bord); border-radius: 8px;
  background: var(--surface); color: var(--texte-doux); font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap;
}
.changer:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 900px) and (max-width: 1100px) { .changer__texte { display: none; } }

.menu__bas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; align-items: start; }
@media (max-width: 360px) { .menu__bas { grid-template-columns: minmax(0, 1fr); } }
.boite--courses { border-color: var(--bord); }
.courses { list-style: none; margin: 12px 0; padding: 0; columns: 1; }
.courses__item { padding: 6px 0; border-bottom: 1px solid var(--bord); break-inside: avoid; }
.courses__item:last-child { border-bottom: 0; }
.courses__item span { display: flex; flex-direction: column; }
.courses__pour { font-size: .8rem; color: var(--texte-doux); }
.courses__item input:checked + span { text-decoration: line-through; color: var(--texte-doux); }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--bord); padding: 24px 0 32px; font-size: .9rem; color: var(--texte-doux); }
.pied p { margin: 0 0 8px; }
.pied__liens { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pied .compteur { margin: 14px 0 0; font-size: .78rem; opacity: .8; }

/* ---------- Impression ---------- */
@media print {
  .bandeau, .pied, .recette__actions, .autres, .fil { display: none !important; }
  body { background: #fff; color: #000; }
  .recette__ingredients, .recette__etapes { border: 0; padding: 0; }
}
