/* Page /app : sur ordinateur, l'application dans le cadre du téléphone, au centre, avec un texte
   d'accompagnement ; sur téléphone, elle occupe tout l'écran comme une application installée. */

.app-page {
  min-height: 100dvh;
  overflow-x: clip;
}
.app-head {
  position: relative;
}
.stage {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px clamp(16px, 4vw, 40px) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  isolation: isolate;
}
.stage__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  filter: blur(70px);
}
.stage__glow span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: var(--page-glow-a);
}
.stage__glow span + span {
  width: 360px;
  translate: -10% -80%;
  background: var(--page-glow-c);
}
.motion .stage__glow span {
  animation: breathe-glow 10s ease-in-out infinite;
}
.motion .stage__glow span + span {
  animation-duration: 13s;
  animation-delay: -4s;
}
@keyframes breathe-glow {
  50% {
    transform: scale(1.12) translate(3%, -3%);
  }
}
.stage__phone {
  display: grid;
  justify-items: center;
}
.motion .stage__phone {
  animation: kit-rise 1s var(--kit-ease) backwards;
}
.stage .device {
  --device-w: clamp(300px, calc((100dvh - 150px) * 0.4737), 372px);
}
.stage__title {
  margin: 0 0 18px;
  font: 900 clamp(34px, 3.5vw, 52px) / 0.94 var(--font-display);
  font-stretch: 125%;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.stage__intro {
  justify-self: end;
  max-width: 360px;
}
.stage__intro p {
  margin: 0;
  color: var(--kit-muted);
  font-size: 17px;
}
.stage__intro .stage__note {
  margin-top: 18px;
  font-size: 14px;
  padding-left: 14px;
  border-left: 3px solid var(--p-coral);
}
.stage__tips {
  max-width: 330px;
}
.stage__h2 {
  margin: 0 0 14px;
  font: 850 22px/1.1 var(--font-display);
  font-stretch: 118%;
}
.tips {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: tip;
  display: grid;
  gap: 14px;
}
.tips li {
  counter-increment: tip;
  position: relative;
  padding-left: 46px;
  color: var(--kit-muted);
  font-size: 15px;
  min-height: 34px;
}
.tips li::before {
  content: counter(tip);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--kit-surface);
  color: var(--kit-fg);
  font: 900 14px var(--font-display);
}
.tips strong {
  display: block;
  color: var(--kit-fg);
}
.stage__devis {
  margin: 28px 0 8px;
  font-size: 14px;
  color: var(--kit-muted);
}
.stage__devis a {
  color: var(--kit-fg);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* Tablette : le téléphone au centre, le texte au-dessus et au-dessous */
@media (max-width: 1060px) and (min-width: 641px) {
  .stage {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .stage__intro {
    text-align: center;
    justify-self: center;
    max-width: 520px;
  }
  .stage__intro .stage__note {
    border-left: 0;
    padding-left: 0;
  }
  .stage__tips {
    max-width: 520px;
  }
  .stage .device {
    --device-w: 360px;
  }
}

/* ---------- Téléphone : plein écran ---------- */
@media (max-width: 640px) {
  html:has(.app-page) {
    height: 100%;
    overflow: hidden;
  }
  .app-page {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .app-page .demo-bar {
    flex: none;
    font-size: 12px;
    padding-block: 5px;
  }
  .app-head,
  .stage__intro,
  .stage__tips,
  .stage__glow,
  .app-page .binux-cta {
    display: none;
  }
  .stage {
    flex: 1;
    min-height: 0;
    display: block;
    padding: 0;
    max-width: none;
    width: 100%;
    margin: 0;
  }
  .stage__phone,
  .stage .device,
  .stage .device__screen {
    height: 100%;
  }
  .motion .stage__phone {
    animation: none;
  }
  .stage .device {
    width: 100%;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .stage .device::before,
  .stage .device::after,
  .stage .device__island,
  .stage .device__status,
  .stage .device__glare,
  .stage .device__home {
    display: none;
  }
  .stage .device__screen {
    border-radius: 0;
  }
  .stage .device .pulso {
    --safe-top: calc(env(safe-area-inset-top, 0px) + 10px);
    --safe-bottom: max(env(safe-area-inset-bottom, 0px), 10px);
  }
  /* Le bandeau occupe déjà le haut : la zone sûre du haut ne compte qu'une fois. */
  .app-page:has(.demo-bar) .device .pulso {
    --safe-top: 10px;
  }
  .app-page .demo-bar {
    padding-top: max(5px, env(safe-area-inset-top, 0px));
  }
}
