/* ═══════════════════════════════════════════════════════════
   PUBLIC SHARED — composants communs a toutes les pages publiques
   (menu, commande, reservation, fidelite, compte, blog, infos, legal, erreurs).
   Contenu : pied de page (_legal_footer.php), bouton "Haut", regles anti-survol.
   Extrait de menu-premium.css : une seule source, jamais dupliquee dans une vue.
   ═══════════════════════════════════════════════════════════ */

/* Reprend le langage visuel deja valide sur la page roulette (bordure haute
   discrete, fond legerement teinte, liens muets qui s'accentuent au survol)
   mais via l'API de theme modulaire (--theme-*) puisque, contrairement a la
   roulette (theme sombre fixe), cette page doit s'adapter au theme choisi
   par CHAQUE restaurant. Remplace l'ancien bloc "carte" blanc fixe
   (rgba(255,255,255,.8)) qui ne s'adaptait a aucun theme sombre. */
.legal-footer {
  margin: 32px auto 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--theme-border-on-inner, rgba(148, 163, 184, .18));
  background: color-mix(in srgb, var(--theme-inner-bg, #faf7f2) 88%, var(--theme-outer-bg, #faf7f2) 12%);
}

.legal-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.legal-footer__brand {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--theme-text-muted-on-inner, #5d6780);
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
}

.legal-footer__links a:link,
.legal-footer__links a:visited {
  color: var(--theme-text-muted-on-inner, #21304e);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  transition: color .18s ease, background .18s ease;
}

.legal-footer__links a:hover,
.legal-footer__links a:focus-visible {
  color: var(--theme-primary, var(--primary-color));
  background: color-mix(in srgb, var(--theme-text-on-inner, #0b1220) 8%, transparent 92%);
}

.legal-footer__links a:focus-visible {
  outline: 2px solid var(--theme-primary, var(--primary-color));
  outline-offset: 2px;
}

.legal-footer__links a:active {
  color: color-mix(in srgb, var(--theme-primary, var(--primary-color)) 70%, var(--theme-text-on-inner, #000) 30%);
}

/* Lien "Vous etes restaurateur ?" (target="_blank") : identifiable sans
   devenir un gros bouton -- simple liseré au lieu d'un remplissage plein. */
.legal-footer__links a[target="_blank"] {
  color: var(--theme-primary, var(--primary-color));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--theme-primary, var(--primary-color)) 40%, transparent 60%);
  margin-left: 4px;
}

.legal-footer__links a[target="_blank"]:hover {
  background: color-mix(in srgb, var(--theme-primary, var(--primary-color)) 14%, transparent 86%);
}


@media (min-width: 640px) {
  .legal-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 720px) {
  /* Pas de marge basse forcee ici : body reserve deja l'espace exact de la
     navbar (voir --mobile-nav-height plus haut) -- l'ajouter une seconde
     fois ici doublait l'espace vide au-dessus de la barre. */
  .legal-footer {
    margin-top: 24px;
  }
}

.to-top {
  position: fixed;
  right: calc(14px + var(--safe-right, env(safe-area-inset-right, 0px)));
  bottom: calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
  z-index: 30;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--secondary-color, #111827);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
}


/* Bouton "Haut" : focus clavier visible, cible tactile >= 44px, place au-dessus des barres fixes du bas. */
.to-top {
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: 0 14px;
  min-width: 48px;
  min-height: 48px;
}
.to-top:focus-visible {
  outline: 3px solid var(--theme-primary, var(--primary-color, #0ea5e9));
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* Aucun survol ne deforme, ne deplace ni ne reste bloque : pas de translation/zoom au survol sur ecran tactile. */
@media (hover: none) {
  .rsv-type-card:hover,
  .blog-post-card:hover,
  .fid-stat:hover { transform: none !important; }
}

/* Etat public (erreur, service suspendu) : meme famille visuelle que le reste du produit, sans image. */
body.pub-body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #faf7f2;
  color: #1c1917;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.pub-state { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.pub-state__card {
  width: min(520px, 100%);
  padding: 36px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(28, 25, 23, .08);
  border-radius: 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
}
.pub-state__code { margin: 0 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #78716c; }
.pub-state__title { margin: 0 0 10px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.pub-state__text { margin: 0 auto 24px; max-width: 38ch; font-size: .98rem; line-height: 1.6; color: #57534e; }
.pub-state__lang { display: flex; justify-content: center; margin-bottom: 18px; }
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--primary-color, #1f2937); color: var(--theme-text-on-primary, #fff);
  font-weight: 700; font-size: .95rem; text-decoration: none;
}
.pub-btn:hover { filter: brightness(.94); }
.pub-btn:focus-visible { outline: 3px solid var(--primary-color, #1f2937); outline-offset: 3px; }

/* Fond commun des pages de contenu (blog, informations) : meme creme que le pied de page, sans degrade bleu. */
body.pub-page { background: #faf7f2 !important; }

/* Mouvement reduit : aucun defilement anime (public.css force scroll-behavior: smooth sur html). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
