/* ==========================================================================
   L'italien — refonte 2026 : la carte (livre qui se feuillette)
   Chargée APRÈS site.css, uniquement sur carte.html.
   Mécanique du livre reprise de l'ancien site (_ancien/), rhabillée dans la
   nouvelle DA : vert #002a0c, gélules, bandeau aplat + motif.
   La couverture garde son émeraude #1F6B52 : c'est voulu, elle ressort
   plus claire que le vert du site.
   ========================================================================== */

/* (bandeau vert, gélules .filtre et fond de barre au défilement :
   composants communs, désormais dans site.css) */

/* --------------------------------------------------------------------------
   1. Zone du livre (fond crème)
   -------------------------------------------------------------------------- */
.zone-livre { padding-block: clamp(1.5rem, 3vw, 2rem) clamp(3.5rem, 9vw, 6.5rem); }
/* le livre est l'élément principal : sa zone s'élargit jusqu'à 1440 px */
.zone-livre .conteneur { --largeur-max: 1440px; }

.carte-note {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(34, 50, 44, 0.7);
  position: relative;
  z-index: 10; /* sous le livre, jamais recouvert par les pages */
}

.carte-mention {
  margin-top: 2rem;
  text-align: center;
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(34, 50, 44, 0.65);
}

/* --------------------------------------------------------------------------
   2. Onglets du livre : gélules compactes (base .filtre dans site.css),
   les huit tiennent sur une seule ligne dès 1100 px de large
   -------------------------------------------------------------------------- */
.livre-onglets {
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.livre-onglets .filtre {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
/* fenêtres moyennes : deux rangées équilibrées (4 + 4) plutôt que 6 + 2 */
@media (min-width: 720px) and (max-width: 1099px) {
  .livre-onglets {
    display: grid;
    grid-template-columns: repeat(4, max-content);
    justify-content: center;
  }
}
/* téléphone : une seule rangée qui défile au doigt, bord à bord */
@media (max-width: 719px) {
  .livre-onglets {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -1.25rem;   /* compense la gouttière du .conteneur */
    padding-inline: 1.25rem;
    scroll-padding-inline: 1.25rem;
    padding-block: 3px;        /* place pour le liseré de focus */
  }
  .livre-onglets::-webkit-scrollbar { display: none; }
  .livre-onglets .filtre { flex: none; }
}

/* --------------------------------------------------------------------------
   5. Liste de plats (dans les pages)
   -------------------------------------------------------------------------- */
.carte-liste {
  max-width: 720px;
  margin-inline: auto;
  display: grid;
  gap: 1.05rem;
}
.carte-item__ligne {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}
.carte-item__nom {
  font-family: var(--police-titre);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--vert);
}
.carte-item__points {
  flex: 1;
  border-bottom: 1px dotted var(--dore);
  transform: translateY(-0.25em);
  min-width: 1.5rem;
}
.carte-item__prix {
  font-weight: 400;
  color: var(--dore);
  white-space: nowrap;
}
.carte-item__desc {
  font-size: 0.88rem;
  color: rgba(34, 50, 44, 0.75);
  max-width: 55ch;
}

/* --------------------------------------------------------------------------
   6. Le livre : scène, pages, feuille qui tourne, flèches
   (mécanique identique à l'ancien site, couleurs mises à jour)
   -------------------------------------------------------------------------- */
.livre { outline: none; }
.livre:focus-visible { box-shadow: 0 0 0 3px rgba(201, 162, 76, 0.5); border-radius: var(--rayon); }

.livre__scene {
  position: relative;
  perspective: 2400px;
  touch-action: pan-y; /* le doigt garde le défilement vertical, on capte l'horizontal */
}

/* ---- La page : papier crème, bruit discret ---- */
.page {
  background-color: var(--blanc);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 1px solid rgba(201, 162, 76, 0.25);
  border-radius: var(--rayon);
  box-shadow: inset 0 0 60px rgba(34, 50, 44, 0.06);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: flex;
  flex-direction: column;
}
.page__contenu {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* défilement inertiel iOS */
  scrollbar-width: thin;
}
.page__numero {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(34, 50, 44, 0.45);
}

/* page finale décorative */
.page--finale { justify-content: center; text-align: center; }
.page--finale .page__devise {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--vert);
}
.fleur-coin {
  width: clamp(90px, 14vw, 170px);
  height: auto;
  color: var(--dore);
  pointer-events: none;
}
.page--finale .fleur-coin { margin: 0 auto 1.2rem; opacity: 0.3; }

/* ---- Sans JS : toutes les pages à la suite, pas de livre ---- */
.no-js .livre__scene { display: grid; gap: 1.5rem; }
.no-js .livre__nav,
.no-js .livre-onglets { display: none; }

/* ---- Mode livre (JS actif) : contenu jamais en display:none ---- */
html:not(.no-js) .livre .page {
  position: absolute;
  inset: 0;
  visibility: hidden;
  z-index: 1;
}
html:not(.no-js) .livre .page.est-courante { visibility: visible; }

/* Téléphone : une seule page, hauteur libre, bascule sur l'axe vertical */
@media (max-width: 899px) {
  html:not(.no-js) .livre .page {
    transition: transform 0.35s ease;
    will-change: transform;
  }
  html:not(.no-js) .livre .page.est-courante { position: relative; }
  .page--sortie-avant   { transform: rotateY(-90deg); }
  .page--sortie-arriere { transform: rotateY(90deg); }
  .page--entree-avant   { transform: rotateY(90deg);  transition: none !important; }
  .page--entree-arriere { transform: rotateY(-90deg); transition: none !important; }
}

/* Ordinateur : livre ouvert, double page, reliure centrale */
@media (min-width: 900px) {
  html:not(.no-js) .livre__scene {
    /* repli : Safari < 15.4, Firefox < 101 */
    height: clamp(380px, min(calc(100vh - 210px), 85vh), 900px);
    height: clamp(380px, min(calc(100svh - 210px), 85svh), 900px);
    /* ombre affirmée qui assoit le livre sur les fleurs — box-shadow,
       pas de filter sur l'arbre des feuilles 3D */
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5);
    border-radius: var(--rayon);
  }
  html:not(.no-js) .livre .page--gauche {
    inset: 0 50% 0 0;
    border-radius: var(--rayon) 0 0 var(--rayon);
    border-right: none;
    box-shadow: inset -46px 0 46px -40px rgba(34, 50, 44, 0.35),
                inset 0 0 60px rgba(34, 50, 44, 0.05);
  }
  html:not(.no-js) .livre .page--droite {
    inset: 0 0 0 50%;
    border-radius: 0 var(--rayon) var(--rayon) 0;
    border-left: none;
    box-shadow: inset 46px 0 46px -40px rgba(34, 50, 44, 0.35),
                inset 0 0 60px rgba(34, 50, 44, 0.05);
  }
  /* pliure du papier au centre */
  html:not(.no-js) .livre__scene::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 90px;
    transform: translateX(-50%);
    background: linear-gradient(90deg,
      rgba(34, 50, 44, 0) 0%,
      rgba(34, 50, 44, 0.10) 42%,
      rgba(34, 50, 44, 0.22) 50%,
      rgba(34, 50, 44, 0.10) 58%,
      rgba(34, 50, 44, 0) 100%);
    z-index: 3;
    pointer-events: none;
  }
}

/* ---- Feuille en train de tourner (ordinateur) ---- */
.feuille {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  z-index: 5;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.05, 0.25, 1);
  pointer-events: none;
}
.feuille--avant   { left: 50%; transform-origin: left center; }
.feuille--arriere { left: 0;   transform-origin: right center; }
.feuille--avant.est-tournee   { transform: rotateY(-180deg); }
.feuille--arriere.est-tournee { transform: rotateY(180deg); }

.feuille__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.feuille__face--verso { transform: rotateY(180deg); }
.feuille .page {
  position: absolute !important;
  inset: 0 !important;
  visibility: visible !important;
  border-radius: 0;
}
.feuille__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 50, 44, 0.12), rgba(34, 50, 44, 0) 30%);
  pointer-events: none;
}

/* ---- Flèches précédent / suivant ---- */
.livre__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.4rem;
  margin-top: 1.6rem;
  position: relative;
  z-index: 10;
}
.livre__fleche {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--vert);
  border-radius: 50%;
  color: var(--vert);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.livre__fleche svg { width: 18px; height: 18px; }
.livre__fleche:hover:not(:disabled) { background: var(--vert); color: var(--creme); }
.livre__fleche:disabled { opacity: 0.35; cursor: default; }
.livre__position {
  min-width: 90px;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: rgba(34, 50, 44, 0.7);
  font-variant-numeric: tabular-nums;
}
.livre__fermer {
  min-height: 44px;
  padding: 0.55rem 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--vert);
  border-radius: 999px;
  color: var(--vert);
  transition: background var(--transition), color var(--transition);
}
.livre__fermer:hover { background: var(--vert); color: var(--creme); }
.livre--ferme .livre__fermer { display: none; }

/* ---- Téléphone : les commandes du livre restent sous le pouce ----
   La barre de navigation colle au bas de l'écran tant que le livre est
   visible (position:sticky), puis reprend sa place dans le flux. La
   réserve à droite laisse passer la bulle WhatsApp (64 px + marge). */
@media (max-width: 899px) {
  html:not(.no-js) .livre__nav {
    position: sticky;
    /* la barre se cale juste AU-DESSUS de la bulle WhatsApp (64 px + 1,2 rem
       de marge basse) : elle reste sous le pouce sans jamais être recouverte */
    bottom: 5.75rem;
    z-index: 20;
    margin-top: 1.1rem;
  }
}

/* --------------------------------------------------------------------------
   7. Couverture (émeraude #1F6B52 conservé) & filigrane des pages
   -------------------------------------------------------------------------- */
.page--couverture {
  container-type: inline-size;
  aspect-ratio: 7 / 10;
  max-height: calc(100vh - 240px);   /* repli : Safari < 15.4, Firefox < 101 */
  max-height: calc(100svh - 240px);
  min-height: 340px;
  width: 100%;
  padding: 0;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--creme);
  background-color: #1F6B52; /* émeraude de la couverture — NE PAS unifier */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 120% 90% at 50% 32%,
      rgba(255, 253, 249, 0.10) 0%,
      rgba(255, 253, 249, 0.03) 35%,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.22) 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.14);
}

.couverture__cadre {
  position: absolute;
  inset: min(12mm, 9%);
  border: 1.3px solid var(--dore);
  pointer-events: none;
}
.couverture__cadre::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 0.8px solid var(--dore);
}

/* arabesques : un dessin (#arabesque), quatre <use> transformés */
.arabesque {
  position: absolute;
  pointer-events: none;
  color: var(--dore);
}
.page--couverture .arabesque { width: 19%; }
.page--couverture .arabesque--hg { top: calc(min(12mm, 9%) + 7px); left: calc(min(12mm, 9%) + 7px); }
.page--couverture .arabesque--hd { top: calc(min(12mm, 9%) + 7px); right: calc(min(12mm, 9%) + 7px); transform: scaleX(-1); }
.page--couverture .arabesque--bg { bottom: calc(min(12mm, 9%) + 7px); left: calc(min(12mm, 9%) + 7px); transform: scaleY(-1); }
.page--couverture .arabesque--bd { bottom: calc(min(12mm, 9%) + 7px); right: calc(min(12mm, 9%) + 7px); transform: scale(-1); }

.couverture__centre {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5cqw;
  text-align: center;
}
.couverture__logo {
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 15cqw;
  line-height: 1;
  color: var(--creme);
  display: inline-flex;
  align-items: baseline;
}
.couverture__i { position: relative; display: inline-block; }
.couverture__etoile {
  position: absolute;
  top: 0.07em;
  left: 50%;
  transform: translateX(-50%);
  width: 0.32em;
  height: 0.32em;
  color: var(--dore);
}
.couverture__sous {
  display: flex;
  align-items: center;
  gap: 3.2cqw;
  font-size: 3.3cqw;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: var(--dore);
  white-space: nowrap;
}
.couverture__filet {
  position: relative;
  width: 12cqw;
  height: 1px;
  background: var(--dore);
  flex: none;
}
.couverture__filet::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dore);
  transform: translateY(-50%);
}
.couverture__filet--g::before { left: -6px; }
.couverture__filet--d::before { right: -6px; }

.couverture__indice {
  position: absolute;
  bottom: 13%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 2.7cqw;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, 0.75);
}
.no-js .couverture__indice { display: none; }

/* ---- Filigrane des pages intérieures (injecté par carte.js) ---- */
.page__filigrane {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(201, 162, 76, 0.35);
  pointer-events: none;
}
.page__filigrane::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(201, 162, 76, 0.22);
}
.page__filigrane .arabesque { width: 15%; max-width: 84px; opacity: 0.38; }
.page__filigrane .arabesque--hg { top: 5px; left: 5px; }
.page__filigrane .arabesque--hd { top: 5px; right: 5px; transform: scaleX(-1); }
.page__filigrane .arabesque--bg { bottom: 5px; left: 5px; transform: scaleY(-1); }
.page__filigrane .arabesque--bd { bottom: 5px; right: 5px; transform: scale(-1); }

/* ---- Livre fermé : couverture seule, centrée, pas de pliure ---- */
@media (min-width: 900px) {
  html:not(.no-js) .livre { overflow-x: clip; }
  html:not(.no-js) .livre--pret .livre__scene {
    transition: transform 0.7s cubic-bezier(0.4, 0.05, 0.25, 1);
  }
  html:not(.no-js) .livre--ferme .livre__scene { transform: translateX(-25%); }
  html:not(.no-js) .livre--seule .livre__scene { transform: translateX(25%); }
  html:not(.no-js) .livre--ferme .livre__scene::before,
  html:not(.no-js) .livre--seule .livre__scene::before { content: none; }
  html:not(.no-js) .livre .page--couverture.page--droite {
    border-radius: 6px var(--rayon) var(--rayon) 6px;
  }
  /* sur ordinateur, la couverture a exactement la taille d'une page intérieure */
  html:not(.no-js) .livre .page--couverture {
    aspect-ratio: auto;
    width: auto;
    max-height: none;
    min-height: 0;
  }
}

/* téléphones étroits : la page du livre garde des marges lisibles sans
   écraser les lignes de plats */
@media (max-width: 430px) {
  /* la gouttière du .conteneur passe à 1 rem sous 430 px (site.css) :
     la rangée d'onglets doit la suivre, sinon elle déborde de 4 px et
     fait apparaître un défilement horizontal sur toute la page */
  .livre-onglets {
    margin-inline: -1rem;
    padding-inline: 1rem;
    scroll-padding-inline: 1rem;
  }
  .page { padding: 1.3rem 1.05rem; }
  .page__filigrane { inset: 6px; }
  .carte-item__nom { font-size: 1.05rem; }
  .carte-item__desc { font-size: 0.85rem; }
  .carte-liste { gap: 0.9rem; }
  .livre-onglets { margin-bottom: 1.2rem; }
}

/* --------------------------------------------------------------------------
   8. Pages de titre de catégorie & pages d'attente
   -------------------------------------------------------------------------- */
.page--titre { text-align: center; }

.titre-cat {
  position: relative;
  margin-block: auto;
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  padding-block: 1rem;
  width: 100%;
}
.titre-cat__fond {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: min(80%, 360px);
  color: var(--dore);
  opacity: 0.08;
  pointer-events: none;
}
.titre-cat__sur {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--dore);
}
.titre-cat__nom {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  line-height: 1.05;
  color: var(--vert);
}
.titre-cat__filet {
  width: 70px;
  height: 1px;
  background: var(--dore);
}
.titre-cat__accroche {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: #2F6B45; /* vert plus clair */
}

.page--titre .page__filigrane .arabesque {
  width: 24%;
  max-width: 140px;
  opacity: 0.5;
}

/* rappel discret de la catégorie en tête des pages de plats */
.page__rappel {
  display: block;
  text-align: center;
  font-family: var(--police-titre);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(0, 42, 12, 0.85);
  margin-bottom: 1.2rem;
}

/* page d'attente : petite arabesque dorée centrée, rien d'autre */
.page--vide { align-items: center; }
.page-vide__ornement {
  margin-block: auto;
  width: min(60%, 190px);
  color: var(--dore);
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   9. Mouvement réduit : le livre abandonne la 3D pour un simple fondu
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.no-js) .livre .page {
    opacity: 0;
    transform: none !important;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s !important;
  }
  html:not(.no-js) .livre .page.est-courante {
    opacity: 1;
    transition: opacity 0.4s ease !important;
  }
}

/* --------------------------------------------------------------------------
   Fond fleuri : la page vit sur la photo — tout ce qui est posé
   directement sur les fleurs passe en crème bien visible (le livre, lui,
   reste crème : l'objet clair sur le fond riche, c'est le contraste
   voulu).
   -------------------------------------------------------------------------- */
.carte-note {
  color: var(--creme);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}
.carte-mention {
  color: rgba(251, 247, 239, 0.9);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}
/* flèches : cercles crème pleins, bien visibles sur les fleurs */
.livre__fleche {
  width: 52px;
  height: 52px;
  border: none;
  background: var(--creme);
  color: var(--vert);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.livre__fleche svg { width: 20px; height: 20px; }
.livre__fleche:hover:not(:disabled) { background: var(--dore); color: var(--vert); }
.livre__fleche:disabled {
  opacity: 1;
  background: rgba(251, 247, 239, 0.4);
  color: rgba(0, 42, 12, 0.5);
  box-shadow: none;
}
/* position (« Couverture », « 3-4 / 28 ») : pastille verte semi-opaque */
.livre__position {
  color: var(--creme);
  font-size: 1rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  background: rgba(0, 42, 12, 0.55);
  border-radius: 999px;
  padding: 6px 16px;
}
.livre__fermer {
  border: none;
  background: var(--creme);
  color: var(--vert);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.livre__fermer:hover { background: var(--dore); color: var(--vert); }

/* ==========================================================================
   Visibilité de la navigation du livre — override final (posé par Claude).
   Les flèches restent pleines et contrastées dans TOUS les états.
   ========================================================================== */
.livre__fleche,
.livre__fleche:disabled {
  width: 56px;
  height: 56px;
  background: var(--creme) !important;
  color: var(--vert) !important;
  opacity: 1 !important;
  border: 2px solid rgba(0, 42, 12, 0.3) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important;
}
.livre__fleche svg { width: 24px; height: 24px; }
.livre__fleche:hover:not(:disabled) {
  background: var(--dore) !important;
  transform: translateY(-2px);
}
.livre__fleche:disabled { color: rgba(0, 42, 12, 0.35) !important; cursor: default; }
.livre__position {
  color: var(--creme) !important;
  background: rgba(0, 23, 10, 0.75) !important;
  padding: 8px 18px;
  font-size: 1rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.livre__fermer {
  color: var(--vert) !important;
  background: var(--creme) !important;
  border: none !important;
  opacity: 1 !important;
  padding: 0.7rem 1.6rem;
  font-size: 0.85rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}
.livre__fermer:hover { background: var(--dore) !important; }

/* ==========================================================================
   Nouveautés : onglet signalé par une petite étoile dorée, message
   d'attente élégant tant qu'aucun plat n'est inscrit (masqué par :has()
   et, en secours, par carte.js).
   ========================================================================== */
.filtre--nouveau { position: relative; }
.filtre--nouveau::before {
  content: "\2726";              /* ✦ */
  margin-right: 0.4em;
  color: var(--dore);
  font-size: 0.8em;
}
.carte-attente {
  margin: 2.2rem auto 0;
  max-width: 22rem;
  text-align: center;
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--vert);
}
.carte-attente span {
  display: block;
  margin-top: 0.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  opacity: 0.75;
}
.carte-attente::before {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 0 auto 1.1rem;
  background: var(--dore);
}
.page__contenu:has(.carte-item) .carte-attente { display: none; }


/* sous-titre de section dans une page du livre (ex. Salé / Sucré du brunch) */
.carte-soustitre {
  font-family: var(--police-titre);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  color: var(--vert);
  margin: 0 0 0.2rem;
  letter-spacing: 0.02em;
}
.carte-soustitre::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 0.45rem auto 0.2rem;
  background: var(--dore);
}


/* ==========================================================================
   10. Finitions « carte de grand restaurant » (oct. 2026)
   Couverture cuir émeraude + dorure à chaud, papier ivoire fibré,
   typographie raffinée, repères, accords mocktail, tranche des pages. Textures : assets/img/carte/ (générées par textures.py).
   ========================================================================== */
:root {
  --dore-texte: #8f6a24;   /* or lisible sur papier ivoire (contraste AA) */
  --dore-clair: #d9b866;
  --encre:      #0f3a22;   /* vert encre des titres de plats */
  --gris-desc:  #4a5850;
}

/* ---- Papier ivoire fibré ---- */
.page {
  background-color: #f8f2e4;
  background-image: url("../img/carte/papier.webp");
  background-size: cover;
  background-position: center;
}

/* ---- Couverture : cuir émeraude, dorure à chaud ---- */
.page--couverture {
  background-color: #145a42;
  background-image:
    radial-gradient(ellipse 120% 90% at 45% 30%, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.3) 100%),
    url("../img/carte/cuir.webp");
  background-size: cover, cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 90px rgba(0, 0, 0, 0.35);
}
.couverture__logo {
  background: linear-gradient(172deg, #f8e9b6 0%, #d9b563 26%, #a27628 47%, #ecd38e 62%, #b0852f 80%, #f3dfa0 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.45));
}
.couverture__etoile { color: #e6c877; }
.couverture__cadre {
  border: 1.5px solid transparent;
  border-image: linear-gradient(135deg, #f3dc95, #a77c2c 30%, #efd48c 55%, #9c7429 80%, #f0d892) 1;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}
.couverture__cadre::before {
  border: 0.8px solid transparent;
  border-image: linear-gradient(135deg, #f3dc95, #a77c2c 30%, #efd48c 55%, #9c7429 80%, #f0d892) 1;
}
.page--couverture .arabesque {
  color: #dcbc6c;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}
.couverture__sous { color: #e0c379; }
.couverture__filet,
.couverture__filet::before { background: #d4b25f; }

/* ---- Livre ouvert (ordinateur) : tranche des pages ---- */
@media (min-width: 900px) {
  html:not(.no-js) .livre:not(.livre--ferme):not(.livre--seule) .livre__scene {
    box-shadow:
      0 34px 70px rgba(0, 0, 0, 0.5),
      2px 3px 0 -1px #efe7d4, 4px 6px 0 -2px #e4d9c1, 6px 9px 0 -3px #d9cdb2,
      -2px 3px 0 -1px #efe7d4, -4px 6px 0 -2px #e4d9c1, -6px 9px 0 -3px #d9cdb2;
  }
}

/* ---- En-tête des pages de plats : petites capitales entre deux filets ---- */
.page__rappel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  font-family: var(--police-texte);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--dore-texte);
  margin-bottom: 1.6rem;
}
.page__rappel::before,
.page__rappel::after {
  content: "";
  width: clamp(1.6rem, 6%, 3rem);
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ---- Lignes de plats ---- */
.carte-liste { gap: 1.3rem; }
.carte-item__nom {
  font-size: 1.26rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  color: var(--encre);
}
.carte-item__points {
  border-bottom: 0;
  height: 2px;
  background-image: radial-gradient(circle, rgba(143, 106, 36, 0.7) 0.75px, transparent 1px);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-position: left center;
  transform: translateY(-0.3em);
}
.carte-item__prix {
  font-family: var(--police-titre);
  font-size: 1.22rem;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  color: var(--dore-texte);
}
.carte-item__desc {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--gris-desc);
}

/* ---- Repères (signature, végétarien, épicé) ---- */
.reperes {
  display: inline-flex;
  gap: 0.28em;
  margin-left: 0.45em;
  vertical-align: 0.02em;
}
.repere {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  flex: none;
}
.repere svg { display: block; width: 100%; height: 100%; }
.repere--signature { color: #b88d2c; }
.repere--vege      { color: #4c7d36; }
.repere--epice     { color: #b23f27; }
.repere--accord    { color: var(--dore-texte); }

/* ---- Accord mocktail conseillé ---- */
.carte-item__accord {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--dore-texte);
}
.carte-item__accord svg { width: 0.95rem; height: 0.95rem; flex: none; }
.carte-item__accord em { font-weight: 600; }

/* ---- Pages de titre : numéro de chapitre + branche d'olivier ---- */
.titre-cat { gap: 1rem; }
.titre-cat__sur {
  font-family: var(--police-titre);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--dore-texte);
}
.titre-cat__nom {
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--encre);
}
.titre-cat__branche {
  width: min(64%, 240px);
  height: auto;
  color: #b18a3a;
}
.titre-cat__accroche { color: #3b6a4b; font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
.titre-cat__fond { opacity: 0.06; }

/* ---- Légende sous le livre ---- */
.carte-legende {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.6rem;
  margin-top: 1.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(251, 247, 239, 0.86);
}
.carte-legende span { display: inline-flex; align-items: center; gap: 0.45rem; }
.carte-legende .repere { width: 1rem; height: 1rem; }
.carte-legende .repere--signature,
.carte-legende .repere--accord { color: #e2c172; }
.carte-legende .repere--vege  { color: #a6d38c; }
.carte-legende .repere--epice { color: #f08e70; }

/* ---- Bascule livre ↔ liste ---- */
.carte-vue {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.8rem;
}
.carte-vue__lien {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, 0.85);
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-color: rgba(201, 162, 76, 0.7);
}
.carte-vue__lien:hover { color: var(--creme); text-decoration-color: var(--dore); }
html:not(.vue-table) .carte-vue__lien--livre,
html.vue-table .carte-vue__lien--liste { display: none; }
.no-js .carte-vue { display: none; }
@media (max-width: 899px) { .carte-vue { justify-content: center; } }

/* ==========================================================================
   11. Mode table (QR code en salle) : carte.html?vue=table
   La liste est construite par carte.js à partir du livre (une seule
   source de vérité). Pas de rideau, pas de hero : la carte tout de suite.
   ========================================================================== */
.carte-table { display: none; }
html.vue-table .carte-table { display: block; }
html.vue-table .hero-fleuri,
html.vue-table .livre,
html.vue-table .livre-onglets { display: none; }
html.vue-table .zone-livre { padding-top: calc(var(--entete-h, 64px) + 1rem); }

.carte-table__nav {
  position: sticky;
  top: var(--entete-h, 64px);
  z-index: 20;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-inline: calc(-1 * var(--gouttiere, 1.25rem));
  padding: 0.75rem var(--gouttiere, 1.25rem);
  background: rgba(0, 30, 10, 0.94);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  scrollbar-width: none;
}
.carte-table__nav::-webkit-scrollbar { display: none; }
.carte-table__nav a {
  flex: none;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(251, 247, 239, 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--creme);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.carte-table__nav a.est-actif { background: var(--creme); color: var(--vert); border-color: var(--creme); }

.carte-table__papier {
  max-width: 820px;
  margin: 1.2rem auto 0;
  padding: clamp(1.3rem, 5vw, 3rem) clamp(1.1rem, 5vw, 3.2rem);
  background: #f8f2e4 url("../img/carte/papier.webp") center / cover;
  border-radius: var(--rayon);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.carte-table__section {
  scroll-margin-top: calc(var(--entete-h, 64px) + 70px);
  padding-block: 1.8rem 2.2rem;
}
.carte-table__section:first-child { padding-top: 0.6rem; }
.carte-table__section + .carte-table__section { border-top: 1px solid rgba(143, 106, 36, 0.25); }
.carte-table__tete {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  margin-bottom: 1.6rem;
  text-align: center;
}
.carte-table__tete .titre-cat__nom { font-size: clamp(2rem, 7vw, 2.9rem); }
.carte-table__tete .titre-cat__branche { width: min(50%, 190px); }
.carte-table .carte-attente { margin-top: 0.5rem; }

/* retouches : le « ı » du logo est un inline-block → il porte sa propre
   dorure ; chiffres romains moins espacés ; en-tête plein en mode table */
.couverture__i {
  background: linear-gradient(172deg, #f8e9b6 0%, #d9b563 26%, #a27628 47%, #ecd38e 62%, #b0852f 80%, #f3dfa0 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.titre-cat__sur { letter-spacing: 0.14em; text-indent: 0.14em; }
.reperes .repere { width: 0.84em; height: 0.84em; }
/* mode table : en-tête toujours plein et compact (60 px), les puces
   collent juste dessous */
html.vue-table { --entete-h: 60px; }
html.vue-table .entete { background: #00290c; box-shadow: 0 2px 18px rgba(0, 0, 0, 0.18); }
html.vue-table .entete .entete__barre { height: 60px; }
/* mode table : les listes issues de deux pages du livre se suivent */
.carte-table .carte-liste + .carte-liste,
.carte-table .carte-liste + .carte-soustitre,
.carte-table .carte-soustitre + .carte-liste { margin-top: 1.3rem; }
.carte-table .carte-mention { margin-top: 1.2rem; }

/* ---- nov. 2026 : livre fermé (couverture seule) ou dernière page seule :
   l'ombre du livre ne doit pas déborder sous la moitié vide de la scène
   (rectangle sombre visible sur le fond vert) — l'ombre passe sur la page ---- */
@media (min-width: 900px) {
  html:not(.no-js) .livre--ferme .livre__scene,
  html:not(.no-js) .livre--seule .livre__scene { box-shadow: none !important; }
  html:not(.no-js) .livre--ferme .page.est-courante,
  html:not(.no-js) .livre--seule .page.est-courante { box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5); }
}

/* Nouveautés : rappel de la catégorie au-dessus du nom du plat */
.carte-item__cat {
  display: block;
  font-family: var(--police-texte, "Jost", sans-serif);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a7a2e;
  margin-bottom: 0.1rem;
}
