/* ============================================================
   Section 08b — methode · Figma node 7206:9721 (nommé « pourquoi »)
   Desktop 1440 : eyebrow → titre 54 → intro → 3 cards pastel
   362×331 (pastilles 1/2/3 reliées par ligne pointillée, avatars,
   sous-cards « Bénéfice » blanches) → pill de conclusion.
   Hauteur maquette : 771px (y 7844 → 8615).
   ============================================================ */

.methode {
  font-family: var(--font-sans);
  padding-inline: clamp(20px, 8.33vw, 120px);
  color: var(--color-ink);
}

.methode__container {
  max-width: var(--container-max);
  margin-inline: auto;
}

/* ---- En-tête (pattern eyebrow-pill, identique à 02-pourquoi) - */

.methode__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.methode__eyebrow {
  margin: 0;
  display: inline-flex;
  padding: 3px;
  background: var(--color-white);
  border: 1px solid rgba(229, 231, 233, 0.5); /* --color-border @50% */
  border-radius: var(--radius-pill);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
}

.methode__eyebrow-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 24px;
  border-radius: var(--radius-pill);
  /* hors tokens: mesuré Figma (dégradé pêche → lilas) */
  background: linear-gradient(90deg, #fff1ed 0%, #f0efff 100%);
}

.methode__eyebrow-text {
  font-size: var(--text-eyebrow);
  line-height: var(--text-eyebrow--line-height);
  font-weight: var(--text-eyebrow--font-weight);
  letter-spacing: var(--text-eyebrow--letter-spacing);
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--color-accent-coral) 0%, var(--color-primary-vivid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.methode__title {
  margin: 19px 0 0;
  max-width: 751px;
  font-size: clamp(32px, 4.5vw, var(--text-h2));
  line-height: 1.04; /* 56px @ 54px */
  font-weight: var(--text-h2--font-weight);
  letter-spacing: var(--text-h2--letter-spacing);
  color: #2d2d2d; /* hors tokens: mesuré Figma */
}

.methode__intro {
  margin: 26px 0 0;
  max-width: 600px;
  font-size: var(--text-body);
  line-height: var(--text-body--line-height);
  font-weight: var(--text-body--font-weight);
  color: rgba(17, 17, 17, 0.8); /* --color-neutral-950 @80% */
}

/* ---- Étapes : 3 cards + ligne pointillée --------------------- */

.methode__steps {
  position: relative;
  margin-top: 87px;
}

/* Filet pointillé reliant les pastilles — retours 13/08 : UN SEUL filet,
   en dégradé 1 → 2 → 3, porté par la grille. Il démarre au bord gauche de
   la pastille « 1 » (donc il ne dépasse jamais l'orange, qui le recouvre)
   et s'arrête pile au bord gauche de la pastille « 3 », qu'il touche.
   Le pointillé est un masque, la couleur un dégradé. */
.methode__cards::before {
  content: "";
  position: absolute;
  top: 44px; /* centre des pastilles (28px de padding + 16px de demi-hauteur) */
  left: 28px; /* bord gauche de la pastille 1 — le filet passe SOUS elle */
  /* fin = bord gauche de la pastille 3 : 2/3 de la rangée + 16px de
     gouttières + 28px de padding de card */
  width: calc(66.6667% + 16px);
  height: 2px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--color-accent-coral) 0%,
    #b36aa5 50%,
    var(--color-primary-vivid) 100%
  );
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 12px);
  mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 12px);
}

.methode__cards {
  position: relative; /* ancre le filet continu */
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1136px; /* cards 362×3 + gaps 24 (mesuré : rangée 1135) */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.methode__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 331px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

/* hors tokens: fonds pastels mesurés Figma (mêmes hex que 02-pourquoi) */
.methode__card--designer  { background: #fff1ed; }
.methode__card--ingenieur { background: #f7f0f6; }
.methode__card--vous      { background: #e8e9fa; }

/* Pastille numérotée : coque blanche 34px + rond plein 28px */
.methode__step {
  margin: 0;
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 3px;
  background: var(--color-white);
  border: 1px solid rgba(229, 231, 233, 0.5); /* --color-border @50% */
  border-radius: var(--radius-pill);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
}

.methode__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
  font-weight: 700;
  letter-spacing: 0.04em; /* 0.56px @ 14px */
  text-transform: uppercase;
  text-align: center;
  color: var(--color-white);
}

.methode__step-num--1 { background: var(--color-accent-coral); }
.methode__step-num--2 { background: #b36aa5; } /* hors tokens: mesuré Figma */
.methode__step-num--3 { background: var(--color-primary-vivid); }

/* Avatar + titre de card (mesuré : avatar à 76px du haut, tag finit
   à 62px → gap 14 ; titre décalé de 4px vs avatar) */
.methode__who {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.methode__avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--color-white);
  border: 1px solid var(--color-border); /* #e5e7e9 */
  border-radius: 15px; /* hors tokens: mesuré Figma */
}

.methode__avatar-img {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 15px; /* hors tokens: mesuré Figma */
  border: 1px solid var(--color-border);
  object-fit: cover;
}

/* Card 3 : pas de photo — bloc gris avec « Vous » */
.methode__avatar--vous .methode__avatar-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 15px; /* hors tokens: mesuré Figma */
  border: 1px solid var(--color-border);
  background: var(--color-border); /* #e5e7e9 */
  font-size: var(--text-body-sm);
  line-height: 22px;
  font-weight: 600;
  color: var(--color-neutral-950);
}

.methode__card-title {
  margin: 4px 0 0;
  max-width: 235px;
  font-size: var(--text-h5);
  line-height: 26px; /* variante dense du token h5 */
  font-weight: var(--text-h5--font-weight);
  letter-spacing: -0.01em; /* hors tokens: -0.21px mesuré Figma */
  color: var(--color-border-dark); /* #27292E — seul token exact pour ce texte */
}

.methode__card-text {
  margin: 5px 0 0;
  max-width: 306px;
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  font-weight: var(--text-body-sm--font-weight);
  color: rgba(17, 17, 17, 0.7); /* --color-neutral-950 @70% */
}

/* Sous-card « Bénéfice » blanche, calée en bas de la card */
.methode__benefit {
  margin-top: auto;
  align-self: stretch;
  min-height: 103px;
  padding: 10px 20px 12px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
}

.methode__benefit-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-body-sm);
  line-height: 32px; /* hors tokens: mesuré Figma */
  font-weight: 500;
  letter-spacing: -0.01em; /* -0.15px @ 15px */
  color: var(--color-border-dark); /* #27292E */
}

.methode__benefit-icon {
  flex: none;
}

.methode__benefit-text {
  margin: 0;
  max-width: 265px;
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  font-weight: var(--text-body-sm--font-weight);
  color: rgba(38, 41, 46, 0.7); /* --color-ink @70% */
}

/* ---- Pill de conclusion -------------------------------------- */

.methode__note {
  margin: 80px auto 0;
  width: fit-content;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: var(--color-white);
  border: 1px solid rgba(229, 231, 233, 0.5); /* --color-border @50% */
  border-radius: var(--radius-pill);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  text-align: center;
  color: rgba(38, 41, 46, 0.7); /* --color-ink @70% */
}

.methode__note strong {
  font-weight: 500; /* Manrope Medium */
}

/* ---- Responsive (maquette desktop-only → adaptation) --------- */

@media (max-width: 1024px) {
  .methode__cards::before {
    display: none; /* le filet ne relie plus les pastilles une fois la grille repliée */
  }

  .methode__cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

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

  .methode__steps {
    margin-top: 56px;
  }

  .methode__note {
    margin-top: 56px;
    border-radius: var(--radius-xl); /* pilule → capsule multi-lignes */
  }
}
