/* ============================================================
   VCJN VOYAGES — consent.css
   Bannière et préférences de cookies, cohérentes avec l'identité
   du site : bleu ciel, blanc, noir, boutons bleus discrets.
   ============================================================ */

.consent-banner,
.consent-modal-root {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 1200;
  box-sizing: border-box;
  font-family: var(--font-body, "Inter", "Segoe UI", system-ui, sans-serif);
  color: var(--ink, #14222e);
}

.consent-banner {
  bottom: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 14px 16px 16px;
  visibility: hidden;
  transition: visibility .35s;
}

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

.consent-card {
  /* N'active jamais la carte : elle ne doit pouvoir recevoir de clic
     que lorsqu'elle est réellement affichée (voir .is-visible). */
  pointer-events: none;
  max-width: 760px;
  width: 100%;
  background: var(--white, #ffffff);
  border: 1px solid var(--line, #dde9f5);
  border-radius: 16px;
  box-shadow: 0 -8px 30px rgba(10, 58, 107, 0.18);
  padding: 20px 22px 18px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}

.consent-banner.is-visible {
  visibility: visible;
}

.consent-banner.is-visible .consent-card {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.consent-card__title {
  margin: 0 0 6px;
  font-family: var(--font-heading, "Poppins", "Segoe UI", system-ui, sans-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy, #0a3a6b);
}

.consent-card__text {
  margin: 0 0 14px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--muted, #5b6b7c);
}

.consent-link {
  color: var(--blue, #2476c1);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.consent-link:hover,
.consent-link:focus-visible {
  color: var(--blue-deeper, #0f4a84);
}

.consent-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

/* Boutons discrets bleus / neutres */
.consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.consent-btn:active {
  transform: translateY(1px);
}

.consent-btn--primary {
  background: var(--grad-blue, linear-gradient(160deg, #2476c1, #165ea0));
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 94, 160, .28);
}
.consent-btn--primary:hover,
.consent-btn--primary:focus-visible {
  background: var(--blue-deeper, #0f4a84);
  box-shadow: 0 8px 20px rgba(15, 74, 132, .34);
}

.consent-btn--outline {
  background: var(--white, #fff);
  color: var(--blue, #2476c1);
  border: 1.5px solid var(--blue, #2476c1);
}
.consent-btn--outline:hover,
.consent-btn--outline:focus-visible {
  background: var(--blue-soft, #e8f2fb);
}

.consent-btn--ghost {
  background: transparent;
  color: var(--muted, #5b6b7c);
  border: 1.5px solid transparent;
}
.consent-btn--ghost:hover,
.consent-btn--ghost:focus-visible {
  color: var(--ink, #14222e);
  border-color: var(--line, #dde9f5);
  background: var(--bg-soft, #f5f8fc);
}

/* Modal de préférences */
.consent-modal-root[hidden] {
  display: none;
}
.consent-modal-root {
  top: 0;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.consent-modal-root.is-open {
  display: flex;
}

.consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 58, 107, 0.5);
  backdrop-filter: blur(2px);
}

html.consent-no-scroll {
  overflow: hidden;
}

.consent-modal__card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--white, #fff);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(10, 58, 107, 0.3);
  padding: 26px 26px 22px;
  animation: consentModalIn .28s ease;
}

@keyframes consentModalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.consent-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted, #5b6b7c);
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft, #f5f8fc);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.consent-modal__close:hover,
.consent-modal__close:focus-visible {
  background: var(--blue-soft, #e8f2fb);
  color: var(--blue-deeper, #0f4a84);
}

.consent-modal__title {
  margin: 0 0 6px;
  font-family: var(--font-heading, "Poppins", "Segoe UI", system-ui, sans-serif);
  font-size: 1.25rem;
  color: var(--navy, #0a3a6b);
  padding-right: 30px;
}

.consent-modal__sub {
  margin: 0 0 16px;
  font-size: .9rem;
  color: var(--muted, #5b6b7c);
}

.consent-rows {
  display: grid;
  gap: 12px;
}

.consent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line, #dde9f5);
  border-radius: 14px;
  background: var(--bg-soft, #f5f8fc);
}

.consent-row__body {
  flex: 1;
  min-width: 0;
}
.consent-row__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.consent-row__title {
  font-family: var(--font-heading, "Poppins", "Segoe UI", system-ui, sans-serif);
  font-weight: 700;
  font-size: .98rem;
  color: var(--navy, #0a3a6b);
}
.consent-row__desc {
  margin: 4px 0 0;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--muted, #5b6b7c);
}

.consent-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-soft, #e8f2fb);
  color: var(--blue-deeper, #0f4a84);
  font-size: .72rem;
  font-weight: 700;
}

/* Interrupteur */
.consent-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.consent-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.consent-switch__slider {
  position: relative;
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: #c3d1e0;
  transition: background .2s ease;
}
.consent-switch__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white, #fff);
  box-shadow: 0 1px 4px rgba(10, 58, 107, 0.3);
  transition: transform .2s ease;
}
.consent-switch input:checked + .consent-switch__slider {
  background: var(--grad-blue, linear-gradient(160deg, #2476c1, #165ea0));
}
.consent-switch input:checked + .consent-switch__slider::after {
  transform: translateX(19px);
}
.consent-switch input:focus-visible + .consent-switch__slider {
  outline: 3px solid var(--orange, #f97316);
  outline-offset: 2px;
  border-radius: 999px;
}
.consent-switch input:disabled + .consent-switch__slider {
  opacity: .7;
  cursor: not-allowed;
  background: var(--grad-blue, linear-gradient(160deg, #2476c1, #165ea0));
}
.consent-switch__label {
  font-size: .78rem;
  color: var(--muted, #5b6b7c);
  white-space: nowrap;
}

.consent-note {
  margin: 14px 0 0;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--muted, #5b6b7c);
  border-top: 1px solid var(--line, #dde9f5);
  padding-top: 12px;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.consent-modal__foot {
  margin: 14px 0 0;
  font-size: .84rem;
  text-align: center;
}

/* Lien « Gérer mes cookies » du pied de page */
.footer-consent-link {
  margin-left: 14px;
  font-size: .85rem;
  color: var(--muted, #5b6b7c);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-consent-link:hover,
.footer-consent-link:focus-visible {
  color: var(--blue, #2476c1);
}

@media (prefers-reduced-motion: reduce) {
  .consent-card,
  .consent-modal__card {
    animation: none;
    transition: none;
  }
}

@media (max-width: 560px) {
  .consent-card__actions {
    justify-content: stretch;
  }
  .consent-card__actions .consent-btn {
    flex: 1 1 100%;
  }
  .consent-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .consent-switch {
    align-self: flex-end;
  }
}