/* Bandeau de consentement aux cookies (assets/js/consent.js) */
.td-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  padding: 12px;
  pointer-events: none;
}

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

.td-consent__box {
  position: relative;
  max-width: 920px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  margin: 0 auto;
  padding: 18px 20px;
  background: #fff;
  color: #3a2e27;
  border-top: 4px solid #004c32;
  border-radius: 8px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .25);
  font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  pointer-events: auto;
}

.td-consent__title {
  margin: 0 0 6px;
  color: #004c32;
  font-size: 17px;
  font-weight: 800;
}

.td-consent__text {
  margin: 0 0 12px;
}

.td-consent .td-consent__text a {
  color: #004c32;
  font-weight: 700;
  text-decoration: underline;
}

.td-consent__prefs {
  margin: 0 0 12px;
  border-top: 1px solid #eee3d3;
}

.td-consent__prefs[hidden] {
  display: none;
}

/* le thème aligne les <label> à droite en plus petit : on rétablit le texte du bandeau */
.td-consent .td-consent__purpose {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #eee3d3;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.td-consent__purpose input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #004c32;
  cursor: pointer;
}

.td-consent__purpose strong {
  display: block;
  color: #004c32;
}

.td-consent .td-consent__purpose--required {
  padding-left: 28px;
  cursor: default;
}

.td-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* « Tout refuser » et « Tout accepter » ont volontairement le même style : la CNIL exige un choix aussi simple dans les deux sens */
.td-consent__btn {
  flex: 0 1 auto;
  min-width: 150px;
  padding: 10px 18px;
  border: 2px solid #004c32;
  border-radius: 6px;
  background: #004c32;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.td-consent__btn:hover,
.td-consent__btn:focus-visible {
  background: #00643f;
  border-color: #00643f;
}

.td-consent__btn--secondary {
  background: #fff;
  color: #004c32;
}

.td-consent__btn--secondary:hover,
.td-consent__btn--secondary:focus-visible {
  background: #f2f7f2;
  border-color: #004c32;
}

.td-consent__btn[hidden] {
  display: none;
}

.td-consent__close {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 2px 8px;
  border: 0;
  background: none;
  color: #73563a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.td-consent__close[hidden] {
  display: none;
}

/* lien « Gérer les cookies » du pied de page : un bouton habillé comme les liens voisins */
.td-consent-link {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

/* même couleur que les liens voisins (règle « .td-footer a » de terridors-cart.css) */
.td-footer .td-consent-link {
  color: black;
}

@media (max-width: 767px) {
  .td-consent {
    padding: 8px;
  }

  .td-consent__box {
    padding: 14px 14px 12px;
    font-size: 13px;
  }

  .td-consent__actions {
    justify-content: stretch;
  }

  /* refuser et accepter côte à côte, à taille égale ; personnaliser en dessous */
  .td-consent__btn {
    flex: 1 1 40%;
    min-width: 0;
    padding: 10px 8px;
  }

  .td-consent__btn--secondary {
    order: 3;
    flex-basis: 100%;
  }
}
