/* ────────────────────────────────────────────────────────────
   IMMERSIO — Bannière de consentement RGPD/CNIL + footer légal
   Conforme aux lignes directrices CNIL :
   - 3 boutons (Accepter / Refuser / Personnaliser) à prominence visuelle identique
   - Cookie wall absent (la bannière n'empêche pas la navigation)
   - Refus aussi simple qu'accepter (1 clic)
   ──────────────────────────────────────────────────────────── */

#consent-banner,
#consent-modal-overlay {
  font-family: 'Inter', sans-serif;
  color: #e4e2dc;
  box-sizing: border-box;
}
#consent-banner *, #consent-modal-overlay * { box-sizing: border-box; }

/* ── Bannière 1ère couche (bottom) ─────────────────────── */
#consent-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 960px;
  margin: 0 auto;
  background: rgba(18, 16, 14, 0.98);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 20px 22px;
  z-index: 9999;
  backdrop-filter: blur(10px);
  display: none;            /* JS toggle */
  animation: consent-slide-up .25s ease-out;
}
@keyframes consent-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
#consent-banner.visible { display: block; }

#consent-banner h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.2px;
}
#consent-banner p {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(228,226,220,0.82);
}
#consent-banner p a {
  color: #c9a87c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#consent-banner p a:hover { color: #e8d5bc; }

#consent-banner .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Boutons : tous strictement même style ─────────────────
   CNIL : refus aussi visible qu'accepter. Même couleur de fond,
   même taille, même police, même padding. */
.consent-btn {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #0c0a09;
  background: #c9a87c;
  border: 1px solid #c9a87c;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
  letter-spacing: 0.2px;
}
.consent-btn:hover { opacity: 0.9; }
.consent-btn:active { transform: translateY(1px); }
.consent-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Modal personnalisation (2ème couche) ──────────────── */
#consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#consent-modal-overlay.visible { display: flex; }

#consent-modal {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: #141210;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 26px 28px 22px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

#consent-modal h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
#consent-modal .modal-intro {
  margin: 0 0 22px;
  font-size: 13px;
  color: rgba(228,226,220,0.65);
  line-height: 1.55;
}

.consent-cat {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
}
.consent-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.consent-cat-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.consent-cat-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201,168,124,0.12);
  color: #c9a87c;
}
.consent-cat-tag.required {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
}
.consent-cat-desc {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(228,226,220,0.6);
  line-height: 1.5;
}

/* Toggle switch */
.consent-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.consent-toggle input {
  opacity: 0;
  width: 0; height: 0;
  position: absolute;
}
.consent-toggle .slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 22px;
  cursor: pointer;
  transition: background .2s;
}
.consent-toggle .slider:before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.consent-toggle input:checked + .slider { background: #c9a87c; }
.consent-toggle input:checked + .slider:before { transform: translateX(18px); }
.consent-toggle input:disabled + .slider {
  background: rgba(201,168,124,0.4);
  cursor: not-allowed;
}
.consent-toggle input:focus-visible + .slider {
  outline: 2px solid #c9a87c;
  outline-offset: 2px;
}

#consent-modal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

#consent-modal .close-x {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
#consent-modal .close-x:hover { color: #fff; }

/* ── Footer légal global ───────────────────────────────── */
#legal-footer {
  margin-top: 60px;
  padding: 22px 24px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}
#legal-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
#legal-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
#legal-footer a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color .15s;
}
#legal-footer a:hover { color: #c9a87c; }
#legal-footer .footer-copy {
  color: rgba(255,255,255,0.25);
  font-size: 11px;
}
#legal-footer button.gear-cookies {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
#legal-footer button.gear-cookies:hover {
  border-color: rgba(201,168,124,0.5);
  color: #c9a87c;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 540px) {
  #consent-banner { left: 8px; right: 8px; bottom: 8px; padding: 18px; }
  #consent-banner .actions { flex-direction: column; }
  .consent-btn { width: 100%; flex: 0 1 auto; }
  #consent-modal { padding: 22px 20px; }
  #legal-footer .footer-inner { flex-direction: column; align-items: flex-start; }
}
