/* KparK Formation - Bandeau + modale de consentement RGPD */

/* ===== Niveau 1 : Bandeau texte compact ===== */
.kpc-banner {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  z-index: 99998;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0,15,45,.25), 0 0 0 1px rgba(0,15,45,.06);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: #1a2238;
  animation: kpc-slide-up .3s ease-out;
}
@keyframes kpc-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.kpc-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 14px 18px;
  max-width: 1280px; margin: 0 auto;
}
.kpc-banner-text {
  flex: 1 1 320px;
  margin: 0;
  font-size: 13.5px; line-height: 1.5;
  color: #5b6478;
}
.kpc-banner-text strong { color: #000F2D; font-weight: 700; }
.kpc-banner-text a { color: #DC5910; text-decoration: underline; }

.kpc-banner-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .kpc-banner { bottom: 0; left: 0; right: 0; border-radius: 12px 12px 0 0; }
  .kpc-banner-inner { padding: 14px; }
  .kpc-banner-actions { width: 100%; }
  .kpc-banner-actions .kpc-btn { flex: 1 1 100%; }
}

/* ===== Niveau 2 : Modale détaillée ===== */
.kpc-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 15, 45, 0.55);
  z-index: 99999;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  animation: kpc-fade .25s ease-out;
}
@keyframes kpc-fade { from { opacity: 0; } to { opacity: 1; } }

.kpc-box {
  position: relative;
  background: #fff;
  width: 100%; max-width: 720px;
  margin: 16px;
  border-radius: 16px;
  padding: 24px 24px 20px;
  box-shadow: 0 24px 60px -16px rgba(0, 15, 45, 0.35);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: #1a2238;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.kpc-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: transparent; border: 0;
  font-size: 24px; line-height: 1; cursor: pointer;
  color: #5b6478;
  border-radius: 8px;
}
.kpc-close:hover { background: #f1f5f9; color: #1a2238; }

.kpc-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: #000F2D; }
.kpc-lead  { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: #5b6478; }

.kpc-cats { display: grid; gap: 10px; margin-bottom: 16px; }
.kpc-cat {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
}
.kpc-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 4px;
  font-size: 14px;
}
.kpc-cat-head strong { color: #000F2D; font-weight: 700; }
.kpc-cat p { margin: 4px 0 0; font-size: 12.5px; color: #5b6478; line-height: 1.45; }
.kpc-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #DC5910;
  background: #FCE6D8; padding: 3px 8px; border-radius: 999px;
}

/* Toggle switch */
.kpc-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.kpc-toggle input { opacity: 0; width: 0; height: 0; }
.kpc-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #cbd5e1; border-radius: 22px;
  transition: .2s;
}
.kpc-slider:before {
  position: absolute; content: ""; height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background-color: #fff; border-radius: 50%;
  transition: .2s;
}
.kpc-toggle input:checked + .kpc-slider { background-color: #DC5910; }
.kpc-toggle input:checked + .kpc-slider:before { transform: translateX(18px); }
.kpc-toggle input:focus-visible + .kpc-slider { box-shadow: 0 0 0 3px rgba(220, 89, 16, .25); }

/* Boutons CNIL au même niveau */
.kpc-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.kpc-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  border: 2px solid;
  transition: background .15s, color .15s, transform .1s;
  white-space: nowrap;
}
.kpc-btn:active { transform: translateY(1px); }
.kpc-btn-primary {
  background: #DC5910; color: #fff; border-color: #DC5910;
}
.kpc-btn-primary:hover { background: #B84508; border-color: #B84508; }
.kpc-btn-secondary {
  background: #fff; color: #000F2D; border-color: #000F2D;
}
.kpc-btn-secondary:hover { background: #000F2D; color: #fff; }

.kpc-foot {
  margin: 0; font-size: 11.5px; line-height: 1.4; color: #94a3b8;
}
.kpc-foot a { color: #DC5910; text-decoration: underline; }

@media (max-width: 600px) {
  .kpc-box { margin: 0; border-radius: 16px 16px 0 0; padding: 20px 16px 16px; }
  .kpc-actions .kpc-btn { flex: 1 1 100%; }
}
