:root {
  --ncc-primary: #1D3747;
  --ncc-secondary: #38AC85;
  --ncc-bg: #ffffff;
  --ncc-text: #1D3747;
  --ncc-btn-text: #ffffff;
}

/* Bandeau */

.ncc-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ncc-bg);
  color: var(--ncc-text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.85rem;
  line-height: 1.4;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.ncc-banner--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ncc-banner__text {
  flex: 1 1 auto;
}

.ncc-banner__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.ncc-banner__desc {
  margin: 0;
  font-size: 16px;
}

.ncc-banner__link {
  color: var(--ncc-primary);
  text-decoration: underline;
  font-weight: 500;
}

.ncc-banner__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Boutons */

.ncc-btn {
  cursor: pointer;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ncc-btn--primary {
  background: var(--ncc-primary);
  color: var(--ncc-btn-text);
  border-color: var(--ncc-primary);
}

.ncc-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.ncc-btn--secondary {
  background: transparent;
  color: var(--ncc-primary);
  border-color: var(--ncc-primary);
}

.ncc-btn--secondary:hover {
  background: rgba(29, 55, 71, 0.06);
}

.ncc-btn--ghost {
  background: transparent;
  color: var(--ncc-text);
  border-color: transparent;
  text-decoration: underline;
  padding-left: 0;
  padding-right: 0;
}

.ncc-btn--ghost:hover {
  color: var(--ncc-primary);
}

/* Panel de personnalisation */

.ncc-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.ncc-panel--open {
  opacity: 1;
  pointer-events: auto;
}

.ncc-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.ncc-panel__inner {
  position: relative;
  z-index: 1;
  background: #ffffff;
  max-width: 640px;
  width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  border-radius: 18px;
  padding: 1.5rem 1.7rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}

.ncc-panel__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  color: #999999;
}

.ncc-panel__title {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  color: var(--ncc-text);
}

.ncc-panel__intro {
  margin-top: 0;
  font-size: 0.9rem;
  color: #4f5c63;
}

.ncc-panel__categories {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ncc-panel__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #ececec;
}

.ncc-panel__category:last-child {
  border-bottom: none;
}

.ncc-panel__category-text h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  color: var(--ncc-text);
}

.ncc-panel__category-text p {
  margin: 0;
  font-size: 0.82rem;
  color: #61707a;
}

.ncc-panel__buttons {
  margin-top: 1.2rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.ncc-panel__back {
  margin-top: 0.7rem;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: var(--ncc-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* Toggle switch */

.ncc-toggle {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 22px;
  align-items: center;
}

.ncc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ncc-toggle__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d0d4d8;
  transition: 0.2s;
}

.ncc-toggle__slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}

.ncc-toggle input:checked + .ncc-toggle__slider {
  background: var(--ncc-primary);
}

.ncc-toggle input:checked + .ncc-toggle__slider::before {
  transform: translateX(20px);
}

.ncc-toggle input:disabled + .ncc-toggle__slider {
  opacity: 0.5;
}

/* Lien "Gérer mes cookies" */

.ncc-preferences-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.85rem;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Responsive */

@media (max-width: 600px) {
  .ncc-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .ncc-banner__buttons {
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-left: 0;
  }
}
