/* Packs Exoring : cartes (même style que les cartes produit) + configurateur en popup. */

.exo-packs__grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.exo-pack-carte::before { display: none; }          /* pas de pastille de couleur */
/* une seule photo : pas de bascule au survol (classe exo-visuel__base absente), image toujours visible */
.exo-pack-carte .exo-visuel img { opacity: 1 !important; }
.exo-pack-carte__visuel {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}
.exo-pack-carte__remise {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  padding: 4px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.exo-pack-carte__info del {
  margin-right: 8px;
  color: #8a8f96;
}
.exo-pack-carte__prix {
  color: #2f74b8;
  font-size: 1.1rem;
}
.exo-pack-carte__bouton {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.exo-pack-carte__bouton:hover { background: #2f74b8; }

/* Mobile : une rangée qui défile, comme les carrousels produit (2026-11-20, retour de Jérémy) :
   presque bord à bord (5 px), cartes à 82 %, 1re calée à gauche, dernière à droite, milieu centré. */
@media (max-width: 781px) {
  .exo-packs__grille {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 5px;
    gap: 14px;
    margin-left: calc(5px - var(--wp--style--root--padding-left, 0px));
    margin-right: calc(5px - var(--wp--style--root--padding-right, 0px));
    padding: 0 0 8px;
    scrollbar-width: none;
  }
  .exo-packs__grille::-webkit-scrollbar { display: none; }
  .exo-pack-carte {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .exo-pack-carte:first-child { scroll-snap-align: start; }
  .exo-pack-carte:last-child { scroll-snap-align: end; }
}

/* ---- Popup ---- */
html.exo-pack-ouvert { overflow: hidden; }
.exo-pack-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exo-pack-modal[hidden] { display: none; }
.exo-pack-modal__fond {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
}
.exo-pack-modal__boite {
  position: relative;
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px 28px 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.exo-pack-modal__fermer {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f6;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.exo-pack-modal__titre { margin: 0 0 4px; font-size: 1.6rem; }
.exo-pack-modal__sous-titre { margin: 0 0 18px; color: #4b5563; }
.exo-pack-etape { margin-bottom: 20px; }
.exo-pack-etape__titre {
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px;
  font-weight: 700;
}
.exo-pack-etape__compteur {
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1f3f6;
  font-size: 0.9rem;
}
.exo-pack-etape__compteur--ok { background: #e3f6e8; color: #1c7c3a; }
.exo-pack-etape__couleurs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.exo-pack-couleur {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  text-align: center;
  transition: border-color 0.2s ease;
}
.exo-pack-couleur--choisie { border-color: #2f74b8; background: #f5f9ff; }
.exo-pack-couleur--indispo { opacity: 0.45; }
.exo-pack-couleur__pastille {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.exo-pack-couleur__nom { font-size: 0.9rem; line-height: 1.2; }
.exo-pack-couleur__qte { display: flex; align-items: center; gap: 8px; }
.exo-pack-couleur__qte button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.exo-pack-couleur__qte button:disabled { background: #d1d5db; cursor: default; }
.exo-pack-couleur__qte output { min-width: 14px; font-weight: 700; }
.exo-pack-modal__pied {
  position: sticky;
  bottom: 0;
  margin: 0 -28px;
  padding: 16px 28px 20px;
  border-top: 1px solid #eef0f3;
  background: #fff;
}
.exo-pack-modal__prix { margin-bottom: 10px; }
.exo-pack-modal__prix del { color: #8a8f96; margin-right: 6px; }
.exo-pack-modal__prix strong { font-size: 1.3rem; color: #2f74b8; }
.exo-pack-modal__prix span { display: block; font-size: 0.9rem; color: #1c7c3a; }
.exo-pack-modal__ajouter {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.exo-pack-modal__ajouter:disabled { background: #c7cbd1; cursor: default; }
.exo-pack-modal__erreur { margin: 8px 0 0; color: #b42318; font-size: 0.9rem; }
.exo-pack-modal__erreur:empty { display: none; }

@media (max-width: 600px) {
  .exo-pack-modal { align-items: flex-end; }
  .exo-pack-modal__boite {
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 24px 18px 0;
  }
  .exo-pack-modal__pied { margin: 0 -18px; padding: 14px 18px 18px; }
  .exo-pack-etape__couleurs { grid-template-columns: repeat(3, 1fr); }
}


/* Mobile (retour de Jérémy du 2026-11-20) : la fenêtre ne doit pas passer sous la barre d'adresse
   (100vh l'inclut : on prend la hauteur réellement visible, dvh), bouton fermer toujours visible,
   cases plus compactes, et la bulle de chat Crisp masquée tant que la fenêtre est ouverte. */
html.exo-pack-ouvert .crisp-client,
html.exo-pack-ouvert #crisp-chatbox { display: none !important; }
.exo-pack-modal { height: 100vh; height: 100dvh; }
@media (max-width: 600px) {
  .exo-pack-modal__boite {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding-top: 18px;
  }
  .exo-pack-modal__fermer {
    position: sticky;
    top: 0;
    float: right;
    margin: -6px -6px 0 8px;
    z-index: 2;
  }
  .exo-pack-modal__titre { font-size: 1.35rem; }
  .exo-pack-modal__sous-titre { margin-bottom: 12px; font-size: 0.92rem; }
  .exo-pack-etape { margin-bottom: 14px; }
  .exo-pack-etape__couleurs { gap: 8px; }
  .exo-pack-couleur { padding: 8px 4px; gap: 4px; border-radius: 12px; }
  .exo-pack-couleur__pastille { width: 22px; height: 22px; }
  .exo-pack-couleur__nom { font-size: 0.82rem; }
  .exo-pack-couleur__qte { gap: 6px; }
  .exo-pack-couleur__qte button { width: 28px; height: 28px; font-size: 1rem; }
  .exo-pack-modal__pied { padding-top: 10px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .exo-pack-modal__prix { margin-bottom: 8px; }
  .exo-pack-modal__prix strong { font-size: 1.15rem; }
  .exo-pack-modal__ajouter { padding: 12px; }
}

/* Pastille « JUSQU'À −25 % AVEC LES PACKS » sur une ligne (sans les visuels, 2026-11-20). */
.exo-packs-intro h5 {
  width: fit-content;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
}
