/* ===== Anchor wrapper (reste dans la page) ===== */
.dp-instance{
  position: fixed;
  z-index: 2147483646; /* très haut, mais la popup sera encore au-dessus */
}
.dp-top-left{    top:15px; left:15px; }
.dp-top-right{   top:15px; right:15px; }
.dp-bottom-left{ bottom:15px; left:15px; }
.dp-bottom-right{bottom:15px; right:15px; }
.dp-middle-left{ top:50%; left:15px; transform:translateY(-50%); }
.dp-middle-right{top:50%; right:15px; transform:translateY(-50%); }

/* ===== Bouton + ===== */
.dp-trigger{
  position: relative;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--dp-btn,#0090d4); color:#fff; font-weight:700; font-size:24px;
  border:none; cursor:pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  z-index: 2147483646;
}
.dp-trigger.hidden{ display:none !important; }


/* ===== Popup portée sous <body> ===== */
.dp-popup{
  position: fixed; /* placé en JS */
  width: var(--dp-w); height: var(--dp-h);
  opacity: 0; pointer-events: none;
  transform: translate(0,0) scale(.86);
  will-change: transform, opacity;
  z-index: 2147483647; /* MAX */
}

/* Boîte réelle : dimensions fermes */
.dp-box{
  position: relative;
  width: 100%; height: 100%;
  border-radius: 12px; overflow: hidden;
  background: rgba(0,0,0,.75); /* remplacé par transparent si image */
  box-shadow: 0 12px 36px rgba(0,0,0,.25), 0 3px 10px rgba(0,0,0,.15);
}

/* Image de fond cliquable */
.dp-bg{
  position: absolute; inset: 0;
  background-image: var(--dp-bg);
  background-size: var(--dp-fit,cover);
  background-position: center;
  background-repeat: no-repeat;
}
.dp-bg-link{ display:block; z-index: 1; position:absolute; inset:0; }

/* Contenu HTML au-dessus de l’image */
.dp-content{
  position: relative;
  z-index: 2;
  color:#fff;
  font-size:14px;
  line-height:1.5;
  height: 100%;
  pointer-events: none;    /* 👈 NE PAS capter les clics par défaut */
}

/* …mais laisser les éléments interactifs cliquables */
.dp-content :is(a, button, input, select, textarea, label){
  pointer-events: auto;
}

/* Close au tout-dessus de la box */
.dp-close{
  position: absolute; z-index: 3;
  top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.6); color:#fff;
  border:none; cursor:pointer; font-size: 20px; line-height: 1;
}

/* État ouvert (activée en JS) */
.dp-popup.is-open{ opacity:1; pointer-events:auto; }

/* Lien "CSR" centré en bas de la popup (positionné vs .dp-box) */
/* Assure que .dp-box est bien la référence */
.dp-box { position: relative; }

/* Lien CSR bien centré en bas */
.dp-box .dp-bottom-link {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  z-index: 5;
}
.dp-box .dp-bottom-link:hover {
  background: rgba(0,0,0,.6);
}

/* === CTA buttons block (bottom-centered) === */
.dp-box { position: relative; } /* ensure absolute child anchors on the box */

/* Bloc d’actions (boutons empilés en bas de la popup) */
.dp-actions {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;   /* empile verticalement */
  align-items: center;
  justify-content: center;
  gap: 10px;                /* espace entre les boutons */
  width: 90%;               /* 👈 le conteneur prend 90% de la largeur de la popup */
  z-index: 5;
}

/* Boutons */
.dp-actions .dp-btn {
  display: block;
  width: 100%;              /* 👈 le bouton s’étend sur toute la largeur du conteneur */
  text-align: center;
  padding: 10px 18px;
  border-radius: 12px;      /* arrondi doux */
  background: rgba(0,144,212,.5);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  white-space: normal;      /* 👈 permet un retour à la ligne si besoin */
}

.dp-actions .dp-btn:hover {
  background: rgba(0,76,114,.85);
}

/* If you previously used .dp-bottom-link, you can remove it or leave it unused. */
