/* CAPDECO Fast header */

.cd-promo {
  min-height: 34px;
  padding: 8px 16px;
  background: var(--cd-promo);
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 18px;
}

.cd-header {
  position: relative;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--cd-border);
}

.cd-header__inner {
  height: 66px;
  max-width: var(--cd-max);
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 24px;
}

.cd-logo {
  display: inline-flex;
  align-items: center;
  width: 154px;
}

.cd-logo img {
  width: 154px;
  height: auto;
}

.cd-burger {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.cd-burger span {
  width: 21px;
  height: 1px;
  background: #111;
}

.cd-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cd-menu__item {
  position: static;
}

.cd-menu__link {
  display: flex;
  align-items: center;
  height: 66px;
  font-size: 15px;
  white-space: nowrap;
  color: #333;
}

.cd-menu__link:hover,
.cd-menu__item:focus-within > .cd-menu__link {
  color: #000;
}

.cd-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--cd-border);
  box-shadow: 0 18px 30px rgba(0,0,0,.07);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  pointer-events: none;
}

.cd-menu__item--mega:hover > .cd-mega,
.cd-menu__item--mega:focus-within > .cd-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.cd-mega__cols {
  max-width: 1160px;
  margin: 0 auto;
  padding: 42px 30px 48px;
  display: grid;
  grid-template-columns: 1fr 280px 280px;
  gap: 42px;
}

.cd-mega__cols--sets {
  grid-template-columns: 1.2fr .9fr 280px 280px;
}

.cd-mega__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.cd-mega__title {
  margin: 0 0 6px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.cd-mega__col a {
  font-size: 15px;
  color: #333;
}

.cd-mega__col a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cd-mega__visual {
  display: block;
  overflow: hidden;
  background: #f6f4f1;
}

.cd-mega__visual img {
  width: 100%;
  aspect-ratio: 13/9;
  object-fit: cover;
  transition: transform .25s ease;
}

.cd-mega__visual:hover img {
  transform: scale(1.025);
}

.cd-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cd-lang {
  font-size: 13px;
  letter-spacing: .04em;
  color: #333;
}

.cd-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cd-icon svg {
  width: 23px;
  height: 23px;
  fill: #111;
}

.cd-cart__count {
  position: absolute;
  right: -9px;
  top: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c71924;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.cd-search {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  background: #fff;
  border-top: 1px solid var(--cd-border);
  border-bottom: 1px solid var(--cd-border);
  padding: 18px 30px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cd-search[hidden] {
  display: none;
}

.cd-search input {
  width: min(640px, 78vw);
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d8d3cd;
  border-radius: 0;
}

.cd-search button {
  height: 44px;
  padding: 0 22px;
  background: #111;
  color: #fff;
}

@media (max-width: 1180px) {
  .cd-header__inner {
    grid-template-columns: 160px 1fr auto;
    gap: 18px;
    padding: 0 20px;
  }

  .cd-menu {
    gap: 24px;
  }

  .cd-menu__link {
    font-size: 14px;
  }

  .cd-mega__cols,
  .cd-mega__cols--sets {
    grid-template-columns: 1fr 240px 240px;
    gap: 28px;
  }

  .cd-mega__cols--sets .cd-mega__col:nth-child(2) {
    display: none;
  }
}

@media (max-width: 900px) {
  .cd-promo {
    font-size: 12px;
  }

  .cd-header__inner {
    height: 60px;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
  }

  .cd-burger {
    display: inline-flex;
    order: 1;
  }

  .cd-logo {
    order: 2;
    width: 138px;
  }

  .cd-logo img {
    width: 138px;
  }

  .cd-actions {
    order: 3;
    gap: 12px;
  }

  .cd-lang {
    display: none;
  }

  .cd-icon {
    width: 22px;
    height: 22px;
  }

  .cd-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--cd-border);
    box-shadow: 0 18px 25px rgba(0,0,0,.08);
    display: none;
  }

  .cd-header.is-open .cd-nav {
    display: block;
  }

  .cd-menu {
    display: block;
    padding: 8px 0;
  }

  .cd-menu__link {
    height: 52px;
    padding: 0 22px;
    justify-content: space-between;
    border-bottom: 1px solid #f0ede8;
  }

  .cd-menu__item--mega > .cd-menu__link::after {
    content: "+";
    font-size: 18px;
    color: #777;
  }

  .cd-menu__item--mega.is-open > .cd-menu__link::after {
    content: "−";
  }

  .cd-mega {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: 0;
    pointer-events: auto;
  }

  .cd-menu__item--mega:hover > .cd-mega,
  .cd-menu__item--mega:focus-within > .cd-mega {
    display: none;
  }

  .cd-menu__item--mega.is-open > .cd-mega {
    display: block;
  }

  .cd-mega__cols,
  .cd-mega__cols--sets {
    display: block;
    padding: 8px 22px 22px;
  }

  .cd-mega__col {
    gap: 10px;
    margin-bottom: 18px;
  }

  .cd-mega__title {
    font-size: 11px;
  }

  .cd-mega__col a {
    font-size: 14px;
    padding: 3px 0;
  }

  .cd-mega__visual {
    display: none;
  }

  .cd-search {
    padding: 14px 16px;
  }

  .cd-search input {
    width: 100%;
    height: 42px;
  }

  .cd-search button {
    height: 42px;
    padding: 0 16px;
  }
}

@media (max-width: 520px) {
  .cd-actions .cd-icon:nth-of-type(2) {
    display: none;
  }
}

/* CAPDECO Fast - transparent homepage header */
.page-index #header {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 120;
  background: transparent;
}

.page-index .cd-promo {
  background: rgba(17,17,17,.72);
  backdrop-filter: blur(8px);
}

.page-index .cd-header {
  background: transparent;
  border-bottom-color: transparent;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.page-index .cd-header:hover,
.page-index .cd-header:focus-within,
.page-index .cd-header.is-open {
  background: #fff;
  border-bottom-color: var(--cd-border);
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}

.page-index .cd-mega {
  border-top: 1px solid var(--cd-border);
}

.page-index .cd-search {
  background: #fff;
}

/* Décale le hero sous le header transparent */
.page-index .cd-hero {
  padding-top: 0;
}

/* Lisibilité du menu sur image claire/sombre */
.page-index .cd-header:not(:hover):not(:focus-within):not(.is-open) .cd-menu__link,
.page-index .cd-header:not(:hover):not(:focus-within):not(.is-open) .cd-lang {
  color: #111;
}

.page-index .cd-header:not(:hover):not(:focus-within):not(.is-open) .cd-icon svg {
  fill: #111;
}

/* Mobile : header blanc pour éviter les problèmes de lecture */
@media (max-width: 900px) {
  .page-index #header {
    position: relative;
  }

  .page-index .cd-header {
    background: #fff;
    border-bottom-color: var(--cd-border);
  }

  .page-index .cd-promo {
    background: var(--cd-promo);
    backdrop-filter: none;
  }
}
