/* Cookie Consent Styles – namespace: cc- */
.cc-hidden { display: none !important; }

/* Overlay — devient scrollable sur mobile pour éviter la carte tronquée */
.cc-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 99998;
  display: flex;
  align-items: flex-start;      /* au lieu de center -> on aligne en haut */
  justify-content: center;
  overflow: auto;               /* l’overlay peut scroller si la carte est grande */
  padding: 16px;                /* padding raisonnable pour petits écrans */
}

/* Carte — limite de hauteur + scroll interne si nécessaire */
.cc-card {
  background: #fff; color: #111; max-width: 820px; width: 100%;
  border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  padding: 24px; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-height: calc(100dvh - 32px);  /* empêche de dépasser l’écran (dvh = viewport dynamique) */
  overflow: auto;                   /* scroll interne si contenu trop long */
  -webkit-overflow-scrolling: touch;/* inertie iOS */
}

.cc-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cc-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.cc-lang { display: flex; gap: 8px; align-items: center; }
.cc-lang select { padding: 6px 10px; border-radius: 8px; border: 1px solid #ddd; background: #fafafa; }
.cc-body { line-height: 1.5; font-size: .98rem; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cc-btn {
  appearance: none; border: 1px solid #111; background: #fff; color: #111;
  padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.cc-btn-primary { background: #111; color: #fff; }
.cc-btn:hover { transform: translateY(-1px); }
.cc-note { font-size: .88rem; color: #555; margin-top: 10px; }

/* Customize panel */
.cc-customize { margin-top: 16px; border-top: 1px solid #eee; padding-top: 16px; }
.cc-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.cc-toggle-row + .cc-toggle-row { border-top: 1px solid #f1f1f1; }
.cc-toggle-title { font-weight: 600; }

.cc-switch { position: relative; width: 48px; height: 28px; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider {
  position: absolute; cursor: pointer; inset: 0; background: #ddd; border-radius: 999px; transition: .2s;
}
.cc-slider:before {
  content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.cc-switch input:checked + .cc-slider { background: #111; }
.cc-switch input:checked + .cc-slider:before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { background: #bbb; cursor: not-allowed; }

/* Bottom reject bar */
.cc-reject-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99997;
  background: rgb(0 0 0 / 70%); color: #fff; padding: 12px 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
}
.cc-reject-bar .cc-reject-left { display: flex; flex-direction: column; gap: 2px; }
.cc-reject-title { margin: 0; font-weight: 700; }
.cc-reject-note { margin: 0; font-size: .92rem; opacity: .9; }
.cc-reject-actions { display: flex; gap: 8px; }
.cc-reject-actions .cc-btn { border-color: #fff; color: #fff; background: transparent; }
.cc-reject-actions .cc-btn-primary { background: #fff; color: #111; border-color: #fff; }

/* Helper for any "manage cookies" link */
a[data-cookie-consent="manage"] { cursor: pointer; }

/* Ajustements compacts sur écrans étroits */
@media (max-width: 480px) {
  .cc-card { padding: 16px; }
  .cc-actions { gap: 8px; margin-top: 12px; }
  .cc-title { font-size: 1rem; }
  .cc-note { font-size: .85rem; }
  .cc-toggle-row { padding: 8px 0; }
}

