/* =====================================================================
   ScanFilm — Styles de la bannière de consentement cookies
   Respecte la charte graphique du site (palette ink/paper/warm/gold)
   ===================================================================== */

.sf-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(26, 21, 16, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: sf-fade-in 0.25s ease-out;
}

@keyframes sf-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sf-consent-box {
  background: #faf8f4;
  border: 0.5px solid rgba(26, 21, 16, 0.15);
  border-radius: 6px;
  max-width: 760px;
  width: 100%;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: sf-slide-up 0.3s ease-out;
}

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

.sf-consent-main {
  padding: 2rem 2rem 1.2rem;
}

.sf-consent-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(26, 21, 16, 0.4);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.sf-consent-label::before {
  content: '';
  display: block;
  width: 2rem;
  height: 0.5px;
  background: rgba(26, 21, 16, 0.4);
}

.sf-consent-box h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.25;
  color: #1a1510;
  margin: 0 0 0.8rem;
}

.sf-consent-box p {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(26, 21, 16, 0.6);
  margin: 0 0 0.8rem;
}

.sf-consent-links {
  font-size: 12px !important;
  margin-top: 0.6rem !important;
}
.sf-consent-links a {
  color: rgba(26, 21, 16, 0.6);
  text-decoration: underline;
  text-decoration-color: rgba(26, 21, 16, 0.25);
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.sf-consent-links a:hover { color: #1a1510; }
.sf-consent-links span { margin: 0 0.5rem; color: rgba(26, 21, 16, 0.3); }

/* ---------- Détails (catégories) ---------- */
.sf-consent-details {
  padding: 0 2rem 1rem;
  border-top: 0.5px solid rgba(26, 21, 16, 0.1);
  margin-top: 0.5rem;
  padding-top: 1.2rem;
}

.sf-consent-row {
  padding: 0.9rem 0;
  border-bottom: 0.5px solid rgba(26, 21, 16, 0.08);
}
.sf-consent-row:last-child { border-bottom: none; }

.sf-consent-row-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.sf-consent-row-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1a1510;
  margin-bottom: 0.3rem;
}

.sf-consent-row-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(26, 21, 16, 0.55);
}

/* ---------- Interrupteurs (toggles) ---------- */
.sf-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.sf-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.sf-switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(26, 21, 16, 0.2);
  border-radius: 22px;
  transition: background 0.2s;
}
.sf-switch-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #faf8f4;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.sf-switch input:checked + .sf-switch-slider {
  background: #1a1510;
}
.sf-switch input:checked + .sf-switch-slider::before {
  transform: translateX(16px);
}
.sf-switch-locked .sf-switch-slider {
  background: rgba(26, 21, 16, 0.4);
  cursor: not-allowed;
}
.sf-switch-locked .sf-switch-slider::before {
  transform: translateX(16px);
}

/* ---------- Boutons d'action ---------- */
.sf-consent-actions {
  display: flex;
  gap: 0.6rem;
  padding: 1.2rem 2rem 1.8rem;
  flex-wrap: wrap;
  border-top: 0.5px solid rgba(26, 21, 16, 0.08);
  background: #f3efe8;
}

.sf-btn {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1.3rem;
  border-radius: 2px;
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.sf-btn-primary {
  background: #1a1510;
  color: #faf8f4;
  border-color: #1a1510;
}
.sf-btn-primary:hover {
  background: #2c2016;
  border-color: #2c2016;
}

.sf-btn-ghost {
  background: transparent;
  color: rgba(26, 21, 16, 0.7);
  border-color: rgba(26, 21, 16, 0.25);
}
.sf-btn-ghost:hover {
  color: #1a1510;
  border-color: #1a1510;
  background: rgba(26, 21, 16, 0.03);
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .sf-consent-overlay { padding: 0; align-items: flex-end; }
  .sf-consent-box {
    border-radius: 6px 6px 0 0;
    max-height: 92vh;
  }
  .sf-consent-main { padding: 1.5rem 1.3rem 1rem; }
  .sf-consent-box h2 { font-size: 1.35rem; }
  .sf-consent-details { padding-left: 1.3rem; padding-right: 1.3rem; }
  .sf-consent-actions {
    padding: 1rem 1.3rem 1.3rem;
    flex-direction: column-reverse;
  }
  .sf-btn { width: 100%; }
}

/* ---------- Lien de réouverture dans le footer ---------- */
.sf-footer-consent-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s;
}
.sf-footer-consent-link:hover { color: rgba(250, 248, 244, 0.6); }
