/* ==========================================================================
   Configurateur Oursons — Inspiration Gourmande
   ========================================================================== */

#configurateur-oursons {
  font-family: 'IvyPresto display', Sans-serif !important;
  color: #3a3a3a !important;
  max-width: 100% !important;
}

#configurateur-oursons button[type='button']:focus:not(.cfg-add-to-cart) {
  background: none !important;
}

/* --------------------------------------------------------------------------
     Fil d'Ariane
     -------------------------------------------------------------------------- */

.cfg-breadcrumb ol {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 10px 0 0 0!important;
  margin: 0 0 20px !important;
}

.cfg-breadcrumb li {
  display: inline-flex !important;
  align-items: center !important;
}

.cfg-step-link {
  background: none !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  cursor: pointer !important;
  font-size: 15px !important;
  color: #888 !important;
  padding: 4px 0 !important;
  transition:
    color 0.2s,
    border-color 0.2s !important;
  letter-spacing: 0.01em !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  outline: none !important;
}

.cfg-step-link.active {
  color: #c4956a !important;
  border-bottom: 2px solid #c4956a !important;
  font-weight: 600 !important;
}

.cfg-sep {
  color: #bbb !important;
  font-size: 14px !important;
  margin: 0 2px !important;
}

/* --------------------------------------------------------------------------
     Gestion des étapes
     -------------------------------------------------------------------------- */

.cfg-step {
  display: none !important;
}

.cfg-step.cfg-visible {
  display: block !important;
}

/* --------------------------------------------------------------------------
     Étape 1 — Cartes format
     -------------------------------------------------------------------------- */

.cfg-formats {
  display: flex !important;
  justify-content: start !important;
  flex-wrap: wrap !important;
  gap: 2rem !important;
  margin-bottom: 20px !important;
}

.cfg-format-card {
  font-family: 'IvyPresto display', Sans-serif !important;
  border: 2px solid transparent !important;
  border-radius: 12px !important;
  padding: 15px 20px 20px !important;
  text-align: center !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  outline: none !important;
  transition: transform 0.2s ease-in-out;
}

.cfg-format-card:hover {
  transform: translateY(-5px);
  background: none !important;
}

.cfg-card-img-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 8px !important;
}

.cfg-format-card img {
  max-width: 160px !important;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

.cfg-format-card h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #3a3a3a !important;
  line-height: 1.3 !important;
  max-width: 21ch;
  text-wrap: wrap;
}

.cfg-price {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #3a3a3a !important;
}

/* --------------------------------------------------------------------------
     Étape 1 — Suggestions
     -------------------------------------------------------------------------- */

.cfg-suggestions {
  border-top: 1px solid #e8e0d5 !important;
  padding-top: 32px !important;
}

.cfg-suggestions-title {
  font-size: 22px !important;
  font-weight: 400 !important;
  margin: 0 0 24px !important;
  color: #3a3a3a !important;
  letter-spacing: 0.01em !important;
}

.cfg-suggestions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.cfg-suggestion-card {
  width: calc(33% - 2rem) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 20px 16px !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: transform 0.2s ease-in-out !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;

  outline: none !important;
}

.cfg-suggestion-card:hover {
  background: none !important;
  transform: translateY(-5px);
}

.cfg-suggestion-card img {
  max-width: 160px !important;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

.cfg-suggestion-card h4 {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #3a3a3a !important;
  line-height: 1.3 !important;
}

/* --------------------------------------------------------------------------
     Étape 2 — Grille oursons
     -------------------------------------------------------------------------- */

.cfg-oursons-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 35px !important;
	padding-top:10px;
  margin-bottom: 32px !important;
  padding-bottom: 30px !important;
}

.cfg-ourson-card {
  background: transparent !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  position: relative !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

.cfg-ourson-img-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 8px !important;
}

.cfg-ourson-card img {
  max-width: 120px !important;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

.cfg-ourson-nom {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #3a3a3a !important;
  letter-spacing: 0.01em !important;
  font-family: 'Transat', Sans-serif;
}

.cfg-ourson-sous-titre {
  font-size: 11px !important;
  color: #c4956a !important;
  font-style: normal !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-family: 'Transat', Sans-serif;
}

/* Ingrédients / tooltip */

.cfg-info-wrap {
  position: relative !important;
}

.cfg-info-btn {
  background: none !important;
  border: none !important;
  color: #000 !important;
  cursor: pointer !important;
  font-size: 14px !important;
  padding: 2px 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: color 0.2s !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  outline: none !important;
  line-height: 1.4 !important;
  font-family: 'Transat', Sans-serif;
}

.cfg-info-btn:hover {
  color: #c4956a !important;
  background: none !important;
}

.cfg-info-btn-label {
  line-height: 1.4 !important;
}

.cfg-info-icon {
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  display: block !important;
}

/* Contenu ingrédients : masqué tant qu’il est dans la carte (Tippy le déplace au popper) */
.cfg-info-wrap > .cfg-tooltip.cfg-tooltip-template {
  display: none !important;
}

.cfg-tooltip-template br{
	display:none;
}

/* Style du contenu une fois dans Tippy */
.cfg-tooltip {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 260px !important;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: #d0ac8a !important;
}

.cfg-tooltip p {
  margin: 0 0 8px !important;
}

.cfg-tooltip p:last-child {
  margin: 0 !important;
}

.cfg-tooltip strong {
  display: block !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #502c1e !important;
  margin-bottom: 4px !important;
}

/* Tooltips configurateur — data-ig-cfg-tippy posé en JS (secours si thème Tippy ignoré) */
[data-ig-cfg-tippy='1'] .tippy-box,
[data-ig-cfg-tippy='1'].tippy-box,
.tippy-box[data-theme~='cfg-oursons'] {
  background: #f5ede4 !important;
  background-color: #f5ede4 !important;
  color: #d0ac8a !important;
  border: 1px solid rgba(80, 44, 30, 0.12) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-ig-cfg-tippy='1'] .tippy-content,
[data-ig-cfg-tippy='1'] .tippy-box .tippy-content,
.tippy-box[data-theme~='cfg-oursons'] .tippy-content {
  padding: 14px 16px !important;
  background-color: #f5ede4 !important;
  color: #d0ac8a !important;
}

/* Calque sombre (animateFill / variantes) */
[data-ig-cfg-tippy='1'] .tippy-backdrop {
  background-color: #f5ede4 !important;
}

/* Contrôle quantité */

.cfg-qty-control {
  display: flex !important;
  align-items: center !important;
  margin-top: 6px !important;
}

.cfg-qty-btn {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid #d0c8be !important;
  background: #fff !important;
  font-size: 16px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition:
    background 0.15s,
    border-color 0.15s !important;
  user-select: none !important;
  color: #3a3a3a !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.cfg-qty-btn:hover {
  background: #f0ebe3 !important;
  border-color: #c4956a !important;
  color: #3a3a3a !important;
}

.cfg-qty-minus {
  border-radius: 4px 0 0 4px !important;
}

.cfg-qty-plus {
  border-radius: 0 4px 4px 0 !important;
}

.cfg-qty-input {
  width: 36px !important;
  height: 30px !important;
  text-align: center !important;
  border: 1px solid #d0c8be !important;
  border-left: none !important;
  border-right: none !important;
  font-size: 14px !important;
  font-family: inherit !important;
  background: #fff !important;
  color: #3a3a3a !important;
  -moz-appearance: textfield !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.cfg-qty-input::-webkit-outer-spin-button,
.cfg-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
}

/* --------------------------------------------------------------------------
     CTA pleine largeur (étape 2) — pas de wrapper, le bouton est la barre
     -------------------------------------------------------------------------- */

#configurateur-oursons .cfg-add-to-cart {
  position: sticky !important;
  bottom: 20px !important;
  left: 0 !important;
  right: 0 !important;
  width: 97% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 16px 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
  transition:
    opacity 0.2s,
    background 0.2s,
    color 0.2s !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
  display: block !important;
  line-height: 1.4 !important;
  text-align: center !important;
  z-index: 5 !important;
  background: #1a1a1a !important;
  color: #fff !important;
  font-family: 'Transat', Sans-serif !important;
}

/* Même barre sombre en attente et pour « Ajouter au panier » */
#configurateur-oursons .cfg-add-to-cart.cfg-foot-waiting:disabled {
  opacity: 1 !important;
  cursor: default !important;
}

#configurateur-oursons .cfg-add-to-cart.cfg-foot-waiting .cfg-current {
  font-weight: 700 !important;
  color: #c4956a !important;
}

#configurateur-oursons .cfg-add-to-cart.cfg-foot-waiting .cfg-max {
  font-weight: 700 !important;
  color: #fff !important;
}

#configurateur-oursons .cfg-add-to-cart:disabled:not(.cfg-foot-waiting) {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: #1a1a1a !important;
  color: #fff !important;
}

#configurateur-oursons .cfg-add-to-cart:not(:disabled):hover {
  background: #2a2624 !important;
  opacity: 1 !important;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
     Boutons génériques
     -------------------------------------------------------------------------- */

.cfg-btn {
  display: inline-block !important;
  background: #1a1a1a !important;
  color: #fff !important;
  border: 2px solid #1a1a1a !important;
  border-radius: 4px !important;
  padding: 12px 28px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
  transition: opacity 0.2s !important;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
  line-height: 1.4 !important;
}

.cfg-btn:hover {
  opacity: 0.85 !important;
  color: #fff !important;
  background: #1a1a1a !important;
  text-decoration: none !important;
}

.cfg-btn-outline {
  background: transparent !important;
  color: #1a1a1a !important;
}

.cfg-btn-outline:hover {
  background: #1a1a1a !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
     Étape 3 — Confirmation
     -------------------------------------------------------------------------- */

.cfg-confirmation {
  text-align: center !important;
  padding: 60px 0 40px !important;
  min-height: 300px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* display:none via .is-cfg-active — évite display:flex !important qui cassait jQuery .hide()/.show() */
.cfg-spinner {
  display: none !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 15px !important;
  color: #666 !important;
}

.cfg-spinner.is-cfg-active {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

.cfg-spinner-icon {
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  border: 3px solid #e8e0d5 !important;
  border-top-color: #c4956a !important;
  border-radius: 50% !important;
  animation: cfg-spin 0.7s linear infinite !important;
  flex-shrink: 0 !important;
}

@keyframes cfg-spin {
  to {
    transform: rotate(360deg);
  }
}

.cfg-success-icon {
  width: 56px !important;
  height: 56px !important;
  background: #c4956a !important;
  color: #fff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  margin: 0 auto 20px !important;
}

.cfg-success,
.cfg-error {
  display: none !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
}

.cfg-success.is-cfg-active,
.cfg-error.is-cfg-active {
  display: flex !important;
}

.cfg-success p,
.cfg-error p {
  font-size: 17px !important;
  margin: 0 !important;
  color: #3a3a3a !important;
}

.cfg-no-oursons {
  text-align: center !important;
  color: #888 !important;
  padding: 40px 0 !important;
  font-style: italic !important;
}

/* --------------------------------------------------------------------------
     Responsive
     -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .cfg-formats {
    grid-template-columns: 1fr !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .cfg-suggestions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .cfg-oursons-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .cfg-breadcrumb ol {
    font-size: 13px !important;
  }

  #configurateur-oursons .cfg-add-to-cart {
    padding: 14px 16px !important;
    white-space: normal !important;
  }
}

@media (max-width: 480px) {
  .cfg-oursons-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .cfg-suggestions-grid {
    grid-template-columns: 1fr !important;
  }
}

@media all and (max-width: 1220px) {
  .config-wrapper {
    max-height: 100% !important;
    overflow: hidden;
  }

  .left {
    display: none;
  }

  .right {
    width: 100%;
  }
}

@media all and (max-width: 767px) {
  .cfg-formats {
    max-width: 100% !important;
  }

  button.cfg-format-card {
    width: 100%;
  }

  .cfg-suggestions-grid {
    flex-direction: column;
  }

  .cfg-suggestion-card {
    width: 100% !important;
  }

  .cfg-suggestions-title {
    margin-top: 20px;
    text-align: center;
  }

  .cfg-breadcrumb ol {
    justify-content: center;
  }
}

@media all and (max-width: 1024px) {
  #configurateur-oursons .cfg-add-to-cart {
    position: fixed !important;
    bottom: 0px !important;
  }
}
