/* R3STO Delivery — la palette « Léman » de la charte R3STO (claire) : bleu nuit du logo, bleu clair, vert clair. Côté client : le cuivre. */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/polices/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/polices/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/polices/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/polices/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-display: swap; src: url(/polices/playfair-display-latin-600-normal.woff2) format('woff2'); }

:root {
  --navy: #1c2e58; --cuivre: #b8632b; --cuivre-fort: #975123;
  --fond: #f5f8fb; --carte: #fff; --texte: #16233f; --faible: #56677f; --bordure: #dce4ee;
  --bleu-clair: #dceaf6; --bleu-texte: #1f4e7a; --vert-clair: #ddf0e6; --vert-texte: #1e6847; --vert: #2e7556;
  --ambre: #96580b; --ambre-clair: #fbeed6; --rouge: #a8321f; --rouge-clair: #f8e3df;
  --accent: var(--navy); --accent-fort: #142244;
  --rayon: 12px; --ombre: 0 1px 2px rgba(22, 35, 63, .06), 0 4px 14px rgba(22, 35, 63, .06);
}
body.client { --accent: var(--cuivre); --accent-fort: var(--cuivre-fort); --fond: #faf6ef; --bordure: #e8dfd0; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--texte); background: var(--fond); }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; margin: 0; line-height: 1.2; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0; } a { color: var(--accent); }
.faible { color: var(--faible); } .petit { font-size: .875rem; } .droite { text-align: right; } .gras { font-weight: 600; }
.cache { display: none !important; }

/* Boutons : hauts de 48 px, pour le doigt */
button, .bouton { font: inherit; font-weight: 600; min-height: 48px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--bordure); background: var(--carte); color: var(--texte); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
button:hover, .bouton:hover { border-color: var(--accent); }
button.plein, .bouton.plein { background: var(--accent); border-color: var(--accent); color: #fff; }
button.plein:hover, .bouton.plein:hover { background: var(--accent-fort); }
button.vert { background: var(--vert); border-color: var(--vert); color: #fff; }
button.lien { border: 0; background: none; color: var(--faible); min-height: 40px; padding: 0 8px; font-weight: 500; text-decoration: underline; }
button.lien.rouge { color: var(--rouge); }
button.petit { min-height: 40px; padding: 0 12px; }
button:disabled { opacity: .5; cursor: default; }
button.large, .bouton.large { width: 100%; }

input, select, textarea { font: inherit; color: inherit; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--bordure); border-radius: 10px; background: #fff; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 4px; }
.champ { margin-bottom: 14px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.npa-ville { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }

.carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre); }
.carte + .carte { margin-top: 14px; }
.erreur { background: var(--rouge-clair); color: var(--rouge); border-radius: 10px; padding: 10px 12px; font-weight: 500; margin: 10px 0; }
.note { background: var(--bleu-clair); color: var(--bleu-texte); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.note.vert { background: var(--vert-clair); color: var(--vert-texte); } .note.ambre { background: var(--ambre-clair); color: var(--ambre); }
.pastille { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; background: var(--bleu-clair); color: var(--bleu-texte); white-space: nowrap; }
.pastille.vert { background: var(--vert-clair); color: var(--vert-texte); } .pastille.ambre { background: var(--ambre-clair); color: var(--ambre); } .pastille.rouge { background: var(--rouge-clair); color: var(--rouge); } .pastille.gris { background: #edf0f4; color: var(--faible); }

/* La marque : le carré officiel, le mot du produit à côté */
.marque { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--texte); }
.marque img { height: 56px; width: auto; display: block; }
.marque span { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.25rem; }

.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
.etroit { max-width: 440px; }

/* ---------- L'application du restaurateur ---------- */
.barre { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--bordure); display: flex; align-items: center; gap: 14px; padding: 8px 16px; }
.barre .nom { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre .marque img { height: 48px; width: auto; }
.onglets { display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--bordure); padding: 0 12px; overflow-x: auto; }
.onglets button { border: 0; border-radius: 0; background: none; color: var(--faible); border-bottom: 3px solid transparent; min-height: 50px; padding: 0 14px; white-space: nowrap; }
.onglets button.actif { color: var(--navy); border-bottom-color: var(--navy); }
.onglets .compte { background: var(--rouge); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 7px; margin-left: 2px; }
.interrupteur { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: .875rem; }
.interrupteur.oui { background: var(--vert-clair); color: var(--vert-texte); border-color: transparent; }
.interrupteur.non { background: var(--rouge-clair); color: var(--rouge); border-color: transparent; }
.interrupteur i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.contenu { padding: 16px; max-width: 1280px; margin: 0 auto; }
.chiffres { display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; }
.chiffres b { font-size: 1.25rem; }

.colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.colonne > h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: inherit; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faible); }
.colonne .vide { border: 1px dashed var(--bordure); border-radius: var(--rayon); padding: 22px 12px; text-align: center; color: var(--faible); font-size: .9rem; }
.commande { background: #fff; border: 1px solid var(--bordure); border-left: 5px solid var(--navy); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); margin-bottom: 12px; }
.commande.livraison { border-left-color: var(--cuivre); }
.commande.nouvelle { animation: appel 1.6s ease-in-out infinite; }
@keyframes appel { 50% { box-shadow: 0 0 0 4px var(--ambre-clair), var(--ombre); } }
.commande .tete { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.commande .heure { font-size: 1.5rem; font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.commande .heure.retard { color: var(--rouge); }
.commande .numero { font-weight: 700; white-space: nowrap; }
.commande .qui { margin-top: 6px; font-weight: 600; }
.commande ul { list-style: none; margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.commande li { display: flex; gap: 8px; padding: 2px 0; } .commande li b { min-width: 30px; }
.commande .remarque { background: var(--ambre-clair); color: var(--ambre); border-radius: 8px; padding: 6px 10px; font-size: .9rem; margin-bottom: 10px; }
.commande .gestes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.commande .gestes .plein, .commande .gestes .vert { flex: 1 1 150px; }
.plus-tard { display: flex; gap: 6px; }
.plus-tard button.choisi { background: var(--bleu-clair); border-color: var(--bleu-texte); color: var(--bleu-texte); }
.finies { margin-top: 22px; } .finies summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.finies .rang { display: grid; grid-template-columns: 50px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--bordure); font-size: .93rem; }

.categorie { margin-bottom: 18px; }
.categorie > .tete { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.categorie > .tete h2 { flex: 1; }
.article { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--bordure); }
.article.epuise .nom { text-decoration: line-through; color: var(--faible); }
.article .prix { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ajout { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; margin-top: 10px; }
.horaires .jour { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.horaires .plage { display: flex; align-items: center; gap: 4px; } .horaires .plage input { padding: 10px 2px; text-align: center; min-width: 0; flex: 1; }
.zone { display: grid; grid-template-columns: 90px 1fr 100px 100px 44px; gap: 8px; margin-bottom: 8px; align-items: center; }
.zone-tete { font-size: .8rem; font-weight: 600; color: var(--faible); margin-bottom: 4px; }
.qr { width: 190px; max-width: 100%; } .qr svg { display: block; width: 100%; height: auto; }
.partage { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.partage .lienpage { font-weight: 600; word-break: break-all; }
.choix { display: flex; gap: 10px; flex-wrap: wrap; }
.choix label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--bordure); border-radius: 10px; padding: 12px 14px; min-height: 48px; margin: 0; background: #fff; flex: 1 1 200px; cursor: pointer; font-size: 1rem; }
.choix input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }

.fenetre { position: fixed; inset: 0; background: rgba(22, 35, 63, .45); z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fenetre > .carte { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; }
.groupe-option { border: 1px solid var(--bordure); border-radius: 10px; padding: 10px; margin-bottom: 10px; background: var(--fond); }
.groupe-option .deux { margin-bottom: 8px; gap: 8px; } .groupe-option textarea { font-size: .95rem; }
.livreur { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--bordure); }
.livreur:first-child { border-top: 0; padding-top: 0; }
.livreur .outils { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.point { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c3ccd8; margin-right: 8px; } .point.oui { background: var(--vert); }
.dispo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #e6ebf2; border-radius: 12px; padding: 5px; margin-bottom: 14px; }
.dispo button { border: 0; background: none; min-height: 46px; } .dispo button.actif { background: #fff; box-shadow: var(--ombre); }
.dispo button.actif.oui { background: var(--vert); color: #fff; }
.feuille { position: fixed; inset: 0; background: rgba(40, 28, 14, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.feuille > div { background: #fff; width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
.feuille h3 { margin: 16px 0 6px; font-family: inherit; font-size: .95rem; }
.feuille label.option { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 0; border-top: 1px solid var(--bordure); font-size: 1rem; font-weight: 400; margin: 0; cursor: pointer; }
.feuille label.option input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); flex: none; }
.feuille label.option span:last-child { margin-left: auto; color: var(--faible); white-space: nowrap; }

/* ---------- La page de commande du client ---------- */
.resto-tete { background: #fff; border-bottom: 1px solid var(--bordure); padding: 22px 16px 16px; }
.resto-tete .dedans { max-width: 720px; margin: 0 auto; }
.resto-tete .infos { color: var(--faible); margin-top: 4px; }
.bascule-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #efe7d9; border-radius: 12px; padding: 5px; margin-top: 14px; }
.bascule-type button { border: 0; background: none; min-height: 44px; }
.bascule-type button.actif { background: #fff; box-shadow: var(--ombre); color: var(--accent); }
.plat { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--bordure); }
.plat:first-of-type { border-top: 0; }
.plat .nom { font-weight: 600; } .plat .prix { margin-top: 2px; font-variant-numeric: tabular-nums; }
.plat.epuise { opacity: .5; }
.compteur { display: inline-flex; align-items: center; gap: 4px; }
.compteur button { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.3rem; }
.compteur button.plus { background: var(--accent); border-color: var(--accent); color: #fff; }
.compteur b { min-width: 26px; text-align: center; }
.panier-barre { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fond) 30%); z-index: 6; }
.panier-barre button { max-width: 688px; margin: 0 auto; display: flex; justify-content: space-between; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.ligne-total > span:last-child { white-space: nowrap; }
.ligne-total { display: flex; gap: 12px; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.ligne-total.grand { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--bordure); margin-top: 6px; padding-top: 10px; }
.pied { text-align: center; color: var(--faible); font-size: .82rem; padding: 26px 16px 110px; }
.pied img { width: 28px; height: 28px; vertical-align: middle; margin-right: 6px; }

/* Le suivi : quatre étapes */
.etapes { list-style: none; margin: 18px 0 6px; padding: 0; }
.etapes li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 18px; position: relative; color: var(--faible); }
.etapes li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bordure); background: #fff; margin: 2px 0 0 4px; z-index: 1; }
.etapes li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 20px; bottom: -2px; width: 2px; background: var(--bordure); }
.etapes li.fait { color: var(--texte); } .etapes li.fait::before { background: var(--vert); border-color: var(--vert); }
.etapes li.fait:not(:last-child)::after { background: var(--vert); }
.etapes li.ici { color: var(--texte); font-weight: 700; } .etapes li.ici::before { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(184, 99, 43, .2); }
.grande-heure { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* ---------- Le site ---------- */
.site-tete { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 16px; gap: 12px; }
.hero { background: linear-gradient(135deg, var(--bleu-clair), var(--vert-clair)); padding: 56px 16px 60px; }
.hero .dedans, .section { max-width: 1080px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 760px; }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 16px 0 26px; }
.hero .boutons { display: flex; gap: 12px; flex-wrap: wrap; }
.section { padding: 48px 16px; }
.section > h2 { font-size: 1.7rem; margin-bottom: 8px; }
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.grille .carte + .carte { margin-top: 0; }
.grille .carte h3 { margin-bottom: 6px; }
.grille .num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.bande { background: #fff; border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.prix-bloc { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 28px; align-items: center; margin-top: 22px; }
.prix-grand { font-family: 'Playfair Display', Georgia, serif; font-size: 2.6rem; font-weight: 600; line-height: 1.1; margin: 6px 0; } .prix-grand span { font: 500 1rem Inter, sans-serif; color: var(--faible); }
.prix-liste { list-style: none; margin: 0; padding: 0; } .prix-liste li { padding: 7px 0 7px 30px; position: relative; } .prix-liste li::before { content: '✓'; position: absolute; left: 0; color: var(--vert); font-weight: 700; }
@media (max-width: 700px) { .prix-bloc { grid-template-columns: 1fr; } }
.site-pied { max-width: 1080px; margin: 0 auto; padding: 30px 16px 50px; color: var(--faible); font-size: .9rem; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.site-pied img { height: 48px; width: auto; }
.site-tete .marque img { height: 64px; }

@media (max-width: 900px) {
  .colonnes { grid-template-columns: 1fr; }
  .grille { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.45rem; }
  .barre { gap: 8px; } .barre .nom { white-space: normal; line-height: 1.2; font-size: .95rem; } .interrupteur { font-size: .8rem; padding: 0 10px; }
  .deux { grid-template-columns: 1fr; }
  .ajout { grid-template-columns: 1fr 100px; } .ajout button { grid-column: 1 / -1; }
  .zone { grid-template-columns: 76px 1fr 44px; } .zone .frais, .zone .mini { grid-column: span 1; } .zone { grid-template-areas: none; }
  .zone input.frais { grid-column: 1 / 2; } .zone input.mini { grid-column: 2 / 3; }
  .zone-tete { display: none; }
  .horaires .jour { grid-template-columns: minmax(0, 1fr); } .horaires .jour { margin-bottom: 14px; } .horaires .jour > span { grid-column: 1 / -1; font-weight: 600; }
  .article { grid-template-columns: 1fr auto; } .article .outils { grid-column: 1 / -1; }
}
