/* =============================================================================
   consent.css — CMP interne Odyssée Développement (look Axeptio)
   ============================================================================= */

/* ── Variables locales (alignées sur le thème Rbt) ───────────────────── */
:root {
  --ody-consent-primary:   #2f57ef;
  --ody-consent-secondary: #b966e7;
  --ody-consent-radius:    12px;
  --ody-consent-shadow:    0 8px 40px rgba(0, 0, 0, .18);
  --ody-consent-z:         9999;
}

/* ── Bandeau d'accueil (step 1) ───────────────────────────────────────── */
#ody-consent-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: var(--ody-consent-radius);
  box-shadow: var(--ody-consent-shadow);
  z-index: var(--ody-consent-z);
  padding: 24px 24px 20px;
  font-family: inherit;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s ease;
  will-change: transform, opacity;
}

#ody-consent-banner.ody-consent-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── Overlay fond (step 2) ────────────────────────────────────────────── */
#ody-consent-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(25, 35, 53, .55);
  z-index: calc(var(--ody-consent-z) - 1);
}

#ody-consent-overlay.ody-consent-visible {
  display: block;
}

/* ── Modale paramétrage (step 2) ──────────────────────────────────────── */
#ody-consent-settings {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  width: 540px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--ody-consent-radius);
  box-shadow: var(--ody-consent-shadow);
  z-index: var(--ody-consent-z);
  padding: 28px 28px 24px;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}

#ody-consent-settings.ody-consent-visible {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── En-tête partagé ─────────────────────────────────────────────────── */
.ody-consent-logo {
  display: block;
  margin-bottom: 12px;
}

.ody-consent-logo img {
  height: 32px;
  width: auto;
}

.ody-consent-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #192335;
  margin: 0 0 8px;
}

.ody-consent-desc {
  font-size: .88rem;
  color: #6b7385;
  line-height: 1.55;
  margin: 0 0 18px;
}

/* ── Boutons CTA ─────────────────────────────────────────────────────── */
.ody-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.ody-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-position .4s ease-in-out, background-color .2s, color .2s, border-color .2s;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

/* Tout accepter — gradient primaire */
.ody-consent-btn-accept {
  color: #fff;
  background-size: 300% 100%;
  background-image: linear-gradient(
    to right,
    var(--ody-consent-primary),
    var(--ody-consent-secondary),
    var(--ody-consent-secondary),
    var(--ody-consent-primary)
  );
  border-color: transparent;
}

.ody-consent-btn-accept:hover {
  background-position: 102% 0;
}

/* Tout refuser — neutre avec bordure */
.ody-consent-btn-reject {
  color: #192335;
  background: transparent;
  border-color: #c8ccd8;
}

.ody-consent-btn-reject:hover {
  border-color: var(--ody-consent-primary);
  color: var(--ody-consent-primary);
}

/* Enregistrer — variante outline primaire */
.ody-consent-btn-save {
  color: var(--ody-consent-primary);
  background: transparent;
  border-color: var(--ody-consent-primary);
}

.ody-consent-btn-save:hover {
  background: var(--ody-consent-primary);
  color: #fff;
}

/* Personnaliser — lien texte */
.ody-consent-btn-customize {
  background: none;
  border: none;
  color: var(--ody-consent-primary);
  font-size: .84rem;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.ody-consent-btn-customize:hover {
  color: var(--ody-consent-secondary);
}

/* ── Lien "En savoir plus" ───────────────────────────────────────────── */
.ody-consent-learn {
  display: block;
  margin-top: 12px;
  font-size: .8rem;
  color: #a0a8b4;
  text-align: center;
  text-decoration: none;
}

.ody-consent-learn:hover {
  color: var(--ody-consent-primary);
}

/* ── Catégories (step 2) ─────────────────────────────────────────────── */
.ody-consent-category {
  border: 1px solid #e6e3f1;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.ody-consent-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ody-consent-cat-title {
  font-size: .95rem;
  font-weight: 700;
  color: #192335;
  margin: 0;
}

.ody-consent-cat-desc {
  font-size: .82rem;
  color: #6b7385;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* Toggle switch */
.ody-consent-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}

.ody-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ody-consent-toggle-slider {
  position: absolute;
  inset: 0;
  background: #c8ccd8;
  border-radius: 50px;
  cursor: pointer;
  transition: background .2s;
}

.ody-consent-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

.ody-consent-toggle input:checked + .ody-consent-toggle-slider {
  background: var(--ody-consent-primary);
}

.ody-consent-toggle input:checked + .ody-consent-toggle-slider::before {
  transform: translateX(20px);
}

.ody-consent-toggle input:disabled + .ody-consent-toggle-slider {
  opacity: .6;
  cursor: not-allowed;
}

/* Badge "Toujours actif" pour la catégorie strictement nécessaire */
.ody-consent-always-on {
  font-size: .75rem;
  color: #3eb75e;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Accordion liste cookies */
.ody-consent-cookie-list-toggle {
  background: none;
  border: none;
  color: var(--ody-consent-primary);
  font-size: .78rem;
  cursor: pointer;
  padding: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.ody-consent-cookie-list-toggle:hover {
  text-decoration: underline;
}

.ody-consent-cookie-list {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  background: #f9f9ff;
  border-radius: 6px;
  font-size: .78rem;
  color: #6b7385;
}

.ody-consent-cookie-list.ody-open {
  display: block;
}

.ody-consent-cookie-list table {
  width: 100%;
  border-collapse: collapse;
}

.ody-consent-cookie-list th,
.ody-consent-cookie-list td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid #e6e3f1;
}

.ody-consent-cookie-list th {
  font-weight: 600;
  color: #192335;
}

/* Footer de la modale step 2 */
.ody-consent-settings-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e6e3f1;
}

/* Ajouter une classe CSS pour le bouton "Modifier mes préférences" dans rgpd.php */
.ody-consent-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  border: none;
  background-size: 300% 100%;
  background-image: linear-gradient(
    to right,
    var(--ody-consent-primary),
    var(--ody-consent-secondary),
    var(--ody-consent-secondary),
    var(--ody-consent-primary)
  );
  transition: background-position .4s ease-in-out;
}

.ody-consent-cta-button:hover {
  background-position: 102% 0;
}
@media (max-width: 767px) {
  #ody-consent-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: var(--ody-consent-radius) var(--ody-consent-radius) 0 0;
    padding: 20px 16px 16px;
  }

  #ody-consent-settings {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateX(0) translateY(0) scale(1);
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--ody-consent-radius) var(--ody-consent-radius) 0 0;
    padding: 20px 16px 16px;
  }

  #ody-consent-settings.ody-consent-visible {
    transform: none;
  }

  .ody-consent-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ody-consent-btn {
    justify-content: center;
  }

  .ody-consent-settings-footer {
    flex-direction: column;
  }
}
