/**
 * PixMyEvent — Correctifs configurateur (2.4.0)
 *
 * Chargée en dernier (après booking.css puis pme-booking.css) pour neutraliser
 * les conflits historiques entre les deux feuilles.
 *
 * 1. Vignettes « type d'évènement » : les pistes de grille étaient déclarées en
 *    `1fr` (et non `minmax(0,1fr)`). Un contenu plus large que la piste — image
 *    ou libellé long — force alors l'élargissement de la colonne : les cartes
 *    débordent du conteneur et se chevauchent au lieu de passer à la ligne.
 * 2. `.pme-ev-card` était forcé en `display:flex` par la feuille legacy, ce qui
 *    annulait le `grid-template-columns:92px 1fr` prévu en mobile.
 * 3. Styles des nouveaux liens « En savoir plus » (fiches produit / SEO).
 */

/* ============================================================
 * 1) Grilles — jamais de débordement, toujours un retour ligne
 * ============================================================ */

.pme-booking .pme-event-types,
.pme-booking--progressive .pme-event-types.pme-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

/* Les enfants de grille valent `min-width:auto` par défaut : c'est cette valeur
   qui empêchait la compression et provoquait le chevauchement. */
.pme-booking .pme-ev-card,
.pme-booking .pme-formula-card,
.pme-booking .pme-acc-card,
.pme-booking .pme-reco-card,
.pme-booking .pme-frame-card,
.pme-booking .pme-service-card,
.pme-booking .pme-service-cell {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere;
}

/* ============================================================
 * 2) Carte « type d'évènement »
 * ============================================================ */

.pme-booking .pme-ev-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.pme-booking .pme-ev-cover {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 96px !important;
  overflow: hidden !important;
}

.pme-booking .pme-ev-cover img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.pme-booking .pme-ev-title {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Tablette : deux colonnes confortables. */
@media (max-width: 980px) {
  .pme-booking .pme-event-types,
  .pme-booking--progressive .pme-event-types.pme-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 10px !important;
  }
}

/* Mobile : passage en lignes vignette + libellé, plus de chevauchement. */
@media (max-width: 700px) {
  .pme-booking .pme-event-types,
  .pme-booking--progressive .pme-event-types.pme-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .pme-booking .pme-ev-card {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    align-items: center !important;
    align-content: center !important;
    text-align: left !important;
    padding: 8px !important;
  }

  .pme-booking .pme-ev-cover {
    height: 66px !important;
  }

  .pme-booking .pme-ev-title {
    text-align: left !important;
    font-size: 15px !important;
  }
}

/* Très petits écrans : on garde deux vignettes par ligne si la place le permet. */
@media (max-width: 420px) {
  .pme-booking .pme-ev-card {
    grid-template-columns: 78px minmax(0, 1fr) !important;
  }
  .pme-booking .pme-ev-cover {
    height: 58px !important;
  }
}

/* ============================================================
 * 3) Liens « En savoir plus » vers les fiches catalogue (SEO)
 * ============================================================ */

.pme-service-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.pme-service-cell > .pme-service-card {
  flex: 1 1 auto;
  width: 100%;
}

.pme-service-more,
.pme-formula-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(200, 164, 107, .55);
  background: #fffaf0;
  color: #7a5c1f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.pme-service-more:hover,
.pme-formula-more:hover,
.pme-service-more:focus-visible,
.pme-formula-more:focus-visible {
  background: #fff3d9;
  border-color: rgba(200, 164, 107, .9);
  color: #5f4715;
  transform: translateY(-1px);
}

.pme-service-more::after,
.pme-formula-more::after {
  content: "↗";
  font-size: 12px;
}

.pme-formula-more {
  margin-top: 8px;
  width: 100%;
}

.pme-formula-desc {
  margin: 4px 0 8px;
  color: #5d6673;
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* ============================================================
 * 4) Étape 2 — sélection multiple d'animations (2.4.3)
 * ============================================================ */

.pme-booking .pme-step-hint {
  margin: 0 0 14px;
  color: #5d6673;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.pme-booking .pme-step-hint em {
  font-style: normal;
  font-weight: 700;
  color: #18283f;
}

/* La pastille « Sélectionné » existe déjà ; on la complète d'une coche pour
   rendre l'état cumulable plus lisible qu'un simple surlignage. */
.pme-booking .pme-service-card[aria-pressed="true"] .pme-service-select {
  background: var(--pme-gold, #c8a46b);
  border-color: var(--pme-gold, #c8a46b);
  color: #fff;
}

.pme-booking .pme-service-card[aria-pressed="true"] .pme-service-select::before {
  content: "✓ ";
  font-weight: 900;
}

.pme-service-estimate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 16px auto 0;
  padding: 14px 18px;
  max-width: 720px;
  border: 1px solid rgba(200, 164, 107, .45);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8, #fff6e6);
  text-align: center;
}

.pme-service-estimate__count {
  font-size: 13px;
  font-weight: 700;
  color: #7a5c1f;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pme-service-estimate__list {
  flex: 1 1 100%;
  font-size: 16px;
  font-weight: 700;
  color: #18283f;
  overflow-wrap: anywhere;
}

.pme-service-estimate__price {
  font-size: 15px;
  color: #3c4653;
}

.pme-service-estimate__price del {
  opacity: .55;
  margin-right: 4px;
}

.pme-service-estimate__price strong {
  font-size: 19px;
  color: #18283f;
}

.pme-service-estimate__badge {
  padding: 5px 12px;
  border-radius: 999px;
  background: #1f8f5f;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
}

.pme-booking .pme-selected-service-note em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13.5px;
  color: #5d6673;
}

@media (max-width: 700px) {
  .pme-service-estimate {
    padding: 12px 14px;
    gap: 6px 10px;
  }
  .pme-service-estimate__list { font-size: 15px; }
}
