/* Gestionnaire de consentement aux cookies */

.rpv-cookie-banner,
.rpv-cookie-modal {
  position: fixed;
  z-index: 5000;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.rpv-cookie-banner[hidden],
.rpv-cookie-modal[hidden] {
  display: none !important;
}

.rpv-cookie-banner {
  left: 22px;
  right: 22px;
  bottom: 22px;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(5, 25, 52, 0.97);
  box-shadow: 0 24px 70px rgba(2, 14, 31, 0.34);
  backdrop-filter: blur(16px);
}

.rpv-cookie-banner h2,
.rpv-cookie-modal h2 {
  margin: 0 0 7px;
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.15;
}

.rpv-cookie-banner p,
.rpv-cookie-modal p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
  line-height: 1.55;
}

.rpv-cookie-banner a,
.rpv-cookie-modal a {
  color: #f5c65a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rpv-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rpv-cookie-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.rpv-cookie-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.rpv-cookie-button-primary {
  color: #111b2a;
  border-color: rgba(139, 88, 0, 0.14);
  background: linear-gradient(180deg, #ffd060 0%, #e9aa14 100%);
}

.rpv-cookie-button-primary:hover {
  background: linear-gradient(180deg, #ffda76 0%, #ecb323 100%);
}

.rpv-cookie-modal {
  inset: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(3, 14, 31, 0.68);
  backdrop-filter: blur(6px);
}

.rpv-cookie-dialog {
  width: min(100%, 560px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 27px 25px 23px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #ffffff;
  background: #071f40;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.rpv-cookie-dialog-header {
  margin-bottom: 22px;
  padding-right: 42px;
  position: relative;
}

.rpv-cookie-close {
  position: absolute;
  right: 0;
  top: -4px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.rpv-cookie-category {
  margin-top: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
}

.rpv-cookie-category h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
}

.rpv-cookie-category p {
  font-size: 11.5px;
}

.rpv-cookie-switch {
  width: 44px;
  height: 24px;
  position: relative;
  flex: 0 0 auto;
}

.rpv-cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rpv-cookie-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #6c7888;
  cursor: pointer;
}

.rpv-cookie-switch span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 160ms ease;
}

.rpv-cookie-switch input:checked + span {
  background: #efb223;
}

.rpv-cookie-switch input:checked + span::after {
  transform: translateX(20px);
}

.rpv-cookie-switch input:disabled + span {
  opacity: 0.70;
  cursor: not-allowed;
}

.rpv-cookie-dialog-actions {
  margin-top: 21px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

@media (max-width: 720px) {
  .rpv-cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 17px 15px;
    grid-template-columns: 1fr;
  }

  .rpv-cookie-actions {
    justify-content: stretch;
  }

  .rpv-cookie-actions .rpv-cookie-button {
    flex: 1 1 auto;
  }

  .rpv-cookie-dialog {
    padding: 23px 17px 19px;
  }

  .rpv-cookie-dialog-actions {
    display: grid;
  }
}
