/**
 * Styles bloc Avantages (éditeur Gutenberg + renfort front)
 */

.avantages-scope {
  container-type: inline-size;
  container-name: avantages;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.avantages {
  --avantages-bg: #0a2329;
  --avantages-gap: 1.6rem;
  --avantages-pad-y: 1.2rem;
  --avantages-pad-x: 1.6rem;
  --avantages-radius: 0.8rem;
  --avantages-icon: 3.2rem;
  --avantages-cols: 2;

  display: grid !important;
  grid-template-columns: repeat(var(--avantages-cols), minmax(0, 1fr));
  gap: var(--avantages-gap);
  margin: 0;
  padding: 0 !important;
  width: 100%;
  min-width: 0;
}

.avantages__item {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
  border-radius: var(--avantages-radius);
  padding: var(--avantages-pad-y) var(--avantages-pad-x);
  background-color: var(--avantages-bg);
  color: #fff;
  text-decoration: none !important;
  box-sizing: border-box;
  min-width: 0;
  min-height: 100%;
}

.avantages__icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--avantages-icon) !important;
  height: var(--avantages-icon) !important;
  margin: 0 !important;
  object-fit: contain;
}

.avantages__icon.dashicons {
  font-size: 3.2rem;
  width: 3.2rem;
  height: 3.2rem;
  color: #e7b405;
  line-height: 1;
}

.avantages__icon--img {
  display: block;
  width: 100%;
  height: auto;
}

.avantages__text {
  margin: 0 !important;
  color: inherit;
  font-size: 14px;
  line-height: 1.3;
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: break-word;
  word-break: normal;
}

.avantages--empty {
  padding: var(--avantages-pad-x);
  border-radius: var(--avantages-radius);
  background-color: var(--avantages-bg);
  color: rgba(255, 255, 255, 0.4);
}

@container avantages (max-width: 42rem) {
  .avantages {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .avantages {
    grid-template-columns: 1fr !important;
  }
}

/**
 * Bouton « Réserver » — styles éditeur Gutenberg uniquement
 * (le front charge déjà _button.scss via app.css)
 */
.editor-styles-wrapper .avantages a.button,
.acf-block-preview .avantages a.button,
.block-editor-block-list__block .avantages a.button {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1.2rem;
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 1.2rem 1.6rem;
  margin: 0;
  border-radius: 0.8rem;
  background-color: #e7b405 !important;
  background-image: linear-gradient(
    135deg,
    #e7b405 0%,
    #e8b50f 13%,
    #ebba2d 36%,
    #f0c25c 66%,
    #f8cd9c 100%
  ) !important;
  color: #06191e !important;
  text-decoration: none !important;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: none;
}

.editor-styles-wrapper .avantages a.button:hover,
.editor-styles-wrapper .avantages a.button:focus,
.acf-block-preview .avantages a.button:hover,
.acf-block-preview .avantages a.button:focus,
.block-editor-block-list__block .avantages a.button:hover,
.block-editor-block-list__block .avantages a.button:focus {
  color: #06191e !important;
  text-decoration: none !important;
}

.editor-styles-wrapper .avantages a.button .button__icon,
.acf-block-preview .avantages a.button .button__icon,
.block-editor-block-list__block .avantages a.button .button__icon {
  display: flex !important;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 !important;
  color: inherit;
}

.editor-styles-wrapper .avantages a.button .button__icon svg,
.acf-block-preview .avantages a.button .button__icon svg,
.block-editor-block-list__block .avantages a.button .button__icon svg {
  display: block;
  width: 2.4rem !important;
  height: auto !important;
  max-width: 100%;
  aspect-ratio: 1;
  fill: currentColor;
  color: inherit;
}

.editor-styles-wrapper .avantages a.button .button__title,
.acf-block-preview .avantages a.button .button__title,
.block-editor-block-list__block .avantages a.button .button__title {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  text-decoration: none !important;
}
