/* Comment ça marche — illustrated page */

/* ── Hero ── */
.how-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 2.5rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
}

.how-hero-copy .eyebrow {
  justify-content: flex-start;
}

.how-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text);
}

.how-hero-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.how-hero-lead strong {
  color: var(--pink-dark);
}

.how-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
}

.how-badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pink-dark);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #F0E4F8;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  box-shadow: 0 4px 16px rgba(201, 177, 255, 0.12);
}

.how-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
}

.how-hero-glow {
  position: absolute;
  inset: 5% 0;
  background: radial-gradient(ellipse at center, rgba(255, 143, 171, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.how-phone-stack {
  position: relative;
  width: min(72%, 240px);
  aspect-ratio: 390 / 844;
}

.how-phone {
  position: absolute;
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 24px 48px rgba(61, 44, 77, 0.18);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.how-phone--back {
  top: 8%;
  left: -12%;
  transform: rotate(-6deg);
  opacity: 0.85;
  z-index: 1;
}

.how-phone--front {
  top: 0;
  right: -8%;
  transform: rotate(4deg);
  z-index: 2;
}

/* ── Journey timeline ── */
.how-timeline {
  position: relative;
  max-width: 900px;
  height: 6px;
  margin: 0 auto 2rem;
  background: linear-gradient(90deg, #7DD3C0 0%, #89CFF0 33%, var(--pink) 66%, #FFD93D 100%);
  border-radius: var(--radius-pill);
  opacity: 0.35;
}

.how-timeline-line {
  display: none;
}

.how-timeline-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--pink);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(255, 107, 138, 0.3);
}

.how-timeline-dot--1 { left: 12.5%; border-color: #7DD3C0; }
.how-timeline-dot--2 { left: 37.5%; border-color: #89CFF0; }
.how-timeline-dot--3 { left: 62.5%; border-color: var(--pink); }
.how-timeline-dot--4 { left: 87.5%; border-color: #FFD93D; }

.how-step--1 { border-color: color-mix(in srgb, #7DD3C0 40%, #F0E4F8); }
.how-step--2 { border-color: color-mix(in srgb, #89CFF0 40%, #F0E4F8); }
.how-step--3 { border-color: color-mix(in srgb, var(--pink) 40%, #F0E4F8); }
.how-step--4 { border-color: color-mix(in srgb, #FFD93D 50%, #F0E4F8); }

/* ── Detection flow ── */
.how-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.how-flow-step {
  background: var(--surface);
  border: 2px solid #F0E4F8;
  border-radius: 20px;
  padding: 1.25rem 0.85rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.how-flow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 0.65rem;
  border-radius: 16px;
}

.how-flow-icon .icon {
  width: 26px;
  height: 26px;
}

.how-flow-step h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.how-flow-step p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.how-flow-step--rest .how-flow-icon { background: rgba(125, 211, 192, 0.2); color: #4BA88E; stroke: #4BA88E; }
.how-flow-step--drive .how-flow-icon { background: rgba(255, 143, 171, 0.2); color: var(--pink-dark); stroke: var(--pink-dark); }
.how-flow-step--stop .how-flow-icon { background: rgba(137, 207, 240, 0.2); color: #5AABD4; stroke: #5AABD4; }
.how-flow-step--alert .how-flow-icon { background: rgba(255, 217, 61, 0.25); color: #C9A020; stroke: #C9A020; }

.how-flow-step--drive { border-color: color-mix(in srgb, var(--pink) 35%, #F0E4F8); }
.how-flow-step--alert { border-color: color-mix(in srgb, #FFD93D 45%, #F0E4F8); }

.how-flow-arrow {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  opacity: 0.4;
}

.how-flow-arrow .icon {
  width: 20px;
  height: 20px;
}

.how-loop {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  padding: 0.75rem 1.25rem;
  background: rgba(201, 177, 255, 0.1);
  border-radius: var(--radius-pill);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.how-engine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ── GPS battery cards ── */
.how-gps-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.how-gps-card {
  background: var(--surface);
  border: 2px solid #F0E4F8;
  border-radius: 24px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.how-gps-meter {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1rem;
}

.how-gps-bar {
  width: 28px;
  height: 10px;
  border-radius: 5px;
  background: #F0E4F8;
}

.how-gps-bar--on { background: currentColor; }

.how-gps-card--light { color: #7DD3C0; border-color: color-mix(in srgb, #7DD3C0 40%, #F0E4F8); background: color-mix(in srgb, #7DD3C0 6%, white); }
.how-gps-card--mid { color: #89CFF0; border-color: color-mix(in srgb, #89CFF0 40%, #F0E4F8); background: color-mix(in srgb, #89CFF0 6%, white); }
.how-gps-card--full { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 40%, #F0E4F8); background: color-mix(in srgb, var(--pink) 6%, white); }

.how-gps-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.how-gps-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.how-gps-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.how-battery-intro {
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.how-battery-aside {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 760px;
  margin: 2rem auto 0;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.12) 0%, rgba(137, 207, 240, 0.1) 100%);
  border: 2px solid color-mix(in srgb, #7DD3C0 35%, #F0E4F8);
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(125, 211, 192, 0.15);
}

.how-battery-aside-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(125, 211, 192, 0.25);
  color: #4BA88E;
}

.how-battery-aside-icon .icon {
  width: 28px;
  height: 28px;
  stroke: #4BA88E;
}

.how-battery-aside-copy h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.how-battery-aside-copy p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.how-battery-punchline {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 1rem !important;
  padding: 0.85rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.92rem !important;
  font-weight: 600;
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 192, 0.35);
  line-height: 1.5 !important;
}

.how-battery-punchline .icon-inline {
  flex-shrink: 0;
  margin-top: 0.15em;
  color: #4BA88E;
  stroke: #4BA88E;
}

/* ── Smart detection panels ── */
.how-smart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.how-smart-panel {
  background: var(--surface);
  border: 2px solid #F0E4F8;
  border-radius: 28px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.how-smart-illus {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.25rem;
}

.how-smart-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed;
}

.how-smart-ring--outer {
  inset: 0;
  border-color: rgba(201, 177, 255, 0.45);
  animation: how-pulse-ring 3s ease-in-out infinite;
}

.how-smart-ring--inner {
  inset: 22%;
  border-color: rgba(137, 207, 240, 0.5);
  animation: how-pulse-ring 3s ease-in-out infinite 0.5s;
}

.how-smart-device {
  position: absolute;
  inset: 32%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 143, 171, 0.15);
  border-radius: 16px;
  border: 2px solid rgba(255, 143, 171, 0.35);
}

.how-smart-device .icon {
  width: 32px;
  height: 32px;
  color: var(--pink-dark);
  stroke: var(--pink-dark);
}

.how-smart-pulse {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: rgba(255, 143, 171, 0.2);
  animation: how-pulse 2s ease-in-out infinite;
}

.how-zone-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.how-zone-ring--1 { width: 36px; height: 36px; border-color: var(--pink); background: rgba(255, 143, 171, 0.2); }
.how-zone-ring--2 { width: 72px; height: 72px; border-color: rgba(137, 207, 240, 0.6); border-style: dashed; }
.how-zone-ring--3 { width: 120px; height: 120px; border-color: rgba(201, 177, 255, 0.35); border-style: dashed; }

.how-zone-car {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-zone-car .icon {
  width: 22px;
  height: 22px;
  color: var(--pink-dark);
  stroke: var(--pink-dark);
}

.how-smart-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.how-smart-panel p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

@keyframes how-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.15; }
}

@keyframes how-pulse-ring {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Reminders ladder ── */
.how-remind-ladder {
  max-width: 900px;
  height: 4px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(90deg, #7DD3C0, #89CFF0, var(--pink), #FFD93D);
  border-radius: var(--radius-pill);
  opacity: 0.4;
}

.how-reminders {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.how-remind {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
  border: 2px solid #F0E4F8;
  box-shadow: var(--shadow);
}

.how-remind-level {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pink);
  color: white;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-remind .icon-step {
  margin: 0.35rem auto 0.5rem;
}

.how-remind h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.how-remind p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.how-remind--1 { border-color: color-mix(in srgb, #7DD3C0 45%, #F0E4F8); background: color-mix(in srgb, #7DD3C0 8%, white); }
.how-remind--1 .how-remind-level { background: #7DD3C0; }
.how-remind--2 { border-color: color-mix(in srgb, #89CFF0 45%, #F0E4F8); background: color-mix(in srgb, #89CFF0 8%, white); }
.how-remind--2 .how-remind-level { background: #89CFF0; }
.how-remind--3 { border-color: color-mix(in srgb, var(--pink) 45%, #F0E4F8); background: color-mix(in srgb, var(--pink) 8%, white); }
.how-remind--4 { border-color: color-mix(in srgb, #FFD93D 55%, #F0E4F8); background: color-mix(in srgb, #FFD93D 12%, white); }
.how-remind--4 .how-remind-level { background: #FFD93D; color: var(--text); }

/* ── Setup grid ── */
.how-setup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.how-setup-card {
  position: relative;
  background: var(--surface);
  border: 2px solid #F0E4F8;
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.how-setup-num {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pink);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-setup-card .icon-step {
  margin: 0.25rem auto 0.5rem;
}

.how-setup-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.how-setup-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.how-steps-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.how-steps-note a {
  color: var(--pink-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .how-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2.5rem;
  }

  .how-hero-copy .eyebrow {
    justify-content: center;
  }

  .how-badges {
    justify-content: center;
  }

  .how-hero-visual {
    order: -1;
    min-height: 280px;
  }

  .how-phone-stack {
    width: min(55%, 200px);
  }

  .how-flow {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .how-flow-arrow {
    justify-content: center;
    transform: rotate(90deg);
    padding: 0.15rem 0;
  }

  .how-engine-grid,
  .how-gps-cards,
  .how-smart-grid {
    grid-template-columns: 1fr;
  }

  .how-reminders,
  .how-setup-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-battery-aside {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem 1.25rem;
  }

  .how-battery-punchline {
    justify-content: center;
    text-align: left;
  }

  .how-timeline {
    display: none;
  }
}

@media (max-width: 640px) {
  .how-reminders,
  .how-setup-grid {
    grid-template-columns: 1fr;
  }

  .how-badges {
    flex-direction: column;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .how-smart-pulse,
  .how-smart-ring--outer,
  .how-smart-ring--inner {
    animation: none;
  }
}
