/* =========================================================
   Bannière cookies — ISIKA Concept
   ========================================================= */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #fff;
  border-top: 3px solid #885346;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  padding: 1.5rem;
  font-size: 0.9rem;
  color: #412f2c;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-banner__title {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: #412f2c;
}

.cookie-banner__desc {
  margin: 0;
  line-height: 1.5;
}

.cookie-banner__desc a {
  color: #885346;
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Boutons : refuser doit être aussi visible qu'accepter (CNIL) */
.cookie-btn {
  border: 1px solid #885346;
  border-radius: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  transition: opacity 0.15s ease;
}

.cookie-btn:hover {
  opacity: 0.85;
}

.cookie-btn--solid {
  background: #885346;
  color: #fff;
}

.cookie-btn--ghost {
  background: transparent;
  color: #885346;
}

/* --- Panneau de personnalisation --- */
.cookie-banner__settings {
  max-width: 1140px;
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid #e3e3e3;
}

.cookie-banner__settings[hidden] {
  display: none;
}

.cookie-choice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.cookie-choice__title {
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.cookie-choice__desc {
  margin: 0;
  font-size: 0.83rem;
  color: #6b5b57;
}

.cookie-banner__actions--settings {
  justify-content: flex-end;
  margin-top: 1rem;
}

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

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

.cookie-switch__slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-switch__slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-switch input:checked + .cookie-switch__slider {
  background: #885346;
}

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

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

/* --- Mobile --- */
@media (max-width: 767.98px) {
  .cookie-banner {
    padding: 1.1rem;
    max-height: 70vh;
    overflow-y: auto;
  }

  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-choice {
    gap: 1rem;
  }
}
