/* ====================================================================
   The Loft 67 — Cookie consent (banner + préférences)
   Style minimal premium, accordé à la palette du site.
   Injecté par /assets/cookie-consent.js sur toutes les pages.
   ==================================================================== */

.cc-banner,
.cc-modal {
  font-family: inherit;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.cc-banner *,
.cc-modal * { box-sizing: border-box; }

/* ----- Banner bas gauche, format compact ----- */
.cc-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  right: auto;
  z-index: 9998;
  max-width: 340px;
  background: #ffffff;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 16px 18px;
  display: none;
  animation: cc-slide-up 280ms ease-out;
}
.cc-banner.is-open { display: block; }

@keyframes cc-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cc-banner__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #0f172a;
}
.cc-banner__message {
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0 0 12px;
  color: #475569;
}
.cc-banner__message a {
  color: #ea580c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.cc-banner .cc-btn {
  padding: 7px 12px;
  font-size: 0.78rem;
}
.cc-banner .cc-btn--link { padding: 7px 6px; }

.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 80ms ease;
  font-family: inherit;
  line-height: 1.2;
}
.cc-btn:active { transform: translateY(1px); }

.cc-btn--primary {
  background: #ea580c;
  color: #ffffff;
}
.cc-btn--primary:hover { background: #c2410c; }

.cc-btn--ghost {
  background: transparent;
  color: #1f2937;
  border-color: #d1d5db;
}
.cc-btn--ghost:hover { background: #f9fafb; border-color: #9ca3af; }

.cc-btn--link {
  background: transparent;
  color: #1f2937;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 12px;
}
.cc-btn--link:hover { color: #ea580c; }

/* ----- Modal préférences ----- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}
.cc-modal.is-open { display: flex; }

.cc-modal__panel {
  background: #ffffff;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
  padding: 28px;
}
.cc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.cc-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}
.cc-modal__close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 8px;
}
.cc-modal__close:hover { color: #0f172a; background: #f3f4f6; }
.cc-modal__intro {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 18px;
}
.cc-cat {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cc-cat__label {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.98rem;
}
.cc-cat__desc {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.45;
}
.cc-cat__required {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Switch */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-switch__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease;
}
.cc-switch__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 160ms ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}
.cc-switch input:checked + .cc-switch__slider { background: #ea580c; }
.cc-switch input:checked + .cc-switch__slider::before { transform: translateX(18px); }
.cc-switch input:disabled + .cc-switch__slider { background: #94a3b8; cursor: not-allowed; opacity: 0.7; }

.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 520px) {
  .cc-banner { padding: 14px 16px; left: 10px; right: 10px; bottom: 10px; max-width: none; border-radius: 14px; }
  .cc-banner__actions { justify-content: stretch; }
  .cc-banner__actions .cc-btn { flex: 1 1 auto; text-align: center; }
  .cc-modal__panel { padding: 22px; border-radius: 16px; }
  .cc-modal__actions { justify-content: stretch; }
  .cc-modal__actions .cc-btn { flex: 1 1 auto; text-align: center; }
}
