/* Correctifs responsive globaux - charge apres les styles propres aux pages. */

:root {
  --ips-navy: #0a1a2f;
  --ips-muted: #94a3b8;
  --ips-muted-strong: #cbd5e1;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
}

header {
  background: var(--ips-navy) !important;
  color: #fff !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  padding: 16px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

header .header-container,
header .site-nav,
header .nav,
header > div[style] {
  width: min(100%, 1200px) !important;
  margin: 0 auto !important;
  padding: 0 18px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px 20px !important;
  position: relative !important;
  text-align: initial !important;
}

header .logo,
header .site-nav .logo,
header > div[style] > a:first-child {
  justify-self: start !important;
  min-width: 0 !important;
  color: #fff !important;
  text-decoration: none !important;
}

header .logo,
header .logo a,
header .site-nav .logo a,
header > div[style] > a:first-child {
  color: #fff !important;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem) !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

header nav,
header .menu {
  position: static !important;
  left: auto !important;
  transform: none !important;
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px 24px !important;
  min-width: 0 !important;
}

header nav a,
header .menu a {
  color: #fff !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  text-decoration: none !important;
  font-size: clamp(0.95rem, 1.55vw, 1.15rem) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

header .icons,
header .header-actions,
header .site-nav > .cart-link {
  justify-self: end !important;
  margin-left: 0 !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

header .cart-link,
header .header-actions a {
  background: transparent !important;
  color: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  font-size: clamp(0.95rem, 1.55vw, 1.15rem) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

header a:hover,
header a:focus {
  color: #fff !important;
}

section.social {
  margin-bottom: 0 !important;
}

section.social + footer {
  margin-top: 0 !important;
}

footer {
  background: var(--ips-navy) !important;
  color: var(--ips-muted) !important;
  padding: 40px 20px 20px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  text-align: left !important;
  font-size: 0.85rem !important;
  border-radius: 0 !important;
  /* Ensure the following lines exist, but do not duplicate */
  /* margin-top: 0 !important; */
  /* border-radius: 0 !important; */
}

footer .footer-container,
footer > div[style] {
  width: min(100%, 1200px) !important;
  margin: 0 auto 30px !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
  text-align: left !important;
}

footer .footer-links,
footer .footer-container > div:first-child,
footer > div[style] > div:first-child {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0 !important;
  text-align: left !important;
  color: var(--ips-muted) !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

footer a,
footer .footer-links a,
footer > div[style] a {
  color: var(--ips-muted) !important;
  text-decoration: none !important;
  margin: 0 15px 8px 0 !important;
  display: inline-block !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

footer a:hover,
footer a:focus {
  color: var(--ips-muted-strong) !important;
}

footer .payment-icons {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
}

footer .payment-icons img {
  width: auto !important;
  height: 24px !important;
  display: block !important;
}

footer .copyright,
footer > div[style] > div:last-child {
  width: min(100%, 1200px) !important;
  margin: 0 auto !important;
  padding-top: 24px !important;
  border-top: 1px solid whitesmoke !important;
  color: #64748b !important;
  text-align: center !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

.container,
.wrap,
.cart-section,
.account-section {
  width: min(100%, 1200px);
}

.container,
.cart-section,
.account-section {
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.card,
.account-card,
aside.product-card,
.empty-cart,
.cart-item {
  max-width: 100%;
}

@media (max-width: 920px) {
  header .header-container,
  header .site-nav,
  header .nav,
  header > div[style] {
    grid-template-columns: minmax(0, max-content) minmax(120px, 1fr) minmax(0, max-content) !important;
    gap: 8px 12px !important;
    padding: 0 12px !important;
  }

  header .logo,
  header .logo a,
  header .site-nav .logo a,
  header > div[style] > a:first-child {
    font-size: clamp(1.05rem, 4vw, 1.45rem) !important;
  }

  header nav,
  header .menu {
    display: grid !important;
    grid-template-columns: repeat(2, max-content) !important;
    justify-content: center !important;
    align-content: center !important;
    gap: 2px 18px !important;
  }

  header nav a,
  header .menu a,
  header .cart-link,
  header .header-actions a {
    font-size: clamp(0.95rem, 3.4vw, 1.15rem) !important;
  }

  header nav a:nth-child(3),
  header .menu a:nth-child(3) {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
  }

  footer .footer-container,
  footer > div[style] {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  footer .footer-links,
  footer .footer-container > div:first-child,
  footer > div[style] > div:first-child {
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (max-width: 640px) {
  header {
    padding: 16px 0 !important;
  }

  header .header-container,
  header .site-nav,
  header .nav,
  header>div[style] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    text-align: center !important;
  }

  header nav,
  header .menu {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px 18px !important;
  }

  header .cart-link,
  header .header-actions a {
    margin-left: 0 !important;
  }

  footer {
    padding: 36px 18px 26px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    text-align: center !important;
  }

  footer .footer-container,
  footer > div[style] {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 18px !important;
    margin-bottom: 24px !important;
  }

  footer .footer-links,
  footer .footer-container > div:first-child,
  footer > div[style] > div:first-child {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
    gap: 10px 14px !important;
    flex: none !important;
  }

  footer a,
  footer .footer-links a,
  footer > div[style] a {
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }

  footer .payment-icons {
    justify-content: center !important;
    flex-wrap: nowrap !important;
  }

  footer .payment-icons img {
    height: 24px !important;
  }
}

@media (max-width: 420px) {
  header .logo,
  header .logo a,
  header .site-nav .logo a,
  header > div[style] > a:first-child {
    font-size: 1rem !important;
  }

  header nav a,
  header .menu a,
  header .cart-link,
  header .header-actions a {
    font-size: 0.92rem !important;
  }

  header nav,
  header .menu {
    gap: 1px 14px !important;
  }
}
