/**
 * FFD Exit-Intent — modale style FFD.
 * Couleurs : rouge #e2001a (CTA, header), bleu nuit #015270 (titre alt), blanc.
 */

#ffd-exit-intent-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  pointer-events: none;
}

#ffd-exit-intent-root.is-visible {
  display: block;
  pointer-events: auto;
}

.ffd-eipopup-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  animation: ffd-eipopup-fade 0.25s ease-out;
}

.ffd-eipopup-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: ffd-eipopup-pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  font-family: 'Open Sans', Arial, sans-serif;
}

.ffd-eipopup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #015270;
  font-size: 28px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.15s, color 0.15s;
}

.ffd-eipopup-close:hover,
.ffd-eipopup-close:focus {
  background-color: #e2001a;
  color: #ffffff;
  outline: none;
}

.ffd-eipopup-image {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #f3f3f3;
}

.ffd-eipopup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ffd-eipopup-body {
  padding: 28px 32px 32px;
}

.ffd-eipopup-title {
  margin: 0 0 14px 0;
  font-family: 'Capriola', 'Open Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #015270;
  text-transform: none;
}

.ffd-eipopup-text {
  margin: 0 0 22px 0;
  font-size: 15px;
  line-height: 1.55;
  color: #2b2b2b;
}

.ffd-eipopup-text p {
  margin: 0 0 10px 0;
}

.ffd-eipopup-text a {
  color: #e2001a;
  text-decoration: underline;
}

.ffd-eipopup-cta {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background-color: #e2001a;
  color: #ffffff !important;
  text-align: center;
  text-decoration: none !important;
  font-family: 'Capriola', 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  transition: background-color 0.15s, transform 0.1s;
  box-sizing: border-box;
}

.ffd-eipopup-cta:hover,
.ffd-eipopup-cta:focus {
  background-color: #b00015;
  outline: none;
  transform: translateY(-1px);
}

body.ffd-eipopup-open {
  overflow: hidden;
}

@keyframes ffd-eipopup-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ffd-eipopup-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 600px) {
  .ffd-eipopup-modal {
    width: calc(100vw - 24px);
    border-radius: 6px;
  }
  .ffd-eipopup-body {
    padding: 22px 20px 24px;
  }
  .ffd-eipopup-title {
    font-size: 18px;
  }
}
