/* ═══════════════════════════════════════════════════════════════════
   Cockpitdo — Système de Consentement Cookies CNIL & RGPD
   ═══════════════════════════════════════════════════════════════════ */

/* ── Bannière de premier niveau (bas d'écran) ─────────────────────── */
.cockpit-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: min(calc(100% - 32px), 1140px);
  background: rgba(10, 10, 10, 0.96) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.4);
  padding: 24px 28px;
  box-sizing: border-box;
  z-index: 99999;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #ffffff;
}

.cockpit-cookie-banner.cockpit-cookie-banner--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cockpit-cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cockpit-cookie-banner__content {
  flex: 1;
  min-width: 0;
}

.cockpit-cookie-banner__title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cockpit-cookie-banner__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.cockpit-cookie-banner__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.cockpit-cookie-banner__link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.cockpit-cookie-banner__link:hover {
  opacity: 0.75;
}

/* ── Boutons de premier niveau (Égalité CNIL stricte) ─────────────── */
.cockpit-cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cockpit-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Boutons Tout Accepter & Tout Refuser : même hiérarchie visuelle CNIL stricte */
.cockpit-cookie-btn--accept {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
}

.cockpit-cookie-btn--accept:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

.cockpit-cookie-btn--reject {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
}

.cockpit-cookie-btn--reject:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

/* Bouton Personnaliser : neutre discret */
.cockpit-cookie-btn--customize {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

.cockpit-cookie-btn--customize:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

/* ── Modale de Personnalisation ──────────────────────────────────── */
.cockpit-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cockpit-cookie-modal-overlay.cockpit-cookie-modal--open {
  opacity: 1;
  pointer-events: auto;
}

.cockpit-cookie-modal {
  width: min(100%, 640px);
  max-height: calc(100vh - 60px);
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cockpit-cookie-modal-overlay.cockpit-cookie-modal--open .cockpit-cookie-modal {
  transform: translateY(0) scale(1);
}

.cockpit-cookie-modal__header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cockpit-cookie-modal__title {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.cockpit-cookie-modal__close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cockpit-cookie-modal__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.cockpit-cookie-modal__body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cockpit-cookie-modal__intro {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.cockpit-cookie-category {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.cockpit-cookie-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cockpit-cookie-category__label {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cockpit-cookie-category__tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.cockpit-cookie-category__desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 10px;
}

.cockpit-cookie-category__details {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.cockpit-cookie-category__details code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  color: #ffffff;
}

/* Interrupteur switch */
.cockpit-cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cockpit-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cockpit-cookie-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.2s;
  border-radius: 24px;
}

.cockpit-cookie-switch__slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.cockpit-cookie-switch input:checked + .cockpit-cookie-switch__slider {
  background-color: #22c55e;
}

.cockpit-cookie-switch input:checked + .cockpit-cookie-switch__slider:before {
  transform: translateX(20px);
}

.cockpit-cookie-switch input:disabled + .cockpit-cookie-switch__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cockpit-cookie-modal__footer {
  padding: 18px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 768px) {
  .cockpit-cookie-banner {
    bottom: 12px;
    padding: 18px 20px;
  }
  .cockpit-cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .cockpit-cookie-banner__actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .cockpit-cookie-btn {
    width: 100%;
    height: 42px;
  }
  .cockpit-cookie-modal__footer {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .cockpit-cookie-modal__footer .cockpit-cookie-btn {
    width: 100%;
  }
}
