/* ═══════════════════════════════════════════════════════════════════════
   ADORA CMP — Cookie Consent Manager
   Style : carte flottante bottom-left, palette Indigo Aurora
   Date : 28/04/2026
   ═══════════════════════════════════════════════════════════════════════ */

.adora-cmp-root,
.adora-cmp-root * {
  box-sizing: border-box;
}

/* ─── Overlay (positionnement de la carte) ─────────────────────────── */
.adora-cmp-overlay {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  z-index: 999999; /* au-dessus de tout */
  max-width: 480px;
  width: calc(100% - 48px);

  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);

  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.adora-cmp-overlay[data-adora-cmp-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ─── Carte ────────────────────────────────────────────────────────── */
.adora-cmp-card {
  background: #FFFFFF;
  color: #1E1B4B;
  border: 1px solid #E5E7F2;
  border-radius: 16px;
  padding: 24px;
  box-shadow:
    0 24px 48px -12px rgba(13, 16, 37, 0.18),
    0 8px 16px -8px rgba(13, 16, 37, 0.10),
    0 1px 0 0 rgba(255, 255, 255, 0.8) inset;
}

/* ─── Header ───────────────────────────────────────────────────────── */
.adora-cmp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.adora-cmp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(167, 139, 250, 0.14));
  color: #0E7490;
  border-radius: 10px;
  flex-shrink: 0;
}

.adora-cmp-title {
  font-family: 'Montserrat', 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0D1025;
  margin: 0;
}

/* ─── Bouton retour ────────────────────────────────────────────────── */
.adora-cmp-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid #E5E7F2;
  border-radius: 8px;
  color: #64748B;
  cursor: pointer;
  transition: all 0.16s ease;
}

.adora-cmp-back:hover {
  background: #FAFAFC;
  color: #0D1025;
  border-color: #C4B5FD;
}

/* ─── Texte ────────────────────────────────────────────────────────── */
.adora-cmp-text {
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
  margin: 0 0 18px 0;
}

.adora-cmp-link {
  color: #0E7490;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  transition: color 0.16s ease;
}

.adora-cmp-link:hover {
  color: #0D1025;
}

/* ─── Catégories ───────────────────────────────────────────────────── */
.adora-cmp-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.adora-cmp-category {
  background: #FAFAFC;
  border: 1px solid #E5E7F2;
  border-radius: 12px;
  padding: 14px 16px;
}

.adora-cmp-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.adora-cmp-cat-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0D1025;
}

.adora-cmp-cat-title svg {
  color: #0E7490;
  flex-shrink: 0;
}

.adora-cmp-cat-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #64748B;
  margin: 0;
}

.adora-cmp-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.10);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.20);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ─── Switch toggle ────────────────────────────────────────────────── */
.adora-cmp-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.adora-cmp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.adora-cmp-slider {
  position: absolute;
  inset: 0;
  background: #E5E7F2;
  border-radius: 22px;
  transition: background 0.18s ease;
}

.adora-cmp-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(13, 16, 37, 0.20);
}

.adora-cmp-switch input:checked + .adora-cmp-slider {
  background: #22D3EE;
}

.adora-cmp-switch input:checked + .adora-cmp-slider::before {
  transform: translateX(18px);
}

.adora-cmp-switch input:focus-visible + .adora-cmp-slider {
  outline: 2px solid #A78BFA;
  outline-offset: 2px;
}

.adora-cmp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Boutons d'action ─────────────────────────────────────────────── */
.adora-cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adora-cmp-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  text-align: center;
}

.adora-cmp-btn:focus-visible {
  outline: 2px solid #A78BFA;
  outline-offset: 2px;
}

.adora-cmp-btn-primary {
  background: #0E7490;
  color: #FFFFFF;
  border-color: #0E7490;
}

.adora-cmp-btn-primary:hover {
  background: #06B6D4;
  border-color: #06B6D4;
  transform: translateY(-1px);
}

.adora-cmp-btn-secondary {
  background: #FFFFFF;
  color: #0D1025;
  border-color: #E5E7F2;
}

.adora-cmp-btn-secondary:hover {
  background: #FAFAFC;
  border-color: #A78BFA;
  color: #0D1025;
}

.adora-cmp-btn-ghost {
  background: transparent;
  color: #64748B;
  border-color: transparent;
}

.adora-cmp-btn-ghost:hover {
  background: #FAFAFC;
  color: #0D1025;
}

/* ─── Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .adora-cmp-overlay {
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }

  .adora-cmp-card {
    padding: 18px;
    border-radius: 14px;
  }

  .adora-cmp-actions {
    flex-direction: column;
  }

  .adora-cmp-btn {
    width: 100%;
  }
}

/* ─── Bouton "Gérer mes cookies" footer ────────────────────────────── */
.adora-cmp-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.adora-cmp-footer-link:hover {
  color: #22D3EE;
}

/* ─── Reduce motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .adora-cmp-overlay,
  .adora-cmp-slider,
  .adora-cmp-slider::before,
  .adora-cmp-btn {
    transition: none;
  }
}
