/* ============================================================
   GDPR Cookie Consent — Style Axeptio
   PrestaShop 1.7.8.8
   ============================================================ */

/* ── Variables ── */
:root {
  --gdpr-accent:      #FF6B6B;
  --gdpr-accent-dark: #e05555;
  --gdpr-green:       #5CB85C;
  --gdpr-green-dark:  #4a9c4a;
  --gdpr-neutral:     #6c757d;
  --gdpr-bg:          #FFFFFF;
  --gdpr-text:        #2d2d2d;
  --gdpr-text-light:  #6c757d;
  --gdpr-border:      #f0ece6;
  --gdpr-shadow:      0 8px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  --gdpr-radius:      20px;
  --gdpr-font:        'Helvetica Neue', Arial, sans-serif;
  --gdpr-z:           99999;
}

/* ── Utilitaires ── */
.gdpr-hidden { display: none !important; }

/* ── Wrapper positionnel ── */
#gdpr-cookie-wrapper {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: var(--gdpr-z);
  font-family: var(--gdpr-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--gdpr-text);
}

#gdpr-cookie-wrapper[data-position="bottom-right"] {
  left: auto;
  right: 24px;
}

/* ── Bulle principale ── */
.gdpr-bubble {
  background: var(--gdpr-bg);
  border-radius: var(--gdpr-radius);
  box-shadow: var(--gdpr-shadow);
  width: 380px;
  max-width: calc(100vw - 48px);
  overflow: hidden;
  animation: gdpr-slide-in .35s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes gdpr-slide-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── Header ── */
.gdpr-bubble__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 0;
}

.gdpr-bubble__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.gdpr-bubble__avatar svg {
  width: 100%;
  height: 100%;
}

.gdpr-bubble__title-block {
  flex: 1;
  min-width: 0;
}

.gdpr-bubble__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gdpr-accent);
  margin-bottom: 2px;
}

.gdpr-bubble__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gdpr-text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gdpr-bubble__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gdpr-text-light);
  border-radius: 50%;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gdpr-bubble__close:hover {
  background: var(--gdpr-border);
  color: var(--gdpr-text);
}

.gdpr-bubble__close svg {
  width: 14px;
  height: 14px;
}

/* ── Body ── */
.gdpr-bubble__body {
  padding: 16px 20px;
}

.gdpr-bubble__desc {
  margin: 0 0 16px;
  color: var(--gdpr-text-light);
  font-size: 13px;
  line-height: 1.6;
}

.gdpr-link {
  color: var(--gdpr-accent);
  text-decoration: underline;
  font-weight: 600;
}

.gdpr-link:hover { color: var(--gdpr-accent-dark); }

/* ── Services ── */
.gdpr-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gdpr-service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fafaf9;
  border: 1px solid var(--gdpr-border);
  border-radius: 12px;
  transition: border-color .2s;
}

.gdpr-service:hover { border-color: #d5cfc8; }

.gdpr-service--required {
  background: #f8faf8;
  border-color: #d4ead4;
}

.gdpr-service__icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.gdpr-service__info {
  flex: 1;
  min-width: 0;
}

.gdpr-service__info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gdpr-text);
  margin-bottom: 1px;
}

.gdpr-service__info span {
  display: block;
  font-size: 11px;
  color: var(--gdpr-text-light);
  line-height: 1.4;
}

.gdpr-service__toggle {
  flex-shrink: 0;
}

/* Badge "Toujours actif" */
.gdpr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gdpr-green);
  background: #e8f5e9;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Toggle Switch ── */
.gdpr-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.gdpr-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.gdpr-switch__slider {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  background: #ccc;
  border-radius: 24px;
  transition: background .25s;
}

.gdpr-switch__slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .25s cubic-bezier(.22,.68,0,1.3);
}

.gdpr-switch input:checked + .gdpr-switch__slider {
  background: var(--gdpr-green);
}

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

.gdpr-switch input:focus-visible + .gdpr-switch__slider {
  outline: 2px solid var(--gdpr-accent);
  outline-offset: 2px;
}

/* ── Footer / Boutons ── */
.gdpr-bubble__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 20px;
  flex-wrap: wrap;
}

.gdpr-btn {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 50px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .12s, box-shadow .18s;
  white-space: nowrap;
  text-align: center;
}

.gdpr-btn:active { transform: scale(.97); }

.gdpr-btn--outline {
  background: transparent;
  border: 2px solid var(--gdpr-border);
  color: var(--gdpr-text-light);
}

.gdpr-btn--outline:hover {
  border-color: var(--gdpr-neutral);
  color: var(--gdpr-text);
}

.gdpr-btn--secondary {
  background: #f0ece6;
  color: var(--gdpr-text);
}

.gdpr-btn--secondary:hover {
  background: #e5dfd6;
}

.gdpr-btn--primary {
  background: var(--gdpr-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,107,107,.35);
}

.gdpr-btn--primary:hover {
  background: var(--gdpr-accent-dark);
  box-shadow: 0 6px 18px rgba(255,107,107,.45);
}

/* ── Bouton de réouverture ── */
.gdpr-reopen {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--gdpr-bg);
  box-shadow: var(--gdpr-shadow);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
  animation: gdpr-slide-in .3s ease both;
}

.gdpr-reopen:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(0,0,0,.18);
}

/* ── Responsive mobile ── */
@media (max-width: 480px) {
  /* Wrapper : collé en bas à gauche, comme Axeptio */
  #gdpr-cookie-wrapper {
    bottom: 16px !important;
    left: 16px !important;
    right: auto !important;
    top: auto !important;
    max-width: calc(100vw - 32px) !important;
  }

  #gdpr-cookie-wrapper[data-position="bottom-right"] {
    left: auto !important;
    right: 16px !important;
  }

  /* La bulle s'adapte à la largeur dispo */
  .gdpr-bubble {
    width: calc(100vw - 32px);
    max-width: 400px;
    border-radius: var(--gdpr-radius);
    animation: gdpr-slide-up .35s cubic-bezier(.22,.68,0,1.2) both;
  }

  @keyframes gdpr-slide-up {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
  }

  /* Bouton de réouverture : reste dans le flux du wrapper, bas gauche */
  .gdpr-reopen {
    position: static !important;
    transform: none !important;
  }
}

/* ── Accessibilité : réduction de mouvement ── */
@media (prefers-reduced-motion: reduce) {
  .gdpr-bubble,
  .gdpr-reopen {
    animation: none;
  }
  .gdpr-switch__slider,
  .gdpr-switch__slider::after,
  .gdpr-btn {
    transition: none;
  }
}
