:root{
  --hp-bg-top: #013086;
  --hp-bg-bottom: #002142;
  --hp-cta: #FEAA00;
  --hp-overlay: rgba(0,0,0,0.55);
  --hp-radius-modal: 6px;
  --hp-font-main: 'Montserrat', Arial, sans-serif;
}

/* Overlay */
.hp-nexaf-overlay {
  position: fixed;
  inset: 0;
  background: var(--hp-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  -webkit-overflow-scrolling: touch;
}

/* Modal */
.hp-nexaf-modal {
  box-sizing: border-box;
  max-width: 900px;
  width: calc(100% - 32px);
  border-radius: var(--hp-radius-modal);
  background: linear-gradient(180deg, var(--hp-bg-top), var(--hp-bg-bottom));
  color: #fff; /* texte par défaut blanc */
  padding: 32px 48px;
  font-family: var(--hp-font-main);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 280ms cubic-bezier(.22,.9,.3,1), opacity 280ms cubic-bezier(.22,.9,.3,1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  position: relative;
  outline: none;
}

/* Show class */
.hp-nexaf-overlay.show .hp-nexaf-modal {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
.hp-nexaf-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* Layout */
.hp-nexaf-inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Left column (image) - DESKTOP: réduit de 50% (360px -> 180px) */
.hp-nexaf-left {
  flex: 0 0 180px;    /* largeur fixe de la colonne image */
  max-width: 180px;
}

.hp-nexaf-image-wrap {
  width: 180px;
  height: auto;
}

.hp-nexaf-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

/* Right column */
.hp-nexaf-right {
  flex: 1 1 0;
  min-width: 180px;
  color: #fff; /* forcer texte blanc */
}

/* Title / subtitle / desc */
.hp-nexaf-modal h1 {
  font-size: 40px;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  line-height: 1;
  color: #fff;
}

.hp-nexaf-subtitle {
  font-size: 26px;
  margin: 0 0 16px 0;
  color: #fff;
}

.hp-nexaf-desc {
  font-size: 16px;
  line-height: 1.8;
  margin-top: 12px;
  color: #fff;
}

/* Ensure links inside description are white and visible */
.hp-nexaf-desc a {
  color: #fff;
  text-decoration: underline;
}

/* Bottom row */
.hp-nexaf-bottom {
  margin-top: 20px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hp-nexaf-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 56px;
  border-radius: 28px;
  background: var(--hp-cta);
  color: #fff; /* texte du CTA en blanc */
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Avatar support (if added inside description) */
.hp-nexaf-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 6px solid var(--hp-cta);
  object-fit: cover;
}

/* Mobile stacked layout (<=767px) */
@media (max-width: 767px) {
  .hp-nexaf-modal {
    padding: 20px 16px;
    max-width: 420px;
  }
  .hp-nexaf-inner {
    display: block;
    text-align: center;
  }
  .hp-nexaf-left {
    margin: 8px auto;
    flex: 0 0 auto;
    max-width: 220px;
    width: 220px;
  }
  .hp-nexaf-image-wrap {
    max-width: 220px;
    margin: 6px auto;
    width: 100%;
  }
  .hp-nexaf-modal h1 {
    font-size: 22px;
    color: #fff;
  }
  .hp-nexaf-subtitle {
    font-size: 18px;
    margin-top: 8px;
    color: #fff;
  }
  .hp-nexaf-desc {
    font-size: 15px;
    margin-top: 8px;
    text-align: left;
    color: #fff;
  }
  .hp-nexaf-bottom {
    margin-top: 16px;
  }
  .hp-nexaf-cta {
    width: calc(100% - 32px);
    height: 48px;
    border-radius: 24px;
    margin: 0 auto;
    color: #fff;
  }
}

/* Close animation (reverse) */
.hp-nexaf-overlay.hiding .hp-nexaf-modal {
  transition: transform 200ms ease-in, opacity 200ms ease-in;
  transform: translateY(8px);
  opacity: 0;
}
