/* ============================================ */
/* BANNIÈRE DE COOKIES */
/* ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: #ffffff;
  padding: 20px 0;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
  transition: transform 0.4s ease-in-out;
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  color: #ffffff;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.95rem;
  color: #c8c8d4;
  line-height: 1.5;
}

.cookie-banner-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================ */
/* BOUTONS */
/* ============================================ */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #6c63ff;
  color: #ffffff;
}

.btn-primary:hover {
  background: #5a52d5;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
  background: #2d2d44;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #3d3d5c;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #c8c8d4;
  border: 2px solid #4a4a6a;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #6c63ff;
  color: #ffffff;
}

/* ============================================ */
/* MODALE DES COOKIES */
/* ============================================ */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  animation: modalFadeIn 0.3s ease;
  background-color: var(--bg-modale);
  color: var(--colortxt-modale);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 44, 44, 0.6);
  backdrop-filter: blur(4px);
}

.cookie-modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(128, 103, 103, 0.425);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: modalSlideUp 0.3s ease;
  color: var(--colortxt-modale);
}

@keyframes modalSlideUp {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }

  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.cookie-modal-header {
  padding: 24px 30px 16px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-modale-cont);
  border-radius: 16px 16px 0 0;
  color: var(--colortxt-modale);
  z-index: 2;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--colortxt-modale);
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--colortxt-modale);
  font-weight: 900;
  cursor: pointer;
  padding: 0 8px;
  transition: all 0.3s ease;
  line-height: 1;
}

.cookie-modal-close:hover {
  color: #333;
  transform: rotate(90deg);
}

.cookie-modal-body {
  padding: 20px 30px 30px;
}

.cookie-modal-description {
  color: var(--colortxt-modale);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Options de cookies */
.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 20px;
}

.cookie-option:last-child {
  border-bottom: none;
}

.cookie-option-info {
  flex: 1;
}

.cookie-option-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  color: var(--colortxt-modale);
}

.cookie-option-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--colortxt-modale);
  line-height: 1.4;
}

/* Toggle switch */
.cookie-option-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-option-toggle input[type="checkbox"] {
  display: none;
}

.cookie-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  background: #ddd;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.cookie-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: brown;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-option-toggle input:checked+.cookie-toggle-switch {
  background: lime;
}

.cookie-option-toggle input:checked+.cookie-toggle-switch::after {
  transform: translateX(24px);
}

.cookie-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 70px;
  text-align: center;
}

.cookie-toggle-on {
  color: lime;
}

.cookie-toggle-off {
  color: #a1a1a1;
}

/* Footer de la modale */
.cookie-modal-footer {
  padding: 16px 30px 24px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: #fafafa;
  border-radius: 0 0 16px 16px;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner-buttons {
    justify-content: center;
    width: 100%;
  }

  .cookie-banner-buttons .btn {
    flex: 1;
    min-width: 120px;
  }

  .cookie-modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cookie-option {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-option-toggle {
    justify-content: center;
  }

  .cookie-modal-footer {
    justify-content: center;
  }

  .cookie-modal-footer .btn {
    flex: 1;
    min-width: 120px;
  }
}