/* ── BANDEAU COOKIES RGPD ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 3px solid #7FB513;
  box-shadow: 0 -4px 32px rgba(7,26,70,.15);
  z-index: 9999;
  padding: 20px 24px;
  font-family: 'Nunito', sans-serif;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
#cookie-banner.visible {
  transform: translateY(0);
}
#cookie-banner .cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
#cookie-banner .cb-text h3 {
  font-size: 1rem;
  font-weight: 900;
  color: #071A46;
  margin-bottom: 6px;
}
#cookie-banner .cb-text p {
  font-size: .83rem;
  color: #555;
  line-height: 1.55;
  margin: 0;
}
#cookie-banner .cb-text a {
  color: #7FB513;
  font-weight: 700;
  text-decoration: underline;
}
#cookie-banner .cb-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}
#cookie-banner .cb-btn-all {
  background: #7FB513;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
#cookie-banner .cb-btn-all:hover { background: #4a7a09; }
#cookie-banner .cb-btn-refuse {
  background: transparent;
  color: #555;
  border: 1.5px solid #ddd;
  padding: 9px 18px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
#cookie-banner .cb-btn-refuse:hover { border-color: #071A46; color: #071A46; }
#cookie-banner .cb-btn-prefs {
  background: transparent;
  color: #7FB513;
  border: none;
  padding: 8px 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

/* Panel préférences */
#cookie-prefs {
  position: fixed;
  inset: 0;
  background: rgba(7,26,70,.5);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#cookie-prefs.open { display: flex; }
#cookie-prefs .cp-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 560px;
  width: 100%;
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Nunito', sans-serif;
}
#cookie-prefs .cp-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  font-size: 1.4rem; cursor: pointer;
  color: #888;
}
#cookie-prefs h2 { font-size: 1.2rem; font-weight: 900; color: #071A46; margin-bottom: 8px; }
#cookie-prefs .cp-intro { font-size: .85rem; color: #666; margin-bottom: 24px; line-height: 1.55; }
.cp-category { border: 1.5px solid #e8edd8; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.cp-category-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cp-category-head h3 { font-size: .92rem; font-weight: 900; color: #071A46; }
.cp-category p { font-size: .8rem; color: #666; line-height: 1.5; margin: 0; }
/* Toggle switch */
.cp-toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.cp-toggle input { opacity: 0; width: 0; height: 0; }
.cp-toggle-slider {
  position: absolute; inset: 0;
  background: #ddd; border-radius: 24px;
  cursor: pointer; transition: .25s;
}
.cp-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: .25s;
}
.cp-toggle input:checked + .cp-toggle-slider { background: #7FB513; }
.cp-toggle input:checked + .cp-toggle-slider::before { transform: translateX(20px); }
.cp-toggle input:disabled + .cp-toggle-slider { opacity: .5; cursor: not-allowed; }
.cp-actions { display: flex; gap: 10px; margin-top: 24px; }
.cp-btn-save {
  flex: 1; background: #071A46; color: #fff; border: none;
  padding: 12px; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .9rem;
  cursor: pointer; transition: background .2s;
}
.cp-btn-save:hover { background: #0d2a6e; }
.cp-btn-all {
  flex: 1; background: #7FB513; color: #fff; border: none;
  padding: 12px; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .9rem;
  cursor: pointer; transition: background .2s;
}
.cp-btn-all:hover { background: #4a7a09; }

/* Lien flottant réouvrir préfs */
#cookie-reopen {
  position: fixed; bottom: 20px; left: 20px;
  background: #fff; border: 1.5px solid #7FB513;
  color: #7FB513; padding: 7px 14px;
  border-radius: 50px; font-size: .75rem; font-weight: 700;
  cursor: pointer; z-index: 9990;
  font-family: 'Nunito', sans-serif;
  display: none; transition: all .2s;
  box-shadow: 0 2px 10px rgba(7,26,70,.1);
}
#cookie-reopen:hover { background: #7FB513; color: #fff; }
#cookie-reopen.show { display: block; }

@media (max-width: 768px) {
  #cookie-banner .cb-inner { grid-template-columns: 1fr; gap: 14px; }
  #cookie-banner .cb-actions { justify-content: flex-start; }
  #cookie-prefs .cp-modal { padding: 24px; }
  .cp-actions { flex-direction: column; }
}
