/* Bannière de consentement RGPD */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(150%);
  width: min(100% - 2rem, 960px);
  background: rgba(255, 255, 255, 0.98);
  color: #19212c;
  box-shadow: 0 18px 48px rgba(0, 19, 44, 0.18);
  border-radius: 18px;
  z-index: 9999;
  border: 1px solid rgba(0, 19, 44, 0.08);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.consent-banner.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.consent-banner__inner {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.consent-banner__texts {
  flex: 1 1 320px;
}

.consent-banner__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.consent-banner__description {
  margin: 0 0 1rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.consent-banner__links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.consent-banner__links a {
  color: var(--qoridor-primary, #141414);
  text-decoration: none;
  font-weight: 600;
}

.consent-banner__links a:hover,
.consent-banner__links a:focus {
  text-decoration: underline;
}

.consent-banner__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  align-items: center;
}

.consent-button {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}

.consent-button:focus-visible {
  outline: 3px solid #19212c;
  outline-offset: 2px;
}

.consent-button--primary {
  background: var(--qoridor-primary, #141414);
  color: var(--qoridor-secondary, #f6f5f0);
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.22);
}

.consent-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(20, 20, 20, 0.28);
  background: var(--qoridor-accent, #2c2c2c);
}

.consent-button--secondary {
  background: var(--qoridor-secondary, #f6f5f0);
  color: var(--qoridor-primary, #141414);
  border: 1px solid rgba(20, 20, 20, 0.18);
}

.consent-button--secondary:hover {
  background: #ece8df;
}

.consent-button--ghost {
  background: transparent;
  color: var(--qoridor-primary, #141414);
  border: 1px solid rgba(20, 20, 20, 0.15);
}

.consent-button--ghost:hover {
  border-color: rgba(20, 20, 20, 0.3);
  background: rgba(20, 20, 20, 0.05);
}

/* Modal de préférences */
.consent-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 32, 0.52);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

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

.consent-modal__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
}

.consent-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 24px;
  max-width: min(680px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: 0 28px 68px rgba(5, 23, 54, 0.35);
}

.consent-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #19212c;
}

.consent-modal__close:hover {
  color: var(--qoridor-accent, #2c2c2c);
}

.consent-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 700;
}

.consent-modal__intro {
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #3c3f45;
}

.consent-options {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.consent-option {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--qoridor-secondary, #f6f5f0);
  border-radius: 18px;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(20, 20, 20, 0.08);
}

.consent-option__texts {
  flex: 1;
}

.consent-option__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.consent-option__description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #4a4f57;
}

.consent-option__badge {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--qoridor-primary, #141414);
  background: rgba(20, 20, 20, 0.08);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.consent-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 0.5rem;
  user-select: none;
}

.consent-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent-toggle__slider {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(20, 20, 20, 0.18);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.consent-toggle__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 3px 8px rgba(20, 20, 20, 0.22);
}

.consent-toggle input:checked + .consent-toggle__slider {
  background: var(--qoridor-primary, #141414);
}

.consent-toggle input:checked + .consent-toggle__slider::after {
  transform: translateX(22px);
}

.consent-toggle__label {
  font-size: 0.88rem;
  color: var(--qoridor-primary, #141414);
}

.consent-modal__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.consent-modal__actions .consent-button {
  flex: 1 1 160px;
}

.consent-manage-trigger {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-align: left;
}

.consent-modal-open {
  overflow: hidden;
}

.consent-manage-trigger:hover,
.consent-manage-trigger:focus-visible {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .consent-banner {
    bottom: 1rem;
    border-radius: 14px;
  }
  .consent-banner__inner {
    flex-direction: column;
    padding: 1.5rem;
  }
  .consent-banner__actions {
    width: 100%;
    flex-direction: column;
  }
  .consent-button {
    width: 100%;
  }
  .consent-modal__panel {
    max-width: min(520px, 92vw);
    padding: 2rem 1.5rem;
  }
  .consent-option {
    flex-direction: column;
    align-items: flex-start;
  }
  .consent-option__badge {
    align-self: flex-start;
  }
  .consent-toggle {
    align-self: flex-start;
  }
  .consent-modal__actions {
    flex-direction: column;
  }
}

