/* =========================================================================
   Chez les Frères — Feuille de style principale
   Organisation en couches (@layer) : reset → base → layout → components → utilities
   ========================================================================= */

@layer reset, base, layout, components, pages, utilities;

/* Transitions entre pages (navigateurs compatibles, sinon ignoré) */
@view-transition {
  navigation: auto;
}

/* ------------------------------------------------------------------ reset */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  * {
    margin: 0;
  }
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  img,
  svg,
  picture {
    display: block;
    max-width: 100%;
    height: auto;
  }
  input,
  button,
  textarea,
  select {
    font: inherit;
    color: inherit;
  }
  button {
    cursor: pointer;
  }
  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }
}

/* ------------------------------------------------------------------- base */
@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 4rem);
  }
  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: var(--font-body);
    font-size: var(--fs-md);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  main {
    flex: 1;
  }
  /* Pages remplies par JavaScript : on réserve la place pour éviter que
     le pied de page « saute » (CLS) */
  body:is([data-page="carte"], [data-page="commander"], [data-page="confirmation"]) main {
    min-height: 100dvh;
  }
  #menu-root[aria-busy="true"] {
    min-height: 150dvh;
  }
  /* Page Infos : place réservée pour les blocs des restaurants (remplis par JavaScript) */
  #restaurants-info:not([data-ready]) {
    min-height: 220dvh;
  }
  #best-sellers[aria-busy="true"] {
    min-height: 40rem;
  }
  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-stretch: var(--display-stretch);
    line-height: 1;
    letter-spacing: var(--display-tracking);
    text-wrap: balance;
  }
  h1 {
    font-size: var(--fs-2xl);
  }
  h2 {
    font-size: var(--fs-xl);
  }
  h3 {
    font-size: var(--fs-lg);
  }
  p {
    text-wrap: pretty;
  }
  a {
    color: var(--c-brand);
    text-underline-offset: 0.2em;
  }
  a:hover {
    color: var(--c-brand-strong);
  }
  :focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-s);
  }
  /* Taille par défaut des icônes du sprite (surchargée par les composants) */
  svg:where([aria-hidden="true"]) {
    width: 1.25em;
    height: 1.25em;
    display: inline-block;
    vertical-align: -0.2em;
  }
  ::selection {
    background: var(--c-ink);
    color: var(--c-accent);
  }
  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
      animation: none !important;
    }
  }
}

/* ----------------------------------------------------------------- layout */
@layer layout {
  .container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
  }
  .section {
    padding-block: var(--sp-8);
  }
  .section--dark {
    background: var(--c-night);
    color: var(--c-cream);
  }
  .section--tint {
    background: var(--c-surface-2);
  }
  .section__head {
    display: grid;
    gap: var(--sp-3);
    margin-bottom: var(--sp-6);
    max-width: 44rem;
  }
  .eyebrow {
    font-weight: 700;
    font-size: var(--fs-sm);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-accent-text);
  }
  .section--dark .eyebrow {
    color: var(--c-accent);
  }
  .lead {
    font-size: var(--fs-lg);
    color: var(--c-muted);
  }
  .section--dark .lead {
    color: var(--c-on-dark-muted);
  }

  /* ---------- En-tête ---------- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--c-night);
    color: var(--c-cream);
    view-transition-name: site-header;
    border-bottom: 3px solid var(--c-accent);
  }
  .site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    min-height: var(--header-h);
  }
  .brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: inherit;
    text-decoration: none;
    margin-right: auto;
  }
  .brand img {
    width: auto;
    height: 48px;
    flex: none;
  }
  .brand__name {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-stretch: var(--display-stretch);
    font-size: clamp(1.1rem, 0.85rem + 1.2vw, 1.4rem);
    white-space: nowrap;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  .brand__name small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-top: 0.2rem;
  }
  .brand:hover {
    color: inherit;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--c-cream);
  }
  .nav-toggle svg {
    width: 26px;
    height: 26px;
  }
  .site-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--c-night);
    border-bottom: 3px solid var(--c-accent);
    padding: var(--sp-3) var(--sp-4) var(--sp-5);
    display: none;
  }
  .site-nav[data-open="true"] {
    display: block;
  }
  .site-nav ul {
    display: grid;
    gap: var(--sp-1);
  }
  .site-nav a {
    display: block;
    padding: var(--sp-3) var(--sp-2);
    color: var(--c-cream);
    text-decoration: none;
    white-space: nowrap;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--radius-s);
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.4em;
  }
  .site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.4em;
  }

  @media (min-width: 60rem) {
    .nav-toggle {
      display: none;
    }
    .site-nav {
      position: static;
      display: block;
      padding: 0;
      border: 0;
      background: none;
    }
    .site-nav ul {
      display: flex;
      gap: var(--sp-2);
    }
    .site-nav a {
      font-size: 0.98rem;
      padding: var(--sp-2) var(--sp-3);
    }
  }

  /* ---------- Pied de page ---------- */
  .site-footer {
    background: var(--c-night);
    color: var(--c-on-dark-muted);
    padding-block: var(--sp-7) calc(var(--sp-6) + 4.5rem);
    font-size: var(--fs-sm);
  }
  @media (min-width: 60rem) {
    .site-footer {
      padding-bottom: var(--sp-6);
    }
  }
  .site-footer a {
    color: var(--c-cream);
  }
  .site-footer a:hover {
    color: var(--c-accent);
  }
  .footer-grid {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }
  .footer-grid h2 {
    font-size: 1.15rem;
    color: var(--c-accent);
    margin-bottom: var(--sp-3);
  }
  .footer-grid ul {
    display: grid;
    gap: var(--sp-2);
  }
  .footer-social {
    display: flex;
    gap: var(--sp-3);
    margin-top: var(--sp-4);
  }
  .site-footer .social-btn {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-on-accent);
    border: 2px solid var(--c-accent);
    transition: transform 0.15s, background 0.15s;
  }
  .site-footer .social-btn:hover {
    background: transparent;
    color: var(--c-accent);
    transform: translateY(-2px);
  }
  .social-btn svg {
    width: 1.4rem;
    height: 1.4rem;
  }
  .footer-bottom {
    margin-top: var(--sp-6);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--c-on-dark-line);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3) var(--sp-5);
    justify-content: space-between;
  }
}

/* ------------------------------------------------------------- components */
@layer components {
  /* ---------- Client mémorisé : « Re-bonjour » et « Recommander » ---------- */
  .client-card {
    display: grid;
    gap: var(--sp-2);
    padding: var(--sp-4);
    border: 2px solid var(--c-line);
    border-radius: var(--radius-md, 0.9rem);
    background: var(--c-selected);
  }
  .client-card p { margin: 0; }
  .client-card__hello { font-size: 1.15rem; }
  .client-card__info { color: var(--c-muted); overflow-wrap: anywhere; }
  .client-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
  .reorder {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    border: 2px solid var(--c-line);
    border-radius: var(--radius-md, 0.9rem);
    background: var(--c-surface);
    color: var(--c-ink);
    box-shadow: 4px 4px 0 var(--c-accent);
    text-align: left;
  }
  .reorder__icon { font-size: 1.6rem; }
  .reorder__text { display: grid; gap: 0.1rem; min-width: 0; }
  .reorder__text span { font-size: var(--fs-sm); color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  @media (max-width: 30rem) {
    .reorder { grid-template-columns: auto 1fr; }
    .reorder .btn { grid-column: 1 / -1; }
  }

  /* ---------- Lien d'évitement ---------- */
  .skip-link {
    position: absolute;
    left: var(--sp-4);
    top: -10rem;
    z-index: 100;
    background: var(--c-accent);
    color: var(--c-ink);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-s);
    font-weight: 700;
  }
  .skip-link:focus {
    top: var(--sp-2);
  }

  /* ---------- Boutons ---------- */
  .btn {
    --btn-bg: var(--c-surface);
    --btn-fg: var(--c-ink);
    --btn-border: var(--c-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: 0.7rem 1.3rem;
    border: 2px solid var(--btn-border);
    border-radius: var(--radius-pill);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.1;
    text-decoration: none;
    transition:
      transform 0.15s var(--ease-out),
      background-color 0.15s,
      box-shadow 0.15s;
    &:hover {
      color: var(--btn-fg);
      transform: translateY(-1px);
      box-shadow: var(--shadow-1);
    }
    &:active {
      transform: translateY(0);
    }
    &:disabled,
    &[aria-disabled="true"] {
      opacity: 0.55;
      cursor: not-allowed;
      transform: none;
    }
    & svg {
      width: 1.25em;
      height: 1.25em;
      flex: none;
    }
  }
  .btn--primary {
    --btn-bg: var(--c-brand);
    --btn-fg: var(--c-on-brand);
    --btn-border: var(--c-brand);
    &:hover {
      --btn-bg: var(--c-brand-strong);
      --btn-border: var(--c-brand-strong);
    }
  }
  .btn--accent {
    --btn-bg: var(--c-accent);
    --btn-fg: var(--c-ink);
    --btn-border: var(--c-accent);
  }
  .btn--ghost-light {
    --btn-bg: transparent;
    --btn-fg: var(--c-cream);
    --btn-border: rgb(255 255 255 / 0.6);
    &:hover {
      --btn-border: var(--c-cream);
    }
  }
  .btn--small {
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    font-size: 0.92rem;
  }
  .btn--block {
    width: 100%;
  }
  .btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
  }

  .icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--c-line);
    background: var(--c-surface);
    color: var(--c-ink);
    & svg {
      width: 20px;
      height: 20px;
    }
    &:hover {
      border-color: var(--c-ink);
    }
  }

  /* ---------- Badges ---------- */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--c-surface-2);
    color: var(--c-ink);
    & svg {
      width: 1.1em;
      height: 1.1em;
    }
  }
  .badge--halal {
    background: var(--c-halal);
    color: #fff;
  }
  .badge--hot {
    background: var(--c-accent);
    color: var(--c-ink);
  }
  .badge--off {
    background: #e8e1da;
    color: #4a3f38;
  }

  /* ---------- Statut ouvert / fermé ---------- */
  .status {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 700;
    background: var(--c-surface);
    color: var(--c-ink);
    border: 2px solid var(--c-line);
    white-space: nowrap;
    &::before {
      content: "";
      width: 0.6rem;
      height: 0.6rem;
      border-radius: 50%;
      background: #9a8f86;
      flex: none;
    }
    &[data-open="true"]::before {
      background: var(--c-success);
      box-shadow: 0 0 0 0 rgb(19 163 74 / 0.6);
      animation: pulse 2s infinite;
    }
    &[data-open="false"]::before {
      background: var(--c-danger);
    }
  }
  .status--light {
    background: var(--c-surface);
    color: var(--c-ink);
    box-shadow: var(--shadow-1);
    &[data-open="true"]::before {
      background: var(--c-success);
    }
    &[data-open="false"]::before {
      background: var(--c-danger);
    }
  }
  @keyframes pulse {
    70% {
      box-shadow: 0 0 0 8px rgb(19 163 74 / 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgb(19 163 74 / 0);
    }
  }
  .site-header .status {
    display: none;
  }
  @media (min-width: 40rem) {
    .site-header .status {
      display: inline-flex;
    }
  }

  /* ---------- Bouton panier (en-tête) ---------- */
  .cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    border: 0;
    background: var(--c-accent);
    color: var(--c-on-accent);
    font-weight: 700;
    flex: none;
    & svg {
      width: 22px;
      height: 22px;
      flex: none;
    }
  }
  .cart-btn__count {
    min-width: 1.5rem;
    height: 1.5rem;
    padding-inline: 0.3rem;
    display: inline-grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--c-ink);
    color: var(--c-accent);
    font-size: 0.8rem;
  }
  .cart-btn__label {
    display: none;
  }
  @media (min-width: 40rem) {
    .cart-btn__label {
      display: inline;
    }
  }

  /* ---------- Barre panier mobile (bas de l'écran) ---------- */
  .cart-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
    background: var(--c-night);
    border-top: 3px solid var(--c-accent);
    transform: translateY(110%);
    visibility: hidden; /* bouton non focusable quand la barre est masquée */
    transition:
      transform 0.3s var(--ease-out),
      visibility 0.3s;
    &[data-visible="true"] {
      transform: translateY(0);
      visibility: visible;
    }
  }
  .cart-bar__btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    min-height: 52px;
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--c-accent);
    color: var(--c-on-accent);
    font-weight: 700;
    font-size: 1.02rem;
  }
  .cart-bar__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--c-ink);
    color: var(--c-accent);
  }
  @media (min-width: 60rem) {
    .cart-bar {
      display: none;
    }
  }

  /* ---------- Carte de plat ---------- */
  .dish-grid {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  }
  .dish {
    container-type: inline-size;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-m);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
      box-shadow 0.2s,
      transform 0.2s var(--ease-out);
    &:hover {
      box-shadow: var(--shadow-2);
    }
    &:has(.dish__add:focus-visible) {
      box-shadow: var(--focus-ring);
    }
    &[data-available="false"] {
      opacity: 0.7;
    }
  }
  .dish__media {
    aspect-ratio: 16 / 9;
    background: var(--c-media-bg);
    display: grid;
    place-items: center;
    color: var(--c-accent);
    & svg {
      width: 38%;
      height: auto;
      max-height: 70%;
    }
    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .dish__body {
    display: grid;
    gap: var(--sp-2);
    padding: var(--sp-4);
    flex: 1;
    grid-template-rows: auto 1fr auto;
  }
  .dish__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    font-size: 1.35rem;
  }
  .dish__desc {
    color: var(--c-muted);
    font-size: var(--fs-sm);
  }
  .dish__allergens {
    font-size: var(--fs-xs);
    color: var(--c-muted);
  }
  .dish__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-top: var(--sp-2);
  }
  .price {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    letter-spacing: -0.03em;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--c-brand);
    white-space: nowrap;
    & small {
      font-family: var(--font-body);
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--c-muted);
      text-transform: uppercase;
      margin-right: 0.25em;
    }
  }
  /* Grille étroite (mobile) : cartes compactes horizontales, vignette à gauche */
  .dish-grid {
    container: dishes / inline-size;
  }
  @container dishes (max-width: 38rem) {
    .dish {
      flex-direction: row;
    }
    .dish__media {
      flex: none;
      width: 5.5rem;
      aspect-ratio: auto;
      & svg {
        width: 70%;
      }
    }
    .dish__body {
      padding: var(--sp-3) var(--sp-4);
      gap: var(--sp-1);
    }
    .dish__title {
      font-size: 1.2rem;
    }
    .dish__foot {
      margin-top: var(--sp-1);
    }
  }
  @container (min-width: 30rem) {
    .dish__title {
      font-size: 1.5rem;
    }
  }
  /* Toutes les cartes de plat sont horizontales (vignette à gauche) : les plats
     avec et sans photo ont la même hauteur, la grille reste régulière. */
  .dish {
    flex-direction: row;
  }
  .dish .dish__media {
    flex: none;
    width: 5.5rem;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: var(--border);
    & svg {
      width: 64%;
    }
  }
  .dish .dish__body {
    min-width: 0;
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-1);
  }
  .dish .dish__title {
    font-size: 1.2rem;
  }
  /* Plat avec photo : vignette plus large, photo recadrée sur fond blanc */
  .dish:not(.dish--noimg) .dish__media {
    width: 8.5rem;
    position: relative;
    /* Les photos ont un fond blanc (scripts/convert-images.py) */
    background: #fff;
    & img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }
  @container dishes (max-width: 38rem) {
    .dish:not(.dish--noimg) .dish__media {
      width: 7rem;
    }
  }

  /* ---------- Carte d'avantage ---------- */
  .features {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  }
  .feature {
    padding: var(--sp-5);
    border-radius: var(--radius-m);
    background: rgb(255 255 255 / 0.04);
    border: 2px solid var(--c-accent);
    box-shadow: 5px 5px 0 var(--c-accent);
    & svg {
      width: 44px;
      height: 44px;
      color: var(--c-accent);
      margin-bottom: var(--sp-3);
    }
    & h3 {
      font-size: 1.4rem;
      margin-bottom: var(--sp-2);
    }
    & p {
      color: var(--c-on-dark-muted);
      font-size: var(--fs-sm);
    }
  }

  /* ---------- Tableau des horaires ---------- */
  .hours {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-md);
    & th,
    & td {
      text-align: left;
      padding: 0.7rem 0.9rem;
      border-bottom: 1px solid var(--c-line);
    }
    & th {
      font-weight: 700;
    }
    & tr[data-today="true"] {
      background: var(--c-surface-2);
      & th::after {
        content: " · aujourd'hui";
        font-weight: 400;
        color: var(--c-brand);
        font-size: var(--fs-sm);
      }
    }
    & td.closed {
      color: var(--c-danger);
      font-weight: 700;
    }
  }

  /* ---------- Cartes génériques ---------- */
  .card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-m);
    padding: var(--sp-5);
    box-shadow: var(--shadow-1);
  }

  /* ---------- Modale (élément <dialog>) ---------- */
  .modal {
    width: min(100%, 36rem);
    max-height: min(92dvh, 52rem);
    margin: auto auto 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-l) var(--radius-l) 0 0;
    background: var(--c-bg);
    color: var(--c-ink);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    &::backdrop {
      background: rgb(17 17 17 / 0.6);
      backdrop-filter: blur(2px);
    }
    &[open] {
      display: flex;
      flex-direction: column;
      animation: sheet-up 0.28s var(--ease-out);
    }
    @media (min-width: 40rem) {
      margin: auto;
      border-radius: var(--radius-l);
      &[open] {
        animation: pop-in 0.22s var(--ease-out);
      }
    }
  }
  .modal__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-5) var(--sp-5) var(--sp-3);
    & h2 {
      font-size: var(--fs-xl);
    }
    & p {
      color: var(--c-muted);
      font-size: var(--fs-sm);
      margin-top: var(--sp-2);
    }
  }
  .modal__body {
    overflow-y: auto;
    padding: 0 var(--sp-5) var(--sp-4);
    overscroll-behavior: contain;
  }
  .modal__foot {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5) calc(var(--sp-4) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--c-line);
    background: var(--c-surface);
  }
  @keyframes sheet-up {
    from {
      transform: translateY(100%);
    }
  }
  @keyframes pop-in {
    from {
      opacity: 0;
      transform: scale(0.96);
    }
  }

  /* ---------- Options dans la modale ---------- */
  .opt-group {
    border: 0;
    padding: 0;
    margin: 0 0 var(--sp-5);
    & legend {
      display: flex;
      align-items: baseline;
      gap: var(--sp-2);
      flex-wrap: wrap;
      font-weight: 700;
      font-size: 1.05rem;
      margin-bottom: var(--sp-2);
      padding: 0;
    }
    & .opt-hint {
      font-weight: 400;
      font-size: var(--fs-xs);
      color: var(--c-muted);
    }
    & .opt-req {
      font-size: var(--fs-xs);
      font-weight: 700;
      text-transform: uppercase;
      color: var(--c-brand);
    }
    &[data-error="true"] legend {
      color: var(--c-danger);
    }
  }
  .opt-list {
    display: grid;
    gap: var(--sp-2);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  }
  .opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--c-line);
    border-radius: var(--radius-s);
    background: var(--c-surface);
    cursor: pointer;
    font-size: var(--fs-sm);
    & input {
      accent-color: var(--c-brand);
      width: 1.15rem;
      height: 1.15rem;
      flex: none;
    }
    & .opt__price {
      margin-left: auto;
      font-weight: 700;
      color: var(--c-muted);
      white-space: nowrap;
    }
    &:has(input:checked) {
      border-color: var(--c-brand);
      background: var(--c-selected);
    }
    &:has(input:focus-visible) {
      box-shadow: var(--focus-ring);
    }
    &:has(input:disabled) {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  /* ---------- Quantité ---------- */
  .qty {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--c-line);
    border-radius: var(--radius-pill);
    background: var(--c-surface);
    & button {
      width: 40px;
      height: 40px;
      border: 0;
      background: transparent;
      border-radius: 50%;
      font-size: 1.3rem;
      font-weight: 700;
      line-height: 1;
    }
    & output {
      min-width: 1.8rem;
      text-align: center;
      font-weight: 700;
    }
  }

  /* ---------- Tiroir panier ---------- */
  .drawer {
    width: min(100%, 26rem);
    height: 100dvh;
    max-height: none;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    background: var(--c-bg);
    color: var(--c-ink);
    box-shadow: var(--shadow-2);
    &::backdrop {
      background: rgb(17 17 17 / 0.55);
    }
    &[open] {
      display: flex;
      flex-direction: column;
      animation: slide-in 0.28s var(--ease-out);
    }
  }
  @keyframes slide-in {
    from {
      transform: translateX(100%);
    }
  }
  .drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-5);
    background: var(--c-night);
    color: var(--c-cream);
    & h2 {
      font-size: 1.7rem;
    }
    & .icon-btn {
      background: transparent;
      color: var(--c-cream);
      border-color: rgb(255 255 255 / 0.4);
    }
  }
  .drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-4) var(--sp-5);
  }
  .drawer__foot {
    padding: var(--sp-4) var(--sp-5) calc(var(--sp-4) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--c-line);
    background: var(--c-surface);
    display: grid;
    gap: var(--sp-3);
  }
  .cart-empty {
    text-align: center;
    padding: var(--sp-7) var(--sp-3);
    color: var(--c-muted);
    & svg {
      width: 64px;
      height: 64px;
      margin: 0 auto var(--sp-3);
      color: var(--c-line);
    }
  }
  .cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--sp-2) var(--sp-3);
    padding-block: var(--sp-4);
    border-bottom: 1px solid var(--c-line);
    & h3 {
      font-family: var(--font-body);
      text-transform: none;
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: 0;
    }
    & .cart-line__opts {
      font-size: var(--fs-xs);
      color: var(--c-muted);
      grid-column: 1 / -1;
    }
    & .cart-line__price {
      font-weight: 700;
      white-space: nowrap;
    }
    & .cart-line__actions {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      gap: var(--sp-3);
      flex-wrap: wrap;
    }
    & .cart-line__note {
      flex: 1 1 10rem;
      min-height: 40px;
      padding: 0.4rem 0.7rem;
      border: 1px solid var(--c-line);
      border-radius: var(--radius-s);
      background: var(--c-surface);
      font-size: var(--fs-sm);
    }
    & .link-btn {
      border: 0;
      background: none;
      color: var(--c-danger);
      font-weight: 700;
      font-size: var(--fs-sm);
      text-decoration: underline;
      min-height: 40px;
    }
  }
  .totals {
    display: grid;
    gap: var(--sp-1);
    & div {
      display: flex;
      justify-content: space-between;
    }
    & .totals__grand {
      font-size: 1.25rem;
      font-weight: 700;
    }
  }
  .pay-note {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    padding: var(--sp-3);
    border-radius: var(--radius-s);
    background: var(--c-note);
    font-size: var(--fs-sm);
    font-weight: 700;
    & svg {
      width: 22px;
      height: 22px;
      flex: none;
      color: var(--c-brand);
    }
  }

  /* ---------- Formulaires ---------- */
  .form {
    display: grid;
    gap: var(--sp-5);
  }
  .field {
    display: grid;
    gap: var(--sp-2);
    align-content: start;
    & label,
    & .field__label {
      font-weight: 700;
    }
    & .field__hint {
      font-size: var(--fs-xs);
      color: var(--c-muted);
    }
    & .field__error {
      font-size: var(--fs-sm);
      color: var(--c-danger);
      font-weight: 700;
    }
    & .field__error:empty {
      display: none;
    }
  }
  .input,
  .select,
  .textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--c-line);
    border-radius: var(--radius-s);
    background: var(--c-surface);
    font-size: 1rem; /* ≥16px : évite le zoom auto sur iOS */
    &:focus-visible {
      border-color: var(--c-ink);
    }
    &[aria-invalid="true"] {
      border-color: var(--c-danger);
    }
  }
  .textarea {
    min-height: 6rem;
    resize: vertical;
  }
  .choice-grid {
    display: grid;
    gap: var(--sp-2);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  }
  .choice {
    position: relative;
    display: grid;
    justify-items: center;
    gap: var(--sp-1);
    padding: var(--sp-3);
    text-align: center;
    border: 2px solid var(--c-line);
    border-radius: var(--radius-m);
    background: var(--c-surface);
    cursor: pointer;
    font-weight: 700;
    & input {
      position: absolute;
      opacity: 0;
      inset: 0;
      cursor: pointer;
    }
    & svg {
      width: 30px;
      height: 30px;
      color: var(--c-brand);
    }
    & small {
      font-weight: 400;
      font-size: var(--fs-xs);
      color: var(--c-muted);
    }
    &:has(input:checked) {
      border-color: var(--c-brand);
      background: var(--c-selected);
      box-shadow: inset 0 0 0 1px var(--c-brand);
    }
    &:has(input:focus-visible) {
      box-shadow: var(--focus-ring);
    }
    &:has(input:disabled) {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }
  .check {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    font-size: var(--fs-sm);
    & input {
      width: 1.3rem;
      height: 1.3rem;
      margin-top: 0.15rem;
      accent-color: var(--c-brand);
      flex: none;
    }
  }
  .hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  /* ---------- Alertes ---------- */
  .alert {
    padding: var(--sp-4);
    border-radius: var(--radius-m);
    border-left: 5px solid var(--c-brand);
    background: var(--c-surface);
    box-shadow: var(--shadow-1);
    & strong {
      display: block;
      margin-bottom: var(--sp-1);
    }
  }
  .alert--warn {
    border-color: var(--c-accent);
    background: #fff8e6;
  }
  .alert--error {
    border-color: var(--c-danger);
    background: #fdecea;
  }
  .alert--ok {
    border-color: var(--c-success);
    background: #eaf6ef;
  }

  /* ---------- Toast ---------- */
  .toast {
    position: fixed;
    left: 50%;
    bottom: 6rem;
    z-index: 200;
    translate: -50% 0;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-pill);
    background: var(--c-night);
    color: var(--c-cream);
    font-weight: 700;
    box-shadow: var(--shadow-2);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.2s,
      translate 0.2s;
    &[data-show="true"] {
      opacity: 1;
      translate: -50% -0.5rem;
    }
    @media (min-width: 60rem) {
      bottom: 2rem;
    }
  }

  /* ---------- Prose (pages légales) ---------- */
  .prose {
    max-width: 46rem;
    & h2 {
      margin-top: var(--sp-6);
      margin-bottom: var(--sp-3);
      font-size: var(--fs-lg);
    }
    & p,
    & ul {
      margin-bottom: var(--sp-3);
    }
    & ul {
      padding-left: 1.2rem;
    }
    & .todo {
      background: var(--c-note);
      padding: 0 0.3em;
      border-radius: 4px;
      font-weight: 700;
    }
  }

  /* ---------- Plan Google Maps (chargé au clic) ---------- */
  .map {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-m);
    overflow: hidden;
    background:
      repeating-linear-gradient(45deg, var(--c-surface-2) 0 12px, var(--c-note) 12px 24px);
    border: 1px solid var(--c-line);
    & iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: 0;
    }
  }
  .map__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4);
    text-align: center;
    & svg {
      width: 48px;
      height: 48px;
      color: var(--c-brand);
    }
    & p {
      font-size: var(--fs-sm);
      color: var(--c-muted);
      max-width: 22rem;
    }
  }

  /* ---------- Style « Taxi » : bordures franches, ombres décalées ---------- */
  .btn {
    --btn-border: var(--c-ink);
    border-radius: var(--radius-btn);
    border: 3px solid var(--btn-border);
    box-shadow: var(--shadow-hard-sm);
    &:hover {
      transform: translate(-2px, -2px);
      box-shadow: var(--shadow-hard);
    }
    &:active {
      transform: translate(2px, 2px);
      box-shadow: 0 0 0 var(--c-ink);
    }
  }
  .btn--ghost-light {
    --btn-border: rgb(255 255 255 / 0.7);
    box-shadow: none;
    &:hover {
      box-shadow: none;
    }
  }
  .dish,
  .card,
  .step,
  .social-card,
  .map,
  .modal {
    border: var(--border);
    box-shadow: var(--shadow-hard);
  }
  .dish:hover {
    box-shadow: var(--shadow-2);
    transform: translate(-2px, -2px);
  }
  .dish__media {
    border-bottom: var(--border);
  }
  .cart-btn {
    border: var(--border);
  }
  .badge {
    border: 2px solid var(--c-ink);
  }
  .badge--hot {
    background: var(--c-ink);
    color: var(--c-accent);
  }
  .opt,
  .choice,
  .input,
  .select,
  .textarea,
  .qty,
  .cat-nav a {
    border-color: var(--c-ink);
  }
  .cat-nav a[aria-current="true"] {
    background: var(--c-ink);
    color: var(--c-accent);
  }
  .pay-note {
    border: 2px solid var(--c-ink);
  }
  .drawer__head,
  .page-head {
    border-bottom: var(--border);
  }
  /* ---------- Choix du restaurant (écran « Vous commandez où ? ») ---------- */
  .chooser {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 24px 16px;
    border: 0;
    background:
      radial-gradient(circle at 75% 10%, rgb(254 141 9 / 0.22), transparent 45%), var(--c-night);
    color: var(--c-cream);
    overflow: auto;
    &[open] {
      display: grid;
      place-items: center;
    }
    &::backdrop {
      background: var(--c-night);
    }
  }
  .chooser__in {
    position: relative;
    width: min(100%, 980px);
    text-align: center;
  }
  .chooser__close {
    position: absolute;
    top: 0;
    right: 0;
  }
  .chooser__logo {
    width: auto;
    height: 120px;
    margin: 0 auto 14px;
  }
  .chooser h1 {
    font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem);
    & em {
      font-style: normal;
      background: var(--c-accent);
      color: var(--c-on-accent);
      padding: 0 0.12em;
    }
  }
  .chooser__sub {
    margin: 12px 0 28px;
    font-size: var(--fs-lg);
    color: var(--c-on-dark-muted);
  }
  .chooser__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 22px;
    text-align: left;
  }
  .chooser__card {
    display: grid;
    gap: 12px;
    padding: 22px;
    background: var(--c-surface);
    border: var(--border);
    color: var(--c-ink);
    border-radius: var(--radius-l);
    box-shadow: 6px 6px 0 var(--c-accent);
    & h2 {
      font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem);
    }
    & ul {
      display: grid;
      gap: 6px;
      font-size: var(--fs-sm);
      color: var(--c-muted);
    }
    & li svg {
      width: 1.1em;
      height: 1.1em;
      vertical-align: -0.15em;
    }
    &.is-current {
      outline: 4px solid var(--c-accent);
      outline-offset: 4px;
    }
  }
  /* 2e restaurant (Metz) : carte bleue */
  .chooser__card--dark {
    background: var(--brand-blue);
    color: #fff;
    border-color: #fff;
    & ul {
      color: rgb(255 255 255 / 0.9);
    }
    & .chooser__tag {
      background: #fff;
      color: var(--brand-blue);
      border-color: #fff;
    }
    & .chooser__btn {
      background: var(--c-night);
      color: #fff;
      border-color: var(--c-night);
      box-shadow: none;
    }
  }
  .chooser__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .chooser__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.25rem 0.7rem;
    border: 2px solid var(--c-ink);
    border-radius: var(--radius-pill);
    background: var(--c-ink);
    color: var(--c-accent);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    & svg {
      width: 1em;
      height: 1em;
    }
  }
  .chooser__status {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-size: var(--fs-sm);
    font-weight: 600;
    &::before {
      content: "";
      width: 0.6rem;
      height: 0.6rem;
      border-radius: 50%;
      background: var(--c-danger);
    }
    &[data-open="true"]::before {
      background: var(--c-success);
    }
  }
  .chooser__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.7rem 1.2rem;
    border: var(--border);
    border-radius: var(--radius-btn);
    background: var(--c-brand);
    color: var(--c-on-brand);
    font-weight: 700;
    font-size: 1.02rem;
    box-shadow: var(--shadow-hard-sm);
    & svg {
      width: 1.2em;
      height: 1.2em;
    }
    &:hover {
      transform: translate(-2px, -2px);
    }
  }
  .chooser__note {
    margin-top: 22px;
    font-size: var(--fs-sm);
    color: var(--c-on-dark-muted);
  }

  /* Bouton « Ville · statut ▾ » dans l'en-tête */
  .status--pick {
    cursor: pointer;
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 600;
    & strong {
      font-weight: 800;
    }
    &:hover {
      box-shadow: var(--shadow-hard-sm);
    }
  }
  /* Lien « Changer de restaurant » (accueil) */
  .link-change {
    border: 0;
    background: none;
    padding: 0;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
    cursor: pointer;
  }
  /* Entrée « Changer de restaurant » du menu mobile */
  .nav-resto {
    display: flex;
    align-items: center;
    gap: 0.4em;
    width: 100%;
    padding: var(--sp-3) var(--sp-2);
    border: 0;
    background: none;
    color: var(--c-cream);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: left;
    & svg {
      width: 1.2em;
      height: 1.2em;
    }
  }
  @media (min-width: 60rem) {
    .nav-resto-item {
      display: none;
    }
  }
  /* Encadré « Vous commandez à … » (page commander) */
  .resto-box {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--sp-3) var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--c-night);
    color: var(--c-cream);
    border: var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-hard);
    & > svg {
      width: 32px;
      height: 32px;
      color: var(--c-accent);
    }
    & strong {
      display: block;
      font-family: var(--font-display);
      font-weight: var(--display-weight);
      font-stretch: var(--display-stretch);
      letter-spacing: -0.03em;
      font-size: var(--fs-lg);
      color: var(--c-accent);
    }
    & small {
      color: var(--c-on-dark-muted);
    }
    & .btn {
      --btn-bg: var(--c-accent);
      --btn-fg: var(--c-ink);
      --btn-border: var(--c-accent);
      box-shadow: none;
    }
  }
  .resto-box__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-on-dark-muted);
  }
  @media (max-width: 30rem) {
    .resto-box {
      grid-template-columns: auto 1fr;
      & .btn {
        grid-column: 1 / -1;
      }
    }
  }

  /* ---------- Apparition au scroll (progressive) ---------- */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .reveal {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 25%;
      }
    }
  }
  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(1.5rem);
    }
  }
}

/* ------------------------------------------------------------------ pages */
@layer pages {
  /* ---------- Accueil : hero ---------- */
  .hero {
    position: relative;
    overflow: hidden;
    background: var(--c-night);
    color: var(--c-cream);
    isolation: isolate;
  }
  .hero::before {
    /* Lueur de braise */
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 70vmax;
    height: 70vmax;
    background: radial-gradient(circle, rgb(254 141 9 / 0.28), transparent 60%);
    z-index: -1;
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: auto auto -30% -20%;
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(circle, rgb(47 91 234 / 0.25), transparent 60%);
    z-index: -1;
  }
  .hero__inner {
    display: grid;
    gap: var(--sp-6);
    align-items: center;
    padding-block: var(--sp-7) var(--sp-8);
    @media (min-width: 60rem) {
      grid-template-columns: 1.15fr 0.85fr;
    }
  }
  .hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
  }
  .hero h1 {
    font-size: var(--fs-hero);
    line-height: 0.95;
    /* Style « contour + plein » : la 1re partie en lettres creuses orange */
    & .hero__outline {
      display: block;
      color: var(--c-accent);
      margin-bottom: 0.08em;
    }
    @supports (-webkit-text-stroke: 1px) {
      & .hero__outline {
        color: transparent;
        -webkit-text-stroke: max(2px, 0.03em) var(--c-accent);
        /* lettres un peu espacées : en contour, elles ne doivent pas se toucher */
        letter-spacing: 0.035em;
        font-stretch: 85%;
      }
    }
    & em {
      font-style: normal;
      color: var(--c-on-accent);
      background: var(--c-accent);
      padding: 0 0.12em;
      box-decoration-break: clone;
      -webkit-box-decoration-break: clone;
    }
  }
  .hero__lead {
    margin-block: var(--sp-4) var(--sp-5);
    font-size: var(--fs-lg);
    color: var(--c-on-dark-muted);
    max-width: 36rem;
  }
  .hero__visual {
    position: relative;
    max-width: 30rem;
    margin-inline: auto;
    width: 100%;
    & .hero__logo {
      width: min(100%, 24rem);
      margin-inline: auto;
      filter: drop-shadow(0 20px 40px rgb(0 0 0 / 0.45));
    }
  }
  .hero__sticker {
    position: absolute;
    right: 0;
    bottom: 0;
    rotate: -8deg;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: 7.25rem;
    aspect-ratio: 1;
    margin: 0;
    padding: 0.75rem;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-on-accent);
    border: 3px solid var(--c-cream);
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    text-transform: uppercase;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    line-height: 1;
    box-shadow: var(--shadow-2);
    & span {
      display: block;
      font-size: 0.8rem;
      letter-spacing: 0.06em;
    }
    & strong {
      display: block;
      font-size: 2.1rem;
      letter-spacing: 0;
      white-space: nowrap;
    }
  }
  .hero__info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3) var(--sp-5);
    margin-top: var(--sp-5);
    font-size: var(--fs-sm);
    color: var(--c-on-dark-muted);
    & a {
      color: var(--c-cream);
    }
    & span {
      display: inline-flex;
      align-items: center;
      gap: 0.4em;
    }
    & svg {
      width: 1.2em;
      height: 1.2em;
      color: var(--c-accent);
    }
  }

  /* Bandeau défilant */
  .ticker {
    background: var(--c-accent);
    color: var(--c-on-accent);
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-size: 1.3rem;
    padding-block: 0.6rem;
    white-space: nowrap;
    & ul {
      display: inline-flex;
      gap: 2.5rem;
      padding-left: 2.5rem;
      list-style: none;
      animation: ticker 30s linear infinite;
    }
    & li::after {
      content: "✦";
      margin-left: 2.5rem;
      color: var(--c-ink);
    }
  }
  @keyframes ticker {
    to {
      transform: translateX(-50%);
    }
  }

  /* Accès rapide */
  .access {
    display: grid;
    gap: var(--sp-6);
    @media (min-width: 55rem) {
      grid-template-columns: 1fr 1fr;
      align-items: start;
    }
  }
  .contact-list {
    display: grid;
    gap: var(--sp-4);
    margin-block: var(--sp-5);
    & li {
      display: flex;
      gap: var(--sp-3);
      align-items: flex-start;
    }
    & svg {
      width: 24px;
      height: 24px;
      color: var(--c-brand);
      flex: none;
      margin-top: 0.15rem;
    }
  }

  /* Réseaux */
  .social {
    display: grid;
    gap: var(--sp-5);
    @media (min-width: 55rem) {
      grid-template-columns: 1.2fr 1fr;
      align-items: center;
    }
  }
  .social__cards {
    display: grid;
    gap: var(--sp-3);
  }
  .social-card {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    border-radius: var(--radius-m);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    text-decoration: none;
    color: var(--c-ink);
    font-weight: 700;
    transition: transform 0.15s var(--ease-out);
    & svg {
      width: 36px;
      height: 36px;
      flex: none;
    }
    & small {
      display: block;
      font-weight: 400;
      color: var(--c-muted);
    }
    &:hover {
      color: var(--c-ink);
      transform: translateX(4px);
    }
  }
  /* ---------- Avis Google ---------- */
  .reviews {
    padding: var(--sp-5);
    border-radius: var(--radius-m);
    background: var(--c-surface);
    border: var(--border);
    box-shadow: var(--shadow-hard);
    color: var(--c-ink);
    text-align: center;
    & .btn {
      display: flex;
      width: fit-content;
      margin-inline: auto;
    }
  }
  .reviews__place {
    font-weight: 700;
    color: var(--c-muted);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .reviews__score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    margin-block: var(--sp-2) var(--sp-3);
    & strong {
      font-family: var(--font-display);
      font-weight: var(--display-weight);
      font-size: 3.2rem;
      line-height: 1;
    }
    & > span {
      display: grid;
      justify-items: start;
      gap: 0.2rem;
    }
    & a {
      font-size: var(--fs-sm);
      color: var(--c-ink);
    }
  }
  .reviews__title {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-size: 1.6rem;
    line-height: 1.1;
  }
  .reviews__text {
    color: var(--c-muted);
    margin-top: var(--sp-2);
  }
  .reviews--thanks {
    margin-block: var(--sp-5);
  }
  /* Note moyenne : étoiles remplies au dixième près */
  .stars {
    display: inline-block;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    line-height: 1;
    color: transparent;
    background: linear-gradient(90deg, var(--brand-orange) var(--pct), #d9d2c7 var(--pct));
    -webkit-background-clip: text;
    background-clip: text;
  }
  /* Cinq étoiles à toucher pour noter (ouvrent l'écran d'avis Google) */
  .rate {
    display: inline-flex;
    gap: 0.35rem;
    margin-top: var(--sp-2);
    font-size: 2.6rem;
    line-height: 1;
    text-decoration: none;
    color: #d9d2c7;
    & span {
      display: inline-block;
      transition:
        color 0.15s,
        transform 0.15s var(--ease-out);
    }
    &:hover span,
    &:focus-visible span {
      color: var(--brand-orange);
    }
    & span:hover ~ span {
      color: #d9d2c7;
    }
    & span:hover {
      transform: scale(1.18) rotate(-6deg);
    }
  }
  /* Après une commande : les étoiles s'allument une à une pour attirer l'œil */
  @media (prefers-reduced-motion: no-preference) {
    .reviews--thanks .rate span {
      animation: star-pop 2.4s var(--ease-out) 0.6s 2;
    }
    .reviews--thanks .rate span:nth-child(2) { animation-delay: 0.75s; }
    .reviews--thanks .rate span:nth-child(3) { animation-delay: 0.9s; }
    .reviews--thanks .rate span:nth-child(4) { animation-delay: 1.05s; }
    .reviews--thanks .rate span:nth-child(5) { animation-delay: 1.2s; }
  }
  @keyframes star-pop {
    0%, 60%, 100% { color: #d9d2c7; transform: none; }
    15%, 45% { color: var(--brand-orange); transform: scale(1.15); }
  }
  .quote {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-stretch: var(--display-stretch);
    letter-spacing: var(--display-tracking);
    font-size: var(--fs-xl);
    line-height: 1.05;
    & span {
      color: var(--c-brand);
    }
  }

  /* ---------- Page carte ---------- */
  .page-head {
    background: var(--c-night);
    color: var(--c-cream);
    padding-block: var(--sp-7) var(--sp-6);
    & p {
      color: var(--c-on-dark-muted);
      margin-top: var(--sp-3);
      max-width: 40rem;
    }
  }
  .menu-tools {
    position: sticky;
    top: calc(var(--header-h) + 3px);
    z-index: 30;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    box-shadow: none;
  }
  .menu-tools__inner {
    display: grid;
    gap: var(--sp-2);
    padding-block: var(--sp-3);
    @media (min-width: 60rem) {
      grid-template-columns: 1fr 18rem;
      align-items: center;
    }
  }
  .cat-nav {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.25rem 0.2rem;
    scroll-snap-type: x proximity;
    &::-webkit-scrollbar {
      display: none;
    }
    & a {
      flex: none;
      scroll-snap-align: start;
      padding: 0.5rem 1rem;
      border-radius: var(--radius-pill);
      border: 2px solid var(--c-line);
      background: var(--c-surface);
      color: var(--c-ink);
      font-weight: 700;
      font-size: var(--fs-sm);
      text-decoration: none;
      white-space: nowrap;
      &[aria-current="true"] {
        background: var(--c-night);
        border-color: var(--c-night);
        color: var(--c-cream);
      }
    }
  }
  .search {
    position: relative;
    & svg {
      position: absolute;
      left: 0.9rem;
      top: 50%;
      translate: 0 -50%;
      width: 20px;
      height: 20px;
      color: var(--c-muted);
      pointer-events: none;
    }
    & input {
      padding-left: 2.6rem;
      border-radius: var(--radius-pill);
      min-height: 44px;
    }
  }
  .menu-cat {
    padding-block: var(--sp-6) var(--sp-4);
    & > header {
      display: flex;
      align-items: end;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: var(--sp-2);
      margin-bottom: var(--sp-4);
    }
    & > header p {
      color: var(--c-muted);
    }
    &[hidden] {
      display: none;
    }
  }
  .menu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-5);
  }
  .menu-empty {
    padding: var(--sp-7) 0;
    text-align: center;
    color: var(--c-muted);
  }

  /* ---------- Page commander ---------- */
  .checkout {
    display: grid;
    gap: var(--sp-6);
    padding-block: var(--sp-6) var(--sp-8);
    @media (min-width: 60rem) {
      grid-template-columns: 1fr 24rem;
      align-items: start;
    }
  }
  .checkout__summary {
    @media (min-width: 60rem) {
      position: sticky;
      top: calc(var(--header-h) + var(--sp-5));
    }
  }
  .step {
    display: grid;
    gap: var(--sp-4);
    padding: var(--sp-5);
    border-radius: var(--radius-m);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    & > h2 {
      display: flex;
      align-items: center;
      gap: var(--sp-3);
      font-size: 1.6rem;
    }
    & > h2 span {
      display: inline-grid;
      place-items: center;
      width: 2.2rem;
      height: 2.2rem;
      border-radius: 50%;
      background: var(--c-brand);
      color: #fff;
      font-size: 1.1rem;
    }
  }
  .grid-2 {
    display: grid;
    gap: var(--sp-4);
    @media (min-width: 40rem) {
      grid-template-columns: 1fr 1fr;
    }
  }
  .summary-line {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-block: var(--sp-2);
    border-bottom: 1px dashed var(--c-line);
    font-size: var(--fs-sm);
    & small {
      display: block;
      color: var(--c-muted);
    }
  }

  /* ---------- Confirmation ---------- */
  .confirm {
    max-width: 40rem;
    margin-inline: auto;
    padding-block: var(--sp-7) var(--sp-8);
    text-align: center;
    display: grid;
    gap: var(--sp-4);
    & .confirm__icon {
      width: 5rem;
      height: 5rem;
      margin-inline: auto;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: var(--c-success);
      color: #fff;
    }
    & .confirm__icon svg {
      width: 2.8rem;
      height: 2.8rem;
    }
    & .confirm__number {
      font-family: var(--font-display);
      font-size: var(--fs-2xl);
      color: var(--c-brand);
      line-height: 1;
    }
    & .card {
      text-align: left;
    }
    & dl {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: var(--sp-2) var(--sp-4);
    }
    & dt {
      font-weight: 700;
    }
  }

  /* ---------- 404 ---------- */
  .notfound {
    min-height: 70dvh;
    display: grid;
    place-content: center;
    text-align: center;
    gap: var(--sp-4);
    padding: var(--sp-7) var(--sp-4);
    & .notfound__code {
      font-family: var(--font-display);
      font-size: clamp(6rem, 25vw, 14rem);
      line-height: 0.9;
      font-weight: var(--display-weight);
      color: var(--c-surface);
      -webkit-text-stroke: 4px var(--c-ink);
      text-shadow: 8px 8px 0 var(--c-ink);
    }
    & .btn-row {
      justify-content: center;
    }
  }
}

/* -------------------------------------------------------------- utilities */
@layer utilities {
  .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .mt-4 {
    margin-top: var(--sp-4);
  }
  .mt-5 {
    margin-top: var(--sp-5);
  }
  .muted {
    color: var(--c-muted);
  }
  .center {
    text-align: center;
  }
  [hidden] {
    display: none !important;
  }
}

/* ------------------------------------------------------------ impression */
@media print {
  .site-header,
  .site-footer,
  .cart-bar,
  .menu-tools,
  .dish__add,
  .skip-link {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
