/* ═══ COOKIE CONSENT BANNER ═══ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

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

.cookie-banner__inner {
  max-width: 480px;
  margin: 0 auto 24px;
  padding: 28px 28px 0;
  background: var(--blanc);
  border-radius: var(--radius-lg);
  box-shadow:
    0 -4px 40px rgba(0, 0, 0, 0.10),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

.cookie-banner__dismiss {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gris-400);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: 20px;
  cursor: pointer;
}

.cookie-banner__dismiss:hover {
  color: var(--noir);
}

.cookie-banner__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.cookie-banner__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.cookie-banner__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  color: var(--noir);
}

.cookie-banner__logo {
  display: block;
  height: 28px;
  width: auto;
  margin-top: 4px;
}

.cookie-banner__text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gris-500);
  margin-bottom: 16px;
}

.cookie-banner__link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--noir);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 24px;
}

.cookie-banner__link:hover {
  color: var(--accent-dark);
}

.cookie-banner__actions {
  display: flex;
  border-top: 1px solid var(--gris-200);
  margin: 0 -28px;
}

.cookie-banner__btn {
  flex: 1;
  padding: 18px 16px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.cookie-banner__btn--choose {
  background: transparent;
  color: var(--accent-dark);
  border-right: 1px solid var(--gris-200);
  border-radius: 0 0 0 var(--radius-lg);
}

.cookie-banner__btn--choose:hover {
  background: var(--gris-50);
}

.cookie-banner__btn--accept {
  background: var(--noir);
  color: var(--blanc);
  border-radius: 0 0 var(--radius-lg) 0;
}

.cookie-banner__btn--accept:hover {
  background: var(--gris-800);
}

/* ═══ COOKIE DETAIL PANEL ═══ */

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

.cookie-panel--visible {
  opacity: 1;
  pointer-events: auto;
}

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

.cookie-panel__inner {
  position: relative;
  background: var(--blanc);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-panel--visible .cookie-panel__inner {
  transform: scale(1);
}

.cookie-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.cookie-panel__header h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--noir);
}

.cookie-panel__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris-400);
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.cookie-panel__close:hover {
  background: var(--gris-50);
  color: var(--noir);
}

.cookie-panel__section {
  padding: 20px 0;
  border-top: 1px solid var(--gris-200);
}

.cookie-panel__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-panel__row h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--noir);
  margin-bottom: 4px;
}

.cookie-panel__row p {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--gris-500);
}

.cookie-panel__always {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: rgba(13, 124, 74, 0.08);
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cookie-panel__details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--gris-50);
  border-radius: 8px;
}

.cookie-panel__cookie-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--noir);
  flex-shrink: 0;
}

.cookie-panel__cookie-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--gris-500);
}

/* Toggle switch */
.cookie-panel__toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-panel__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-panel__toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gris-200);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-panel__toggle-slider::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--blanc);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.cookie-panel__toggle input:checked + .cookie-panel__toggle-slider {
  background: var(--success);
}

.cookie-panel__toggle input:checked + .cookie-panel__toggle-slider::after {
  transform: translateX(20px);
}

.cookie-panel__actions {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--gris-200);
  margin: 20px -32px -32px;
}

.cookie-panel__actions .cookie-banner__btn {
  border-radius: 0;
}

.cookie-panel__actions .cookie-banner__btn--choose {
  border-radius: 0 0 0 var(--radius-lg);
}

.cookie-panel__actions .cookie-banner__btn--accept {
  border-radius: 0 0 var(--radius-lg) 0;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 520px) {
  .cookie-banner__inner {
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: none;
  }

  .cookie-banner__btn--choose {
    border-radius: 0;
  }

  .cookie-banner__btn--accept {
    border-radius: 0;
  }
}
