/* Bandeau de consentement aux cookies (Google Consent Mode v2). */
.consent-banner {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 14px;
  width: min(calc(100% - 24px), 980px);
  overflow: hidden;
  border: 2px solid #dedede;
  border-radius: 15px;
  background: #fff;
  color: #101820;
  box-shadow: 0 12px 32px rgba(4, 22, 41, .18);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 110%) scale(.985);
  transform-origin: bottom center;
  transition: opacity .42s ease, transform .52s cubic-bezier(.22, 1, .36, 1), visibility .52s;
}

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

.consent-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.consent-banner.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 110%) scale(.985);
  pointer-events: none;
}

.consent-banner__inner {
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "copy copy"
    "actions actions";
  gap: 12px 18px;
}

.consent-banner__copy {
  grid-area: copy;
  min-width: 0;
}

.consent-banner__title {
  margin: 0 0 12px;
  color: #161616;
  font: 500 23px/1.2 "DM Sans", system-ui, sans-serif;
}

.consent-banner__text {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: #5c5c5c;
}

.consent-banner__text a {
  display: inline-flex;
  align-items: center;
  color: #009c9a;
  font-weight: 500;
  text-decoration: underline;
  white-space: nowrap;
}

.consent-banner__text a:focus-visible {
  outline: 2px solid rgba(0, 156, 154, .45);
  outline-offset: 3px;
}

.consent-banner__actions {
  grid-area: actions;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.consent-banner__customize {
  margin-right: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #009c9a;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.consent-banner__customize:hover,
.consent-banner__customize:focus-visible {
  color: #007f7d;
}

.consent-banner__button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
  color: #242424;
  font: 500 17px "DM Sans", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: none;
}

.consent-banner__button:focus-visible {
  outline: 3px solid rgba(0, 156, 154, .28);
  outline-offset: 3px;
}

.consent-banner__button[data-consent="accept"] {
  min-width: 124px;
  padding-inline: 14px;
  border-color: #009c9a;
  background: #009c9a;
  color: #fff;
  transition: background-color .18s ease, border-color .18s ease;
}

.consent-banner__button[data-consent="accept"]:hover {
  background: #008d8b;
  border-color: #008d8b;
}

.consent-banner__button--ghost {
  background: transparent;
  color: #242424;
  border-color: #dedede;
}

/* Déclencheur discret placé dans le pied de page. */
.consent-manage {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.consent-manage:hover,
.consent-manage:focus-visible {
  color: #009c9a;
}

@media (max-width: 980px) {
  .consent-banner__inner {
    padding: 14px 16px 12px;
    gap: 14px;
  }

  .consent-banner__actions {
    flex-wrap: wrap;
  }

  .consent-banner__actions .consent-banner__button {
    flex: 0 1 auto;
  }
}

@media (max-width: 680px) {
  .consent-banner__inner {
    min-height: 0;
    padding: 17px 14px 14px;
    gap: 14px;
  }

  .consent-banner__title {
    margin-bottom: 8px;
    font-size: 21px;
  }

  .consent-banner__text {
    font-size: 15px;
  }

  .consent-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "accept accept"
      "customize customize"
      "selection refuse";
    gap: 9px;
  }

  .consent-banner__customize {
    grid-area: customize;
    margin: 0 0 2px;
  }

  .consent-banner__button[data-consent="accept"] {
    grid-area: accept;
    justify-self: center;
    width: min(100%, 220px);
  }

  .consent-banner__button[data-consent="selection"] {
    grid-area: selection;
  }

  .consent-banner__button[data-consent="refuse"] {
    grid-area: refuse;
  }

  .consent-banner__button,
  .consent-banner__button--ghost {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner {
    transition: none;
  }

}

/* Modale de préférences I-SOLUTIONS. */
body.consent-modal-open {
  overflow: hidden;
}

.consent-preferences {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 24, 43, .48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

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

.consent-preferences.is-open {
  opacity: 1;
  visibility: visible;
}

.consent-preferences__backdrop {
  position: absolute;
  inset: 0;
}

.consent-preferences__dialog {
  position: relative;
  width: min(100%, 780px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 38px 40px 30px;
  border: 1px solid rgba(0, 156, 154, .2);
  border-radius: 26px;
  background: #fff;
  color: #07182b;
  box-shadow: 0 28px 80px rgba(1, 16, 31, .3);
  transform: translateY(18px) scale(.98);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.consent-preferences.is-open .consent-preferences__dialog {
  transform: translateY(0) scale(1);
}

.consent-preferences__close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(7, 24, 43, .16);
  border-radius: 50%;
  background: #fff;
  color: #07182b;
  font: 400 24px/30px Arial, sans-serif;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.consent-preferences__close:hover,
.consent-preferences__close:focus-visible {
  border-color: #009c9a;
  background: #eef8f7;
  color: #007f7d;
}

.consent-preferences__close:focus-visible {
  outline: 3px solid rgba(0, 156, 154, .28);
  outline-offset: 3px;
}

.consent-preferences__eyebrow {
  margin: 0 0 10px;
  color: #007f7d;
  font: 800 12px/1.2 "Manrope", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.consent-preferences__dialog h2 {
  max-width: 610px;
  margin: 0 56px 12px 0;
  color: #07182b;
  font: 800 clamp(28px, 4vw, 40px)/1.08 "Manrope", sans-serif;
  letter-spacing: -.03em;
}

.consent-preferences__intro {
  max-width: 670px;
  margin: 0 0 26px;
  color: #536879;
  font-size: 16px;
  line-height: 1.55;
}

.consent-preferences__options {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.consent-preferences__option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  grid-template-areas: "copy toggle";
  align-items: start;
  gap: 18px;
  padding: 18px 18px 17px;
  border: 1px solid #dce9e9;
  border-radius: 14px;
  background: #f8fbfb;
  cursor: pointer;
}

.consent-preferences__option--required {
  border-color: rgba(0, 156, 154, .35);
  background: linear-gradient(135deg, #f8fbfb, #eef8f7);
  cursor: default;
}

.consent-preferences__option-copy {
  grid-area: copy;
  display: grid;
  gap: 5px;
}

.consent-preferences__option-copy strong {
  color: #07182b;
  font-size: 17px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.consent-preferences__option-copy small {
  color: #405666;
  font-size: 15px;
  line-height: 1.45;
}

.consent-preferences__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.consent-preferences__toggle {
  grid-area: toggle;
  position: relative;
  justify-self: end;
  width: 50px;
  height: 29px;
  border-radius: 999px;
  background: #cbd5da;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.consent-preferences__toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(7, 24, 43, .22);
  transition: transform .2s ease;
}

.consent-preferences__option input:checked + .consent-preferences__toggle {
  background: #009c9a;
  box-shadow: 0 0 0 4px rgba(0, 156, 154, .12);
}

.consent-preferences__option input:checked + .consent-preferences__toggle::after {
  transform: translateX(21px);
}

.consent-preferences__option input:focus-visible + .consent-preferences__toggle {
  outline: 3px solid rgba(0, 156, 154, .3);
  outline-offset: 3px;
}

.consent-preferences__option input:disabled + .consent-preferences__toggle {
  background: #74c4c3;
}

.consent-preferences__save {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: #009c9a;
  color: #fff;
  font: 700 16px "DM Sans", sans-serif;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.consent-preferences__save:hover {
  background: #007f7d;
  transform: translateY(-1px);
}

.consent-preferences__save:focus-visible {
  outline: 3px solid rgba(0, 156, 154, .3);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .consent-preferences {
    padding: 10px;
  }

  .consent-preferences__dialog {
    max-height: calc(100vh - 20px);
    padding: 28px 20px 20px;
    border-radius: 22px;
  }

  .consent-preferences__close {
    top: 18px;
    right: 18px;
  }

  .consent-preferences__dialog h2 {
    margin-right: 45px;
    font-size: 29px;
  }

  .consent-preferences__intro {
    font-size: 15px;
  }

  .consent-preferences__option {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 12px;
    padding: 15px 13px;
  }

  .consent-preferences__option-copy strong {
    font-size: 14px;
  }

  .consent-preferences__option-copy small {
    font-size: 14px;
  }

  .consent-preferences__toggle {
    width: 44px;
    height: 26px;
  }

  .consent-preferences__toggle::after {
    width: 20px;
    height: 20px;
  }

  .consent-preferences__option input:checked + .consent-preferences__toggle::after {
    transform: translateX(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-preferences,
  .consent-preferences__dialog,
  .consent-preferences__toggle,
  .consent-preferences__toggle::after,
  .consent-preferences__save {
    transition: none;
  }
}
