/* ========================================
   C-F-04 — Sticky Menu
   Mobile-first — BEM
   Couleurs via inline CSS vars (--sm-bg, --sm-border)
   et ACF Options (cta bg/color sur chaque bouton)
======================================== */

/* ── Block ─────────────────────────────────────────────────────────────── */

.cf-04-sticky-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;

  /* Masqué sous l'écran par défaut */
  transform: translateY(calc(100% + 2px));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;

  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 11px;

  background-color: var(--sm-bg, var(--sticky-bg, #F6F2E8));
  border: 1.5px solid var(--sm-border, var(--sticky-border, #2E3617));
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

/* ── Visible (ajouté par JS) ────────────────────────────────────────────── */

.cf-04-sticky-menu--visible {
  transform: translateY(0);
}

/* ── CTA ─────────────────────────────────────────────────────────────── */

.cf-04-sticky-menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  flex: 1 1 auto;
  min-width: 120px;
  height: 56px;
  padding: 0 14px;

  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;

  font-family: var(--font-secondary, 'DM Sans', sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;

  transition: opacity 0.2s ease;
}

.cf-04-sticky-menu__cta:hover {
  opacity: 0.85;
}

.cf-04-sticky-menu__cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ── Picto ───────────────────────────────────────────────────────────── */

.cf-04-sticky-menu__picto {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  /* Si picto sombre sur fond coloré, passer en blanc */
  filter: brightness(0) invert(1);
}

/* ── Label ───────────────────────────────────────────────────────────── */

.cf-04-sticky-menu__label {
  /* Hérite color inline du lien parent */
}

/* ── Desktop ≥ 1024px ── Bloc vertical en bas à droite ─────────────── */

@media (min-width: 1024px) {

  .cf-04-sticky-menu {
    left: auto;
    right: 20px;
    bottom: 20px;

    /* Masqué hors écran à droite par défaut */
    transform: translateX(calc(100% + 24px));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

    flex-direction: column;
    gap: 15px;
    width: 156px;
    padding: 10px 7px;
    max-width: none;
  }

  .cf-04-sticky-menu--visible {
    transform: translateX(0);
  }

  .cf-04-sticky-menu__cta {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 0 10px;
  }
}
