/* Bandeau de consentement cookies — charte marine/sable/soleil */

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  max-width: 720px;
  margin-inline: auto;
  background: #0F2438;
  color: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 24px 64px rgba(4, 12, 20, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.consent-banner p { margin: 0; flex: 1 1 280px; color: rgba(255, 255, 255, 0.9); }
.consent-banner a { color: #9CCBEB; }

.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.consent-btn {
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 44px;
}

.consent-btn-accept { background: #E9A13B; color: #0F2438; }
.consent-btn-accept:hover { background: #D18A1F; }
.consent-btn-refuse { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.consent-btn-refuse:hover { border-color: #fff; }
.consent-btn-custom {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 10px 4px;
}
.consent-btn-custom:hover { color: #fff; }

/* Modale de personnalisation */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 310;
  background: rgba(15, 36, 56, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.consent-modal {
  background: #FDFBF6;
  color: #1F2B35;
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(4, 12, 20, 0.45);
}

.consent-modal h2 { font-size: 1.25rem; margin: 0 0 16px; }

.consent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(31, 43, 53, 0.08);
}

.consent-row strong { display: block; font-size: 0.9375rem; }
.consent-row small { color: rgba(31, 43, 53, 0.6); font-size: 0.8125rem; line-height: 1.4; display: block; max-width: 34ch; }

.consent-switch { position: relative; flex: none; width: 46px; height: 26px; }
.consent-switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.consent-switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(31, 43, 53, 0.25); transition: background 0.2s ease; pointer-events: none;
}
.consent-switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform 0.2s ease;
}
.consent-switch input:checked + .track { background: #256B9B; }
.consent-switch input:checked + .track::after { transform: translateX(20px); }
.consent-switch input:disabled + .track { background: #8FB3A0; opacity: 0.7; }
.consent-switch input:focus-visible + .track { outline: 2px solid #256B9B; outline-offset: 2px; }

.consent-modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.consent-btn-save { background: #17344E; color: #fff; }
.consent-btn-save:hover { background: #0F2438; }

/* Lien footer permanent */
.cookie-settings-link {
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: rgba(255, 255, 255, 0.75); font-size: 0.9375rem; padding: 12px 0;
  text-decoration: none;
}
.cookie-settings-link:hover { color: #fff; }

@media (max-width: 640px) {
  .consent-banner { flex-direction: column; align-items: stretch; }
  .consent-actions { justify-content: stretch; }
  .consent-btn { flex: 1; }
}
