/* La Dalle — bistrot de quartier. Crème, bordeaux, encre ; bordures épaisses et ombres nettes. */
:root {
  --creme: #f6efe1;
  --papier: #fffaf0;
  --encre: #2b1d16;
  --bordeaux: #8e2428;
  --bordeaux-fonce: #6f1a1e;
  --or: #f6c66a;
  --beurre: #fbe9b7;
  --gris: #5a4a3e;
  --gris-clair: #6b5a4c;
  --pointille: #c9b8a2;
  --titre: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --texte: 'Work Sans', -apple-system, system-ui, sans-serif;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--creme); }
body {
  margin: 0; min-height: 100dvh; background: var(--creme); color: var(--encre);
  font: 16px/1.45 var(--texte); -webkit-font-smoothing: antialiased; text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--bordeaux); }
h1, h2, h3 { font-family: var(--titre); margin: 0; line-height: 1.08; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: calc(96px + var(--bas)); }

/* Store rayé */
.store {
  height: calc(40px + var(--haut)); background: repeating-linear-gradient(90deg, var(--bordeaux) 0 26px, var(--creme) 26px 52px);
  border-bottom: 3px solid var(--encre); border-radius: 0 0 6px 6px;
}
.entete { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 4px; }
.entete-ligne { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.surtitre { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gris-clair); font-weight: 600; }
.entete h1 { font-size: 38px; font-weight: 800; }
.entete h1 em { color: var(--bordeaux); }
.chapo { margin: 4px 0 0; color: var(--gris); }

.section-titre { margin: 26px 20px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-titre h2 { font-size: 24px; font-weight: 800; }

/* Cartes et boutons */
.carte { background: var(--papier); border: 2px solid var(--encre); border-radius: 18px; box-shadow: 4px 4px 0 var(--encre); }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 22px; border: 2px solid var(--encre); background: var(--papier); font-weight: 600; font-size: 15px;
  text-decoration: none; color: var(--encre); box-shadow: 3px 3px 0 var(--encre); cursor: pointer;
}
.bouton:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--encre); }
.bouton.plein { background: var(--bordeaux); color: var(--papier); }
.bouton.grand { min-height: 54px; border-radius: 27px; font-size: 17px; width: 100%; box-shadow: 4px 4px 0 var(--encre); }
.bouton.discret { box-shadow: none; }
.bouton[disabled] { opacity: .5; }
.rond {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: 2px solid var(--encre); background: var(--papier);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--encre); padding: 0;
}
.lien { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--bordeaux); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Plats de la semaine : défilement horizontal */
.defile { display: flex; gap: 14px; overflow-x: auto; padding: 4px 20px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.defile::-webkit-scrollbar { display: none; }
.plat-carte { flex: 0 0 220px; scroll-snap-align: start; padding: 12px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--encre); }
.plat-carte .nom { font-family: var(--titre); font-size: 20px; font-weight: 600; line-height: 1.15; }
.meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--gris); gap: 8px; }

.vignette { border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plat-carte .vignette { height: 132px; }

.toques { display: inline-flex; gap: 2px; color: var(--encre); }
.toques svg { display: block; }

/* Liste du menu */
.tableau { margin: 0 20px; background: var(--papier); border: 2px solid var(--encre); border-radius: 16px; overflow: hidden; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 0 8px 0 14px; min-height: 52px; border-bottom: 1px dashed var(--pointille); text-decoration: none; color: var(--encre); }
.ligne:last-child { border-bottom: 0; }
.ligne.aujourdhui { background: var(--beurre); }
.jour { width: 38px; flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bordeaux); }
.ligne .plat { flex: 1; min-width: 0; }
.vide { color: #6e5e52; }

/* Menu de la semaine */
.jours { margin: 16px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.jour-carte { display: flex; align-items: center; gap: 12px; border: 2px solid var(--encre); border-radius: 14px; padding: 0 4px 0 10px; min-height: 60px; background: var(--papier); }
.jour-carte.libre { background: transparent; border-style: dashed; }
.jour-carte.aujourdhui { box-shadow: 3px 3px 0 var(--bordeaux); }
.date { width: 42px; display: flex; flex-direction: column; align-items: center; line-height: 1.05; flex-shrink: 0; }
.date span:first-child { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bordeaux); }
.date span:last-child { font-family: var(--titre); font-size: 20px; font-weight: 800; }
.jour-carte a, .jour-carte .choisir { flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; text-decoration: none; color: var(--encre); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.jour-carte small { font-size: 12px; color: var(--gris-clair); }
.choisir { font-weight: 500; color: #6e5e52 !important; }
.nav-semaine { display: flex; align-items: center; justify-content: space-between; margin: 14px 20px 0; gap: 8px; }
.nav-semaine span { font-weight: 600; font-size: 15px; text-align: center; }

/* Recettes */
.recherche { margin: 16px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.champ { width: 100%; min-height: 48px; border: 2px solid var(--encre); border-radius: 14px; background: var(--papier); padding: 0 14px; font-size: 16px; }
textarea.champ { padding: 10px 14px; min-height: 90px; resize: vertical; line-height: 1.4; }
.puces { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.puce { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 2px solid var(--encre); background: transparent; font-weight: 500; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.puce[aria-pressed="true"] { background: var(--encre); color: var(--creme); }
.liste { margin: 14px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.rangee { display: flex; align-items: center; gap: 12px; padding: 10px; text-decoration: none; color: var(--encre); box-shadow: 3px 3px 0 var(--encre); }
.rangee .vignette { width: 64px; height: 64px; flex-shrink: 0; }
.rangee .corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rangee .nom { font-family: var(--titre); font-size: 18px; font-weight: 600; line-height: 1.15; }
.rangee small { color: var(--gris); font-size: 13px; }

/* Fiche recette */
.heros { height: calc(280px + var(--haut)); border-bottom: 3px solid var(--encre); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.heros img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heros .barre { position: absolute; top: calc(14px + var(--haut)); left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; z-index: 1; }
.heros .barre div { display: flex; gap: 8px; }
.fiche-tete { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.fiche-tete h1 { font-size: 34px; font-weight: 800; }
.infos { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 14px; color: var(--gris); }
/* Choix de l'appareil : Four & feu / Cookeo / Airfryer */
.appareils { margin: 16px 20px 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 2px solid var(--encre); border-radius: 22px; overflow: hidden; background: var(--papier); }
.appareils button { min-height: 44px; border: 0; border-left: 2px solid var(--encre); background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; }
.appareils button:first-child { border-left: 0; }
.appareils button[aria-pressed="true"] { background: var(--encre); color: var(--creme); }
.au { font-style: italic; font-weight: 600; color: var(--bordeaux); font-size: .8em; }
.badges { display: flex; gap: 4px; margin-top: 2px; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 1px 7px; border-radius: 9px; background: var(--beurre); border: 1px solid var(--encre); }
.reglages-fiche { margin: 18px 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.case { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; border-radius: 16px; box-shadow: none; }
.case > span { font-size: 12px; font-weight: 600; color: var(--gris-clair); }
.pas { display: flex; align-items: center; justify-content: space-between; }
.pas strong { font-family: var(--titre); font-size: 26px; font-weight: 800; }
.pas button { background: var(--creme); font-size: 20px; font-weight: 600; }
.choix-toques { display: flex; justify-content: space-between; }
.choix-toques button { width: 44px; height: 44px; border: 0; background: none; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ingredients label { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 48px; border-bottom: 1px dashed var(--pointille); cursor: pointer; }
.ingredients label:last-child { border-bottom: 0; }
.ingredients input { width: 22px; height: 22px; accent-color: var(--bordeaux); margin: 0; flex-shrink: 0; }
.ingredients input:checked + span { text-decoration: line-through; color: var(--gris-clair); }
.ingredients span { flex: 1; }
.ingredients b { color: var(--bordeaux); font-weight: 600; white-space: nowrap; }
.etapes { margin: 0 20px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.etapes li { display: flex; gap: 12px; line-height: 1.5; }
.num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 15px; background: var(--encre); color: var(--creme); font-family: var(--titre); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.minutes { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--bordeaux); }
.gloss { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted var(--bordeaux) 2px; text-underline-offset: 3px; cursor: help; }
.astuce { margin: 26px 20px 0; padding: 14px; background: var(--beurre); border: 2px solid var(--encre); border-radius: 16px; }
.astuce h3 { font-style: italic; font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.fait { margin: 22px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--gris); font-size: 14px; }
.collant { position: sticky; bottom: calc(72px + var(--bas)); margin-top: 24px; padding: 12px 20px; background: linear-gradient(transparent, var(--creme) 30%); }

/* Mode cuisine */
.cuisine { min-height: 100dvh; background: var(--encre); color: var(--creme); display: flex; flex-direction: column; gap: 18px; padding: calc(16px + var(--haut)) 20px calc(20px + var(--bas)); }
.cuisine .haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cuisine .rond { background: transparent; border-color: var(--creme); color: var(--creme); }
.cuisine .titre-plat { font-size: 14px; color: #d8cbb6; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuisine .compte { font-family: var(--titre); font-weight: 800; font-size: 18px; }
.progression { display: flex; gap: 6px; }
.progression span { flex: 1; height: 6px; border-radius: 3px; background: #5a463a; }
.progression span.ok { background: var(--or); }
.cuisine .centre { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.cuisine .etiquette { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--or); font-weight: 600; }
.cuisine .consigne { margin: 0; font-family: var(--titre); font-size: clamp(26px, 7.4vw, 36px); line-height: 1.22; font-weight: 600; text-wrap: pretty; }
.minuteur { align-self: flex-start; min-height: 54px; padding: 0 22px; border-radius: 27px; border: 2px solid var(--or); background: transparent; color: var(--or); font-weight: 600; font-size: 18px; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-variant-numeric: tabular-nums; }
.minuteur.actif { background: var(--or); color: var(--encre); }
.minuteur.fini { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--papier); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.autres-minuteurs { display: flex; gap: 8px; flex-wrap: wrap; }
.autres-minuteurs span { font-size: 13px; padding: 6px 10px; border-radius: 14px; background: #4a372c; font-variant-numeric: tabular-nums; }
.cuisine .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cuisine .actions button { min-height: 68px; border-radius: 20px; border: 2px solid var(--creme); background: transparent; color: var(--creme); font-weight: 600; font-size: 18px; cursor: pointer; }
.cuisine .actions button.suivant { background: var(--or); color: var(--encre); }

/* Courses */
.rayon { margin: 18px 20px 0; }
.rayon h3 { font-size: 18px; margin-bottom: 8px; }
.ingredients small { display: block; font-size: 12px; color: var(--gris-clair); }

/* Formulaire */
.formulaire { padding: 0 20px; display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.formulaire label.titre-champ { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.groupe { display: flex; flex-direction: column; gap: 8px; }
.groupe > span { font-weight: 600; font-size: 14px; }
.ing-ligne { display: grid; grid-template-columns: 64px 74px minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
.ing-ligne .champ { padding: 0 8px; font-size: 15px; min-height: 44px; }
.ing-ligne select.champ { grid-column: 1 / 4; }
.ing-bloc { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--pointille); }
.etape-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; }
.etape-ligne .min { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gris); }
.etape-ligne .min input { width: 80px; }
.couleurs { display: flex; gap: 10px; flex-wrap: wrap; }
.couleurs button { width: 40px; height: 40px; border-radius: 20px; border: 2px solid var(--encre); cursor: pointer; }
.couleurs button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--creme), 0 0 0 6px var(--encre); }
.photo-apercu { width: 100%; height: 180px; border: 2px solid var(--encre); border-radius: 16px; }
.danger { color: var(--bordeaux); border-color: var(--bordeaux); box-shadow: none; }

/* Barre d'onglets */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--encre);
  padding: 8px max(8px, calc((100% - 560px) / 2)) calc(8px + var(--bas)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.onglets a { color: var(--creme); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; min-height: 52px; }
.onglets a[aria-current="page"] { color: var(--or); }
.onglets-int { max-width: 560px; margin: 0 auto; display: contents; }

/* Feuille (bas d'écran) */
.voile { position: fixed; inset: 0; background: rgba(43, 29, 22, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.feuille {
  width: 100%; max-width: 560px; max-height: 82dvh; overflow-y: auto; background: var(--creme); border-top: 3px solid var(--encre);
  border-radius: 22px 22px 0 0; padding: 18px 20px calc(20px + var(--bas)); display: flex; flex-direction: column; gap: 12px;
}
.feuille h2 { font-size: 24px; font-weight: 800; }
.feuille .tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.choix { display: flex; flex-direction: column; gap: 8px; }
.choix button { text-align: left; min-height: 52px; border: 2px solid var(--encre); border-radius: 14px; background: var(--papier); padding: 6px 12px; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.choix button .vignette { width: 40px; height: 40px; flex-shrink: 0; }

.message { margin: 14px 20px 0; padding: 12px 14px; border: 2px dashed var(--encre); border-radius: 14px; color: var(--gris); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--bas)); z-index: 30; background: var(--encre); color: var(--creme); padding: 10px 18px; border-radius: 20px; font-size: 15px; max-width: 90vw; }
.chargement { padding: 60px 20px; text-align: center; color: var(--gris); }
