@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/libre-baskerville-latin-700-normal.woff2') format('woff2'),
       url('../fonts/libre-baskerville-latin-700-normal.woff') format('woff');
}

/* Les variables sont redéfinies par les réglages du module (attribut style) */
.croq-popup {
  --croq-brown: #a7bc44;        /* couleur principale */
  --croq-brown-dark: #8ea03a;  /* survol (calculé) */
  --croq-btn-text: #333333;     /* texte du bouton principal */
  --croq-cream: #ffffff;        /* fond */
  --croq-alt: #f5f5f5;          /* fond secondaire */
  --croq-text: #333333;
  --croq-muted: #333333;
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  visibility: hidden; opacity: 0;
  transition: opacity .3s ease, visibility .3s;
}
/* Évite que padding et bordures élargissent les éléments (bouton trop large) */
.croq-popup, .croq-popup *, .croq-popup *::before, .croq-popup *::after { box-sizing: border-box; }

.croq-popup.is-open { visibility: visible; opacity: 1; }
.croq-popup__overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(30, 30, 30, .55); }

.croq-popup__box {
  position: relative;
  display: flex;
  width: 100%; max-width: 700px;
  max-height: calc(100vh - 32px);
  background: var(--croq-cream);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
  overflow: hidden;
  transform: translateY(14px);
  transition: transform .35s ease;
}
.croq-popup.is-open .croq-popup__box { transform: none; }

/* Colonne photo */
.croq-popup__photo { flex: 0 0 34%; position: relative; overflow: hidden; background: var(--croq-alt); }
.croq-popup__photo img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; max-width: none; object-fit: cover; display: block;
}

/* Bouton fermer */
.croq-popup__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; padding: 8px;
  background: none; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--croq-text);
}
.croq-popup__close svg { display: block; }
.croq-popup__close:hover { background: var(--croq-alt); }

/* Colonne contenu : tout est aligné sur la même marge */
.croq-popup__content {
  flex: 1 1 auto; min-width: 0;
  overflow-x: hidden; overflow-y: auto;
  padding: 26px 28px 22px;
  color: var(--croq-text);
}
.croq-popup__logo { max-width: 220px; max-height: 48px; width: auto; height: auto; display: block; margin: 0 44px 22px 0; }

.croq-popup__title {
  font-weight: 700; font-size: 1.8rem; line-height: 1.2;
  margin: 0 0 14px; color: var(--croq-text); text-transform: none;
  text-wrap: balance; /* évite un mot isolé en fin de ligne */
}
/* Police incluse ; avec « Police du site », le titre reprend celle des titres du thème */
.croq-popup:not(.croq-popup--font-site) .croq-popup__title {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
}
.croq-popup__paw { display: inline-block; width: .85em; height: .85em; vertical-align: -.05em; color: var(--croq-brown); }
.croq-popup__paw svg { display: block; width: 100%; height: 100%; }
.croq-popup__text { font-size: 1rem; line-height: 1.55; color: var(--croq-muted); margin: 0 0 20px; }

/* Rangée d'avantages, sur fond secondaire comme le bandeau du site */
.croq-popup__features {
  display: flex; list-style: none; margin: 0 0 18px; padding: 12px 4px;
  background: var(--croq-alt); border-radius: 8px;
}
.croq-popup__features li {
  flex: 1 1 0; min-width: 0; text-align: center; padding: 0 4px;
  font-size: .7rem; line-height: 1.3; font-weight: 600; color: var(--croq-text);
}
.croq-popup__features svg {
  display: block; width: 26px; height: 26px; margin: 0 auto 6px;
  fill: none; stroke: var(--croq-brown); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
}

/* Boutons : mêmes dimensions pour les deux */
.croq-popup__btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 52px; padding: 0 18px; margin: 0 0 10px;
  border: 2px solid transparent; border-radius: 8px;
  font-family: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.2;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color .2s, border-color .2s, color .2s;
}
.croq-popup__btn--main { background: var(--croq-brown); border-color: var(--croq-brown); color: var(--croq-btn-text); }
.croq-popup__btn--main:hover, .croq-popup__btn--main:focus {
  background: var(--croq-brown-dark); border-color: var(--croq-brown-dark); color: var(--croq-btn-text); text-decoration: none;
}
.croq-popup__btn--main svg {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.croq-popup__pin { margin-right: 12px; }
.croq-popup__arrow { margin-left: 16px; transition: transform .2s; }
.croq-popup__btn--main:hover .croq-popup__arrow { transform: translateX(3px); }

.croq-popup__btn--ghost { background: var(--croq-cream); color: var(--croq-text); border-color: var(--croq-text); }
.croq-popup__btn--ghost:hover { background: var(--croq-alt); }
.croq-popup__btn:focus-visible, .croq-popup__close:focus-visible { outline: 3px solid var(--croq-brown); outline-offset: 2px; }

.croq-popup__note { margin: 10px 0 0; font-size: .72rem; line-height: 1.5; text-align: center; color: var(--croq-muted); opacity: .8; }

body.croq-popup-lock { overflow: hidden; }

/* Écrans peu hauts (portables 13") : on resserre */
@media (max-height: 720px) and (min-width: 681px) {
  .croq-popup__logo { margin-bottom: 14px; }
  .croq-popup__title { font-size: 1.55rem; margin-bottom: 10px; }
  .croq-popup__text { margin-bottom: 14px; }
  .croq-popup__features { margin-bottom: 14px; padding: 10px 4px; }
}

/* Tablette / mobile : photo en bandeau au-dessus */
@media (max-width: 680px) {
  .croq-popup__box { flex-direction: column; overflow-y: auto; }
  .croq-popup__photo { flex: 0 0 150px; }
  .croq-popup__content { overflow: visible; padding: 20px 18px 18px; }
  .croq-popup__title { font-size: 1.45rem; }
  .croq-popup__close { background: rgba(255, 255, 255, .92); }
}
@media (max-width: 420px) {
  .croq-popup__features { flex-wrap: wrap; }
  .croq-popup__features li { flex: 0 0 50%; margin: 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .croq-popup, .croq-popup__box, .croq-popup__arrow { transition: none; }
}
