/* Shared Xelia palette: website + restaurant dashboard. */
.xelia-app {
  --x-blue: #2fa4d2;
  --x-action: #167da5;
  --x-soft: #edf8fc;
  --x-ink: #0f172a;
  --x-muted: #64748b;
  --x-line: #e6eef6;
  --accent: var(--x-action);
  --line: var(--x-line);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--x-ink);
}
body.xelia-app.container { max-width: none; padding: 0; background: #f7fbfe; overflow: hidden; }
.xelia-app [hidden] { display: none !important; }
.xelia-app button { font: inherit; -webkit-tap-highlight-color: transparent; }
.xelia-app button:focus-visible, .xelia-app a:focus-visible, #menu-viewport:focus-visible {
  outline: 3px solid var(--x-action); outline-offset: 3px;
}
.xelia-app button:disabled { opacity: .5; cursor: not-allowed; }
.ordering-app {
  position: fixed; top: var(--app-top, 0px); left: 0; right: 0;
  height: 100vh; height: 100dvh; height: var(--app-height, 100dvh); padding: 20px;
}
.app-view { width: 100%; height: 100%; margin: 0 auto; min-height: 0; }
.x-eyebrow { display: block; color: var(--x-action); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.x-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--x-line);
  border-radius: 12px; background: white; color: var(--x-ink); font-size: 14px; font-weight: 600;
}
.x-button-quiet { color: var(--x-action); background: var(--x-soft); border-color: transparent; }
.x-button-primary { color: white; background: var(--x-action); border-color: var(--x-action); }
.x-button:hover { filter: brightness(.97); }
.entry-view { max-width: 700px; display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding: 36px 24px 20px; }
.entry-restaurant { display: flex; align-items: center; flex-direction: column; gap: 12px; font-size: 13px; color: #475569; font-weight: 500; }
.entry-restaurant img { border-radius: 22px; object-fit: contain; background: white; box-shadow: 0 6px 24px #0f172a08; }
.entry-intro { text-align: center; margin: auto 0 28px; padding-top: 32px; }
.entry-intro h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -.045em; line-height: 1.16; font-weight: 600; margin: 12px 0 16px; }
.entry-intro h1 span { color: var(--x-action); }
.entry-intro p { color: var(--x-muted); font-size: 15px; line-height: 1.7; margin: 0; }
.entry-actions { display: grid; gap: 14px; width: 100%; max-width: 490px; }
.entry-choice {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 23px 20px;
  border: 1px solid var(--x-line); border-radius: 18px; background: white; text-align: left;
  color: var(--x-ink); box-shadow: 0 5px 22px #217b9e05; transition: border-color .15s, background .15s;
}
.entry-choice:hover { border-color: #b5dce9; background: #fbfdfe; }
.entry-choice-auria { background: var(--x-soft); border-color: #d3eaf4; }
.entry-choice-auria:hover { background: #e3f4fc; }
.entry-choice-icon { display: grid; place-items: center; flex: 0 0 48px; height: 48px; background: #f3f9fc; border-radius: 14px; color: var(--x-action); }
.entry-choice-auria .entry-choice-icon { background: white; }
.entry-choice-icon svg { width: 29px; height: 29px; }
.entry-choice-copy { display: grid; gap: 6px; }
.entry-choice-copy strong { font-weight: 600; font-size: 16px; }
.entry-choice-copy small { color: var(--x-muted); font-size: 12px; line-height: 1.5; }
.entry-arrow { margin-left: auto; color: var(--x-action); font-size: 20px; }
.entry-reassurance { margin: 22px 0 26px; color: var(--x-muted); text-align: center; font-size: 12px; line-height: 1.6; }
.xelia-signature { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--x-muted); text-decoration: none; margin-top: auto; }
.xelia-signature img { object-fit: contain; }
.menu-view, .xelia-app .chat-card { max-width: 760px; display: flex; flex-direction: column; background: white; border: 1px solid var(--x-line); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 40px #217b9e06; }
.menu-header, .xelia-app .chat-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: white; border-bottom: 1px solid var(--x-line); }
.menu-header h1 { margin: 2px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -.03em; }
.menu-header .brand-logo { width: 38px; height: 38px; }
.menu-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 8px 16px 0; flex-shrink: 0; }
.menu-pages, .menu-zoom { display: flex; gap: 2px; }
.menu-zoom { margin-left: auto; }
.menu-pages button, .menu-zoom button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: white; color: #475569; font-size: 13px; }
.menu-pages button[aria-current] { color: var(--x-action); background: var(--x-soft); font-weight: 600; }
.menu-zoom button { font-size: 20px; }
.menu-zoom #menu-zoom-reset { font-size: 12px; min-width: 62px; padding: 8px; font-variant-numeric: tabular-nums; }
.menu-help { margin: 0; padding: 5px 16px 10px; color: var(--x-muted); font-size: 11px; text-align: center; }
.menu-viewport { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: none; background: #f0f5f8; padding: 12px; scrollbar-gutter: stable; cursor: grab; }
.menu-viewport.is-dragging { cursor: grabbing; user-select: none; }
.menu-stage { position: relative; margin: 0 auto; }
.menu-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.menu-page { position: relative; margin: 0 0 16px; }
.menu-page:not(.is-loaded)::before { content: "Chargement de la carte…"; position: absolute; top: 44px; left: 0; right: 0; z-index: 1; text-align: center; color: #526477; font-size: 14px; pointer-events: none; }
.menu-page img { display: block; width: 100%; height: auto; background: #f4efdf; border-radius: 3px; -webkit-user-drag: none; user-select: none; }
.menu-page figcaption { color: #526477; font-size: 11px; text-align: center; padding: 8px 0; }
.menu-page-error { min-height: 120px; display: grid; place-content: center; padding: 24px; background: white; text-align: center; font-size: 14px; }
.menu-footer { padding: 12px 20px 10px; border-top: 1px solid var(--x-line); background: white; flex-shrink: 0; text-align: center; }
.menu-footer .x-button { width: 100%; max-width: 480px; min-height: 50px; justify-content: space-between; padding: 12px 20px; }
.menu-footer > span { display: block; color: var(--x-muted); font-size: 10px; margin-top: 7px; }
.ordering-status { flex-shrink: 0; padding: 12px 16px; margin: 0; background: #fff8e8; color: #78500c; font-size: 13px; line-height: 1.5; }
.entry-view .ordering-status { border-radius: 12px; margin-bottom: 16px; max-width: 490px; }
.xelia-app .chat-card { max-width: 620px; }
.xelia-app .chat-header .brand { min-width: 0; gap: 9px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy small { font-size: 11px; color: var(--x-muted); }
.xelia-app .brand-name { font-size: 15px; }
.chat-header-actions { display: flex; gap: 6px; align-items: center; }
.chat-header-actions .x-button, .chat-header-actions .voice-header-mode-btn { font-size: 12px; min-height: 44px; padding: 8px 10px; border-radius: 10px; }
.xelia-app #chat { flex: 1; height: auto; min-height: 0; padding: 18px 14px 48px; border: none; background: #fff; }
.xelia-app #chat::before { display: none; }
.xelia-app .bot { background: #f7fafc; backdrop-filter: none; border-color: #edf2f6; }
.xelia-app .user { background: var(--x-soft); border-color: #dceff6; color: var(--x-ink); backdrop-filter: none; }
.xelia-app .msg.bot .bot-text { max-width: 100%; min-width: 0; }
.xelia-app .chat-inputbar { position: static; flex-shrink: 0; width: auto; padding: 12px; }
.chat-choice-dock {
  flex-shrink: 0; padding: 12px 16px 4px; border-top: 1px solid var(--x-line);
  background: white;
}
.chat-choice-inner { width: 100%; max-width: 420px; margin: 0 auto; }
.chat-choice-title { margin: 0 0 8px; color: var(--x-muted); font-size: 12px; font-weight: 600; text-align: center; }
.chat-choice-buttons { display: grid; grid-template-columns: 1fr; grid-auto-rows: minmax(56px, auto); gap: 8px; }
.xelia-app .chat-choice-button {
  width: 100%; min-height: 56px; padding: 12px 18px; border: 1px solid #c9e4ef;
  border-radius: 14px; background: var(--x-soft); color: var(--x-action);
  font-size: 16px; font-weight: 600; line-height: 1.4; text-align: center;
  touch-action: manipulation; transition: background .15s, border-color .15s;
}
.chat-choice-button:hover { background: #e0f2fa; border-color: var(--x-blue); }
.chat-choice-button:active { background: #d3edf8; }
.chat-choice-button:disabled { cursor: wait; }
body.xelia-order-mode-direct .chat-choice-dock,
body.xelia-order-mode-choice .chat-choice-dock { display: none; }
.xelia-app .order-recap {
  align-self: center; width: 100%; max-width: 440px; margin: 12px 0;
  border: 1px solid var(--x-line); border-top: 3px solid var(--x-blue);
  border-radius: 18px; background: white; padding: 18px;
  box-shadow: 0 6px 24px #217b9e08; overflow-wrap: anywhere;
}
.order-recap-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.order-recap-header h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.order-recap-status { color: var(--x-action); font-size: 11px; background: var(--x-soft); padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.order-recap-item { padding: 16px 0; border-bottom: 1px dashed var(--x-line); }
.order-recap-item-heading { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.order-recap-quantity { flex-shrink: 0; color: var(--x-action); font-weight: 600; }
.order-recap-name { flex: 1; font-weight: 600; }
.order-recap-price { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.order-recap-options { margin: 8px 0 0; font-size: 13px; line-height: 1.6; }
.order-recap-options div { margin-top: 4px; }
.order-recap-options dt { display: inline; color: var(--x-muted); font-weight: 400; }
.order-recap-options dd { display: inline; margin: 0; }
.order-recap-pending { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: #78500c; }
.order-recap-total { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 15px; font-weight: 600; }
.order-recap-note { margin: 8px 0 0; color: var(--x-muted); font-size: 12px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .chat-choice-button { transition: none; } }
.xelia-app .chat-input { font-size: 16px; border-radius: 14px; box-shadow: none; }
.xelia-app .chat-send { flex-shrink: 0; box-shadow: none; }
.xelia-app .hero-logo { width: 62px; }
.xelia-app #hero-intro { padding-top: 18px; }
.xelia-app #xelia-badge { background: white; font-size: 10px; }
.chat-initializing { color: var(--x-muted); font-size: 14px; text-align: center; margin-top: 30px; }
.xelia-app .voice-direct-screen { flex: 1; min-height: 0; overflow-y: auto; }
.xelia-app.xelia-order-mode-direct .chat-card { max-width: 940px; }
.xelia-app .voice-header-mode-btn { color: var(--x-action); border-color: var(--x-line); background: white; }
.xelia-app .voice-session-active #chat { padding-bottom: 48px; }
@media (max-width: 576px) {
  .ordering-app { padding: 0; }
  .menu-view, .xelia-app .chat-card { width: 100%; margin: 0; border: none; border-radius: 0; height: 100%; box-shadow: none; }
  .entry-view { padding: calc(24px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom)); }
  .entry-intro { padding-top: 28px; margin-bottom: 26px; }
  .entry-choice { padding: 20px 16px; gap: 12px; }
  .entry-choice-copy strong { font-size: 15px; }
  .menu-header, .xelia-app .chat-header { padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
  .menu-footer { padding: 10px 16px calc(8px + env(safe-area-inset-bottom)); }
  .xelia-app .chat-inputbar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .menu-toolbar { padding-left: 10px; padding-right: 10px; }
  .xelia-app .chat-header { flex-wrap: wrap; }
}
@media (max-height: 700px) {
  .entry-view { padding-top: 18px; }
  .entry-restaurant { flex-direction: row; gap: 10px; }
  .entry-restaurant img { width: 44px; height: 44px; border-radius: 12px; }
  .entry-intro { padding-top: 20px; margin-bottom: 20px; }
  .entry-intro h1 { font-size: 30px; }
  .entry-choice { padding-top: 16px; padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .entry-choice { transition: none; } }
/* Identité du restaurant mise en avant à l’accueil */
.entry-restaurant {
  flex-direction: column;
  flex-shrink: 0;
  gap: 12px;
  margin: auto 0 32px;
  text-align: center;
}

.entry-restaurant img {
  width: clamp(96px, 18vh, 132px);
  height: auto;
  border-radius: 24px;
}

.entry-restaurant h1 {
  margin: 0;
  color: var(--x-ink);
  font-size: clamp(28px, 5vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.entry-city {
  color: var(--x-muted);
  font-size: 14px;
}
