:root {
  --cdco-navy: #071a3a;
  --cdco-blue: #075fbd;
  --cdco-blue-dark: #064d97;
  --cdco-red: #e3132d;
  --cdco-ink: #1e2d47;
  --cdco-muted: #52627b;
  --cdco-line: #d9e3f0;
  --cdco-soft: #eef5ff;
}

body.cdco-site-shell-active {
  overflow-x: clip;
}

html:has(body.cdco-site-shell-active) {
  scroll-padding-top: 82px;
}

/* Les anciens correctifs de l'accueil reservaient artificiellement la place
 * d'un en-tete fixe. Le shell 1.8.x est sticky et reste dans le flux : cette
 * reservation creerait donc une grande bande blanche au-dessus de l'en-tete. */
html body.cdco-site-shell-active.home[class] {
  padding-top: 0 !important;
}

/* Le bandeau d'introduction de la boutique utilise un fond bleu fonce. Ces
 * couleurs appartiennent au shell afin de rester disponibles pendant la
 * recette privee, meme lorsque l'ancien module de pied de page n'est pas
 * charge. */
body.cdco-site-shell-active .cd-shop-intro,
body.cdco-site-shell-active .cd-shop-intro .cd-shop-kicker,
body.cdco-site-shell-active .cd-shop-intro h2 {
  color: #fff !important;
}

body.cdco-site-shell-active .cd-shop-intro p {
  color: #eef6ff !important;
}

body.cdco-shell-lock {
  overflow: hidden;
}

#cdco-legacy-home-script-bridge {
  display: none !important;
}

.cdco-site-shell-active #cd-global-topbar,
.cdco-site-shell-active #cd-site-footer,
.cdco-site-shell-active #cd-cookie-manage,
.cdco-site-shell-active #cd-cookie-banner {
  display: none !important;
}

.cdco-shell-header,
.cdco-shell-footer,
.cdco-cookie-dialog,
.cdco-shell-drawer {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

.cdco-shell-header *,
.cdco-shell-footer *,
.cdco-cookie-dialog *,
.cdco-shell-drawer * {
  box-sizing: border-box;
}

.cdco-shell-header .screen-reader-text,
.cdco-shell-footer .screen-reader-text {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
}

.cdco-shell-header {
  position: sticky;
  top: 0;
  z-index: 99990;
  width: 100%;
  border-bottom: 1px solid var(--cdco-line);
  background: #fff;
  color: var(--cdco-ink);
  box-shadow: 0 2px 12px rgba(7, 26, 58, 0.08);
}

.admin-bar .cdco-shell-header {
  top: 32px;
}

.cdco-shell-header__main {
  display: grid;
  grid-template-columns: 58px 180px minmax(300px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.cdco-shell-menu-button {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 48px;
  border: 1px solid #cad8e9;
  border-radius: 12px;
  background: #fff;
  color: var(--cdco-navy);
  cursor: pointer;
}

.cdco-shell-menu-button:hover,
.cdco-shell-menu-button:focus-visible {
  border-color: var(--cdco-blue);
  background: var(--cdco-soft);
  outline: 3px solid rgba(7, 95, 189, 0.16);
  outline-offset: 2px;
}

.cdco-shell-menu-button__bars {
  display: grid;
  gap: 4px;
  width: 23px;
}

.cdco-shell-menu-button__bars i {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.cdco-shell-menu-button__label {
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
}

.cdco-shell-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.cdco-shell-logo img {
  display: block;
  width: min(180px, 100%);
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.cdco-shell-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.cdco-shell-search input[type='search'] {
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  margin: 0;
  border: 2px solid var(--cdco-blue);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--cdco-ink);
  font-size: 14px;
}

.cdco-shell-search input[type='search']:focus {
  border-color: var(--cdco-navy);
  outline: 3px solid rgba(7, 95, 189, 0.16);
  outline-offset: 0;
}

.cdco-shell-search button {
  min-width: 112px;
  height: 48px;
  min-height: 48px;
  border: 2px solid var(--cdco-blue);
  border-radius: 0 8px 8px 0;
  padding: 0 16px;
  background: var(--cdco-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cdco-shell-search button:hover,
.cdco-shell-search button:focus-visible {
  border-color: var(--cdco-blue-dark);
  background: var(--cdco-blue-dark);
}

.cdco-shell-account,
.cdco-shell-cart {
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid #cad8e9;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: var(--cdco-navy);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.cdco-shell-account:hover,
.cdco-shell-cart:hover,
.cdco-shell-account:focus-visible,
.cdco-shell-cart:focus-visible {
  border-color: var(--cdco-blue);
  background: var(--cdco-soft);
  color: var(--cdco-blue-dark);
}

.cdco-shell-account svg,
.cdco-shell-cart__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cdco-shell-cart__count {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 5px;
  background: var(--cdco-red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.cdco-shell-brandbar {
  max-height: 112px;
  overflow: hidden;
  border-top: 1px solid #e2e9f3;
  background: var(--cdco-navy);
  opacity: 1;
  transform: translateY(0);
  transition: max-height .22s ease, opacity .18s ease, transform .22s ease, border-color .18s ease;
}

.cdco-shell-header--compact .cdco-shell-brandbar {
  max-height: 0;
  border-top-color: transparent;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.cdco-shell-brandbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.cdco-shell-brandbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 13px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.cdco-shell-brandbar a:hover,
.cdco-shell-brandbar a:focus-visible {
  background: var(--cdco-blue);
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.cdco-shell-drawer[hidden],
.cdco-cookie-dialog[hidden] {
  display: none !important;
}

.cdco-shell-drawer {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: grid;
  grid-template-columns: min(390px, calc(100% - 46px)) 1fr;
}

.cdco-shell-drawer__panel {
  position: relative;
  z-index: 2;
  overflow: auto;
  height: 100%;
  padding: 22px;
  background: #fff;
  color: var(--cdco-ink);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.22);
}

.cdco-shell-drawer__backdrop {
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 12, 31, 0.64);
  cursor: pointer;
}

.cdco-shell-drawer__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 22px;
}

.cdco-shell-drawer__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  appearance: none;
  border: 1px solid #b9cbe0;
  border-radius: 11px;
  padding: 0;
  background: linear-gradient(145deg, #fff, #eef5ff) !important;
  color: var(--cdco-navy) !important;
  box-shadow: 0 5px 14px rgba(7, 26, 58, .10);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.cdco-shell-drawer__close span {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.cdco-shell-drawer__close span::before,
.cdco-shell-drawer__close span::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 1px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.cdco-shell-drawer__close span::before { transform: rotate(45deg); }
.cdco-shell-drawer__close span::after { transform: rotate(-45deg); }

.cdco-shell-drawer__close:hover,
.cdco-shell-drawer__close:focus-visible {
  border-color: var(--cdco-blue-dark);
  background: var(--cdco-soft) !important;
  color: var(--cdco-blue-dark) !important;
  outline: 3px solid rgba(7, 95, 189, .20);
  outline-offset: 2px;
  transform: translateY(-1px);
}

/* Les quatre contrôles du sélecteur d'accueil gardent exactement la même base. */
body.home #finder-form .finder-grid {
  align-items: end;
}

body.home #finder-form .finder-grid label,
body.home #finder-form .finder-grid .primary-button {
  min-width: 0;
}

body.home #finder-form select,
body.home #finder-form .primary-button {
  box-sizing: border-box;
  height: 48px;
  min-height: 48px;
  margin: 0;
  line-height: 1.2;
}

body.home #finder-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%230067c9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), linear-gradient(to left, #edf5ff 0 36px, transparent 36px);
  background-position: right 11px center, 100% 0;
  background-size: 14px 14px, 100% 100%;
  background-repeat: no-repeat;
}

.cdco-brand-editorial,
.cdco-brand-finder,
[data-cdco-brand-finder] {
  scroll-margin-top: 86px;
}

.cdco-shell-drawer__primary,
.cdco-shell-drawer__brands nav {
  display: grid;
}

.cdco-shell-drawer__primary a,
.cdco-shell-drawer__brands a {
  border-bottom: 1px solid var(--cdco-line);
  padding: 12px 4px;
  color: var(--cdco-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.cdco-shell-drawer__brands {
  margin-top: 26px;
}

.cdco-shell-drawer__brands h2 {
  margin: 0 0 7px;
  color: var(--cdco-navy);
  font-size: 16px;
}

.cdco-shell-drawer__brands nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.cdco-shell-footer {
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--cdco-line);
  background: #f1f6ff;
  color: var(--cdco-ink);
}

.cdco-shell-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 25px 0;
}

.cdco-shell-benefits div {
  display: grid;
  gap: 5px;
  text-align: center;
}

.cdco-shell-benefits strong {
  color: var(--cdco-navy);
  font-size: 14px;
}

.cdco-shell-benefits span {
  color: var(--cdco-muted);
  font-size: 12px;
  line-height: 1.4;
}

.cdco-shell-footer__main {
  display: grid;
  grid-template-columns: 1.25fr 1.35fr 0.8fr 1fr;
  gap: 38px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid #d6e2f2;
  padding: 32px 0 28px;
}

.cdco-shell-footer__identity img {
  display: block;
  width: 150px;
  height: auto;
  max-height: 54px;
  object-fit: contain;
}

.cdco-shell-footer__identity p,
.cdco-shell-footer__identity address {
  margin: 12px 0 0;
  color: var(--cdco-muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.65;
}

.cdco-shell-footer a {
  color: #27415f;
  text-decoration: none;
}

.cdco-shell-footer a:hover,
.cdco-shell-footer a:focus-visible {
  color: var(--cdco-blue-dark);
  text-decoration: underline;
}

.cdco-shell-footer__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.cdco-shell-footer__column h2 {
  margin: 0 0 5px;
  color: var(--cdco-navy);
  font-size: 15px;
}

.cdco-shell-footer__column > a,
.cdco-shell-footer__brands a,
.cdco-shell-footer__cookie-button {
  font-size: 13px;
  line-height: 1.35;
}

.cdco-shell-footer__brands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 20px;
  width: 100%;
  margin-top: 4px;
}

.cdco-shell-footer__cookie-button {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #27415f;
  font-family: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.cdco-shell-footer__cookie-button:hover,
.cdco-shell-footer__cookie-button:focus-visible {
  color: var(--cdco-blue-dark);
  text-decoration: underline;
  outline: 2px solid rgba(7, 95, 189, 0.22);
  outline-offset: 3px;
}

.cdco-shell-footer__bottom {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid #d6e2f2;
  padding: 17px 0 22px;
  color: var(--cdco-muted);
  font-size: 11px;
  line-height: 1.45;
}

.cdco-cookie-dialog {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 100030;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  width: min(1080px, calc(100% - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: auto;
  border: 1px solid #bdcde2;
  border-radius: 14px;
  padding: 20px;
  background: #fff;
  color: var(--cdco-ink);
  box-shadow: 0 16px 54px rgba(3, 20, 48, 0.28);
}

.cdco-cookie-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100029;
  background: rgba(2, 12, 31, 0.5);
}

.cdco-cookie-backdrop[hidden] {
  display: none !important;
}

.cdco-cookie-dialog__copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cdco-navy);
  font-size: 18px;
}

.cdco-cookie-dialog__copy p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
}

.cdco-cookie-dialog__copy a {
  color: var(--cdco-blue-dark);
  font-size: 12px;
  font-weight: 700;
}

.cdco-cookie-dialog__actions {
  display: flex;
  gap: 8px;
}

.cdco-cookie-dialog__actions button,
#cdco-cookie-save {
  min-height: 42px;
  border: 2px solid var(--cdco-blue-dark);
  border-radius: 7px;
  padding: 7px 13px;
  background: #fff;
  color: var(--cdco-blue-dark);
  font-weight: 800;
  cursor: pointer;
}

#cdco-cookie-accept,
#cdco-cookie-save {
  background: var(--cdco-blue-dark);
  color: #fff;
}

.cdco-cookie-dialog__details {
  grid-column: 1 / -1;
  border-radius: 9px;
  padding: 12px;
  background: var(--cdco-soft);
}

.cdco-cookie-dialog__details label {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.cdco-cookie-dialog__details small {
  display: block;
  margin-top: 3px;
  color: var(--cdco-muted);
}

@media (max-width: 1024px) {
  .cdco-shell-header__main {
    grid-template-columns: 54px 150px minmax(260px, 1fr) 48px 58px;
    gap: 10px;
  }

  .cdco-shell-account span:last-child,
  .cdco-shell-cart__label {
    display: none;
  }

  .cdco-shell-account,
  .cdco-shell-cart {
    padding: 0 9px;
  }

  .cdco-shell-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .admin-bar .cdco-shell-header {
    top: 46px;
  }

  .cdco-shell-header__main {
    grid-template-columns: 52px minmax(120px, 1fr) 46px 52px;
    grid-template-areas: 'menu logo account cart' 'search search search search';
    gap: 8px 10px;
    width: min(100% - 20px, 720px);
    padding: 8px 0 10px;
  }

  .cdco-shell-menu-button { grid-area: menu; }
  .cdco-shell-logo { grid-area: logo; }
  .cdco-shell-search { grid-area: search; }
  .cdco-shell-account { grid-area: account; }
  .cdco-shell-cart { grid-area: cart; }

  .cdco-shell-logo img {
    width: 145px;
    max-height: 48px;
  }

  .cdco-shell-search input[type='search'],
  .cdco-shell-search button {
    height: 44px;
    min-height: 44px;
  }

  .cdco-shell-search button {
    min-width: 96px;
    padding: 0 10px;
  }

  .cdco-shell-brandbar__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cdco-shell-brandbar a {
    min-width: 0;
    min-height: 29px;
    padding: 5px 3px;
    font-size: 10px;
    text-align: center;
  }

  .cdco-shell-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cdco-cookie-dialog {
    grid-template-columns: 1fr;
  }

  .cdco-cookie-dialog__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .cdco-shell-search input[type='search'] {
    font-size: 12px;
  }

  .cdco-shell-search button {
    min-width: 86px;
    font-size: 11px;
  }

  .cdco-shell-benefits,
  .cdco-shell-footer__main {
    grid-template-columns: 1fr;
  }

  .cdco-shell-footer__main {
    gap: 26px;
  }

  .cdco-shell-footer__bottom {
    flex-direction: column;
    gap: 6px;
  }

  .cdco-cookie-dialog {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .cdco-cookie-dialog__actions {
    grid-template-columns: 1fr;
  }

  .cdco-cookie-dialog__actions button {
    width: 100%;
  }
}
