/* ==========================================================================
   Header + footer (from the reference design)
   Loaded AFTER styles.css. Only header / footer / sticky-cart rules live here;
   variables are scoped to these blocks so the rest of the page is untouched.
   ========================================================================== */
.topbar, .header, .mobile-nav, .footer, .cartbar {
  --blue-900: #0a2470; --blue-700: #1240b8; --blue-600: #1a52d6; --blue-100: #e6edfc; --blue-50: #f3f6fd;
  --accent: #ffb000; --accent-hover: #ffc233;
  --ink: #101828; --ink-soft: #475467; --line: #e4e7ec; --bg-alt: #f6f7f9;
  --radius-sm: 8px; --gutter: 16px; --header-h: 64px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}
.topbar .container, .header .container, .footer .container { max-width: 1240px; padding-inline: var(--gutter); }
/* Topbar + header use the same width and side padding as the page sections (.container in styles.css) */
.topbar .container, .header .container { max-width: 1320px; padding-inline: 20px; }
@media (max-width: 1199px){ .topbar .container, .header .container { padding-inline: 24px; } }
@media (max-width: 767px){ .topbar .container, .header .container { padding-inline: 16px; } }
@media (max-width: 359px){ .topbar .container, .header .container { padding-inline: 12px; } }
.header a, .footer a, .topbar a, .mobile-nav a, .cartbar a { text-decoration: none; }
.header ul, .footer ul, .header address, .footer address { margin: 0; padding: 0; list-style: none; }
.header p, .footer p, .topbar p, .footer h3 { margin: 0; }
.header svg, .footer svg, .topbar svg, .cartbar svg, .mobile-nav svg { display: block; max-width: 100%; }
.header .icon, .footer .icon, .topbar .icon, .cartbar .icon, .mobile-nav .icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 2000; background: var(--ink, #101828); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.header :focus-visible, .footer :focus-visible, .mobile-nav :focus-visible, .cartbar :focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; border-radius: 4px; }
.footer :focus-visible { outline-color: #fff; }
.header .input, .mobile-nav .input {
  width: 100%; min-height: 48px; padding: 0 14px; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #c9ced6; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
.header .input:hover, .mobile-nav .input:hover { border-color: var(--blue-600); }
.header .input:focus, .mobile-nav .input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(26,82,214,.25); }
.header .input::placeholder, .mobile-nav .input::placeholder { color: #667085; }
.cartbar .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px;
  font: inherit; font-weight: 700; font-size: .9375rem; border: 2px solid transparent; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--ink); cursor: pointer;
}
.cartbar .btn:hover { background: var(--accent-hover); }
.cartbar .btn .icon { width: 20px; height: 20px; }

/* 4. Barre promo & en-tête ------------------------------------------------ */
.topbar { background: var(--blue-900); color: #fff; font-size: .875rem; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar__promo { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.topbar__promo .icon { width: 18px; height: 18px; color: var(--accent); }
.topbar__contact { display: none; gap: 20px; }
.topbar__contact a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.topbar__contact .icon { width: 16px; height: 16px; }

.header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--blue-700); text-decoration: none !important; flex: none; }

.logo__img { height: 52px; width: auto; aspect-ratio: 1 / 1; flex: none; }
.footer__logo .logo__img { height: 64px; background: #fff; border-radius: 14px; padding: 4px; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-weight: 900; font-style: italic; font-size: 1.375rem; letter-spacing: -.02em; text-transform: uppercase; color: var(--blue-700); }
.logo__name small { font-size: .65em; color: #6b7a99; font-weight: 800; }
.logo__tag { font-size: .6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-top: 4px; }

.nav { display: none; }
.nav__list { display: flex; gap: 4px; }
.nav__list a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.nav__list a:hover, .nav__list a[aria-current="page"] { background: var(--blue-50); color: var(--blue-700); }

.header__search { display: none; position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.header__search .input { padding-left: 42px; min-height: 44px; background: var(--bg-alt); border-color: transparent; }
.header__search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-soft); pointer-events: none; }

.header__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-width: 44px; min-height: 44px; justify-content: center; padding: 0 10px;
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9375rem; color: var(--ink); text-decoration: none !important;
}
.icon-btn:hover { background: var(--blue-50); color: var(--blue-700); }
.icon-btn__label { display: none; }
.badge {
  position: absolute; top: 2px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: var(--ink); font-size: .75rem; font-weight: 800;
  border-radius: 999px; display: grid; place-items: center; line-height: 1;
}
.cart-total { display: none; font-weight: 800; }

.menu-toggle { display: inline-flex; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 var(--gutter); color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); text-decoration: none; }
.mobile-nav a:hover { background: var(--blue-50); }
.mobile-search { padding: 12px var(--gutter); position: relative; }
.mobile-search .input { padding-left: 42px; }
.mobile-search .icon { position: absolute; left: calc(var(--gutter) + 12px); top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-soft); }


/* 13. Pied de page --------------------------------------------------------- */
.footer { background: #0b1220; color: #cbd2e0; padding-top: 48px; }
.footer a { color: #cbd2e0; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 32px; }
.footer__brand .logo__name { color: #fff; }
.footer__brand .logo__name small { color: #9aa7c7; }
.footer__brand .logo__tag { color: #cbd2e0; }
.footer__brand .logo { color: #fff; }
.footer__brand p { margin-top: 16px; font-size: .9375rem; max-width: 34ch; }
.footer h3 { color: #fff; font-size: .9375rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer__links { display: grid; gap: 4px; }
.footer__links a { display: inline-block; padding: 6px 0; min-height: 32px; }
.footer__contact { display: grid; gap: 12px; font-style: normal; }
.footer__contact div { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .icon { width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background-color .15s; }
.social a:hover { background: var(--blue-600); }
.social .icon { width: 20px; height: 20px; color: #fff; }
.payments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pay { height: 32px; min-width: 52px; padding: 0 10px; background: #fff; border-radius: 6px; display: grid; place-items: center; }
.pay svg { height: 20px; width: auto; }
.footer__bottom { margin-top: 40px; padding-block: 20px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 8px; font-size: .875rem; color: #9aa4b8; }

/* 14. Barre panier mobile -------------------------------------------------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16,24,40,.08);
}
.cartbar__info { line-height: 1.2; }
.cartbar__info span { font-size: .8125rem; color: var(--ink-soft); display: block; }
.cartbar__info strong { font-size: 1.125rem; font-weight: 900; }


.header__in > * { min-width: 0; }
@media (max-width: 599px){
  .header__in { gap: 4px; }
  .menu-toggle { padding: 0 6px; }
  .logo { gap: 6px; min-width: 0; }
  .logo__img { height: 40px; }
  .logo__name { font-size: 1.0625rem; }
  .logo__tag { font-size: .625rem; letter-spacing: .04em; }
  .header__actions { gap: 0; }
  .icon-btn { padding: 0 8px; }
}
@media (max-width: 359px){
  .logo__tag { display: none; }
}


@media (min-width: 600px){
  .header, .topbar, .footer, .mobile-nav, .cartbar { --gutter: 24px; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 960px){
  .topbar__contact { display: flex; }
  .menu-toggle, .mobile-nav, .mobile-nav.is-open { display: none; }
  .nav { display: block; order: 3; flex: 0 0 100%; margin-top: 12px; border-top: 1px solid var(--line); }
  .nav__list { margin-inline: -12px; }
  .header__search { display: block; max-width: none; margin-left: 0; }
  .icon-btn__label { display: inline; }
  .cart-total { display: inline; }
  .header__actions { margin-left: 0; }
  .header__in { flex-wrap: wrap; gap: 0 32px; min-height: 0; padding-top: 12px; }
  .header__search { margin-inline: 0; }
  .header__actions { order: 2; }
  
  .logo__img { height: 56px; }
  .footer__logo .logo__img { height: 64px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; }
  .cartbar { display: none; }
  body { padding-bottom: 0; }
}
@media (min-width: 1200px){
  .nav__list a { padding: 10px 14px; }
}
/* Keep the cart badge on the icon (not over the total) once the total is shown */
@media (min-width: 960px){
  .header .badge { right: auto; left: 24px; }
}
/* The sticky cart bar is shown below 960px: reserve room so it never hides content */
@media (max-width: 959px){
  body { padding-bottom: 72px; }
}
/* Footer logo/text must not overflow on very small screens */
.footer__grid > * { min-width: 0; }
.footer__links a, .footer__contact span, .footer__contact a { overflow-wrap: anywhere; }

/* WordPress menu: sub-menu dropdown (desktop) */
@media (min-width: 960px){
  .nav__list > li { position: relative; }
  .nav__list .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 60; min-width: 190px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(15,30,70,.14); }
  .nav__list li:hover > .sub-menu, .nav__list li:focus-within > .sub-menu { display: block; }
  .nav__list .sub-menu a { white-space: nowrap; }
  .nav__list .menu-item-has-children > a::after { content: "▾"; margin-left: 6px; font-size: .75em; opacity: .6; }
}
