/* ============================================================
   RGPD — Bandeau de consentement cookies
   NPS Window Tech
   ============================================================ */

/* ---- BANNER ---- */
#rgpd-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1b1f4b;
  color: #fff;
  z-index: 9999;
  padding: 20px 24px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
  animation: rgpd-slide-up .4s ease;
  transition: transform .4s ease, opacity .4s ease;
}
#rgpd-banner.rgpd-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

@keyframes rgpd-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.rgpd-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.rgpd-text {
  flex: 1;
}
.rgpd-text strong {
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}
.rgpd-text p {
  font-size: 13px;
  line-height: 1.5;
  opacity: .85;
  margin: 0;
}

.rgpd-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- BUTTONS ---- */
.rgpd-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.rgpd-btn-accept {
  background: #2ba5a2;
  color: #fff;
}
.rgpd-btn-accept:hover {
  background: #239290;
}
.rgpd-btn-refuse {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.rgpd-btn-refuse:hover {
  background: rgba(255,255,255,0.2);
}
.rgpd-btn-prefs {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 10px 8px;
}
.rgpd-btn-prefs:hover {
  color: #fff;
}

/* ---- PREFERENCES OVERLAY ---- */
#rgpd-prefs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: rgpd-fade .2s ease;
}

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

#rgpd-prefs-panel {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: rgpd-scale .25s ease;
}

@keyframes rgpd-scale {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.rgpd-prefs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e3e7ed;
}
.rgpd-prefs-header strong {
  font-size: 16px;
  color: #2f3542;
}
.rgpd-prefs-x {
  background: none;
  border: none;
  font-size: 22px;
  color: #5f6b78;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.rgpd-prefs-x:hover {
  color: #2f3542;
}

.rgpd-prefs-body {
  padding: 8px 24px;
}

.rgpd-pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f0f2f5;
  gap: 16px;
}
.rgpd-pref-row:last-child {
  border-bottom: none;
}

.rgpd-pref-info {
  flex: 1;
}
.rgpd-pref-info strong {
  font-size: 14px;
  color: #2f3542;
  display: block;
  margin-bottom: 2px;
}
.rgpd-pref-info p {
  font-size: 12px;
  color: #5f6b78;
  line-height: 1.4;
  margin: 0;
}

.rgpd-toggle-wrap {
  flex-shrink: 0;
}

.rgpd-always {
  font-size: 11px;
  font-weight: 600;
  color: #2ba5a2;
  background: rgba(43,165,162,0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

/* ---- TOGGLE SWITCH ---- */
.rgpd-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.rgpd-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rgpd-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: .3s;
}
.rgpd-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
}
.rgpd-switch input:checked + .rgpd-slider {
  background: #2ba5a2;
}
.rgpd-switch input:checked + .rgpd-slider::before {
  transform: translateX(20px);
}

.rgpd-prefs-footer {
  padding: 16px 24px;
  border-top: 1px solid #e3e7ed;
  text-align: right;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .rgpd-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .rgpd-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .rgpd-btn {
    width: 100%;
    padding: 12px;
  }
  .rgpd-btn-prefs {
    padding: 8px;
  }
  #rgpd-banner {
    padding: 16px;
    /* Leave space for mobile CTA bar */
    bottom: 70px;
  }
}
