/* ==========================================================================
   OH'Berge Planeville — feuille de style principale (mobile-first)
   Identité reprise du site actuel : bordeaux #46071a, vert foncé #14261C,
   gris #4E5652, fond clair #F4F6F4 ; titres Abril Fatface, texte Poppins.
   Polices auto-hébergées (licence SIL OFL) : aucun appel à Google.
   ========================================================================== */

@font-face { font-family: "Abril Fatface"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/abril-fatface-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }

:root {
  --c-burgundy: #46071a;
  --c-burgundy-soft: #46071aa6;
  --c-green: #14261c;
  --c-text: #4e5652;
  --c-light: #f4f6f4;
  --c-white: #ffffff;
  --c-muted: #777676;
  --c-border: #e2e6e3;
  --c-italy-green: #0d7a3f;
  --c-italy-white: #d9d9d9;
  --c-italy-red: #b5202e;
  --c-primary: var(--c-burgundy);
  --c-accent: var(--c-green);
  --c-surface: var(--c-white);
  --c-bg: var(--c-white);
  --radius: 10px;
  --radius-pill: 50px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Abril Fatface", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--c-text); background: var(--c-bg); }
img { max-width: 100%; height: auto; }
a { color: var(--c-burgundy); }
a:hover { color: var(--c-green); }
:focus-visible { outline: 3px solid var(--c-green); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-title); font-weight: 400; color: var(--c-green); line-height: 1.3; }
h1 { font-size: clamp(2.2rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4, h5, h6 { font-family: var(--font); color: var(--c-green); }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; z-index: 100; }
.skip-link:focus { left: 16px; top: 8px; background: var(--c-white); padding: 8px 12px; }

/* --- Boutons (pilules, comme le site actuel) --- */
.btn { font: inherit; display: inline-block; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--c-border); background: var(--c-white); color: var(--c-text); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-pill { border-radius: var(--radius-pill); padding: 17px 35px; border: 0; }
.btn-burgundy, .btn-primary { background: var(--c-burgundy); border-color: var(--c-burgundy); color: var(--c-white); }
.btn-burgundy:hover, .btn-burgundy:focus, .btn-primary:hover, .btn-primary:focus { background: var(--c-burgundy-soft); color: #ffffffd4; }
.btn-outline { background: transparent; border: 2px solid var(--c-burgundy); color: var(--c-burgundy); }
.btn-outline:hover { background: var(--c-burgundy); color: var(--c-white); }
.btn-primary { margin-top: 12px; }
.btn-small { padding: 6px 12px; font-size: .9rem; }

/* --- En-tête bordeaux avec logo --- */
.site-header { background: var(--c-burgundy); color: var(--c-white); position: relative; z-index: 20; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.brand-logo { display: inline-flex; }
.brand-logo img { display: block; width: 160px; height: auto; }
.brand { font-family: var(--font-title); font-size: 1.35rem; color: var(--c-white); text-decoration: none; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.main-nav a { color: var(--c-white); text-decoration: none; font-weight: 500; padding: 6px 0; }
.main-nav a:hover, .main-nav a:focus, .main-nav a[aria-current="page"] { color: #ddcdcd; }
.main-nav .nav-account { border: 1px solid #ffffff80; border-radius: var(--radius-pill); padding: 6px 16px; }
.nav-toggle { display: none; }

/* Menu mobile : sans JavaScript la navigation reste visible ; avec JS elle se replie. */
@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: 1px solid #ffffff80; border-radius: 8px; cursor: pointer; }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 22px; height: 2px; background: var(--c-white); position: relative; content: ""; }
  .nav-toggle-bar::before { position: absolute; top: -7px; }
  .nav-toggle-bar::after { position: absolute; top: 7px; }
  .main-nav { width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 12px 4px; border-top: 1px solid #ffffff22; }
  .main-nav .nav-account { border-radius: 0; border: 0; border-top: 1px solid #ffffff22; padding: 12px 4px; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: flex; }
}
@media (min-width: 861px) { .brand-logo img { width: 200px; } }

.preview-bar { background: #fff3cd; color: #5c4400; text-align: center; padding: 6px 16px; font-size: .9rem; }
.badge-draft { display: inline-block; vertical-align: middle; font-family: var(--font); font-size: .8rem; font-weight: 600; letter-spacing: .02em; background: #fff3cd; color: #5c4400; border: 1px solid #e6c25a; border-radius: 6px; padding: 2px 8px; }

/* --- Images de fond (balises <img>, compatibles CSP) --- */
.hero, .page-hero, .section-parallax { position: relative; overflow: hidden; isolation: isolate; }
.bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay, .section-overlay { position: absolute; inset: 0; background: var(--c-green); z-index: -1; }

/* --- Hero d'accueil --- */
.hero { min-height: 60vh; display: flex; align-items: center; color: var(--c-white); text-align: center; padding: 90px 0 120px; }
.hero .hero-overlay { opacity: .5; }
.hero-content { max-width: 820px; }
.hero-kicker { font-family: var(--font-title); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; color: var(--c-white); }
.hero-title { color: var(--c-white); margin: 0 0 12px; font-size: clamp(3rem, 11vw, 6.6rem); line-height: 1.15; }
.hero-text { font-size: 1.1rem; margin: 0 auto 28px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-shape { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; fill: var(--c-white); z-index: 0; }

/* --- Bandeau de page --- */
.page-hero { background: var(--c-green); color: var(--c-white); text-align: center; padding: 70px 0 60px; }
.page-hero .hero-overlay { opacity: .6; }
.page-hero h1 { color: var(--c-white); margin: 0; font-size: clamp(2rem, 6vw, 3.6rem); }
.page-hero-intro { font-size: 1.1rem; margin: 8px auto 0; max-width: 680px; }
.page-hero .hero-kicker { font-family: var(--font); font-size: 1rem; }

/* --- Sections --- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-top: 0; }
.section-kicker { font-family: var(--font-title); color: var(--c-burgundy); font-size: 1.4rem; margin: 0; }
.section-pattern { background-color: var(--c-white); background-image: linear-gradient(#fffffff7, #fffffff7), url("../img/food-pattern.png"); background-repeat: repeat; }
.section-parallax { color: var(--c-white); padding: 110px 0 90px; }
.section-parallax .section-overlay { opacity: .72; }
.section-parallax h2 { color: var(--c-white); text-align: center; margin-top: 0; }

.pasta-grid { display: grid; gap: 32px; align-items: center; }
.pasta-images { display: flex; gap: 14px; justify-content: center; }
.pasta-images img { width: 46%; max-width: 230px; border-radius: 160px; object-fit: cover; aspect-ratio: 1 / 2; }
.pasta-text h2 { margin: 0 0 12px; }
@media (min-width: 900px) { .pasta-grid { grid-template-columns: 1fr 1.2fr; } }

.rich-text p { margin: 0 0 1em; }
.rich-text h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.4em 0 .5em; }
.rich-text ul { padding-left: 1.2em; }

/* --- Horaires --- */
.hours-box { max-width: 560px; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.hours-table th, .hours-table td { padding: 8px 4px; border-bottom: 1px solid #ffffff33; text-align: left; font-weight: 400; }
.hours-table td { text-align: right; }
.hours-table .is-today th, .hours-table .is-today td { font-weight: 600; }
.hours-table-light th, .hours-table-light td { border-bottom-color: var(--c-border); }
.closure-note { background: #ffffff1f; border-left: 3px solid var(--c-white); padding: 8px 12px; margin-top: 16px; }

/* --- Actualités --- */
.news-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 28px; }
.news-card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.news-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.news-card-body { padding: 18px; }
.news-card time { color: var(--c-muted); font-size: .9rem; }
.news-card h2, .news-card h3 { font-size: 1.4rem; margin: 6px 0 8px; }
.news-card h2 a, .news-card h3 a { color: var(--c-green); text-decoration: none; }
.news-card h2 a:hover, .news-card h3 a:hover { color: var(--c-burgundy); }
.article-image { border-radius: var(--radius); margin-bottom: 24px; }

/* --- Contact --- */
.contact-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-card { background: var(--c-light); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.contact-card h2 { font-size: 1.7rem; margin-top: 0; }
.contact-card .label { display: block; font-size: .85rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }

/* --- Pied de page --- */
.flag-strip { height: 6px; background: linear-gradient(90deg, var(--c-italy-green) 0 33.33%, var(--c-italy-white) 33.33% 66.66%, var(--c-italy-red) 66.66% 100%); }
.site-footer { background: var(--c-burgundy); color: #f3e8ea; font-size: .95rem; }
.site-footer a { color: var(--c-white); }
.site-footer a:hover { color: #ddcdcd; }
.footer-grid { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-title { font-family: var(--font-title); font-size: 2rem; color: var(--c-white); margin: 0 0 8px; }
.footer-heading { font-weight: 600; color: var(--c-white); margin: 0 0 8px; }
.footer-links { list-style: none; padding: 0; margin: 0 0 16px; }
.footer-links li { margin: 4px 0; }
.footer-bottom { border-top: 1px solid #ffffff26; padding-top: 14px; padding-bottom: 18px; font-size: .85rem; color: #e0cfd3; }
.footer-bottom p { margin: 0; }

/* --- Pages d'erreur / pagination / divers --- */
.error-page { text-align: center; padding: 64px 16px; }
.debug { text-align: left; white-space: pre-wrap; font-size: .8rem; background: #222; color: #eee; padding: 16px; border-radius: var(--radius); overflow-x: auto; }
.pager { display: flex; gap: 16px; margin: 16px 0; justify-content: center; }
.notice { background: var(--c-light); border-left: 4px solid var(--c-green); padding: 12px 16px; border-radius: var(--radius); }
body.staff main, body.admin main { padding-top: 32px; padding-bottom: 48px; }
.public main > .auth-box, .public main > section:not([class]) { padding: 40px 16px 56px; }

/* --- Formulaires & alertes --- */
.auth-box { max-width: 440px; margin: 0 auto; }
.form { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }
.form label { font-weight: 600; margin-top: 8px; }
.form input, .form select, .form textarea { font: inherit; padding: 10px 12px; border: 1px solid #cfd5d1; border-radius: var(--radius); background: var(--c-white); width: 100%; }
.form textarea { min-height: 120px; resize: vertical; }
.form input[aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; margin: 2px 0 0; font-size: .9rem; }
.alert { padding: 12px 16px; border-radius: var(--radius); }
.alert-ok { background: #e7f2e1; border: 1px solid #b9d6a8; }
.alert-error { background: #fbe9e7; border: 1px solid #f0b5ad; }
.inline-form { margin: 0; }

/* --- Staff / Admin --- */
.staff-header { background: var(--c-green); }
.staff-header .brand { color: var(--c-white); }
.tile-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tile { display: block; padding: 28px 20px; background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 1.2rem; font-weight: 600; text-decoration: none; text-align: center; }
.tile:hover, .tile:focus { border-color: var(--c-burgundy); }
.admin-nav a { color: #f3ece4; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-white); font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.data-table th { background: var(--c-light); }
.data-table .is-inactive { color: var(--c-muted); }
.data-table .json { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; max-width: 280px; word-break: break-word; }
.data-table img.thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; }
.form-wide { max-width: 760px; }
.checkbox-group { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 12px; margin-top: 12px; }
.form .checkbox { display: flex; gap: 8px; align-items: center; font-weight: normal; }
.form .checkbox input { width: auto; }
.checkbox.is-disabled { color: var(--c-muted); }
.help { color: var(--c-muted); font-size: .9rem; margin: 2px 0 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.form-actions .btn-primary { margin-top: 0; }
.btn-danger { background: #fff; color: #b3261e; border-color: #e3a29c; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filter-bar input, .filter-bar select { padding: 6px 10px; border: 1px solid var(--c-border); border-radius: var(--radius); }
.status-pill { display: inline-block; font-size: .8rem; padding: 2px 8px; border-radius: 6px; background: var(--c-light); }
.status-pill.is-published { background: #e7f2e1; color: #2d5a1b; }
.status-pill.is-draft { background: #fff3cd; color: #5c4400; }
.hours-editor { width: 100%; border-collapse: collapse; }
.hours-editor th, .hours-editor td { padding: 6px; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: middle; }
.hours-editor input[type="time"] { width: 120px; padding: 6px; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

/* --- Carte du restaurant --- */
.menu-nav { position: sticky; top: 0; z-index: 10; background: var(--c-white); border-bottom: 1px solid var(--c-border); }
.menu-nav .container { display: flex; gap: 6px 20px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; white-space: nowrap; scrollbar-width: thin; }
.menu-nav a { color: var(--c-green); text-decoration: none; font-weight: 500; }
.menu-nav a:hover, .menu-nav a:focus { color: var(--c-burgundy); }
.menu-category { scroll-margin-top: 64px; margin-bottom: 48px; }
.menu-category h2 { text-align: center; margin: 0 0 8px; }
.menu-category h2::after { content: ""; display: block; width: 90px; height: 4px; margin: 10px auto 0; background: linear-gradient(90deg, var(--c-italy-green) 0 33.33%, var(--c-italy-white) 33.33% 66.66%, var(--c-italy-red) 66.66% 100%); }
.menu-category-intro { text-align: center; color: var(--c-muted); }
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px dashed #cfd5d1; align-items: start; }
.menu-item h3 { font-family: var(--font); font-weight: 600; font-size: 1.05rem; color: var(--c-green); margin: 0; }
.menu-item p { margin: 2px 0 0; font-size: .95rem; }
.menu-item-text { min-width: 0; }
.menu-prices { display: flex; gap: 16px; font-weight: 600; color: var(--c-burgundy); white-space: nowrap; }
.menu-prices > span { min-width: 56px; text-align: right; }
.menu-prices small { font-weight: 400; color: var(--c-muted); }
.menu-head { border-bottom: 0; padding-bottom: 0; }
.menu-head .menu-prices { color: var(--c-muted); font-weight: 500; font-size: .9rem; }
.menu-item-img { grid-column: 1 / -1; width: 100%; max-width: 320px; border-radius: var(--radius); }
.menu-allergens { color: var(--c-muted); font-size: .85rem !important; }
.menu-item.is-sold-out h3, .menu-item.is-sold-out .menu-prices { opacity: .55; }
.badge-soldout { display: inline-block; vertical-align: middle; font-size: .75rem; font-weight: 600; background: #fbe9e7; color: #8a1c13; border-radius: 6px; padding: 1px 8px; margin-left: 4px; }
.menu-footnote { text-align: center; color: var(--c-muted); font-size: .9rem; margin-top: 32px; }

/* --- Disponibilités (staff, tactile) --- */
.availability-list { list-style: none; padding: 0; max-width: 760px; }
.availability-cat { font-weight: 600; color: var(--c-green); margin: 20px 0 6px; }
.availability-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.availability-item .btn { min-width: 190px; min-height: 48px; }
.availability-item.is-sold-out > span { color: var(--c-muted); text-decoration: line-through; }
.status-pill.is-archived { background: #eee; color: #666; }

/* --- Commande et panier --- */
.lead { font-size: 1.15rem; }
.cart-bar { position: sticky; top: 0; z-index: 10; background: var(--c-white); border-bottom: 1px solid var(--c-border); }
.cart-bar-inner { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.cart-bar .btn-pill { padding: 10px 22px; }
.mode-chip { display: inline-block; font-size: .85rem; background: #e7f2e1; color: #2d5a1b; border-radius: 6px; padding: 2px 8px; margin: 2px 0; }
.mode-chip.is-off { background: var(--c-light); color: var(--c-muted); }
.order-item { padding: 16px 0; border-bottom: 1px dashed #cfd5d1; display: grid; gap: 8px; }
.order-item h3 { font-family: var(--font); font-weight: 600; font-size: 1.05rem; color: var(--c-green); margin: 0; }
.order-item p { margin: 2px 0 0; font-size: .95rem; }
.order-form { display: grid; gap: 6px; }
.order-form fieldset { border: 0; padding: 0; margin: 0; }
.order-form legend { font-weight: 600; font-size: .9rem; color: var(--c-green); }
.order-form .checkbox { display: flex; gap: 8px; align-items: center; min-height: 32px; }
.order-price { font-weight: 600; color: var(--c-burgundy); }
.order-actions { display: flex; gap: 10px; align-items: center; }
.qty { width: 72px; padding: 8px; border: 1px solid #cfd5d1; border-radius: var(--radius); font: inherit; }
.cart-lines { list-style: none; padding: 0; margin: 0 0 24px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.cart-line > div:first-child { grid-column: 1 / -1; }
.cart-line.has-error { background: #fff8f7; }
.cart-qty { display: flex; gap: 6px; align-items: center; }
.cart-amount { font-weight: 600; color: var(--c-burgundy); grid-column: 1 / -1; text-align: right; }
@media (min-width: 700px) {
  .cart-line { grid-template-columns: 1fr auto auto auto; }
  .cart-line > div:first-child { grid-column: auto; }
  .cart-amount { grid-column: auto; min-width: 100px; }
}
.cart-card { background: var(--c-light); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.cart-card h2 { font-size: 1.6rem; margin-top: 0; }
.cart-card h3 { font-family: var(--font); font-size: 1.05rem; font-weight: 600; }
.cart-totals p { display: flex; justify-content: space-between; margin: 6px 0; }
.cart-total { font-weight: 600; font-size: 1.2rem; color: var(--c-green); border-top: 1px solid var(--c-border); padding-top: 8px; }

/* --- Onglets de réglages --- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--c-border); margin-bottom: 20px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--c-muted); border-radius: var(--radius) var(--radius) 0 0; }
.tabs a:hover { color: var(--c-green); background: var(--c-light); }
.tabs a.is-active { color: var(--c-white); background: var(--c-green); }
.settings-card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.settings-card h2 { margin-top: 0; }
.settings-card code { word-break: break-all; }
.inline-form { margin-top: 10px; }

/* --- Écran des commandes en direct (PC caisse, tactile) --- */
body.staff:has(#live) main.container { max-width: none; padding: 0 12px; }
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 0; }
.live-bar h1 { font-size: 1.5rem; margin: 0; margin-right: auto; }
.live-conn { font-weight: 600; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.live-conn.is-ok { background: #e2f3dc; color: #24561a; }
.live-conn.is-down { background: #fde3e1; color: #9b1c12; }
.live-conn.is-pending { background: var(--c-light); color: var(--c-muted); }
.live-sound[aria-pressed="false"] { border-color: #c47a00; color: #8a5600; }
.live-filter select { font-size: 1rem; padding: 8px; min-height: 44px; }
.live-clock { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.live-lost { background: #b3261e; color: #fff; padding: 12px 16px; border-radius: var(--radius); font-weight: 600; font-size: 1.1rem; }
.live-columns { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .live-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.live-col { background: var(--c-light); border-radius: var(--radius); padding: 10px; min-height: 60vh; }
.live-col h2 { font-family: var(--font); font-size: 1.15rem; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.live-col[data-col="new"] h2 { color: #9b1c12; }
.live-count { background: var(--c-green); color: #fff; border-radius: 999px; min-width: 2em; text-align: center; padding: 2px 8px; font-size: .95rem; }
.live-list { display: grid; gap: 10px; }
.live-empty { color: var(--c-muted); text-align: center; margin: 20px 0; }
.live-card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: #fff;
  border: 2px solid var(--c-border); border-left: 8px solid #6b8f71; border-radius: var(--radius); padding: 12px; position: relative; min-height: 96px; }
.live-card.is-delivery { border-left-color: #2b5f8e; }
.live-card:hover, .live-card:focus-visible { border-color: var(--c-green); outline: none; }
.live-card.is-fresh { animation: live-pulse 1.2s ease-in-out infinite; border-color: #c47a00; }
.live-card.is-late { background: #fff4f2; border-color: #d0453a; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px rgba(196, 122, 0, .35); } }
@media (prefers-reduced-motion: reduce) { .live-card.is-fresh { animation: none; box-shadow: 0 0 0 4px rgba(196, 122, 0, .5); } }
.live-card-top { display: flex; justify-content: space-between; gap: 8px; }
.live-type { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--c-muted); }
.live-time { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.live-name { font-size: 1.1rem; font-weight: 600; margin: 4px 0 2px; overflow-wrap: anywhere; }
.live-meta, .live-ref { font-size: .9rem; color: var(--c-muted); }
.live-card-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.live-status { font-weight: 600; font-size: .9rem; }
.live-late { position: absolute; top: -10px; right: 10px; background: #b3261e; color: #fff; font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.live-panel { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 16px; }
.live-panel[hidden] { display: none; }
.live-panel-inner { background: #fff; border-radius: var(--radius); width: 100%; max-width: 720px; padding: 20px; position: relative; margin: auto 0; }
.live-panel-inner h2 { margin: 0 48px 12px 0; font-size: 1.5rem; }
.live-close { position: absolute; top: 12px; right: 12px; min-width: 44px; min-height: 44px; font-size: 1.2rem; }
.live-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 1.05rem; }
.live-dl dt { font-weight: 600; color: var(--c-muted); }
.live-dl dd { margin: 0; overflow-wrap: anywhere; }
.live-items { list-style: none; padding: 0; margin: 0 0 10px; border-top: 1px solid var(--c-border); }
.live-items li { padding: 8px 0; border-bottom: 1px solid var(--c-border); font-size: 1.1rem; }
.live-item-line { display: flex; justify-content: space-between; gap: 10px; }
.live-opt { padding-left: 1.2em; }
.live-opt.is-remove { color: #9b1c12; font-weight: 600; }
.live-note { background: #fff7e0; border-radius: 4px; padding: 4px 8px; margin-top: 4px; }
.live-total { font-size: 1.2rem; font-weight: 600; text-align: right; }
.live-history { margin: 10px 0; font-size: .95rem; }
.live-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.live-big { min-height: 56px; min-width: 150px; font-size: 1.15rem; padding: 12px 20px; flex: 1 1 150px; }
.live-reason { margin-top: 14px; }
.live-reason input { width: 100%; font-size: 1.1rem; padding: 12px; }

/* --- Installation --- */
.install-checks { list-style: none; padding: 0; margin: 0; }
.install-checks li { padding: 6px 0; border-bottom: 1px solid var(--c-border); }
.install-checks .is-ok strong { color: #24561a; }
.install-checks .is-ko strong { color: #9b1c12; }
.install-checks .is-warn strong { color: #8a5600; }

/* --- Interface livreur (mobile) --- */
.driver { max-width: 640px; margin: 0 auto; }
.driver-card { background: #fff; border: 2px solid var(--c-border); border-left: 8px solid #2b5f8e; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.driver-card.is-picked { border-left-color: #c47a00; }
.driver-card.is-available { border-left-color: #6b8f71; }
.driver-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.driver-time { font-size: 1.4rem; }
.driver-ref { color: var(--c-muted); font-size: .9rem; }
.driver-name { font-size: 1.2rem; font-weight: 600; margin: 6px 0 2px; }
.driver-addr { font-size: 1.1rem; margin: 0 0 10px; }
.driver-links, .driver-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.driver-actions form { flex: 1 1 160px; display: grid; gap: 8px; }
.driver-pay { font-weight: 600; padding: 8px 10px; border-radius: 6px; background: #e2f3dc; color: #24561a; }
.driver-pay.is-collect { background: #fff1d6; color: #7a4a00; font-size: 1.15rem; }
.driver-items { margin: 8px 0; padding-left: 1.2em; }
.driver-problem summary { cursor: pointer; padding: 10px 0; color: #9b1c12; font-weight: 600; min-height: 44px; }
.live-delivery { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px solid var(--c-border); padding-top: 10px; }
.live-delivery p { flex: 1 1 100%; margin: 0; font-weight: 600; }
.live-driver-select { min-height: 56px; font-size: 1.1rem; padding: 8px; flex: 1 1 180px; }

/* --- Réservations de tables --- */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row > div { flex: 1 1 140px; }
.time-choices { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 12px 0; }
.time-choices legend { font-weight: 600; margin-bottom: 8px; }
.time-choice { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--c-border); border-radius: 6px; padding: 8px 12px; min-height: 44px; cursor: pointer; }
.time-choice:has(input:checked) { border-color: #46071a; background: #f6ece4; }
.booking-summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.booking-summary dt { font-weight: 600; }
.booking-status { font-size: 1.3rem; }
.day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-nav form { display: inline-flex; gap: 6px; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 2px 0; }
.btn-small { padding: 4px 10px; font-size: .9rem; min-height: 36px; }
.link-button { background: none; border: 0; color: #9b1c12; text-decoration: underline; cursor: pointer; padding: 0; }
.res-actions { min-width: 220px; }
.res-cancelled td, .res-rejected td, .res-no_show td { opacity: .55; }
.res-pill-pending { background: #fff1d6; color: #7a4a00; }
.res-pill-confirmed { background: #e2f3dc; color: #24561a; }
.res-pill-seated { background: #dbe8f6; color: #1f4a75; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.input-small { width: 5.5em; }
.combo-form { border-top: 1px solid var(--c-border); padding-top: 12px; margin-top: 12px; }
.combo-tables { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; }
.block-list { margin: 6px 0 0; padding-left: 1.2em; }
/* Plan de salle (SVG) */
.plan-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; }
.floor-plan { display: block; width: 100%; min-width: 640px; height: auto; touch-action: none; }
.plan-floor { fill: #faf6f1; }
.plan-shape { fill: #fff; stroke: #6b5a4e; stroke-width: 2; }
.plan-label { font: 700 16px sans-serif; fill: #2b2b2b; pointer-events: none; }
.plan-seats { font: 12px sans-serif; fill: #6b6b6b; pointer-events: none; }
.plan-table.is-offline .plan-shape { stroke-dasharray: 5 3; }
.floor-plan.is-editable .plan-table { cursor: grab; }
.plan-table.is-dragging { cursor: grabbing; }
.plan-table:focus { outline: none; }
.plan-table:focus .plan-shape, .plan-table.is-dragging .plan-shape { stroke: #46071a; stroke-width: 4; }
.plan-table.state-free .plan-shape { fill: #e2f3dc; stroke: #3d7a2e; }
.plan-table.state-reserved .plan-shape { fill: #fff1d6; stroke: #b07000; }
.plan-table.state-occupied .plan-shape { fill: #dbe8f6; stroke: #1f4a75; }
.plan-table.state-blocked .plan-shape { fill: #e6e6e6; stroke: #777; stroke-dasharray: 6 3; }
.plan-toolbar { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; }
.plan-legend li::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; border: 2px solid #777; }
.plan-legend .state-free::before { background: #e2f3dc; border-color: #3d7a2e; }
.plan-legend .state-reserved::before { background: #fff1d6; border-color: #b07000; }
.plan-legend .state-occupied::before { background: #dbe8f6; border-color: #1f4a75; }
.plan-legend .state-blocked::before { background: #e6e6e6; }
.plan-details { padding-left: 1.2em; }

/* --- Hôtel --- */
.room-choices { border: 0; padding: 0; display: grid; gap: 10px; }
.room-choice { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--c-border); border-radius: 6px; padding: 12px; cursor: pointer; }
.room-choice:has(input:checked) { border-color: #46071a; background: #f6ece4; }
.planning-wrap { margin-bottom: 20px; }
.planning { border-collapse: collapse; font-size: .85rem; min-width: 100%; }
.planning th, .planning td { border: 1px solid var(--c-border); padding: 4px; text-align: center; min-width: 46px; height: 42px; }
.planning tbody th { text-align: left; white-space: nowrap; background: #faf6f1; }
.planning thead th.is-today { background: #46071a; color: #fff; }
.planning td { white-space: nowrap; overflow: hidden; max-width: 90px; }
.pl-free { background: #fff; }
.pl-pending { background: #fff1d6; }
.pl-confirmed { background: #e2f3dc; }
.pl-checked_in { background: #dbe8f6; font-weight: 600; }
.pl-checked_out { background: #eee; color: #666; }
.pl-block { background: repeating-linear-gradient(45deg, #e6e6e6, #e6e6e6 6px, #f5f5f5 6px, #f5f5f5 12px); color: #555; }
.hk { display: inline-block; font-size: .75rem; padding: 1px 6px; border-radius: 8px; background: #eee; }
.hk-dirty { background: #fde2e0; color: #8a1c12; }
.hk-cleaning { background: #fff1d6; color: #7a4a00; }
.hk-clean, .hk-inspected { background: #e2f3dc; color: #24561a; }
.hk-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.res-pill-checked_in { background: #dbe8f6; color: #1f4a75; }

.input-wide { width: 100%; font-family: monospace; font-size: .85rem; }

/* --- Ménage (smartphone) --- */
.hk-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hk-card { border: 2px solid var(--c-border); border-radius: 8px; padding: 12px; background: #fff; }
.hk-card-dirty { border-color: #d9534f; }
.hk-card-cleaning { border-color: #e0a100; }
.hk-number { font-size: 1.6rem; }
.hk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.btn-big { min-height: 48px; padding: 10px 16px; font-size: 1.05rem; }
/* ===== Finitions v1 (3 nov. 2026) : boutons lisibles, panier, historique, paiements ===== */
.btn { font-weight: 500; border: 1.5px solid #c7cec9; min-height: 40px; transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover, .btn:focus-visible { border-color: var(--c-burgundy); color: var(--c-burgundy); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-burgundy:hover, .btn-primary:hover, .btn-burgundy:focus-visible, .btn-primary:focus-visible { color: var(--c-white); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-danger { background: #fff; color: #a3211a; border-color: #d98a84; }
.btn-danger:hover, .btn-danger:focus-visible { background: #a3211a; border-color: #a3211a; color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-pill { border: 0; }
:focus-visible { outline: 3px solid #c58b2b; outline-offset: 2px; }
.js .no-js-only { display: none; }

/* Panier */
.cart-qty { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--c-border); border-radius: var(--radius-pill); background: var(--c-white); overflow: hidden; }
.qty-btn { font: inherit; font-size: 1.3rem; line-height: 1; width: 42px; height: 40px; border: 0; background: var(--c-light); color: var(--c-burgundy); cursor: pointer; }
.qty-btn:hover { background: var(--c-burgundy); color: var(--c-white); }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-value { min-width: 36px; text-align: center; font-weight: 600; }
.btn-remove { font: inherit; font-size: .9rem; background: none; border: 0; color: #a3211a; cursor: pointer; padding: 8px 6px; min-height: 40px; }
.btn-remove:hover { text-decoration: underline; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 2px solid var(--c-border); border-radius: var(--radius); background: var(--c-white); cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:hover { border-color: var(--c-burgundy-soft); }
.choice-card:has(input:checked) { border-color: var(--c-burgundy); background: #fbf3f5; box-shadow: 0 0 0 1px var(--c-burgundy) inset; }
.choice-card:has(input:focus-visible) { outline: 3px solid #c58b2b; outline-offset: 2px; }
.choice-card.is-disabled { opacity: .55; cursor: not-allowed; }
.choice-title { font-weight: 600; color: var(--c-green); font-size: 1.05rem; }
.choice-sub { font-size: .9rem; color: var(--c-muted); }

/* Suppression / actions de ligne */
.form-delete { margin: -8px 0 20px; display: flex; justify-content: flex-end; }
.row-actions { white-space: nowrap; }
.row-actions .inline-form { margin-left: 4px; }
td .inline-form { margin-top: 4px; }

/* Historique des commandes / journal des paiements */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: var(--c-light); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0 16px; }
.filter-bar label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 500; gap: 2px; }
.filter-bar input, .filter-bar select { min-height: 40px; }
.filter-bar .btn-primary { margin-top: 0; }
.data-table .num, .data-table th.num { text-align: right; white-space: nowrap; }
.data-table tr.is-negative td.num { color: #a3211a; }
.data-table tfoot td { border-bottom: 0; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }
.detail-grid { display: grid; gap: 0 24px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.detail-list dt { font-weight: 600; color: var(--c-green); }
.detail-list dd { margin: 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.stat { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 10px 16px; min-width: 150px; }
.stat-label { display: block; font-size: .8rem; color: var(--c-muted); }
.stat strong { font-size: 1.15rem; color: var(--c-green); }
.order-pill { display: inline-block; font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: #eceeed; color: #333; white-space: nowrap; }
.order-pill-new { background: #fff1d6; color: #7a4a00; }
.order-pill-accepted, .order-pill-preparing { background: #dbe8f6; color: #1f4a75; }
.order-pill-ready, .order-pill-assigned_to_driver, .order-pill-out_for_delivery { background: #e6e0f6; color: #46307a; }
.order-pill-collected, .order-pill-delivered { background: #e2f3dc; color: #24561a; }
.order-pill-rejected, .order-pill-cancelled, .order-pill-refunded { background: #fbe4e2; color: #8a1f17; }
.order-pill-pending_payment { background: #f1f1f1; color: #666; }
.live-col-link { font-size: .8rem; font-weight: 500; margin-left: 6px; }
.live-history-link { min-height: 40px; }
.data-table .btn-primary, .inline-form .btn-primary, .page-head .btn-primary, td .btn-primary { margin-top: 0; }
.btn-light { background: #ffffffe6; color: var(--c-burgundy); border: 0; }
.btn-light:hover, .btn-light:focus-visible { background: var(--c-white); color: var(--c-burgundy); }
.btn-hero-main { font-size: 1.1rem; box-shadow: 0 6px 18px #00000040; }
.hero-phone { margin: 16px 0 0; font-size: .95rem; }
.hero-phone a { color: inherit; font-weight: 600; }

/* Commande par téléphone */
.phone-grid { display: grid; gap: 0 24px; align-items: start; }
@media (min-width: 1000px) { .phone-grid { grid-template-columns: 3fr 2fr; } .phone-customer { position: sticky; top: 12px; } }
.phone-items h3 { font-family: var(--font); font-size: 1rem; font-weight: 600; margin: 16px 0 8px; color: var(--c-green); }
.phone-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.phone-product { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 8px 10px; background: var(--c-white); }
.phone-product.is-soldout { opacity: .5; }
.phone-product-name { display: block; font-weight: 600; margin-bottom: 4px; }
.phone-variant { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; padding: 2px 0; }
.phone-variant input { width: 64px; min-height: 40px; text-align: center; font-size: 1.05rem; }
.phone-variant.has-qty input { border-color: var(--c-burgundy); background: #fbf3f5; font-weight: 600; }
.phone-order .delivery-only { display: none; }
.phone-order:has(input[name="mode"][value="delivery"]:checked) .delivery-only { display: block; }
.phone-when { border: 0; padding: 0; margin: 8px 0; }
.phone-when input[type="time"] { min-height: 40px; }
.phone-total { font-size: 1.15rem; margin: 12px 0 4px; }
