/* -------------------------------------------------------------------------
   Bandeau de gestion des cookies (RGPD) — Ustensiles & Cuisine
   ------------------------------------------------------------------------- */

.cookie-consent-banner {
  position: fixed;
  z-index: 10000;
  right: 0;
  bottom: 0;
  left: 0;
  background: #fff;
  border-top: 1px solid var(--uc-line, #e7e8e5);
  box-shadow: 0 -4px 24px rgba(23, 26, 24, .12);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}

.cookie-consent-banner[hidden] {
  display: none;
}

.cookie-consent-banner--visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-consent-banner__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.cookie-consent-banner__text {
  flex: 1 1 420px;
  min-width: 260px;
}

.cookie-consent-banner__title {
  margin: 0 0 6px;
  color: var(--uc-ink, #171a18);
  font-family: 'Barlow', Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.cookie-consent-banner__desc {
  margin: 0;
  color: #656a66;
  font-family: 'Barlow', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

.cookie-consent-banner__link {
  color: var(--uc-red, #d93f45);
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.cookie-consent-banner__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

/* Buttons ------------------------------------------------------------- */

.cookie-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-family: 'Barlow', Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.cookie-consent-btn--primary {
  background: var(--uc-red, #d93f45);
  color: #fff;
}

.cookie-consent-btn--primary:hover,
.cookie-consent-btn--primary:focus-visible {
  background: var(--uc-red-dark, #a90e14);
}

.cookie-consent-btn--secondary {
  background: transparent;
  color: var(--uc-ink, #171a18);
  border: 1px solid var(--uc-line, #e7e8e5);
}

.cookie-consent-btn--secondary:hover,
.cookie-consent-btn--secondary:focus-visible {
  border-color: var(--uc-ink, #171a18);
}

.cookie-consent-btn--tertiary {
  min-height: auto;
  padding: 12px 4px;
  background: transparent;
  color: #656a66;
  text-decoration: underline;
  text-transform: none;
  font-weight: 700;
}

.cookie-consent-btn--tertiary:hover,
.cookie-consent-btn--tertiary:focus-visible {
  color: var(--uc-ink, #171a18);
}

/* Modal ----------------------------------------------------------------- */

.cookie-consent-modal {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cookie-consent-modal[hidden] {
  display: none;
}

.cookie-consent-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 26, 24, .5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}

.cookie-consent-modal--visible .cookie-consent-modal__overlay {
  opacity: 1;
}

.cookie-consent-modal__container {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(23, 26, 24, .3);
  transform: scale(.96);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.cookie-consent-modal--visible .cookie-consent-modal__container {
  transform: scale(1);
  opacity: 1;
}

.cookie-consent-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--uc-line, #e7e8e5);
}

.cookie-consent-modal__title {
  margin: 0;
  color: var(--uc-ink, #171a18);
  font-family: 'Barlow', Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
}

.cookie-consent-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #656a66;
  cursor: pointer;
}

.cookie-consent-modal__close:hover,
.cookie-consent-modal__close:focus-visible {
  background: #faf7f2;
  color: var(--uc-ink, #171a18);
}

.cookie-consent-modal__body {
  padding: 22px 26px;
}

.cookie-consent-modal__intro {
  margin: 0 0 20px;
  color: #656a66;
  font-size: 13px;
  line-height: 1.6;
}

.cookie-consent-category {
  padding: 16px 0;
  border-top: 1px solid var(--uc-line, #e7e8e5);
}

.cookie-consent-category:first-of-type {
  border-top: 0;
}

.cookie-consent-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent-category__title {
  color: var(--uc-ink, #171a18);
  font-size: 14px;
  font-weight: 700;
}

.cookie-consent-category__desc {
  margin: 8px 0 0;
  color: #656a66;
  font-size: 13px;
  line-height: 1.6;
}

.cookie-consent-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px 26px;
  border-top: 1px solid var(--uc-line, #e7e8e5);
}

/* Toggle switch ----------------------------------------------------------- */

.cookie-consent-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  cursor: pointer;
}

.cookie-consent-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.cookie-consent-toggle__track {
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 26px;
  padding: 3px;
  background: #d8c7b3;
  border-radius: 999px;
  transition: background .2s ease;
}

.cookie-consent-toggle__thumb {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 26, 24, .3);
  transition: transform .2s ease;
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__track {
  background: var(--uc-red, #d93f45);
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__track .cookie-consent-toggle__thumb {
  transform: translateX(18px);
}

.cookie-consent-toggle input:focus-visible + .cookie-consent-toggle__track {
  outline: 2px solid var(--uc-red, #d93f45);
  outline-offset: 2px;
}

.cookie-consent-toggle--disabled {
  cursor: not-allowed;
}

.cookie-consent-toggle--disabled .cookie-consent-toggle__track {
  background: var(--uc-navy, #1c3549);
  opacity: .6;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .cookie-consent-banner__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 0;
  }

  /* In a column layout the desktop flex-basis (420px) would become a height. */
  .cookie-consent-banner__text {
    flex: 0 0 auto;
    min-width: 0;
  }

  .cookie-consent-banner__inner {
    gap: 12px;
    padding: 14px 0;
  }

  .cookie-consent-banner__desc {
    font-size: 12px;
    line-height: 1.5;
  }

  /* Compact layout: reject / accept side by side, customize link underneath. */
  .cookie-consent-banner__actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-consent-btn {
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
  }

  .cookie-consent-btn--tertiary {
    grid-column: 1 / -1;
    order: 3;
    padding: 4px;
  }
}

@media (max-width: 479.98px) {
  .cookie-consent-modal {
    padding: 12px;
  }

  .cookie-consent-modal__header,
  .cookie-consent-modal__body,
  .cookie-consent-modal__footer {
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Footer link that reopens the preferences modal. */
.uc-footer-cookie-link {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.uc-footer-cookie-link:hover,
.uc-footer-cookie-link:focus-visible {
  text-decoration: underline;
}
