/*
 * POLYALIS Presence V1 — Méthode
 *
 * Issue #100:
 * - preserve the canonical seven-stage method and role trio;
 * - align editorial voice and visual grammar with the corrected Presence pages;
 * - replace one-off inline SVG with existing local Bootstrap Icons;
 * - replace the abstract hero graphic with useful method guidance;
 * - remove the seven-column desktop compression;
 * - use current Presence layout primitives.
 */

main[data-shell-view="methode"] {
  --methode-ink: #181c16;
  --methode-muted: #596154;
  --methode-line: #dce8cf;
  --methode-white: #ffffff;

  width: 100%;
  max-width: var(--presence-v1-layout-max);
  margin-inline: auto;
  color: var(--methode-ink);
  background: var(--methode-white);
}

main[data-shell-view="methode"] p {
  margin-block-start: 0;
}

.v1-methode-eyebrow,
.v1-methode-hero__guide-label {
  margin: 0 0 0.75rem;
  color: var(--presence-v1-color-accent-dark);
  font-family: var(--presence-v1-font-body);
  font-size: 0.75rem;
  font-weight: var(--presence-v1-font-weight-bold);
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Existing local Bootstrap icon masks */

.v1-methode-icon {
  --v1-methode-icon-image: none;

  display: inline-block;
  width: 1.8rem;
  height: 1.8rem;
  background-color: currentColor;
  -webkit-mask-image: var(--v1-methode-icon-image);
  mask-image: var(--v1-methode-icon-image);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.v1-methode-icon--lightbulb {
  --v1-methode-icon-image: url("/assets/icons/bootstrap/lightbulb.svg");
}

.v1-methode-icon--diagram-3 {
  --v1-methode-icon-image: url("/assets/icons/bootstrap/diagram-3.svg");
}

.v1-methode-icon--person {
  --v1-methode-icon-image: url("/assets/icons/bootstrap/person.svg");
}

/* Hero */

.v1-methode-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 88% 18%,
      color-mix(in srgb, var(--presence-v1-color-accent-soft) 72%, transparent),
      transparent 28rem
    ),
    linear-gradient(
      135deg,
      var(--methode-white) 0%,
      var(--presence-v1-color-accent-very-soft) 100%
    );
  border-block-end: 1px solid var(--presence-v1-color-accent-soft);
}

.v1-methode-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(
      to right,
      color-mix(in srgb, var(--presence-v1-color-accent-dark) 13%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--presence-v1-color-accent-dark) 13%, transparent) 1px,
      transparent 1px
    );
  background-size:
    clamp(2.4rem, 4vw, 3.25rem)
    clamp(2.4rem, 4vw, 3.25rem);
  background-position: right top;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 30%,
    rgb(0 0 0 / 0.35) 54%,
    black 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 30%,
    rgb(0 0 0 / 0.35) 54%,
    black 100%
  );
  pointer-events: none;
}

.v1-methode-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding-block: clamp(4.5rem, 10vw, 7rem);
}

.v1-methode-hero__copy {
  min-width: 0;
  max-width: 58rem;
}

.v1-methode-hero h1 {
  max-width: 17ch;
  margin: 0;
  font-family: var(--presence-v1-font-display);
  font-size: clamp(2.55rem, 7vw, 5rem);
  font-weight: var(--presence-v1-font-weight-semibold);
  letter-spacing: -0.045em;
  line-height: 1.03;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}

.v1-methode-hero__lead {
  max-width: 52rem;
  margin: clamp(1.4rem, 3vw, 2rem) 0 0;
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  line-height: 1.65;
}

.v1-methode-hero__relationship {
  max-width: 46rem;
  margin: 1.25rem 0 0;
  padding-inline-start: 1rem;
  border-inline-start: 0.25rem solid var(--presence-v1-color-accent);
  color: var(--presence-v1-color-accent-dark);
  font-weight: var(--presence-v1-font-weight-semibold);
  line-height: 1.55;
}

.v1-methode-hero__guide {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid var(--presence-v1-color-accent-soft);
  border-radius: 0.75rem;
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.06);
}

.v1-methode-hero__guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--presence-v1-color-accent-soft);
}

.v1-methode-hero__guide-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.875rem;
  align-items: center;
  padding-block: 0.9rem;
  border-block-end: 1px solid var(--presence-v1-color-accent-soft);
}

.v1-methode-hero__guide-number {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  background: var(--presence-v1-color-accent);
  color: var(--methode-white);
  border-radius: 50%;
  font-family: var(--presence-v1-font-display);
  font-size: 0.72rem;
  font-weight: var(--presence-v1-font-weight-bold);
}

.v1-methode-hero__guide-list strong,
.v1-methode-hero__guide-list small {
  display: block;
}

.v1-methode-hero__guide-list strong {
  font-family: var(--presence-v1-font-display);
  font-size: 1rem;
  line-height: 1.3;
}

.v1-methode-hero__guide-list small {
  margin-block-start: 0.2rem;
  color: var(--methode-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Shared headings */

.v1-methode-framework,
.v1-methode-stages,
.v1-methode-decisions,
.v1-methode-collaboration,
.v1-methode-principles {
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.v1-methode-section-heading {
  max-width: 60rem;
  margin-block-end: clamp(2rem, 5vw, 3rem);
}

.v1-methode-section-heading h2,
.v1-methode-final h2 {
  margin: 0;
  font-family: var(--presence-v1-font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.v1-methode-section-heading > p:last-child {
  max-width: 54rem;
  margin: 1rem 0 0;
  color: var(--methode-muted);
  font-size: clamp(1.05rem, 2vw, 1.18rem);
  line-height: 1.65;
}

/* Canonical role trio */

.v1-methode-framework {
  background: var(--methode-white);
}

.v1-methode-roles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.v1-methode-role {
  min-width: 0;
  padding-block-start: 1.25rem;
  border-block-start: 0.25rem solid var(--presence-v1-color-accent);
}

.v1-methode-role__icon-shell {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-block-end: 1rem;
  background: var(--presence-v1-color-accent-very-soft);
  color: var(--presence-v1-color-accent);
  border: 1px solid var(--presence-v1-color-accent-soft);
  border-radius: 50%;
}

.v1-methode-role h3,
.v1-methode-stage h3,
.v1-methode-decision h3,
.v1-methode-collaboration__item h3,
.v1-methode-principle h3 {
  margin: 0;
  font-family: var(--presence-v1-font-display);
  line-height: 1.25;
}

.v1-methode-role h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.v1-methode-role p {
  margin: 0.75rem 0 0;
  color: var(--methode-muted);
  line-height: 1.6;
}

/* Seven stages */

.v1-methode-stages {
  background: var(--presence-v1-color-accent-very-soft);
  border-block: 1px solid var(--presence-v1-color-accent-soft);
}

.v1-methode-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.v1-methode-stage {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 1.6rem);
  background: var(--methode-white);
  border: 1px solid var(--presence-v1-color-accent-soft);
  border-radius: 0.75rem;
}

.v1-methode-stage__number,
.v1-methode-decision__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 1.8rem;
  padding-inline: 0.55rem;
  background: var(--presence-v1-color-accent);
  color: var(--methode-white);
  border-radius: 999px;
  font-family: var(--presence-v1-font-display);
  font-size: 0.7rem;
  font-weight: var(--presence-v1-font-weight-bold);
  letter-spacing: 0.06em;
}

.v1-methode-stage__number {
  margin-block-end: 1rem;
}

.v1-methode-stage h3 {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  overflow-wrap: normal;
  word-break: normal;
}

.v1-methode-stage p {
  margin: 0.75rem 0 0;
  color: var(--methode-muted);
  line-height: 1.55;
}

/* Decision points — editorial markers, not fake buttons */

.v1-methode-decisions {
  background: var(--methode-white);
}

.v1-methode-decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1.5rem;
}

.v1-methode-decision {
  min-width: 0;
  padding-block: 1.2rem;
  border-block-start: 1px solid var(--presence-v1-color-accent-soft);
}

.v1-methode-decision__marker {
  margin-block-end: 0.9rem;
}

.v1-methode-decision h3 {
  font-size: 1.15rem;
}

.v1-methode-decision p {
  margin: 0.55rem 0 0;
  color: var(--methode-muted);
  line-height: 1.55;
}

.v1-methode-note {
  max-width: 58rem;
  margin: 1.5rem 0 0;
  padding-inline-start: 1rem;
  border-inline-start: 0.25rem solid var(--presence-v1-color-accent);
  color: var(--presence-v1-color-accent-dark);
  font-weight: var(--presence-v1-font-weight-semibold);
  line-height: 1.55;
}

/* Collaboration */

.v1-methode-collaboration {
  background:
    linear-gradient(
      135deg,
      var(--presence-v1-color-accent-very-soft) 0%,
      var(--methode-white) 100%
    );
  border-block: 1px solid var(--presence-v1-color-accent-soft);
}

.v1-methode-collaboration__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.v1-methode-collaboration__item {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 1.6rem);
  background: rgb(255 255 255 / 0.85);
  border: 1px solid var(--presence-v1-color-accent-soft);
  border-radius: 0.75rem;
}

.v1-methode-collaboration__item h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
}

.v1-methode-collaboration__item p {
  margin: 0.75rem 0 0;
  color: var(--methode-muted);
  line-height: 1.6;
}

/* Principles — deliberately lighter than cards */

.v1-methode-principles {
  background: var(--methode-white);
}

.v1-methode-principles__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.v1-methode-principle {
  min-width: 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 0.25rem solid var(--presence-v1-color-accent);
}

.v1-methode-principle .v1-methode-eyebrow {
  margin-block-end: 0.65rem;
}

.v1-methode-principle h3 {
  max-width: 30rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.v1-methode-principle p:last-child {
  max-width: 40rem;
  margin: 0.8rem 0 0;
  color: var(--methode-muted);
  line-height: 1.6;
}

/* Final CTA — same grammar as corrected Presence pages */

.v1-methode-final {
  background: var(--presence-v1-color-accent-dark);
  color: var(--methode-white);
}

.v1-methode-final .v1-methode-eyebrow {
  color: var(--methode-white);
}

.v1-methode-final__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3rem);
}

.v1-methode-final__copy {
  min-width: 0;
}

.v1-methode-final h2 {
  color: var(--methode-white);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.25;
}

.v1-methode-final__copy > p:last-child {
  max-width: 52rem;
  margin: 0.6rem 0 0;
  color: var(--methode-white);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.55;
}

.v1-methode-final__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-block-size: 3rem;
  padding: 0.75rem 1.5rem;
  background: var(--methode-white);
  color: var(--presence-v1-color-accent-dark);
  border: 2px solid var(--methode-white);
  border-radius: 999px;
  font-weight: var(--presence-v1-font-weight-semibold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.v1-methode-final__action:hover {
  background: var(--presence-v1-color-accent-very-soft);
}

/* Mobile enrichment */

@media (min-width: 37.5rem) {
  .v1-methode-roles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v1-methode-role:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 1.5rem) / 2);
    justify-self: center;
  }

  .v1-methode-final__action {
    width: fit-content;
  }
}

/* Tablet */

@media (min-width: 50rem) {
  .v1-methode-roles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v1-methode-role:last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }

  .v1-methode-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .v1-methode-stage:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 1.25rem) / 2);
    justify-self: center;
  }

  .v1-methode-decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v1-methode-collaboration__grid,
  .v1-methode-principles__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* Desktop — local Presence switch = 1120px */

@media (min-width: 70rem) {
  .v1-methode-hero__layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    gap: clamp(3.5rem, 6vw, 6rem);
    min-block-size: clamp(42rem, 76vh, 56rem);
    padding-block: clamp(5rem, 8vw, 7rem);
  }

  .v1-methode-stage-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .v1-methode-stage {
    grid-column: span 3;
  }

  .v1-methode-stage:nth-child(n + 5) {
    grid-column: span 4;
  }

  .v1-methode-stage:last-child {
    width: auto;
    justify-self: stretch;
  }

  .v1-methode-decision-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .v1-methode-final__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .v1-methode-final__action {
    width: auto;
    justify-self: end;
  }
}
