/* ═══════════════════════════════════════════════════════════════════════════
   Widget lead Myli — habillage Bohēbon (feuille autonome)

   1. Masque la barre de CTA du widget (en haut sur desktop, en bas sur mobile)
      et la vignette d'avis Google en bas à droite.
   2. Rend l'espace que le widget réserve à sa barre.
   3. Habille le panneau (« Sur place », « À emporter », « Livraison ») aux
      couleurs et typographies Bohēbon.
   4. Classe `bhb-lead-plain` : un déclencheur qui ouvre le panneau sans
      prendre le style de bouton du widget.

   Peut être chargée avant ou après le widget : celui-ci injecte sa propre
   feuille au dernier moment, d'où les `!important` et le préfixe `html` /
   `html body` sur chaque règle, qui l'emportent quel que soit l'ordre.

   ⚠️ La barre étant masquée, le panneau ne peut plus être fermé par le widget
   lui-même : ajouter aussi `bohebon-lead-widget.js` (voir LISEZ-MOI.md).

   Polices attendues sur la page : « Bricolage Grotesque » (texte, boutons) et
   « Londrina Solid » (noms de restaurants).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Réglages ────────────────────────────────────────────────────────────── */

:root {
  /* Distance entre le haut de l'écran et le panneau : à ajuster à la hauteur
     du header du site (+ ~30px d'air). */
  --bhb-lead-top: 120px;
  --bhb-lead-top-mobile: 80px;

  --bhb-lead-vert: #239f71; /* VERT_1 */
  --bhb-lead-rose: #ff78a0; /* ROSE_1 */
  --bhb-lead-rose-dark: #d64b75; /* ROSE_dark */
  --bhb-lead-white: #fff5eb; /* WHITE (crème) */
  --bhb-lead-black: #0b1713; /* BLACK */
  --bhb-lead-font-body: "Bricolage Grotesque", sans-serif;
  --bhb-lead-font-title: "Londrina Solid", sans-serif;
}

/* ── 1. Barre de CTA et vignette d'avis masquées ─────────────────────────── */

html body #m8-ctas,
html body #m8-widgetTiles {
  display: none !important;
}

/* ── 2. Espace réservé à la barre rendu à la page ────────────────────────────
   Le widget ajoute `padding-top: 69px` au body sur desktop et
   `margin-bottom: 150px` sur mobile pour laisser la place à sa barre. */

html body.m8ctas {
  padding-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ── 3. Panneau ──────────────────────────────────────────────────────────── */

/* Fond : un voile sombre plutôt que le blanc à 90 % du widget. */
html #m8-ctas-container {
  background-color: rgb(11 23 19 / 55%) !important;
  color: var(--bhb-lead-black);
  font-family: var(--bhb-lead-font-body) !important;
}

/* Sauf les icônes Font Awesome (chevrons `<i class="fa …">`) : elles
   s'afficheraient en carré vide sans leur police. */
html body #m8-ctas-container *:not(.fa, .fas, .far, .fab) {
  font-family: var(--bhb-lead-font-body) !important;
}

/* Les cartes (une par mode, toujours présentes dans la page). */
html #m8-ctas-container > div > div {
  background-color: var(--bhb-lead-white) !important;
  border-radius: 15px !important;
  padding: 32px !important;
  box-shadow: 0 12px 40px rgb(11 23 19 / 25%) !important;
}

/* La carte ouverte, décalée sous le header. Uniquement `.m8-paneopen` : le
   widget masque les deux autres en les faisant glisser hors écran via `top`. */
html #m8-ctas-container > div > div.m8-paneopen {
  top: var(--bhb-lead-top) !important;
  max-height: calc(100dvh - var(--bhb-lead-top) - 40px);
  overflow-y: auto;
}

@media (max-width: 760px) {
  html #m8-ctas-container > div > div {
    padding: 24px 20px !important;
  }

  html #m8-ctas-container > div > div.m8-paneopen {
    top: var(--bhb-lead-top-mobile) !important;
    max-height: calc(100dvh - var(--bhb-lead-top-mobile) - 16px);
  }
}

/* Bouton « Me géolocaliser » et autres boutons : pilule ROSE_1, libellé
   crème en capitales (style MENU). */
html #m8-ctas-container button {
  height: 48px !important;
  padding-inline: 32px !important;
  border: none !important;
  border-radius: 100px !important;
  background-color: var(--bhb-lead-rose) !important;
  color: var(--bhb-lead-white) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

html #m8-ctas-container button:hover {
  background-color: var(--bhb-lead-rose-dark) !important;
}

html #m8-ctas-container button span {
  color: inherit !important;
  font: inherit !important;
  letter-spacing: inherit;
}

/* « ou » entre les deux modes de recherche. */
html #m8-ctas-container .m8-alternative {
  margin-block: 12px !important;
  color: var(--bhb-lead-black) !important;
  font-size: 14px !important;
  font-weight: 300;
}

/* Champ d'adresse : blanc, 48px, bordure grise, coins 15px. */
html #m8-ctas-container .m8-search-input input {
  height: 48px !important;
  padding: 0 44px 0 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 15px !important;
  background-color: #fff !important;
  color: var(--bhb-lead-black) !important;
  font-size: 16px !important;
  font-weight: 300 !important;
  transition: border-color 0.2s ease;
}

html #m8-ctas-container .m8-search-input input:focus {
  border-color: var(--bhb-lead-vert) !important;
  outline: none;
}

html #m8-ctas-container .m8-address-tip {
  margin-top: 8px;
  color: var(--bhb-lead-black) !important;
  font-size: 13px !important;
  font-weight: 300;
  opacity: 0.7;
}

html #m8-ctas-container .m8-geoerror,
html #m8-ctas-container .m8-badaddress {
  color: var(--bhb-lead-rose-dark) !important;
  font-size: 14px !important;
}

/* Indicateur de chargement en VERT_1. */
html #m8-ctas-container .loader {
  border-color: rgb(35 159 113 / 20%) !important;
  border-top-color: var(--bhb-lead-vert) !important;
}

/* ── Résultats ───────────────────────────────────────────────────────────── */

/* Le widget réserve 110px sous la liste pour sa barre, masquée ici. */
html #m8-ctas-container .m8-results {
  padding-bottom: 0 !important;
}

html #m8-ctas-container .m8-spots > ul > li {
  padding-block: 16px !important;
  border-bottom: 1px solid rgb(11 23 19 / 10%) !important;
}

html #m8-ctas-container .m8-spots ul > li:last-child {
  border-bottom: none !important;
}

/* Nom du restaurant sans la puce « • » : le widget l'écrit en dur dans le
   texte, d'où ce décalage vers la gauche de la largeur de « • » (0,58em en
   Bricolage Grotesque), rogné par `overflow: hidden`. */
html #m8-ctas-container .m8-spots > ul > li > div:first-child {
  overflow: hidden;
  font-size: 19px !important;
  text-indent: -0.58em;
}

/* Boutons et lignes « - Click&Collect… » alignés sur le reste du texte
   (le widget les décale de 22px). */
html #m8-ctas-container .m8-spots .m8-takeways {
  margin-inline: 0 !important;
}

/* Intitulés (Horaires, Adresse, Commande à emporter) : Londrina Solid,
   capitales, VERT_1. */
html #m8-ctas-container .m8-spots span.m8-infotitle {
  color: var(--bhb-lead-vert) !important;
  font-family: var(--bhb-lead-font-title) !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  text-transform: uppercase;
}

html #m8-ctas-container .m8-address,
html #m8-ctas-container .m8-spots span.m8-infotip {
  color: var(--bhb-lead-black) !important;
  font-size: 14px !important;
  font-weight: 300 !important;
}

html #m8-ctas-container .m8-spots > ul > li .m8-hour-open {
  color: var(--bhb-lead-vert) !important;
}

html #m8-ctas-container .m8-spots > ul > li .m8-hour-closed {
  color: var(--bhb-lead-rose-dark) !important;
}

/* Horaires dépliés : alignés sur le texte, colonne des jours à largeur fixe
   (le widget la met à 40 % et décale la liste de 21px). */
html #m8-ctas-container .m8-spots > ul > li .m8-hours {
  margin: 8px 0 12px !important;
  padding-left: 0 !important;
}

html #m8-ctas-container .m8-spots > ul > li .m8-hours > li {
  padding-block: 2px !important;
}

html #m8-ctas-container .m8-spots > ul > li .m8-hours > li span {
  width: 110px !important;
}

/* Boutons « Commander » de chaque résultat. */
html #m8-ctas-container .m8-spots a.m8-button,
html #m8-ctas-container .m8-spots > ul > li .m8-button-advanced {
  border: none !important;
  border-radius: 100px !important;
  background-color: var(--bhb-lead-rose) !important;
  color: var(--bhb-lead-white) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
}

html #m8-ctas-container .m8-spots a.m8-button:hover,
html #m8-ctas-container .m8-spots a.m8-button.active,
html #m8-ctas-container .m8-spots > ul > li .m8-button-advanced:hover {
  background-color: var(--bhb-lead-rose-dark) !important;
}

/* « Calculez l'itinéraire » : logos Google Maps / Plans / Waze en ligne à
   droite du libellé (le reset du site les passe en bloc, empilés). */
html #m8-ctas-container .m8-spots > ul > li .m8-button-advanced {
  box-sizing: border-box;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px !important;
}

html #m8-ctas-container .m8-spots > ul > li .m8-button-advanced > div:first-child > div:first-child div {
  display: inline-flex !important;
  gap: 4px;
  margin-left: 8px !important;
  vertical-align: middle;
}

html #m8-ctas-container .m8-spots > ul > li .m8-button-advanced img {
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
}

/* Liens secondaires d'un résultat (itinéraire, téléphone) en VERT_1. */
html
  #m8-ctas-container
  .m8-spots
  > ul
  > li
  a:not(.m8-button, .m8-button-advanced, .m8platform) {
  color: var(--bhb-lead-vert) !important;
}

/* ── 4. Déclencheurs sans style ──────────────────────────────────────────────
   La feuille du widget habille tout élément portant `onspot`, `takeaway`,
   `delivery`, `clickcollect` ou `contact` en pilule verte animée, où qu'il
   soit dans la page. Ajouter `bhb-lead-plain` à côté de la classe pour garder
   le clic sans cet habillage : l'élément garde alors l'apparence que lui donne
   le site.

   Les valeurs sont neutres (et non `revert` / `revert-layer`) pour donner le
   même résultat sur n'importe quel site. Le widget force la graisse et, au
   survol, la couleur en `!important` : par défaut elles sont héritées du
   parent, `--bhb-lead-plain-weight` et `--bhb-lead-plain-hover-color` les
   règlent sur l'élément si besoin. */

html body .bhb-lead-plain:is(.onspot, .takeaway, .delivery, .clickcollect, .contact),
html body .bhb-lead-plain:is(.onspot, .takeaway, .delivery, .clickcollect, .contact):hover {
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-weight: var(--bhb-lead-plain-weight, inherit) !important;
  text-transform: none !important;
  transition: none !important;
  animation: none !important;
  cursor: pointer;
}

html body .bhb-lead-plain:is(.onspot, .takeaway, .delivery, .clickcollect, .contact):hover {
  color: var(--bhb-lead-plain-hover-color, inherit) !important;
  fill: currentColor !important;
}

/* ── 5. Boutons Elementor portant les classes du widget (automatique) ────────
   Même effet que `bhb-lead-plain`, sans classe à ajouter : sur tout élément
   Elementor qui porte `onspot`, `takeaway`, `delivery`, `clickcollect` ou
   `contact`, on annule l'habillage de widget2.css (fond vague verte, pilule,
   ombre, police « CODE ») pour garder le style réglé dans Elementor.
   Spécificité volontairement plus faible que celle des réglages Elementor
   d'un élément : ceux-ci gagnent. */

html body .elementor-element:is(.onspot, .takeaway, .delivery, .clickcollect, .contact) {
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  font-weight: inherit !important;
  text-transform: inherit;
  -webkit-animation: none;
  animation: none;
  -webkit-transition: none;
  transition: none;
}
