/* =============================================================
   PERMIS EXPRESS BELGE — Bandeau de consentement cookies (RGPD)
   ============================================================= */

.cookie-banner {
  position: fixed;
  bottom: 22px;
  left: 22px;
  right: 22px;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--border, #E6E8EE);
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 24px 60px rgba(11, 26, 51, .18);
  z-index: 1000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1A2238;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.2), opacity .3s;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; font-weight: 700;
  color: #0B1A33; margin-bottom: 8px;
  letter-spacing: -.01em;
}
.cookie-banner p {
  font-size: .9rem; line-height: 1.6;
  color: #5C6A85; margin-bottom: 18px;
}
.cookie-banner p a {
  color: #0B1A33;
  text-decoration: underline;
  text-decoration-color: #E0B252;
  text-underline-offset: 3px;
}

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn {
  flex: 1; min-width: 140px;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; border: 2px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.cookie-btn-primary {
  background: #E0B252; color: #0B1A33;
  box-shadow: 0 4px 14px rgba(224, 178, 82, .3);
}
.cookie-btn-primary:hover { background: #F1CE82; transform: translateY(-1px); }
.cookie-btn-ghost {
  background: transparent; color: #0B1A33;
  border-color: #E6E8EE;
}
.cookie-btn-ghost:hover { border-color: #0B1A33; }
.cookie-btn-link {
  background: transparent; color: #5C6A85;
  padding: 12px 8px; flex: 0 1 auto;
  min-width: auto;
  text-decoration: underline; text-underline-offset: 3px;
}
.cookie-btn-link:hover { color: #0B1A33; }

/* === MODAL PRÉFÉRENCES === */
.cookie-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 26, 51, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1001;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s;
}
.cookie-modal-backdrop.show { display: flex; opacity: 1; }

.cookie-modal {
  background: #fff;
  border-radius: 22px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  color: #1A2238;
  transform: translateY(20px);
  transition: transform .3s ease;
}
.cookie-modal-backdrop.show .cookie-modal { transform: translateY(0); }

.cookie-modal-head {
  padding: 28px 32px 18px;
  border-bottom: 1px solid #E6E8EE;
}
.cookie-modal-head h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem; font-weight: 700;
  color: #0B1A33;
  letter-spacing: -.01em;
}
.cookie-modal-head p { font-size: .9rem; color: #5C6A85; margin-top: 6px; }

.cookie-modal-body { padding: 22px 32px; }
.cookie-cat {
  border: 1px solid #E6E8EE;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.cookie-cat:has(input:checked) { border-color: rgba(224, 178, 82, .5); }

.cookie-cat-head {
  display: flex; align-items: center;
  justify-content: space-between; gap: 14px;
}
.cookie-cat h4 {
  font-family: 'Inter', sans-serif;
  font-size: .98rem; font-weight: 600; color: #0B1A33;
}
.cookie-cat .desc {
  font-size: .85rem; color: #5C6A85;
  margin-top: 8px; line-height: 1.55;
}
.cookie-cat .badge {
  display: inline-block;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  background: #FAF7F1; color: #5C6A85;
  padding: 3px 10px; border-radius: 999px;
  margin-left: 8px;
}

.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle .slider {
  position: absolute; inset: 0;
  background: #D6DAE3;
  border-radius: 999px;
  cursor: pointer;
  transition: .25s;
}
.toggle .slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
  transition: .25s;
}
.toggle input:checked + .slider { background: #E0B252; }
.toggle input:checked + .slider::before { transform: translateX(20px); }
.toggle input:disabled + .slider { background: #142847; opacity: .5; cursor: not-allowed; }
.toggle input:disabled + .slider::before { transform: translateX(20px); }

.cookie-modal-foot {
  padding: 18px 32px 28px;
  display: flex; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid #E6E8EE;
}
.cookie-modal-foot .cookie-btn { flex: 1; min-width: 140px; }

@media (max-width: 720px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 22px; }
  .cookie-modal-head, .cookie-modal-body, .cookie-modal-foot {
    padding-left: 22px; padding-right: 22px;
  }
  .cookie-actions, .cookie-modal-foot { flex-direction: column; }
  .cookie-actions .cookie-btn, .cookie-modal-foot .cookie-btn {
    width: 100%; flex: none;
  }
}
