/* =====================================================================
   LOOP & SHOP — En-tete, navigation, pied de page
   ===================================================================== */

/* ============================== TOPBAR ============================== */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.82);
  font-size: .81rem;
  position: relative;
  z-index: 60;
}
.topbar--gold { background: var(--brand); color: var(--ink); font-weight: 600; }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 40px;
}
.topbar__ticker { flex: 1; overflow: hidden; }
.topbar__msg {
  display: none;
  align-items: center;
  gap: 8px;
  animation: fadeUp .5s;
}
.topbar__msg.is-active { display: inline-flex; }
.topbar__msg svg { color: var(--brand); }
.topbar--gold .topbar__msg svg { color: var(--ink); }
.topbar__links { display: flex; align-items: center; gap: 20px; }
.topbar__links a { opacity: .85; }
.topbar__links a:hover { opacity: 1; color: var(--brand); }
.topbar--gold .topbar__links a:hover { color: var(--ink); text-decoration: underline; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* ============================== HEADER ============================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t), transform var(--t);
}
.header.is-stuck { box-shadow: 0 4px 24px rgba(11,27,58,.08); }
.header.is-hidden { transform: translateY(-100%); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { height: 46px; width: auto; }
.logo__text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -.03em;
  color: var(--ink);
  white-space: nowrap;
}
.logo__text b { color: var(--brand-700); }

/* Navigation principale */
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav__item { position: relative; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: .93rem;
  font-weight: 700;
  color: var(--ink);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.nav__link:hover, .nav__item:hover > .nav__link { background: var(--surface-2); color: var(--ink); }
.nav__link.is-active { color: var(--brand-700); }
.nav__link .chev { transition: transform var(--t-fast); }
.nav__item:hover .chev { transform: rotate(180deg); }
.nav__badge {
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Sous-menu simple */
.nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 232px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  z-index: 60;
}
.nav__item:hover > .nav__dropdown { opacity: 1; visibility: visible; transform: none; }
.nav__dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--r-xs);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__dropdown a:hover { background: var(--brand-soft); color: var(--ink); }

/* Mega menu */
.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(1080px, calc(100vw - 48px));
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), transform var(--t), visibility var(--t);
  z-index: 60;
}
.nav__item:hover > .mega { opacity: 1; visibility: visible; transform: translateX(-50%); }
.mega__grid { display: grid; grid-template-columns: repeat(4, 1fr) 260px; gap: 28px; }
.mega__col-title {
  font-family: var(--font-heading);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-700);
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.mega__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.mega__list a {
  display: block;
  padding: 7px 10px;
  margin-left: -10px;
  border-radius: var(--r-xs);
  font-size: .89rem;
  font-weight: 500;
  color: var(--text-2);
}
.mega__list a:hover { background: var(--surface-2); color: var(--ink); padding-left: 14px; }
.mega__promo {
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background: var(--ink);
  color: #fff;
}
.mega__promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.mega__promo-content { position: relative; }
.mega__promo h4 { color: #fff; margin-bottom: 4px; font-size: 1.05rem; }
.mega__promo p { font-size: .82rem; opacity: .85; margin-bottom: 12px; }

/* Actions header */
.header__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); transform: translateY(-1px); }
.icon-btn__count {
  position: absolute;
  top: 5px; right: 4px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--ink);
  font-size: .66rem;
  font-weight: 800;
  border: 2px solid var(--white);
}
.icon-btn__count.is-empty { display: none; }
.icon-btn__count.is-bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.45); } }

.header__cta { margin-left: 6px; }

/* Barre de recherche header */
.header__search { flex: 1; max-width: 460px; position: relative; }
.search-form { position: relative; }
.search-form .input {
  padding-left: 46px;
  padding-right: 14px;
  background: var(--surface-2);
  border-color: transparent;
  border-radius: var(--r-pill);
  height: 48px;
}
.search-form .input:focus { background: #fff; border-color: var(--brand); }
.search-form__icon {
  position: absolute;
  left: 17px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  z-index: 70;
  display: none;
  max-height: 460px;
  overflow-y: auto;
}
.search-suggest.is-open { display: block; }
.search-suggest__label {
  padding: 12px 18px 6px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.search-suggest__item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 18px;
  transition: background var(--t-fast);
}
.search-suggest__item:hover { background: var(--surface-2); }
.search-suggest__item img {
  width: 46px; height: 46px;
  object-fit: cover;
  border-radius: var(--r-xs);
  background: var(--surface-2);
}
.search-suggest__name { font-size: .89rem; font-weight: 600; color: var(--ink); }
.search-suggest__price { font-size: .84rem; color: var(--brand-700); font-weight: 700; }
.search-suggest__more {
  display: block;
  padding: 13px;
  text-align: center;
  font-size: .86rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink);
}

/* Burger */
.burger {
  width: 44px; height: 44px;
  display: none;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--ink);
}
.burger:hover { background: var(--surface-2); }

/* ========================= MENU MOBILE ========================= */
.offcanvas {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(390px, 88vw);
  background: var(--white);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform var(--t-slow);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-lg);
}
.offcanvas.is-open { transform: none; }
.offcanvas--right { inset: 0 0 0 auto; transform: translateX(100%); width: min(430px, 92vw); }
.offcanvas--right.is-open { transform: none; }

.offcanvas__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.offcanvas__title { font-size: 1.05rem; margin: 0; }
.offcanvas__body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.offcanvas__foot { padding: 20px 22px; border-top: 1px solid var(--line); background: var(--surface-2); flex-shrink: 0; }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,27,58,.5);
  backdrop-filter: blur(3px);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
}
.backdrop.is-open { opacity: 1; visibility: visible; }

/* Accordeon menu mobile */
.mnav { list-style: none; margin: 0; padding: 0; }
.mnav > li { border-bottom: 1px solid var(--line); }
.mnav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 2px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  width: 100%;
}
.mnav__toggle svg { transition: transform var(--t-fast); }
.mnav__toggle.is-open svg { transform: rotate(180deg); }
.mnav__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 12px 14px;
  display: none;
}
.mnav__sub.is-open { display: block; }
.mnav__sub a {
  display: block;
  padding: 9px 0;
  font-size: .92rem;
  color: var(--text-2);
}
.mnav__sub a:hover { color: var(--brand-700); }

/* ========================= PANIER LATERAL ========================= */
.mini-cart__list { display: flex; flex-direction: column; gap: 16px; }
.mini-cart__item { display: flex; gap: 14px; align-items: flex-start; }
.mini-cart__img {
  width: 74px; height: 74px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  flex-shrink: 0;
}
.mini-cart__info { flex: 1; min-width: 0; }
.mini-cart__name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.mini-cart__meta { font-size: .78rem; color: var(--text-3); }
.mini-cart__price { font-size: .9rem; font-weight: 800; color: var(--brand-700); margin-top: 4px; }
.mini-cart__remove { color: var(--text-3); padding: 4px; border-radius: 6px; }
.mini-cart__remove:hover { color: var(--danger); background: var(--danger-soft); }

.cart-summary { display: flex; flex-direction: column; gap: 9px; }
.cart-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: .9rem;
  color: var(--text-2);
}
.cart-summary__row b { color: var(--ink); font-weight: 700; }
.cart-summary__row--total {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px dashed var(--line-strong);
  font-size: 1.12rem;
}
.cart-summary__row--total b { font-size: 1.28rem; color: var(--ink); font-family: var(--font-heading); }
.cart-summary__row--free { color: var(--success); font-weight: 700; }

/* Barre de progression livraison gratuite */
.free-ship {
  padding: 13px 16px;
  background: var(--brand-soft);
  border-radius: var(--r-sm);
  font-size: .84rem;
  margin-bottom: 18px;
}
.free-ship__bar {
  height: 6px;
  background: rgba(11,27,58,.1);
  border-radius: 99px;
  margin-top: 9px;
  overflow: hidden;
}
.free-ship__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-700));
  border-radius: 99px;
  transition: width var(--t-slow);
}

/* ============================== FOOTER ============================== */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  margin-top: 80px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}
.footer a { color: rgba(255,255,255,.7); }
.footer a:hover { color: var(--brand); }
.footer h4, .footer h3 { color: #fff; }

.footer__main { padding: 68px 0 48px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 48px;
}
.footer__heading {
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
  margin-bottom: 20px;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer__list a { font-size: .92rem; display: inline-flex; align-items: center; gap: 8px; }
.footer__list a:hover { transform: translateX(3px); }
.footer__logo img { height: 62px; margin-bottom: 18px; }
.footer__about { font-size: .92rem; line-height: 1.75; max-width: 44ch; }

.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  transition: all var(--t-fast);
}
.socials a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: var(--sh-gold);
}

.footer__contact-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: .92rem;
}
.footer__contact-item svg { color: var(--brand); flex-shrink: 0; margin-top: 3px; }
.footer__contact-item b { color: #fff; display: block; font-weight: 700; }

.footer__bottom {
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .84rem;
}
.footer__pay { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer__pay img {
  height: 30px;
  background: #fff;
  border-radius: 5px;
  padding: 3px 7px;
}

/* Newsletter footer */
.footer-news__form { display: flex; gap: 9px; margin-top: 16px; }
.footer-news__form .input {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.14);
  color: #fff;
  border-radius: var(--r-pill);
}
.footer-news__form .input::placeholder { color: rgba(255,255,255,.45); }
.footer-news__form .input:focus { background: rgba(255,255,255,.12); border-color: var(--brand); }

/* ====================== BOUTON WHATSAPP FLOTTANT ====================== */
.wa-float {
  position: fixed;
  bottom: 26px; right: 26px;
  z-index: 180;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wa-float__btn {
  width: 60px; height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 10px 30px rgba(37,211,102,.42);
  transition: transform var(--t), box-shadow var(--t);
  position: relative;
}
.wa-float__btn:hover { transform: scale(1.08); color: #fff; }
.wa-float__btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--whatsapp);
  opacity: 0;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.45); }
}
.wa-float__label {
  background: var(--white);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--sh);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--t);
  pointer-events: none;
}
.wa-float:hover .wa-float__label { opacity: 1; transform: none; }

/* Retour en haut */
.to-top {
  position: fixed;
  bottom: 26px; left: 26px;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--sh);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--t);
  z-index: 170;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand); color: var(--ink); }

/* ====================== BARRE MOBILE INFERIEURE ====================== */
.mobile-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  display: none;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar__inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.mobile-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 8px;
  font-size: .66rem;
  font-weight: 600;
  color: var(--text-3);
  position: relative;
}
.mobile-bar__item.is-active { color: var(--brand-700); }
.mobile-bar__item .icon-btn__count { top: 2px; right: 50%; margin-right: -22px; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1200px) {
  .mega__grid { grid-template-columns: repeat(3, 1fr) 240px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1.3fr; }
  .footer__grid > :nth-child(3) { display: none; }
}

@media (max-width: 991px) {
  .nav, .header__cta, .header__search { display: none; }
  .burger { display: grid; }
  .header__inner { gap: 14px; }
  .logo img { height: 38px; }
  .logo__text { font-size: 1.1rem; }
  .footer { margin-top: 48px; }
  .footer__main { padding: 48px 0 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer__grid > :nth-child(3) { display: block; }
  .mobile-bar { display: block; }
  body { padding-bottom: 62px; }
  .wa-float { bottom: 74px; right: 16px; }
  .wa-float__btn { width: 52px; height: 52px; }
  .wa-float__label { display: none; }
  /* Remonte le bouton WhatsApp quand la barre d'achat est affichee */
  body:has(.sticky-buy.is-visible) .wa-float { bottom: 142px; }
  .to-top { bottom: 74px; left: 16px; width: 42px; height: 42px; }
}

@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .topbar__links { display: none; }
  .topbar__inner { justify-content: center; }
}
