/* Roadmap : un parcours en trois stations (disponible, en pilote, ensuite), une frise des briques
   et les engagements qui ne changeront pas. */

/* ---------- Hero ---------- */

.rm-hero-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 104px;
}

.rm-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.rm-h1 {
  max-width: 11em;
  margin: 0;
  color: #fff;
  font-family: var(--ps-font-sans);
  font-size: clamp(46px, 6.4vw, 104px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.rm-lead {
  max-width: 30em;
  color: var(--ps-muted-dark);
  font-size: 20px;
  line-height: 1.5;
}

.rm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.rm-btn {
  min-height: 56px;
  padding: 17px 28px;
  font-size: 17px;
}

/* Parcours : trois stations sur une voie, la station du pilote mise en avant. */
.rm-route {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  padding: 40px 20px 36px;
  border: 1px solid rgba(255, 180, 140, 0.18);
  border-radius: var(--ps-radius-card);
  background: rgba(42, 24, 16, 0.55);
}

.rm-route-track {
  position: absolute;
  top: 50.5px;
  right: calc(20px + (100% - 40px) / 6);
  left: calc(20px + (100% - 40px) / 6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 3px;
}

.rm-route-done {
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ps-status-trusted), var(--ps-orange-light));
}

.rm-route-todo {
  border-top: 3px dashed rgba(255, 211, 189, 0.3);
}

.rm-stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  text-align: center;
}

.rm-stop-dot {
  position: relative;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin-bottom: 14px;
  border-radius: 50%;
}

.rm-stop--ok .rm-stop-dot {
  border: 5px solid var(--ps-ember);
  background: var(--ps-status-trusted);
  box-shadow: 0 0 0 2px var(--ps-status-trusted);
}

.rm-stop--pilot .rm-stop-dot {
  border: 5px solid var(--ps-ember);
  background: var(--ps-orange-light);
  box-shadow: 0 0 0 2px var(--ps-orange-light);
}

/* Halo doux autour de la station en cours. */
.rm-stop--pilot .rm-stop-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(255, 138, 61, 0.55);
  border-radius: 50%;
  animation: rm-pulse 2.4s ease-out infinite;
}

.rm-stop--next .rm-stop-dot {
  border: 2px solid rgba(255, 211, 189, 0.45);
  background: var(--ps-ember);
}

.rm-stop-name {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.rm-stop--next .rm-stop-name {
  color: var(--ps-muted-dark);
}

.rm-stop-count {
  color: var(--ps-muted-dark);
  font-size: 15px;
  line-height: 1.4;
}

.rm-stop-count b {
  color: #fff;
  font-weight: 800;
}

.rm-here {
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

@keyframes rm-pulse {
  0% { opacity: 0.9; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* ---------- Titres de section : titre puis sous-titre, empilés ---------- */

.rm-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.rm-head .f-lead {
  max-width: 34em;
  margin: 0;
}

.rm-note {
  flex-direction: column;
}

/* ---------- Frise : trois phases reliées par une voie continue ---------- */

.rm-tl {
  --rm-gap: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

.rm-phase {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding-left: 48px;
}

/* Mobile : la voie descend à gauche, d'une phase à la suivante. */
.rm-phase::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -48px;
  left: 11px;
  width: 2px;
}

.rm-phase--ok::before { background: linear-gradient(var(--ps-status-trusted), var(--ps-orange-light)); }
.rm-phase--pilot::before { background: linear-gradient(var(--ps-orange-light), var(--ps-orange)); }

.rm-phase--next::before {
  bottom: 0;
  width: 0;
  border-left: 2px dashed #d9c3b6;
}

.rm-phase-dot {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.rm-phase--ok .rm-phase-dot {
  border: 5px solid var(--ps-paper);
  background: var(--ps-status-trusted);
  box-shadow: 0 0 0 2px var(--ps-status-trusted);
}

.rm-phase--pilot .rm-phase-dot {
  border: 5px solid var(--ps-paper);
  background: var(--ps-orange);
  box-shadow: 0 0 0 2px var(--ps-orange);
}

.rm-phase--pilot .rm-phase-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(244, 81, 30, 0.45);
  border-radius: 50%;
  animation: rm-pulse 2.4s ease-out infinite;
}

.rm-phase--next .rm-phase-dot {
  border: 2px solid #c9b0a2;
  background: var(--ps-paper);
}

.rm-phase-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.ps-page .rm-phase-title {
  margin: 0;
  color: var(--ps-ink);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.rm-pill {
  padding: 6px 14px;
  border-radius: var(--ps-radius-pill);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.rm-pill--ok { background: rgba(16, 185, 129, 0.14); color: #047857; }
.rm-pill--pilot { background: var(--ps-orange); color: #fff; }
.rm-pill--next { border: 1px solid #d9c3b6; color: #7f685c; }

.rm-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--ps-line-light);
  border-radius: var(--ps-radius-card);
  background: #fff;
}

.rm-phase--pilot .rm-card {
  border-color: rgba(244, 81, 30, 0.28);
  box-shadow: 0 24px 48px -36px rgba(244, 81, 30, 0.55);
}

.rm-phase--next .rm-card {
  border: 1px dashed #d9c3b6;
  background: rgba(255, 255, 255, 0.45);
}

.rm-tag {
  padding: 4px 12px;
  border-radius: var(--ps-radius-pill);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.rm-tag--ext { background: rgba(16, 185, 129, 0.12); color: #047857; }
.rm-tag--desk { background: rgba(244, 81, 30, 0.1); color: #9a3412; }
.rm-tag--con { background: rgba(180, 83, 9, 0.1); color: #92400e; }
.rm-tag--ent { background: rgba(28, 17, 11, 0.07); color: var(--ps-ink); }

.rm-card-title {
  color: var(--ps-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.rm-card-text {
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.ps-page main .f-paper a.ps-link.rm-phase-link:not(.ps-btn):not(.ps-row):not(.ps-card) {
  color: var(--ps-ink);
}

.ps-page main .f-paper a.ps-link.rm-phase-link:not(.ps-btn):not(.ps-row):not(.ps-card):hover {
  color: var(--ps-orange-dark);
}

/* ---------- Ce qui ne changera pas ---------- */

.rm-fixed {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-fixed li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 32px 28px;
  border: 1px solid rgba(255, 180, 140, 0.18);
  border-radius: var(--ps-radius-card);
  background: rgba(42, 24, 16, 0.55);
}

.rm-fixed-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(244, 81, 30, 0.16);
  color: var(--ps-peach);
}

.rm-fixed-title {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.rm-fixed-text {
  color: #d7c3b8;
  font-size: 19px;
  line-height: 1.55;
}

/* ---------- Grands écrans ---------- */

@media (min-width: 700px) {
  .rm-cards--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .rm-fixed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Hero en deux colonnes ; frise horizontale, la voie court sous les trois points. */
@media (min-width: 1100px) {
  .rm-hero-wrap {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 64px;
  }

  .rm-route {
    justify-self: end;
  }

  .rm-tl {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--rm-gap);
  }

  .rm-phase {
    padding-top: 48px;
    padding-left: 0;
  }

  .rm-phase::before {
    top: 11px;
    right: calc(-1 * var(--rm-gap));
    bottom: auto;
    left: 0;
    width: auto;
    height: 2px;
  }

  .rm-phase--ok::before { background: linear-gradient(90deg, var(--ps-status-trusted), var(--ps-orange-light)); }
  .rm-phase--pilot::before { background: linear-gradient(90deg, var(--ps-orange-light), var(--ps-orange)); }

  .rm-phase--next::before {
    right: 0;
    width: auto;
    height: 0;
    border-top: 2px dashed #d9c3b6;
    border-left: 0;
  }
}

/* ---------- Mobile et mouvement réduit ---------- */

@media (max-width: 900px) {
  .rm-hero-wrap {
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 72px;
  }

  .rm-stop--pilot .rm-stop-dot::after,
  .rm-phase--pilot .rm-phase-dot::after {
    animation: none;
    opacity: 0.6;
    transform: scale(0.9);
  }
}

@media (max-width: 480px) {
  .rm-route {
    padding: 32px 8px 28px;
  }

  .rm-route-track {
    top: 43px;
    right: calc(8px + (100% - 16px) / 6);
    left: calc(8px + (100% - 16px) / 6);
  }

  .rm-stop-name {
    font-size: 18px;
  }

  .rm-stop-count {
    font-size: 13px;
  }

  .rm-here {
    padding: 4px 8px;
    font-size: 12px;
  }

  .rm-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rm-stop--pilot .rm-stop-dot::after,
  .rm-phase--pilot .rm-phase-dot::after {
    animation: none;
    opacity: 0.6;
    transform: scale(0.9);
  }
}

/* Cartes de la frise : texte plus compact et même hauteur pour toutes. */
.rm-card-title { font-size: 21px; }
.rm-card-text { font-size: 16px; line-height: 1.5; }
.rm-tag { font-size: 12px; }
.rm-card { padding: 20px 22px; }
.rm-cards { grid-auto-rows: 1fr; }

@media (min-width: 700px) {
  .rm-card { min-height: 210px; }
}

/* Produit concerné : simple mention en texte, sans pastille de couleur. */
.rm-prod {
  color: #8a6a5a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.rm-phase--pilot .rm-prod {
  color: var(--ps-orange-dark);
}
