/* =============================================================
   PALA — maquette sur mesure, hors du parc (couleurs en dur, JS
   permis). Direction : une pizzeria de quartier, populaire et
   chaleureuse — le crème des murs, le noyer des tables, le rouge
   tomate de la mosaïque du four, le menthe et le moutarde des chaises.
   Un seul titrage, gras de naissance (Caprasimo, dans la lignée du
   Cooper Black des enseignes des années 70) : il n'a ni italique ni
   gras, on ne lui en demande pas — le navigateur les synthétiserait.
   ============================================================= */

@font-face { font-family: "Caprasimo"; src: url("../fonts/caprasimo.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --creme: #f6ecdb;
  --creme-2: #efdfc4;
  --marbre: #fffaf1;
  --noyer: #34211a;
  --noyer-doux: #6a4b3b;
  --tomate: #b3301a;
  --tomate-fonce: #8e2412;
  --tomate-clair: #f6d3c6;
  --menthe: #bfe0cd;
  --menthe-fonce: #2f6b4f;
  --moutarde: #e2b041;
  --moutarde-clair: #f5e2b0;
  --four: #23150f;
  --four-2: #33201a;
  --clair: #f8efe0;
  --clair-doux: #d9c4ad;
  --filet: rgb(52 33 26 / 0.16);
  --bord: rgb(52 33 26 / 0.55);         /* contour d'un contrôle sur le crème : ≥ 3:1 */
  --bord-clair: rgb(248 239 224 / 0.5); /* contour d'un contrôle sur le four : ≥ 3:1 */

  --titre: "Caprasimo", "Cooper Black", Georgia, serif;
  --texte: "DM Sans", system-ui, sans-serif;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --large: 76rem;
  --rayon: 1.1rem;
  --entete: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--entete) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--creme); color: var(--noyer); font: 400 1.0625rem/1.6 var(--texte); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--tomate); outline-offset: 3px; }
.pate :focus-visible, .pied :focus-visible, .heros :focus-visible { outline-color: var(--moutarde); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem; background: var(--noyer); color: var(--clair); border-radius: 0.5rem; }
.evitement:focus { top: 1rem; }
.cadre { width: min(100% - 2 * var(--gouttiere), var(--large)); margin-inline: auto; }
.discret { color: var(--noyer-doux); }
.sans-js [data-js] { display: none !important; }

/* ---- Le bandeau de la maquette ---- */
.maquette { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; padding: 0.55rem var(--gouttiere); background: var(--four); color: var(--clair); font-size: 0.8125rem; text-align: center; }
.maquette span { font-weight: 700; }
.maquette a { color: var(--moutarde); }

/* ---- Boutons ---- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.4rem; border: 2px solid transparent; border-radius: 999px;
  font: 700 1rem/1.1 var(--texte); text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.bouton:active { transform: translateY(1px); }
.bouton-plein { background: var(--tomate); color: var(--marbre); }
.bouton-plein:hover { background: var(--tomate-fonce); }
.bouton-contour { background: transparent; color: var(--clair); border-color: var(--clair); }
.bouton-contour:hover { background: var(--clair); color: var(--noyer); }
.bouton-contour-sombre { background: transparent; color: var(--noyer); border-color: var(--noyer); }
.bouton-contour-sombre:hover { background: var(--creme-2); }
.bouton-large { width: 100%; }
.lien { padding: 0; border: 0; background: none; text-decoration: underline; cursor: pointer; font-weight: 700; }
.lien-fleche { font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }
.lien-fleche::after { content: " →"; }

/* ---- En-tête ---- */
.entete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 2rem);
  height: var(--entete); padding-inline: var(--gouttiere);
  margin-bottom: calc(var(--entete) * -1);
  color: var(--clair);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.entete[data-plein] { background: rgb(246 236 219 / 0.95); color: var(--noyer); box-shadow: 0 1px 0 var(--filet); backdrop-filter: blur(10px); }
.marque { display: flex; align-items: center; gap: 0.5rem; margin-right: auto; font: 400 1.85rem/1 var(--titre); text-decoration: none; letter-spacing: 0.01em; }
.entete-nav { display: none; gap: clamp(1rem, 2vw, 1.75rem); font-weight: 500; font-size: 0.9375rem; }
.entete-nav a { text-decoration: none; padding-block: 0.4rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.25s; }
.entete-nav a:hover { background-size: 100% 2px; }
.bouton-commander { min-height: 2.6rem; padding: 0.45rem 1.1rem; font-size: 0.9375rem; background: var(--tomate); color: var(--marbre); }
.bouton-commander:hover { background: var(--tomate-fonce); }
.compteur { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding-inline: 0.35rem; border-radius: 999px; background: var(--marbre); color: var(--tomate-fonce); font-size: 0.8125rem; }
.entete-menu { display: grid; gap: 6px; place-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: none; cursor: pointer; }
.entete-menu span { display: block; width: 1.5rem; height: 2px; border-radius: 2px; background: currentColor; }
@media (min-width: 60rem) {
  .entete-nav { display: flex; }
  .entete-menu { display: none; }
}
.menu-mobile { inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 5.5rem var(--gouttiere) 2rem; border: 0; background: var(--creme); color: var(--noyer); }
.menu-mobile nav { display: grid; gap: 0.25rem; }
.menu-mobile nav a { padding-block: 0.5rem; font: 400 2rem/1.2 var(--titre); text-decoration: none; }
.menu-fermer { position: absolute; top: 0.75rem; right: var(--gouttiere); width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer; }
.menu-fermer::before, .menu-fermer::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.5rem; height: 2px; background: var(--noyer); }
.menu-fermer::before { transform: translate(-50%, -50%) rotate(45deg); }
.menu-fermer::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---- Héros ---- */
.heros { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(100svh, 56rem); overflow: clip; color: var(--clair); background: var(--four); }
.heros-image, .heros-image img { position: absolute; inset: 0; width: 100%; height: 100%; }
.heros-image img { object-fit: cover; object-position: 50% 50%; }
.heros-voile { position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(20 12 8 / 0.55), rgb(20 12 8 / 0) 24%), linear-gradient(to top, rgb(20 12 8 / 0.9) 0%, rgb(20 12 8 / 0.55) 40%, rgb(20 12 8 / 0.05) 72%); }
/* L'image en paysage (même requête que sa <source>) met des ampoules allumées derrière la
   colonne de texte : le reflet de l'une effaçait le « I » du surtitre à 1440 px. Un voile
   latéral, là seulement ; le portrait garde le sien. */
@media (min-aspect-ratio: 4/5) {
  .heros-voile { background: linear-gradient(to right, rgb(20 12 8 / 0.6), rgb(20 12 8 / 0) 55%), linear-gradient(to bottom, rgb(20 12 8 / 0.55), rgb(20 12 8 / 0) 24%), linear-gradient(to top, rgb(20 12 8 / 0.9) 0%, rgb(20 12 8 / 0.55) 40%, rgb(20 12 8 / 0.05) 72%); }
}
.heros-texte { position: relative; padding-top: 8rem; padding-bottom: clamp(2.5rem, 8vh, 5rem); }
.sur { margin-bottom: 0.9rem; font: 700 0.8125rem/1.4 var(--texte); letter-spacing: 0.16em; text-transform: uppercase; color: var(--tomate); }
.heros .sur { color: var(--moutarde); }
.heros-titre { max-width: 13ch; margin-bottom: 1.25rem; font: 400 clamp(3rem, 1.4rem + 6vw, 6.75rem)/0.98 var(--titre); letter-spacing: -0.01em; }
.heros-titre em, .titre em { font-style: normal; color: var(--moutarde); }
.heros-chapo { max-width: 38rem; margin-bottom: 2rem; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: rgb(248 239 224 / 0.92); }
.heros-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.statut { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 500; font-size: 0.9375rem; }
.statut::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--clair-doux); }
.statut[data-ouvert]::before { background: #7fd3a6; box-shadow: 0 0 0 0 rgb(127 211 166 / 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .statut[data-ouvert]::before { animation: respire 2.4s ease-out infinite; }
  @keyframes respire { 70% { box-shadow: 0 0 0 0.55rem rgb(127 211 166 / 0); } 100% { box-shadow: 0 0 0 0 rgb(127 211 166 / 0); } }
}

/* ---- Sections ---- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-tete { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.titre { margin-bottom: 1rem; font: 400 clamp(2.3rem, 1.6rem + 3vw, 4rem)/1.02 var(--titre); letter-spacing: -0.005em; }
.titre em { color: var(--tomate); }
.chapo { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem); line-height: 1.5; }
.chapo + p { margin-top: 1rem; }

/* ---- La carte ---- */
.filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 2rem; }
.filtre {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.45rem 1rem;
  border: 2px solid var(--bord); border-radius: 999px; background: transparent; font-weight: 700; font-size: 0.9375rem; cursor: pointer;
}
.filtre:hover { border-color: var(--noyer); }
.filtre[aria-pressed="true"] { background: var(--noyer); border-color: var(--noyer); color: var(--marbre); }
.filtre[aria-pressed="true"]::before { content: "✓"; }
.filtre-n { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--creme-2); color: var(--noyer); font-size: 0.8125rem; }
.filtres-resultat { margin-left: 0.25rem; font-weight: 500; color: var(--noyer-doux); }
.filtres-vide { padding: 2rem 0; font-size: 1.125rem; }
.note-js { padding: 1rem 1.25rem; margin-bottom: 2rem; border: 2px solid var(--bord); border-radius: var(--rayon); }

.pizzas { display: grid; gap: 1rem; }
.pizza {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0.5rem 1rem;
  padding: 0.85rem; border-radius: var(--rayon); background: var(--marbre); box-shadow: 0 1px 0 var(--filet), 0 12px 30px -24px rgb(52 33 26 / 0.5);
}
.pizza-photo { grid-row: 1 / span 2; }
.pizza-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--rayon) - 0.35rem); background: var(--creme-2); }
.pizza-nom { font: 400 1.35rem/1.15 var(--titre); margin-bottom: 0.25rem; }
.pizza-garniture { font-size: 0.9375rem; line-height: 1.45; color: var(--noyer-doux); }
.pizza-pastilles:not(:empty) { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.pizza-pied { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; align-self: end; }
.pizza-prix { font: 400 1.45rem/1 var(--titre); }
.pastille { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font: 700 0.75rem/1.4 var(--texte); letter-spacing: 0.02em; vertical-align: 0.2em; }
.pastille-v, .pastille-vegan { background: var(--menthe); color: #1f4a36; }
.pastille-piquante { background: var(--tomate-clair); color: var(--tomate-fonce); }
.pastille-blanche { background: var(--moutarde-clair); color: #5c4310; }
.pastille-mois { background: var(--tomate); color: var(--marbre); font-family: var(--texte); }
.pizza-du-mois { box-shadow: inset 0 0 0 2px var(--tomate), 0 12px 30px -24px rgb(52 33 26 / 0.5); }
@media (min-width: 44rem) {
  .pizzas { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; }
  .pizza { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding: 0.9rem 0.9rem 1.1rem; gap: 0.9rem; }
  .pizza-photo { grid-row: auto; }
  .pizza-corps { padding-inline: 0.35rem; }
  .pizza-pied { grid-column: 1; padding-inline: 0.35rem; }
  .pizza-nom { font-size: 1.6rem; }
}

/* Ajouter, puis − / + */
.ajout { flex: none; }
.bouton-ajouter {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; padding: 0.4rem 1rem;
  border: 0; border-radius: 999px; background: var(--tomate); color: var(--marbre); font-weight: 700; font-size: 0.9375rem; cursor: pointer;
}
.bouton-ajouter:hover { background: var(--tomate-fonce); }
.bouton-ajouter span { font-size: 1.2rem; line-height: 1; }
.quantite { display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.2rem; border-radius: 999px; background: var(--noyer); color: var(--marbre); }
.quantite button { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.quantite button:hover { background: rgb(255 250 241 / 0.16); }
.quantite output { min-width: 1.6rem; text-align: center; font-weight: 700; }
[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.ajout-petit .bouton-ajouter { min-height: 2.5rem; padding-inline: 0.85rem; }

/* Desserts et boissons */
.autres { display: grid; gap: 2rem; margin-top: clamp(3rem, 6vw, 4.5rem); }
@media (min-width: 52rem) { .autres { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.autres-titre { margin-bottom: 0.75rem; font: 400 1.75rem/1.1 var(--titre); }
.autre { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding-block: 0.65rem; border-bottom: 1px solid var(--filet); }
.autre-prix { font-weight: 700; }
.carte-notes { display: grid; gap: 0.5rem; max-width: 52rem; margin-top: 2.5rem; font-size: 0.875rem; color: var(--noyer-doux); }

/* ---- La pizza du mois ---- */
.du-mois { background: var(--moutarde-clair); }
.du-mois-grille { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.du-mois-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 30px 60px -30px rgb(52 33 26 / 0.55); background: var(--creme-2); }
.du-mois-photo { max-width: 34rem; }
.du-mois-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.du-mois .pizza-prix { font-size: 2rem; }
@media (min-width: 52rem) { .du-mois-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---- La pâte : la nuit du four ---- */
.pate { background: var(--four); color: var(--clair); }
.pate .sur { color: var(--moutarde); }
.pate .titre em { color: var(--moutarde); }
.pate-grille { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.pate-photo img { width: 100%; border-radius: var(--rayon); background: var(--four-2); }
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-top: 2rem; border-top: 1px solid rgb(248 239 224 / 0.2); }
.chiffres dt { font: 400 clamp(2rem, 1.4rem + 2.5vw, 3.25rem)/1 var(--titre); color: var(--moutarde); }
.chiffres dd { margin-top: 0.4rem; font-size: 0.9375rem; color: var(--clair-doux); }
@media (min-width: 52rem) {
  .pate-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .chiffres { grid-column: 1 / -1; }
}

/* ---- La salle ---- */
.salle { background: var(--creme-2); }
.salle-grille { display: grid; gap: 2rem; align-items: center; }
.salle-photo img, .salle-emporter img { width: 100%; border-radius: var(--rayon); background: var(--creme); }
.salle-texte .bouton { margin-top: 1.75rem; }
.salle-emporter { max-width: 26rem; }
@media (min-width: 52rem) {
  .salle-grille { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-areas: "photo texte" "photo emporter"; column-gap: clamp(2rem, 5vw, 4rem); }
  .salle-photo { grid-area: photo; }
  .salle-texte { grid-area: texte; align-self: end; }
  .salle-emporter { grid-area: emporter; align-self: start; }
}

/* ---- Infos ---- */
.infos-grille { display: grid; gap: 2.5rem; }
.infos .section-tete { margin-bottom: 0; }
.bloc-titre { margin-bottom: 0.75rem; font: 700 0.8125rem/1.4 var(--texte); letter-spacing: 0.16em; text-transform: uppercase; color: var(--tomate); }
.infos-bloc p + .bloc-titre { margin-top: 1.75rem; }
.horaires { width: 100%; border-collapse: collapse; margin-bottom: 0.75rem; }
.horaires th, .horaires td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--filet); text-align: left; font-weight: 400; }
.horaires th { text-transform: capitalize; width: 8rem; }
.horaires tr[data-aujourdhui] { background: var(--menthe); font-weight: 700; }
.horaires tr[data-aujourdhui] th { font-weight: 700; }
.horaires tr[data-aujourdhui] th::after { content: " · aujourd’hui"; font-weight: 400; text-transform: none; }
.infos-bloc .discret { font-size: 0.875rem; }
.infos-vue img { width: 100%; border-radius: var(--rayon); }
.infos-vue figcaption, .discret-legende { margin-top: 0.6rem; font-size: 0.875rem; color: var(--noyer-doux); }
.instagram-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin-block: 1rem; }
.instagram-grille img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0.5rem; background: var(--creme-2); }
.instagram .discret { font-size: 0.875rem; }
@media (min-width: 52rem) {
  .infos-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
  .infos .section-tete { grid-column: 1 / -1; }
}
@media (min-width: 72rem) {
  .infos-grille { grid-template-columns: 1fr 1fr 1.2fr; }
  .infos-vue { grid-column: 1 / span 2; }
}

/* ---- Pied ---- */
.pied { position: relative; padding-block: 4rem 2rem; background: var(--noyer); color: var(--clair); }
body[data-panier] .pied { padding-bottom: calc(2rem + 5.5rem + env(safe-area-inset-bottom)); }
.pied-grille { display: grid; gap: 2rem; }
.pied-nom { font: 400 2.5rem/1 var(--titre); margin-bottom: 0.5rem; }
.pied-liens { display: grid; gap: 0.4rem; align-content: start; }
.pied-liens a { text-decoration: none; }
.pied-liens a:hover { text-decoration: underline; }
.pied-credits { font-size: 0.875rem; color: var(--clair-doux); }
.pied-credits b { color: var(--clair); }
.pied-credits summary { margin-top: 0.75rem; cursor: pointer; color: var(--clair); }
.pied-credits ul { display: grid; gap: 0.35rem; margin-top: 0.6rem; }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(248 239 224 / 0.18); font-size: 0.8125rem; color: var(--clair-doux); }
.pied-bas a { color: var(--moutarde); }
@media (min-width: 52rem) { .pied-grille { grid-template-columns: 1fr 1fr 1.6fr; } }

/* ---- La barre du panier ---- */
.barre-panier { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 0.75rem var(--gouttiere) calc(0.75rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgb(246 236 219 / 0.96) 60%, rgb(246 236 219 / 0)); pointer-events: none; }
.barre-bouton {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 3.5rem; padding: 0.6rem 0.75rem 0.6rem 1.25rem;
  border: 0; border-radius: 999px; background: var(--noyer); color: var(--marbre); cursor: pointer; box-shadow: 0 18px 40px -18px rgb(52 33 26 / 0.8);
}
.barre-resume { display: flex; gap: 0.75rem; font-size: 0.9375rem; }
.barre-action { padding: 0.55rem 1rem; border-radius: 999px; background: var(--tomate); font-weight: 700; font-size: 0.9375rem; }
@media (min-width: 44rem) {
  .barre-panier { left: auto; padding: 1.25rem; background: none; }
  .barre-bouton { width: auto; min-width: 24rem; }
  body[data-panier] .pied { padding-bottom: 2rem; }
  body[data-panier] .pied-bas { padding-right: 27rem; }
}

/* ---- Le dialogue de commande ---- */
.commande {
  width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--creme); color: var(--noyer);
}
.commande::backdrop { background: rgb(35 21 15 / 0.55); }
@media (min-width: 44rem) {
  .commande { width: min(32rem, 100%); margin-left: auto; box-shadow: -30px 0 80px -30px rgb(0 0 0 / 0.5); }
}
@media (prefers-reduced-motion: no-preference) {
  .commande[open] { animation: entre 0.28s ease-out; }
  @keyframes entre { from { transform: translateY(2rem); opacity: 0; } }
  @media (min-width: 44rem) { @keyframes entre { from { transform: translateX(2rem); opacity: 0; } } }
}
.commande-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.commande-tete { display: flex; align-items: center; justify-content: space-between; padding: 1rem var(--gouttiere); border-bottom: 1px solid var(--filet); }
.commande-tete h2 { font: 400 1.75rem/1.1 var(--titre); }
.commande-fermer { position: relative; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--creme-2); cursor: pointer; }
.commande-fermer::before, .commande-fermer::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.1rem; height: 2px; background: var(--noyer); }
.commande-fermer::before { transform: translate(-50%, -50%) rotate(45deg); }
.commande-fermer::after { transform: translate(-50%, -50%) rotate(-45deg); }
.commande-corps { overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem var(--gouttiere) 1.5rem; }
.etape { margin: 0; padding: 1.25rem 0 0.25rem; border: 0; min-width: 0; }
.etape + .etape { margin-top: 0.75rem; border-top: 1px solid var(--filet); }
.etape-titre { display: flex; align-items: center; gap: 0.6rem; padding: 0; margin-bottom: 0.9rem; font: 400 1.35rem/1.2 var(--titre); }
/* Une légende se pose SUR la bordure de son fieldset : flottante, elle redevient un titre. */
legend.etape-titre { float: left; width: 100%; }
legend.etape-titre + * { clear: both; }
.etape-n { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--noyer); color: var(--marbre); font: 700 0.875rem/1 var(--texte); }
.lignes { display: grid; }
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.5rem; grid-template-areas: "nom quantite total" "unite quantite total"; align-items: center; column-gap: 0.75rem; padding-block: 0.6rem; border-bottom: 1px solid var(--filet); }
.ligne-nom { grid-area: nom; font-weight: 700; }
.ligne-unite { grid-area: unite; font-size: 0.875rem; }
.ligne .quantite { grid-area: quantite; }
.ligne-total { grid-area: total; text-align: right; font-weight: 700; }
.panier-vide { padding-block: 1rem; }
.jours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.jour { display: grid; gap: 0.1rem; padding: 0.6rem 0.5rem; border: 2px solid var(--bord); border-radius: 0.8rem; background: var(--marbre); cursor: pointer; text-align: center; }
.jour span { font-size: 0.8125rem; color: var(--noyer-doux); }
.jour[aria-checked="true"] { background: var(--noyer); border-color: var(--noyer); color: var(--marbre); }
.jour[aria-checked="true"] span { color: var(--clair-doux); }
.creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr)); gap: 0.45rem; }
.creneau { min-height: 2.75rem; padding: 0.4rem; border: 2px solid var(--bord); border-radius: 0.7rem; background: var(--marbre); font-weight: 700; font-size: 0.9375rem; cursor: pointer; }
.creneau[aria-checked="true"] { background: var(--tomate); border-color: var(--tomate); color: var(--marbre); }
.creneau[aria-disabled="true"] { text-decoration: line-through; background: transparent; border-style: dashed; opacity: 0.6; }
[data-creneaux-note] { margin-top: 0.75rem; font-size: 0.875rem; }
.champs-deux { display: grid; gap: 0.9rem; }
@media (min-width: 30rem) { .champs-deux { grid-template-columns: 1fr 1fr; } }
.champ { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
.champ label { font-weight: 700; font-size: 0.9375rem; }
.champ input { width: 100%; min-height: 3rem; padding: 0.6rem 0.85rem; border: 2px solid var(--bord); border-radius: 0.7rem; background: var(--marbre); font: inherit; color: inherit; }
.champ input::placeholder { color: var(--noyer-doux); }
.champ input:focus-visible { outline-offset: 1px; }
.choix { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; margin-bottom: 0.5rem; border: 2px solid var(--bord); border-radius: 0.8rem; background: var(--marbre); cursor: pointer; }
.choix:has(input:checked) { border-color: var(--noyer); box-shadow: inset 0 0 0 1px var(--noyer); }
.choix input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--tomate); }
.choix .discret { display: block; font-size: 0.875rem; }
.commande-pied { display: grid; gap: 0.6rem; padding: 1rem var(--gouttiere) calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--filet); background: var(--marbre); }
.commande-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.commande-total output { font: 400 1.6rem/1 var(--titre); }
.erreur:empty { display: none; }
.erreur { color: var(--tomate-fonce); font-weight: 700; font-size: 0.9375rem; }

.confirmation { height: 100%; overflow-y: auto; padding: 2.5rem var(--gouttiere); }
.confirmation:focus { outline: none; }
.confirmation-titre { margin-bottom: 0.75rem; font: 400 2.1rem/1.1 var(--titre); }
.confirmation-heure { margin-bottom: 1.5rem; font-size: 1.125rem; }
.confirmation-lignes { display: grid; margin-bottom: 1rem; }
.confirmation-lignes li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.5rem; border-bottom: 1px solid var(--filet); }
.confirmation > p { margin-bottom: 0.75rem; }
.confirmation > p:empty { display: none; }
.confirmation-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* L'image « à venir » : l'aplat se lit comme un état, pas comme une erreur. */
img.a-venir { filter: saturate(0.9); }
