/* ==========================================================================
   TYConsulting — Sections de la page d'accueil
   ========================================================================== */

.section {
  padding-block: var(--section-y);
}

.section__head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
  max-width: 46rem;
}

.section__head .section__label {
  margin-bottom: 0;
}

.section__title {
  font-size: var(--fs-h2);
}

.section__intro {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.section__cta {
  margin-top: var(--space-7);
}

/* Masque de ligne pour la révélation typographique */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.line__inner {
  display: block;
  text-wrap: balance;
}

/* =========================================================================
   Héros
   ========================================================================= */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--surface) 100%);
}

/* Lignes de plan : deux hairlines bleu-vert qui montent vers la droite */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(170deg, transparent 49.7%, var(--teal-line) 49.7%, var(--teal-line) 50%, transparent 50.3%) 0 0 / 100% 100% no-repeat;
  opacity: 0.28;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-8);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
}

.hero__kicker {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.hero__em {
  color: var(--teal-deep);
}

.hero__lead {
  margin-top: var(--space-5);
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

@media (min-width: 64em) {
  .hero__inner {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: center;
    column-gap: var(--space-8);
    min-height: min(42rem, 82vh);
  }
}

/* Repères */
.reperes {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--navy-100);
  background: var(--white);
}

.reperes__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.repere {
  display: grid;
  gap: 0.15rem;
  padding: var(--space-5) var(--space-4) var(--space-5) 0;
  border-bottom: var(--rule);
}

.repere:nth-child(odd) {
  border-right: var(--rule);
}

.repere:nth-child(even) {
  padding-left: var(--space-4);
}

.repere:nth-child(n + 3) {
  border-bottom: 0;
}

.repere__value {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem);
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.repere__label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .reperes__inner {
    grid-template-columns: repeat(4, 1fr);
  }

  .repere,
  .repere:nth-child(even) {
    padding: var(--space-5) var(--space-5);
    border-bottom: 0;
    border-right: var(--rule);
  }

  .repere:first-child {
    padding-left: 0;
  }

  .repere:last-child {
    border-right: 0;
  }
}

/* =========================================================================
   Expertises : index
   ========================================================================= */

.expertises {
  display: grid;
  gap: var(--space-8);
}

.expertises__intro {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.expertises__intro .btn {
  justify-self: start;
  margin-top: var(--space-2);
}

@media (min-width: 64em) {
  .expertises {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-9);
  }

  .expertises__intro {
    position: sticky;
    top: 6rem;
  }
}

.xp {
  position: relative;
  counter-reset: xp;
}

/* Rail vertical */
.xp::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.25rem;
  width: 2px;
  background: var(--navy-100);
}

.xp__item {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-bottom: var(--rule);
}

.xp__item:last-child {
  border-bottom: 0;
}

/* Point du rail */
.xp__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--navy-100);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-xs);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-reveal) var(--ease-out), background-color var(--dur-reveal) var(--ease-out), color var(--dur-reveal) var(--ease-out);
}

.xp__body {
  display: grid;
  gap: var(--space-3);
}

.xp__icon {
  color: var(--teal-deep);
}

.xp__title {
  font-size: var(--fs-lg);
}

.xp__body > p {
  color: var(--color-text-muted);
  max-width: 56ch;
}

.xp__deliverables {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.xp__deliverables li {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--navy-50);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--navy);
}

.xp__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--teal-deep);
}

@media (hover: hover) and (pointer: fine) {
  .xp__link:hover .btn__icon {
    transform: translateX(3px);
  }
}

/* =========================================================================
   Offres : échelle d'engagement
   ========================================================================= */

.section--offres {
  background: var(--surface);
}

.ladder {
  position: relative;
  display: grid;
  gap: var(--space-5);
}

.ladder__curve {
  display: none;
}

.offer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--white);
  border: var(--rule);
  border-radius: var(--radius-md);
  transition: transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .offer:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--teal);
  }
}

.offer--top {
  border-color: var(--navy);
}

.offer__dot {
  position: absolute;
  top: -0.5rem;
  left: var(--space-6);
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--white);
}

.offer__duration {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.offer__title {
  font-size: var(--fs-lg);
}

.offer__text {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
  flex: 1;
}

.offer .btn {
  align-self: flex-start;
  margin-top: var(--space-2);
}

@media (min-width: 40em) {
  .ladder {
    grid-template-columns: 1fr 1fr;
  }
}

/* Quatre colonnes seulement quand les boutons « Demander un devis » tiennent sur une ligne */
@media (min-width: 80em) {
  .ladder {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    padding-top: 10rem;
    align-items: end;
  }

  .ladder__curve {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 13rem;
    pointer-events: none;
  }

  .ladder__path {
    fill: none;
    stroke: var(--teal);
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
  }

  /* Les cartes montent avec la courbe */
  .offer:nth-child(2) { margin-bottom: 0; }
  .offer:nth-child(3) { margin-bottom: 3rem; }
  .offer:nth-child(4) { margin-bottom: 6rem; }
  .offer:nth-child(5) { margin-bottom: 9.5rem; }

  .offer__dot {
    top: -0.55rem;
  }
}

/* =========================================================================
   Pourquoi nous choisir
   ========================================================================= */

.why {
  display: grid;
  gap: var(--space-5);
}

.why__item {
  padding: var(--space-5) 0 var(--space-5) var(--space-5);
  border-left: 2px solid var(--navy-100);
  transition: border-color var(--dur-hover) var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .why__item:hover {
    border-color: var(--teal);
  }
}

.why__icon {
  color: var(--teal-deep);
  margin-bottom: var(--space-4);
}

.why__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.why__item p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

@media (min-width: 40em) {
  .why {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64em) {
  .why {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

/* =========================================================================
   Méthode (bloc marine)
   ========================================================================= */

.section--method {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.section--method::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px) 0 0 / 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}

.section--method .container {
  position: relative;
}

.section--method .section__title {
  color: var(--white);
}

.section--method .section__intro {
  color: var(--slate-300);
}

.method {
  position: relative;
}

.method__curve {
  display: none;
}

.method__steps {
  display: grid;
  gap: var(--space-6);
  counter-reset: step;
}

.mstep {
  position: relative;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur-hover) var(--ease-hover), background-color var(--dur-hover) var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .mstep:hover {
    border-color: rgba(19, 168, 158, 0.6);
    background: rgba(255, 255, 255, 0.05);
  }
}

.mstep__num {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--navy-900);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
}

.mstep__diagram {
  width: 7.5rem;
  height: 4.5rem;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mstep__diagram circle {
  fill: var(--teal);
}

.mstep__check {
  stroke: var(--white);
}

.mstep__title {
  font-size: var(--fs-lg);
  color: var(--white);
}

.mstep > p {
  color: var(--slate-300);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.mstep__out {
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white) !important;
  font-weight: 500;
}

@media (min-width: 40em) {
  .method__steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64em) {
  .method {
    padding-top: 8.5rem;
  }

  .method__curve {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 7.5rem;
    pointer-events: none;
  }

  .method__track,
  .method__path {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
  }

  .method__track {
    stroke: rgba(255, 255, 255, 0.14);
  }

  .method__path {
    stroke: var(--teal);
  }

  .method__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    align-items: start;
  }

  /* Les cartes suivent la courbe ascendante */
  .mstep:nth-child(1) { margin-top: 0; }
  .mstep:nth-child(2) { margin-top: -2rem; }
  .mstep:nth-child(3) { margin-top: -4rem; }
  .mstep:nth-child(4) { margin-top: -6.5rem; }
}

.section__cta--dark {
  margin-top: var(--space-8);
}

/* =========================================================================
   Secteurs
   ========================================================================= */

.sectors {
  display: grid;
  gap: var(--space-5);
}

.sector {
  padding: var(--space-5);
  border: var(--rule);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color var(--dur-hover) var(--ease-hover), transform var(--dur-hover) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .sector:hover {
    border-color: var(--teal);
    transform: translateY(-3px);
  }
}

.sector__icon {
  color: var(--teal-deep);
  margin-bottom: var(--space-4);
}

.sector__title {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}

.sector p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

@media (min-width: 40em) {
  .sectors {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64em) {
  .sectors {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
  }
}

/* =========================================================================
   Le cabinet
   ========================================================================= */

.section--cabinet {
  background: var(--surface);
}

.cabinet {
  display: grid;
  gap: var(--space-8);
}

.cabinet__copy {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.values {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.value {
  padding: var(--space-5);
  background: var(--white);
  border-radius: var(--radius-md);
  border: var(--rule);
}

.value .icon {
  color: var(--teal-deep);
  margin-bottom: var(--space-3);
}

.value h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}

.value p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

@media (min-width: 40em) {
  .values {
    grid-template-columns: repeat(3, 1fr);
  }
}

.brief {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-6);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
}

.brief .section__label {
  margin-bottom: 0;
  color: var(--teal);
}

.brief__mark {
  width: 5rem;
  height: 2.5rem;
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-linecap: round;
  margin-bottom: var(--space-2);
}

.brief__mark circle {
  fill: var(--teal);
  stroke: none;
}

.brief__title {
  font-size: var(--fs-xl);
  color: var(--white);
}

.brief__facts {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-sm);
}

.brief__facts div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--space-3);
}

.brief__facts dt {
  color: var(--slate-300);
}

.brief__facts dd {
  margin: 0;
  font-weight: 500;
}

.brief__link {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(19, 168, 158, 0.4);
  text-underline-offset: 0.2em;
}

@media (min-width: 64em) {
  .cabinet {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-9);
    align-items: start;
  }
}

/* =========================================================================
   Demande de devis
   ========================================================================= */

.section--devis {
  border-top: 1px solid var(--navy-100);
}

.section--devis:focus {
  outline: none;
}

.devis {
  display: grid;
  gap: var(--space-7);
}

.devis__copy {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.devis__address {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  border-top: var(--rule);
  font-size: var(--fs-sm);
}

.devis__address p {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.devis__address .icon {
  margin-top: 0.25rem;
  color: var(--teal-deep);
}

.devis__link {
  color: var(--teal-deep);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(12, 122, 115, 0.35);
  text-underline-offset: 0.2em;
}

.devis__map {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  font-weight: 500;
  color: var(--teal-deep);
}

.form--devis {
  padding: var(--space-6);
  background: var(--white);
  border: var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

@media (min-width: 64em) {
  .devis {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-9);
    align-items: start;
  }

  .devis__copy {
    position: sticky;
    top: 6rem;
  }
}

/* =========================================================================
   Bandeau d'appel final
   ========================================================================= */

.section--final {
  background: var(--navy-900);
  color: var(--white);
}

.final {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-5);
  max-width: 48rem;
}

.final__mark {
  width: 7.5rem;
  height: 3.75rem;
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.final__mark circle {
  fill: var(--teal);
  stroke: none;
}

.final__title {
  font-size: var(--fs-h2);
}

.final__lead {
  color: var(--slate-300);
  max-width: 52ch;
}
