/* ═══════════════════════════════════════════════════════════════
   CMP Impériale RP — bandeau cookies custom
   ═══════════════════════════════════════════════════════════════ */

#imp-cmp,
#imp-cmp *,
#imp-cmp-modal,
#imp-cmp-modal * {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── BANDEAU BAS ─────────────────────────────────────────────── */
#imp-cmp {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483646;
  width: calc(100% - 32px);
  max-width: 540px;
  animation: imp-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes imp-slide-up {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.imp-cmp-card {
  background: rgba(20, 20, 28, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  padding: 22px;
  color: #f0f0f5;
}

.imp-cmp-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.imp-cmp-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 16px;
}

.imp-cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.imp-cmp-link {
  color: #a78bfa;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  margin-right: auto;
}

.imp-cmp-link:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

.imp-cmp-btn {
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.15px;
  font-family: inherit;
}

.imp-cmp-btn-accept {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.imp-cmp-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

.imp-cmp-btn-deny {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}

.imp-cmp-btn-deny:hover {
  background: rgba(239, 68, 68, 0.25);
}

.imp-cmp-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

.imp-cmp-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── MODAL PERSONNALISATION ─────────────────────────────────── */
#imp-cmp-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.imp-cmp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: imp-fade 0.2s ease;
}

@keyframes imp-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.imp-cmp-modal-card {
  position: relative;
  background: #0f0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  color: #f0f0f5;
  overflow: hidden;
  animation: imp-modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes imp-modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.imp-cmp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(180deg, #1c1c2a, #14141f);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.imp-cmp-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.imp-cmp-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  padding: 0;
}

.imp-cmp-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.imp-cmp-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.imp-cmp-modal-body::-webkit-scrollbar { width: 6px; }
.imp-cmp-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.imp-cmp-category {
  background: #14141f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}

.imp-cmp-category:last-child { margin-bottom: 0; }

.imp-cmp-category-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.imp-cmp-category-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.imp-cmp-category-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.5;
}

/* Toggle switch */
.imp-cmp-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  display: inline-block;
  cursor: pointer;
}

.imp-cmp-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.imp-cmp-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: all 0.2s;
}

.imp-cmp-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.imp-cmp-toggle input:checked + .imp-cmp-slider {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
}

.imp-cmp-toggle input:checked + .imp-cmp-slider::before {
  transform: translateX(20px);
}

.imp-cmp-toggle-disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.imp-cmp-toggle-disabled .imp-cmp-slider {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.4);
}

.imp-cmp-toggle-disabled .imp-cmp-slider::before {
  transform: translateX(20px);
  background: #6ee7b7;
}

.imp-cmp-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  background: #14141f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: flex-end;
}

/* ─── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #imp-cmp {
    bottom: 12px;
    width: calc(100% - 16px);
  }
  .imp-cmp-card {
    padding: 18px;
    border-radius: 14px;
  }
  .imp-cmp-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .imp-cmp-link {
    text-align: center;
    margin: 0 0 4px 0;
  }
  .imp-cmp-btn {
    width: 100%;
    padding: 12px 16px;
  }
  .imp-cmp-modal-card {
    border-radius: 14px;
    max-height: 92vh;
  }
  .imp-cmp-modal-header { padding: 14px 18px; }
  .imp-cmp-modal-body { padding: 14px; }
  .imp-cmp-modal-footer {
    flex-direction: column;
    padding: 14px;
  }
  .imp-cmp-modal-footer .imp-cmp-btn {
    width: 100%;
  }
}
