/* ==========================================================================
   NoteLab.cloud — Module CSS Cookies & Consentement RGPD
   assets/css/cookies.css
   Style Minimal Droit : 0 border-radius, 0 box-shadow, intégration universelle.
   ========================================================================== */

/* -------------------------------------------------------------
   BANNIÈRE DE CONSENTEMENT COOKIES FLOTTANTE (SITE-WIDE)
   ------------------------------------------------------------- */
.cookie-banner-wrapper {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 560px;
  width: calc(100% - 3rem);
  background-color: #0e1017;
  border: 1px solid #222634;
  box-shadow: 5px 5px #22c55e !important;
  z-index: 99999;
  display: none;
  border-radius: 0 !important;
  animation: notelabCookieFadeIn 0.22s ease-out;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #f3f4f6;
}

.cookie-banner-wrapper.visible {
  display: block;
}

@keyframes notelabCookieFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner-header {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid #222634;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #12151e;
}

.cookie-banner-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.2;
}

.cookie-banner-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: #22c55e;
}

.cookie-banner-body {
  padding: 1.15rem 1.25rem;
  font-size: 0.83rem;
  color: #9ca3af;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cookie-banner-body strong {
  color: #f3f4f6;
  font-weight: 600;
}

.cookie-banner-body a {
  color: #3b82f6;
  text-decoration: underline;
}

.cookie-banner-actions {
  padding: 0.5rem 1.25rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cookie-banner-actions .btn {
  flex: 1 1 auto;
  font-size: 12px;
  padding: 8px 12px;
  text-align: center;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* -------------------------------------------------------------
   MODALE DE PRÉFÉRENCES RGPD DÉTAILLÉES
   ------------------------------------------------------------- */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #f3f4f6;
  box-sizing: border-box;
}

.cookie-modal-backdrop.open {
  display: flex;
}

.cookie-modal-dialog {
  background-color: #0e1017;
  border: 1px solid #222634;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: notelabCookieFadeIn 0.2s ease-out;
}

.cookie-modal-header {
  padding: 1rem;
  border-bottom: 1px solid #222634;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #12151e;
}

.cookie-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.cookie-modal-body {
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-category-item {
  border: 1px solid #222634;
  background-color: #0f1117;
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  box-sizing: border-box;
}

.cookie-category-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cookie-category-info p {
  font-size: 0.82rem;
  color: #9ca3af;
  line-height: 1.5;
  margin: 0;
}

.cookie-tag-required {
  font-size: 0.9rem;
  color: #22c55e;
}

.cookie-tag-optional {
  font-size: 0.9rem;
  color: #3b82f6;
}

/* Interrupteur Toggle Droit 0 Radius */
.switch-droit {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider-droit {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #1e2230;
  border: 1px solid #222634;
  transition: 0.2s;
  border-radius: 0 !important;
}

.slider-droit:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #6b7280;
  transition: 0.2s;
  border-radius: 0 !important;
}

.switch-droit input:checked+.slider-droit {
  background-color: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.switch-droit input:checked+.slider-droit:before {
  transform: translateX(22px);
  background-color: #22c55e;
}

.switch-droit input:disabled+.slider-droit {
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-modal-footer {
  padding: 1.15rem 1.5rem;
  border-top: 1px solid #222634;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  background-color: #12151e;
  flex-wrap: wrap;
}

/* Toast de notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #151821;
  border: 1px solid #22c55e;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  z-index: 110000;
  display: none;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.toast-notice.show {
  display: flex;
  animation: notelabCookieFadeIn 0.2s ease-out;
}

/* Bouton discret de réouverture des préférences */
.footer-link-button {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: #9ca3af;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
  font-family: inherit;
}

.footer-link-button:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cookie-banner-wrapper {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-banner-actions .btn {
    width: 100%;
  }

  .cookie-category-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-modal-footer .btn {
    width: 100%;
  }
}