/* cookie-consent.css — PROF_MathsCPGE AI
   Palette basée sur le violet foncé de la marque (~#2D2560). */

:root {
  --cc-primary: #2D2560;
  --cc-primary-hover: #3d3380;
  --cc-text: #1f1f1f;
  --cc-bg: #ffffff;
  --cc-border: #e2e2e2;
}

.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  background: var(--cc-bg);
  border-top: 1px solid var(--cc-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  font-family: inherit;
}

.cc-banner__text {
  flex: 1 1 480px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cc-text);
}

.cc-banner__text a {
  color: var(--cc-primary);
  font-weight: 600;
  text-decoration: none;
}

.cc-banner__text a:hover {
  text-decoration: underline;
}

.cc-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 260px;
}

.cc-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 24px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cc-btn--primary {
  background: var(--cc-primary);
  color: #ffffff;
  border: 1px solid var(--cc-primary);
}

.cc-btn--primary:hover {
  background: var(--cc-primary-hover);
}

.cc-btn--ghost {
  background: transparent;
  color: var(--cc-primary);
  border: 1px solid var(--cc-border);
}

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

/* Modal de paramétrage */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
}

.cc-modal {
  background: var(--cc-bg);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  font-family: inherit;
}

.cc-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--cc-primary);
}

.cc-modal__intro {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--cc-text);
}

.cc-category {
  border-top: 1px solid var(--cc-border);
  padding: 16px 0;
}

.cc-category__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-category__label {
  font-weight: 700;
  font-size: 14px;
  color: var(--cc-text);
}

.cc-category__desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

.cc-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Switch style toggle */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-switch__slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 22px;
  transition: 0.15s;
}

.cc-switch__slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.15s;
}

.cc-switch input:checked + .cc-switch__slider {
  background-color: var(--cc-primary);
}

.cc-switch input:checked + .cc-switch__slider::before {
  transform: translateX(18px);
}

.cc-switch input:disabled + .cc-switch__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .cc-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-banner__actions {
    flex: 1 1 auto;
  }
}
