/**
 * @file
 * Types de bloc du design system découpés par variante (repris de
 * wallonie.be) : hero classique / mini / recherche, blocs de contenu arrondi /
 * fond coloré / CTA, wizard.
 *
 * Fichier CSS simple (hors SCSS) : les règles ne ciblent que les wrappers de
 * ces nouveaux types, sans effet sur les blocs existants.
 */

/* Hero recherche / mini sur surface foncée : la couleur globale des titres du
   thème écraserait le texte blanc du composant. */
div.ds-hero-banner-wrapper spw-hero[variant="maxi"][surface="dark"] :is(h1, h2),
div.ds-hero-banner-wrapper spw-hero[variant="mini"][surface="dark"] :is(h1, h2) {
  color: #fff !important;
}

/* Blocs de contenu découpés : le titre suit la couleur du texte fixée par le
   DS (blanc sur fond coloré, foncé sur fond neutre). */
.ds-block-content-wrapper spw-block-content[variant] h2 {
  margin-top: 0;
  color: inherit;
}

/* --------------------------------------------------------------------------
 * Wizard : étapes numérotées reliées par un trait.
 * ------------------------------------------------------------------------ */

div.ds-wizard-wrapper {
  margin-top: 70px;
  margin-bottom: 90px;
}

div.ds-wizard-wrapper h2.layout-title {
  margin-top: 0;
  margin-bottom: 35px;
}

.ds-wizard-wrapper .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 20px 0;
}

.wizard-step-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.wizard-step-container:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 3px;
  background-color: #ed0334;
  z-index: 0;
}

.wizard-step-container .step-count {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 15px;
  border-radius: 50%;
  background-color: #ed0334;
  color: #fff;
  font-weight: bold;
}

.wizard-step-container h3 {
  margin: 15px 0 5px;
  font-size: 1.2rem;
}

.wizard-step-container .wizard-step-text,
.wizard-step-container .wizard-step-text p {
  margin: 0;
  padding: 0 10px;
  font-size: 1rem;
}

/* Mobile : étapes empilées, trait vertical. */
@media (max-width: 767.98px) {
  .ds-wizard-wrapper .row {
    flex-direction: column;
    gap: 24px;
  }

  .wizard-step-container:not(:last-child)::after {
    top: 40px;
    left: 50%;
    width: 3px;
    height: calc(100% - 16px);
    transform: translateX(-50%);
  }

  .wizard-step-container h3,
  .wizard-step-container .wizard-step-text {
    position: relative;
    z-index: 1;
    background-color: #fff;
  }
}
