/* ==========================================================================
   Avance Mobilité — home-alternative.css
   Only what is specific to the "Accueil alternative" template
   (everything shared lives in theme.css).
   ========================================================================== */

/* ---------- Ticker under the hero --------------------------------------------- */

.am-ticker { margin-top: 40px; border-block: 1px solid var(--am-line); background: rgba(255, 255, 255, .6); overflow: hidden; }
.am-ticker__track { display: flex; width: max-content; animation: am-ticker 38s linear infinite; }
.am-ticker:hover .am-ticker__track { animation-play-state: paused; }
.am-ticker ul { display: flex; }
.am-ticker li { display: flex; align-items: center; padding: 20px 0; font-size: 13px; font-weight: 600; color: var(--am-ink); white-space: nowrap; }
.am-ticker li::after { content: "·"; margin-inline: 60px; color: var(--am-teal); font-weight: 400; }
@keyframes am-ticker { to { transform: translateX(-50%); } }

/* ---------- Dark section: vehicle, equipment, steps --------------------------- */

.am-vehicle { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.am-vehicle__media { position: relative; aspect-ratio: 6 / 7; border-radius: var(--am-radius); overflow: hidden; box-shadow: var(--am-shadow-lg); }
.am-vehicle__media img, .am-vehicle__media .am-ph { width: 100%; height: 100%; object-fit: cover; }
.am-vehicle__media::after { content: ""; position: absolute; inset: 60% 0 0; background: linear-gradient(180deg, transparent, rgba(4, 28, 40, .85)); }
.am-vehicle__media figcaption { position: absolute; left: 24px; bottom: 22px; z-index: 1; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.am-vehicle__copy p:not(.am-eyebrow) { margin-top: 22px; max-width: 56ch; font-size: 15px; }
.am-subsection { margin-top: clamp(64px, 8vw, 96px); padding-top: 44px; border-top: 1px solid var(--am-line-dark); }
.am-subsection__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 32px; }
.am-subsection__aside { max-width: 34ch; font-size: 12.5px; text-align: right; }
.am-equip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--am-line-dark); border: 1px solid var(--am-line-dark); border-radius: var(--am-radius); overflow: hidden;
}
.am-equip__item { padding: 26px 26px 30px; background: var(--am-deep-2); transition: background-color .3s; }
.am-equip__item:hover { background: #0e4359; }
.am-equip__item h4 { margin-top: 22px; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.am-equip__item p { margin-top: 8px !important; font-size: 13.5px; line-height: 1.6; }
.am-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 22px; font-size: 11.5px; line-height: 1.6; color: #8fa9b5; }
.am-notes strong { color: #fff; }
/* steps / posters */
.am-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.am-poster { aspect-ratio: 9 / 16; max-height: 640px; width: 100%; border-radius: 10px; overflow: hidden; background: #050d2c; }
.am-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--am-ease); }
.am-step:hover .am-poster > img:not(.am-poster__logo) { transform: scale(1.03); }
.am-poster--css {
  position: relative; display: flex; flex-direction: column; justify-content: center; padding: 12% 10%;
  color: #fff; isolation: isolate;
  background:
    radial-gradient(90% 24% at 50% 84%, rgba(40, 110, 255, .55), transparent 70%),
    radial-gradient(120% 60% at 80% 40%, rgba(30, 60, 140, .45), transparent 70%),
    linear-gradient(180deg, #060c2a, #040a24);
}
.am-poster--css::after {
  content: ""; position: absolute; left: -35%; right: -35%; bottom: 8%; height: 34%; z-index: -1;
  border-bottom: 3px solid #4d97ff; border-radius: 50%; filter: drop-shadow(0 0 12px #2f7bff) drop-shadow(0 6px 26px #2f7bff); transform: rotate(5deg);
}
.am-poster__logo { position: absolute; top: 7%; left: 50%; transform: translateX(-50%); width: 42% !important; height: auto !important; object-fit: contain !important; }
.am-poster__title { font-size: clamp(22px, 2.5vw, 34px); line-height: 1.08; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; }
.am-poster__title span { color: #3f93ff; }
.am-poster__title::after { content: ""; display: block; width: 34px; height: 3px; margin-top: 18px; background: #3f93ff; }
.am-poster__sub { margin-top: 16px !important; font-size: clamp(13px, 1.2vw, 16px); line-height: 1.35; }
.am-poster__sub em { font-style: normal; color: #3f93ff; }
.am-step__kicker { margin-top: 22px !important; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #8fa9b5; }
.am-step__title { margin-top: 8px; font-size: 15.5px; font-weight: 600; }
.am-step__text { margin-top: 8px !important; font-size: 13.5px; max-width: 40ch; }

/* ---------- Application + tracker demo ---------------------------------------- */

.am-app {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: clamp(36px, 6vw, 72px); align-items: center;
  padding: clamp(28px, 5vw, 64px); margin-inline: -16px; border-radius: var(--am-radius-lg);
  background: radial-gradient(90% 100% at 100% 50%, #e8f4f8, #fff 70%); box-shadow: var(--am-shadow);
}
.am-app__list { margin-top: 34px !important; display: grid; gap: 22px; }
.am-app__list li { display: flex; gap: 16px; }
.am-app__list h3 { font-size: 15.5px; font-weight: 600; color: var(--am-ink); letter-spacing: -.01em; }
.am-app__list p { margin-top: 4px !important; font-size: 14px; max-width: 50ch; }
.am-tracker { background: #fff; border: 1px solid var(--am-line); border-radius: 16px; box-shadow: var(--am-shadow-lg); overflow: hidden; font-size: 13px; }
.am-tracker__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--am-line); }
.am-tracker__body { padding: 22px; }
.am-tracker__head { display: flex; justify-content: space-between; align-items: flex-start; }
.am-tracker__title { margin-top: 4px !important; font-size: 17px; font-weight: 600; color: var(--am-ink); letter-spacing: -.02em; }
.am-tracker__hint { margin-top: 14px !important; font-size: 11.5px; line-height: 1.55; }
.am-tracker__hint a { color: var(--am-teal); text-decoration: underline; text-underline-offset: 2px; }
.am-tracker__status { display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #e7f6f3; border: 1px solid #cfece6; }
.am-tracker__status strong { display: block; font-size: 13px; color: var(--am-ink); }
.am-tracker__status span { font-size: 11.5px; }
.am-tracker__map {
  position: relative; padding: 30px 18px 34px; border-block: 1px solid var(--am-line);
  background:
    linear-gradient(var(--am-line) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, var(--am-line) 1px, transparent 1px) 0 0 / 28px 100%,
    var(--am-mist);
}
.am-tracker__map svg { width: 100%; height: auto; overflow: visible; }
.am-route { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.am-route--bg { stroke: #b9d6e0; }
.am-route--done { stroke: var(--am-navy); stroke-dasharray: 100; stroke-dashoffset: 88; transition: stroke-dashoffset 1.2s var(--am-ease); }
.am-route__start { fill: #fff; stroke: var(--am-navy); stroke-width: 2.5; }
.am-route__end { fill: var(--am-navy); }
.am-route__car { fill: var(--am-navy); stroke: #fff; stroke-width: 2; }
.am-route__car-halo { fill: rgba(14, 127, 140, .22); }
.am-tracker__place { position: absolute; font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--am-muted); }
.am-tracker__place--from { left: 22px; top: 12px; }
.am-tracker__place--to { right: 22px; bottom: 30px; }
.am-tracker__caption { position: absolute; right: 12px; bottom: 8px; padding: 3px 8px; background: #fff; border: 1px solid var(--am-line); border-radius: 4px; font-size: 9.5px; color: var(--am-muted); }
.am-tracker__meta { display: flex; justify-content: space-between; padding: 10px 22px; background: var(--am-mist); font-size: 11px; }
.am-tracker__actions { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; }
.am-tracker__foot { padding: 6px 22px 18px; font-size: 10.5px; text-align: center; color: var(--am-muted); }

/* ---------- Human ------------------------------------------------------------- */

.am-human { background: radial-gradient(80% 120% at 100% 50%, #e3f1f6, var(--am-mist) 60%, #f7fbfc); padding-block: clamp(64px, 8vw, 96px); }
.am-human__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.am-human__sign { margin-top: 28px !important; font-weight: 700; color: var(--am-ink); }
.am-human__media { position: relative; aspect-ratio: 13 / 12; border-radius: var(--am-radius); overflow: hidden; box-shadow: var(--am-shadow-lg); }
.am-human__media img, .am-human__media .am-ph { width: 100%; height: 100%; object-fit: cover; }
.am-human__media::after { content: ""; position: absolute; inset: 70% 0 0; background: linear-gradient(180deg, transparent, rgba(4, 28, 40, .75)); }
.am-human__media figcaption { position: absolute; left: 18px; bottom: 14px; z-index: 1; color: #fff; font-size: 12px; }

/* ---------- Responsive -------------------------------------------------------- */

@media (max-width: 980px) {
  .am-vehicle, .am-app, .am-human__inner { grid-template-columns: minmax(0, 1fr); }
  .am-vehicle__media { aspect-ratio: 4 / 3.4; }
  .am-app { margin-inline: 0; }
  .am-subsection__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .am-subsection__aside { text-align: left; }
  .am-equip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-human__media { order: -1; }
}

@media (max-width: 640px) {
  .am-equip, .am-notes { grid-template-columns: minmax(0, 1fr); }
  .am-notes { gap: 14px; }
  .am-steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding-inline: 20px; padding-bottom: 8px; }
  .am-step { scroll-snap-align: center; }
  .am-vehicle__copy .am-btn { width: 100%; }
  .am-app { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .am-ticker__track { width: auto; flex-wrap: wrap; }
  .am-ticker ul[aria-hidden] { display: none; }
  .am-ticker ul { flex-wrap: wrap; padding-inline: 20px; }
}
