/* Au Jardin des Thés · barre du téléphone (≤ 760 px)
   S'appuie sur les variables de site.css (--chocolat, --creme, --terre, --sans).
   Les valeurs après la virgule ne servent que si site.css n'est pas chargé.
   23/11 (Liham) : le bouton à 3 barres ouvre l'ancien menu plein écran (.menu-tel de mobile.css, js/menu-mobile.js) ;
   le volet du zip d'origine n'est plus utilisé, ses règles ont été retirées. */

.barre-mobile {
  --bm-chocolat: var(--chocolat, #4E3428);
  --bm-creme: var(--creme, #F7EEE8);
  --bm-terre: var(--terre, #A65F4E);
  --bm-texte: var(--sans, 'Archivo', system-ui, sans-serif);
  --bm-sortie: cubic-bezier(.22, 1, .36, 1);
  --bm-o2: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 2px rgba(78,52,40,.07), 0 10px 22px -8px rgba(78,52,40,.2), 0 34px 60px -28px rgba(78,52,40,.32);
  --bm-o3: 0 2px 4px rgba(46,28,20,.14), 0 20px 40px -12px rgba(46,28,20,.38), 0 60px 90px -36px rgba(46,28,20,.5);

  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 60;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--bm-texte);
  color: var(--bm-chocolat);
}

/* ---------- La pilule ---------- */
.barre-mobile__pilule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: var(--bm-o2);
  transition: background-color .3s var(--bm-sortie), box-shadow .3s var(--bm-sortie);
}
/* Menu ouvert : la pilule reste au-dessus du menu plein écran, un peu plus nette */
.barre-mobile.est-ouverte .barre-mobile__pilule {
  background: rgba(255,255,255,.9);
  box-shadow: var(--bm-o3);
}

.barre-mobile__logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px var(--bm-creme), 0 6px 12px -5px rgba(46,28,20,.4);
}
.barre-mobile__logo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.barre-mobile__carte {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--bm-chocolat);
  color: var(--bm-creme);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 16px -8px rgba(46,28,20,.6);
  transition: transform .3s var(--bm-sortie);
}
.barre-mobile__carte:active { transform: translateY(1px); }

/* ---------- Burger 3 barres -> croix ---------- */
.barre-mobile__burger {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bm-creme);
  color: var(--bm-chocolat);
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(78,52,40,.14), inset 0 -1px 0 rgba(255,255,255,.7);
  -webkit-tap-highlight-color: transparent;
}
.barre-mobile__burger span {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--bm-sortie), opacity .2s linear;
}
.barre-mobile__burger span:nth-child(1) { top: 15.5px; }
.barre-mobile__burger span:nth-child(2) { top: 21.2px; }
.barre-mobile__burger span:nth-child(3) { top: 26.9px; }
.barre-mobile__burger[aria-expanded="true"] { background: var(--bm-chocolat); color: var(--bm-creme); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 12px -6px rgba(46,28,20,.6); }
.barre-mobile__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.7px) rotate(45deg); }
.barre-mobile__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.barre-mobile__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.7px) rotate(-45deg); }

.barre-mobile :focus-visible { outline: 2px solid var(--bm-terre); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .barre-mobile * { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- Intégration au site ----------
   Au-dessus de 760 px : la barre disparaît.
   En dessous : on masque l'en-tête actuel (.entete-fond) et on laisse de la place en haut. */
@media (min-width: 761px) {
  .barre-mobile { display: none !important; }
}
@media (max-width: 760px) {
  .entete-fond { display: none !important; }
  body.avec-barre-mobile { padding-top: 76px; }
}

/* ---------- Raccord avec site.css ----------
   site.css passe tout lien survolé en chocolat (a:hover) : sans ce raccord, « Voir la carte » devenait
   chocolat sur chocolat, et au téléphone le survol reste collé après un appui. */
.barre-mobile .barre-mobile__carte:hover { color: var(--bm-creme); }

/* ---------- Menu plein écran (.menu-tel) ----------
   Liham, 23/11 : « je vois pas bien le bouton appeler, venir et insta » : fond crème comme les cases Horaires / Adresse,
   contour plus foncé. */
.menu-tel .mt-trois a {
  background: var(--creme, #F7EEE8);
  border-color: rgba(78,52,40,.3);
  box-shadow: 0 2px 8px rgba(78,52,40,.08);
}
