/*
 * La landing de superquote.app. Les jetons sont ceux de DESIGN.md (thème clair, cartes blanches, un seul bouton noir par
 * écran, le jaune de la marque), toute mesure sur la grille de 4 et de 8 ; la page est blanche, l'app dans le téléphone
 * garde son fond gris. Onest est servie par l'API, en quatre graisses ; aucune ressource tierce.
 */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/Onest-400Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/Onest-600SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Onest-700Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/Onest-800ExtraBold.woff2") format("woff2");
}

:root {
  --background: #f2f3f5;
  --surface: #ffffff;
  --text: #191c1f;
  --text-secondary: #5e646c;
  --hairline: #e8eaed;
  --disabled: #c9cdd2;
  --primary: #191c1f;
  --on-primary: #ffffff;
  --accent: #ffd43b;
  --on-accent: #191c1f;
  --scrim: #111316;
  --focus: #3e6ff2;
  --read: #3e6ff2;
  --rec: #e5484d;

  --header-h: 64px;
  --stage-h: calc(100svh - var(--header-h));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 16px/22px var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p,
ul,
fieldset {
  margin: 0;
  padding: 0;
}

h1,
h2 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* Boutons : le noir de l'action principale (56, pilule), le jaune du simulateur, le gris de l'action discrète (40). */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 24px;
  border-radius: 9999px;
  font: 600 17px/24px var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.88;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-secondary {
  background: var(--background);
  color: var(--text);
}

.btn-small {
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
  line-height: 20px;
}

/* En-tête : blanc, son filet sous lui, collé en haut au défilement ; le logo, le nom et « Télécharger ». */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--hairline);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 700 20px/26px var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

/* Sous 360 px, le nom et « Télécharger » se touchent : logo et nom un peu plus petits. */
@media (max-width: 359px) {
  .brand {
    gap: 8px;
    font-size: 18px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
}

/* L'app dans un téléphone. Sur bureau, le téléphone se colle sous l'en-tête et les promesses défilent à côté de lui ;
   sur un téléphone, chaque promesse a sous son texte le composant de l'app qui la raconte. Sans script, le téléphone
   et les composants restent cachés : `is-live` (landing.js) les montre. */

.story {
  position: relative;
}
.story-pin {
  display: none;
}
.chapter-hero {
  text-align: center;
}
.hero-copy {
  padding-top: 32px;
}
.chapter-hero h1 {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 44px;
  line-height: 44px;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.chapter-hero .lead {
  max-width: 520px;
  margin: 16px auto 0;
  font-size: 18px;
  line-height: 26px;
  color: var(--text-secondary);
}
.chapter-hero .btn {
  width: auto;
  margin-top: 24px;
}
.chapter {
  padding-top: 72px;
}
.chapter h2 {
  font-size: 40px;
  line-height: 41px;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.chapter .text {
  max-width: 460px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 26px;
}


/* Le téléphone : 390 sur 844, posé et mis à l'échelle par le script ; son cadre noir fin et son îlot. */
.device {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  transform-origin: 0 0;
  will-change: transform;
}
.phone {
  position: relative;
  height: 100%;
  padding: 11px;
  border-radius: 60px;
  background: var(--text);
  box-shadow:
    0 0 0 1px rgb(25 28 31 / 0.4),
    0 48px 96px -32px rgb(25 28 31 / 0.38);
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 9;
  top: 22px;
  left: 50%;
  width: 120px;
  height: 34px;
  margin-left: -60px;
  border-radius: 20px;
  background: #000;
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 49px;
  background: var(--background);
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
  text-align: left;
}
.screen p {
  margin: 0;
}
.screen .view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--background);
  transform: translateX(calc(var(--x, 0) * 100%));
  box-shadow: -12px 0 32px rgb(25 28 31 / 0.08);
}
.screen .v-body {
  padding: 56px 16px 0;
  transform: translateY(calc(var(--scroll, 0) * -1px));
}
.screen .status {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 6px 24px 0 36px;
  background: var(--background);
  font-size: 16px;
  font-weight: 600;
}
.screen .status svg {
  height: 12px;
}
/* Un élément qui entre dans l'app : sa place s'ouvre et il descend dedans, sans fondu (le script règle la hauteur). */
.screen .slot {
  overflow: hidden;
}
.screen .slot > * {
  transform: translateY(calc((1 - var(--r, 1)) * -100%));
}
.screen .nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.screen .round {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
}
.screen .round svg {
  width: 22px;
  height: 22px;
}
.screen .progress {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #dfe1e4;
}
.screen .progress-half {
  --w: 40%;
}
.screen .progress i {
  display: block;
  width: var(--w, 20%);
  height: 100%;
  border-radius: 2px;
  background: var(--text);
}
.screen .v-title {
  padding-top: 20px;
  font-size: 27px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.screen .card {
  border-radius: 20px;
  background: var(--surface);
}
.screen .transcript {
  height: 430px;
  margin-top: 16px;
  padding: 16px;
  font-size: 17px;
  line-height: 25px;
}
.screen .transcript span::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 20px;
  margin-left: 1px;
  vertical-align: -4px;
  background: var(--text);
}
.screen .rec-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.screen .rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rec);
}
.screen .wave {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 96px;
  height: 20px;
}
.screen .wave i {
  flex: 1;
  height: 100%;
  border-radius: 1px;
  background: var(--text);
  transform: scaleY(0.25);
  animation: wave 0.8s ease-in-out infinite alternate;
}
@keyframes wave {
  to {
    transform: scaleY(var(--amp, 0.8));
  }
}
.screen .cta-zone {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 34px;
  background: linear-gradient(rgb(242 243 245 / 0), var(--background) 36%);
  transform: translateY(calc(var(--y, 0) * 160%));
}
.screen .cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  transform: scale(calc(1 - var(--press, 0) * 0.04));
}
.screen .cta-rec {
  background: var(--rec);
}
.screen .cta-rec i {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 3px;
}
.screen .roll {
  display: grid;
  overflow: hidden;
  height: 24px;
  line-height: 24px;
}
.screen .roll > span {
  grid-area: 1 / 1;
  text-align: center;
  transform: translateY(calc(var(--s, 0) * -110%));
}
.screen .roll > span + span {
  transform: translateY(calc((1 - var(--s, 0)) * 110%));
}
.screen .cta-off {
  opacity: calc(0.3 + var(--on, 0) * 0.7);
}
.screen .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.screen .who b {
  display: block;
  font-size: 18px;
  line-height: 23px;
  font-weight: 700;
}
.screen .who small {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
}
/* L'en-tête du devis, épinglé sous la barre d'état : la flèche et le titre, puis la barre du total une fois
   les actions sorties de l'écran (C21), avec son filet. */
.screen .q-head {
  position: absolute;
  z-index: 3;
  top: 56px;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--background);
  box-shadow: 0 1px 0 rgb(25 28 31 / calc(var(--f, 0) * 0.08));
}
.screen .q-head > * {
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
}
.screen .q-head .who {
  opacity: calc(1 - var(--f, 0));
}
.screen .pinbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  opacity: var(--f, 0);
}
.screen .pinbar b {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.screen .minis {
  display: flex;
  gap: 4px;
}
.screen .minis .round {
  width: 40px;
  height: 40px;
}
.screen .minis .round svg {
  width: 20px;
  height: 20px;
}
.screen .q-body {
  padding-top: 120px;
}
.screen .q-body .amount {
  margin-top: 0;
}
.screen .amount {
  margin-top: 18px;
  font-size: 41px;
  line-height: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.screen .amount small {
  font-size: 18px;
  letter-spacing: 0;
}
.screen .sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.screen .tag {
  padding: 2px 10px;
  border: 1px solid #c9cdd2;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  transform: scale(var(--pop, 1));
}
.screen .tag-sent {
  border-color: transparent;
  background: #e4e7eb;
  color: var(--text);
}
.screen .actions {
  display: flex;
  gap: 14px;
  padding-top: 20px;
}
.screen .action {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 76px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  text-align: center;
}
.screen .action .round {
  width: 54px;
  height: 54px;
}
.screen .q-gap {
  padding-top: 12px;
}
.screen .q-card {
  padding: 16px 16px 2px;
}
.screen .section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
  font-size: 18px;
  line-height: 23px;
  font-weight: 700;
  white-space: nowrap;
}
.screen .section-head small {
  font-size: 12px;
}
.screen .section-head > span:first-child {
  min-width: 0;
  white-space: normal;
}
.screen .section-head .price {
  flex: none;
  align-self: start;
}
.screen .item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.screen .qty {
  display: grid;
  place-content: center;
  height: 48px;
  border-radius: 12px;
  background: var(--background);
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.screen .qty small {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}
.screen .item-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.screen .item-foot b {
  color: var(--text);
  font-size: 15px;
}
.screen .price {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
.screen .options {
  margin-top: 16px;
  padding: 0 16px;
}
.screen .option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
}
.screen .options > .slot:first-child > .option {
  border-top: 0;
}
.screen .radio {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid #c9cdd2;
  border-radius: 50%;
}
.screen .radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--text);
  transform: scale(var(--on, 0));
}
.screen .option-other {
  color: var(--text-secondary);
}
.screen .option-other .round {
  width: 32px;
  height: 32px;
  margin-left: auto;
  background: var(--background);
}
.screen .option-other .round svg {
  width: 18px;
  height: 18px;
}
.screen .follow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  font-size: 15px;
  font-weight: 600;
}
.screen .follow svg {
  width: 18px;
  height: 18px;
}
.screen .follow span:last-child {
  color: var(--read);
}
.screen .h-label {
  padding-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}
.screen .h-card {
  margin-top: 8px;
  padding: 0 16px;
}
.screen .h-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.screen .h-card > .slot:last-child > .h-row {
  border-bottom: 0;
}
.screen .h-row svg {
  width: 20px;
  height: 20px;
}
.screen .h-row b {
  font-weight: 600;
}
.screen .h-row small {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
}
.screen .h-row time {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}
/* La notification du téléphone, sous l'îlot. */
.screen .notice {
  position: absolute;
  z-index: 7;
  top: 54px;
  left: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 24px;
  background: rgb(255 255 255 / 0.96);
  box-shadow:
    0 0 0 1px rgb(25 28 31 / 0.05),
    0 14px 36px -6px rgb(25 28 31 / 0.3);
  font-size: 14px;
  line-height: 19px;
  transform: translateY(calc((1 - var(--r, 0)) * (-100% - 64px)));
}
.screen .notice img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.screen .notice p {
  min-width: 0;
}
.screen .notice b,
.screen .notice span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.screen .notice b {
  font-weight: 600;
}
.screen .notice span {
  color: var(--text-secondary);
}
.screen .dim {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: rgb(17 19 22 / calc(var(--r, 0) * 0.45));
}
.screen .sheet {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px 34px;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  transform: translateY(calc((1 - var(--r, 0)) * 105%));
}
.screen .grab {
  width: 40px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: #d5d8dc;
}
.screen .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 21px;
  font-weight: 700;
}
.screen .sheet-head .round {
  background: var(--background);
}
.screen .pct-label {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
}
.screen .pct {
  font-size: 60px;
  line-height: 66px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.screen .pct small {
  color: var(--text-secondary);
  font-size: 40px;
}
.screen .slider {
  position: relative;
  height: 6px;
  margin: 18px 12px 0;
  border-radius: 3px;
  background: var(--hairline);
}
.screen .slider i {
  display: block;
  width: calc(var(--p, 0) * 100%);
  height: 100%;
  border-radius: 3px;
  background: var(--text);
}
.screen .slider b {
  position: absolute;
  top: 50%;
  left: calc(var(--p, 0) * 100%);
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgb(25 28 31 / 0.1),
    0 2px 8px rgb(25 28 31 / 0.2);
}
.screen .sum {
  margin-top: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.screen .sum b {
  display: block;
  font-size: 18px;
  line-height: 24px;
}
.screen .sum span {
  color: var(--text-secondary);
  font-size: 15px;
}
.screen .deposit {
  padding-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}
.screen .field-wrap {
  padding-top: 12px;
}
.screen .field {
  min-height: 62px;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--background);
  font-size: 17px;
  line-height: 22px;
}
.screen .field small {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}
.screen .sheet-cta {
  padding-top: 16px;
}


/* Sur un téléphone, chaque partie montre le seul composant de l'app qui la raconte, à sa taille réelle, sous son
   texte. Sa hauteur est celle de sa fin de scène, posée par le script, pour que rien ne bouge autour. */
.screen.m-scene {
  display: none;
  width: calc(100% - 32px);
  height: auto;
  max-width: 358px;
  margin: 32px auto 0;
  overflow: visible;
  border-radius: 0;
  background: none;
}
.is-live .screen.m-scene {
  display: flow-root;
}
.m-scene .card {
  box-shadow:
    0 0 0 1px rgb(25 28 31 / 0.06),
    0 24px 48px -20px rgb(25 28 31 / 0.24);
}
/* Dans une promesse, le composant suit le texte, aligné à gauche ; au haut de page, il reste centré. */
[data-copy] + .m-scene {
  width: auto;
  margin-left: 0;
}
.m-scene .h-card {
  overflow: hidden;
}
.m-scene .transcript {
  height: auto;
  margin-top: 0;
}
.m-scene .follow {
  padding: 16px 0 0 4px;
}
/* Les deux questions occupent la même place : la seconde arrive en fondu, d'un court glissement. */
.m-scene .m-track {
  display: grid;
}
.m-scene .m-pane {
  grid-area: 1 / 1;
  opacity: var(--o, 1);
  transform: translateX(calc(var(--x, 0) * 1px));
}
/* La question en tête de la carte de ses réponses, comme le titre d'une rubrique du devis. */
.m-scene .options {
  margin-top: 0;
}
.m-scene .q-title {
  padding: 16px 0 14px;
  font-size: 18px;
  line-height: 23px;
  font-weight: 700;
}
.m-scene .m-pct {
  padding: 20px 16px 24px;
}
.m-scene .pct-label {
  margin-top: 0;
}

/* Le simulateur : une carte noire, la question d'O5, celle d'O6, puis la durée gagnée et les deux barres d'O7. Sans
   script, les trois s'empilent ; `is-wizard` (landing.js) n'en montre qu'une, son avancement à droite du titre. */

.sim-wrap {
  padding-block: 56px;
}

.sim-card {
  padding: 24px;
  border-radius: 24px;
  background: var(--primary);
  color: var(--on-primary);
}

.simulator h2 {
  font-weight: 800;
  font-size: 32px;
  line-height: 36px;
  letter-spacing: -0.03em;
}

/* L'en-tête : le titre, et à sa droite une petite barre d'avancement, puis « Recommencer » au résultat. */
.sim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sim-progress {
  flex: none;
  width: 56px;
  height: 4px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.16);
}

.sim-progress[hidden],
.sim-restart[hidden] {
  display: none;
}

.sim-progress-fill {
  width: 33.4%;
  height: 100%;
  border-radius: inherit;
  background: var(--on-primary);
  transition: width 0.4s var(--ease-out);
}

.sim-card[data-step="2"] .sim-progress-fill {
  width: 66.7%;
}

/* Sur un téléphone, l'icône seule, pour que le titre garde sa largeur ; le libellé reste le nom du bouton, et revient
   à côté de l'icône dès 768. */
.sim-restart {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
  color: inherit;
  font: 600 15px/20px var(--font);
  cursor: pointer;
  transition: background-color 0.15s;
}

.sim-restart span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sim-restart:hover {
  background: rgb(255 255 255 / 0.2);
}

.sim-restart:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.sim-stage {
  margin-top: 24px;
}

.sim-step {
  display: block;
  min-width: 0;
  border: 0;
}

.sim-step:focus {
  outline: none;
}

.sim-step + .sim-step {
  margin-top: 32px;
}

/* Une étape à la fois : toutes dans la même case, la scène à la hauteur de celle montrée ; la précédente sort à gauche,
   la suivante attend à droite. Le retrait de 8 garde le contour de focus des pastilles dans la scène, qui coupe le reste. */

.sim-card.is-wizard .sim-stage {
  display: grid;
  margin: 24px -8px -8px;
  padding: 8px;
  overflow: hidden;
  transition: height 0.4s var(--ease-out);
}

.sim-card.is-wizard .sim-step {
  grid-area: 1 / 1;
  align-self: start;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease-out),
    visibility 0s linear 0.4s;
}

.sim-card.is-wizard .sim-step.is-before {
  transform: translateX(-32px);
}

.sim-card.is-wizard .sim-step.is-current {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.3s 0.08s,
    transform 0.4s var(--ease-out),
    visibility 0s;
}

legend {
  padding: 0;
  margin-bottom: 20px;
  font: 700 24px/30px var(--font);
  letter-spacing: -0.01em;
}

/* Les réponses : de vrais boutons blancs sur le noir, deux par ligne sur un téléphone, quatre sur un grand écran. */
.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chip {
  display: block;
  position: relative;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: 600 17px/20px var(--font);
  text-align: center;
  transition:
    background-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s var(--ease-out);
}

.chip input:hover + span {
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.24);
  transform: translateY(-2px);
}

.chip input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.gain-value {
  display: block;
  font-weight: 800;
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.gain-text {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 26px;
  color: rgb(255 255 255 / 0.72);
}

.bars {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.bar-label {
  font: 600 15px/20px var(--font);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.bar-track {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
}

.bar-fill {
  height: 100%;
  border-radius: 9999px;
  transform-origin: left center;
}

.bar-fill-today {
  background: rgb(255 255 255 / 0.4);
}

.bar-fill-superquote {
  background: var(--accent);
}

/* La durée au bout de sa barre, sur un emplacement de 96 de large, alignée à droite : celle de Superquote sur le jaune. */

.bar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: none;
  width: 96px;
  height: 24px;
}

.bar-value {
  font: 700 15px/20px var(--font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar-value-today {
  font-weight: 400;
  color: rgb(255 255 255 / 0.72);
}

.bar-value-superquote {
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--on-accent);
}

.sim-result .btn {
  width: 100%;
  margin-top: 32px;
}

/* La course d'O7 : Superquote arrive en 1,2 s, aujourd'hui en 3 s. `armed` (posée par landing.js, jamais sous mouvement
   réduit) remet les barres à zéro et cache les durées, `go` lance la course à l'arrivée sur le résultat. */

.sim-card.armed .bar-fill {
  transform: scaleX(0);
}

.sim-card.armed .bar-value {
  opacity: 0;
}

.sim-card.armed.go .bar-fill-today {
  animation: grow 3s linear 0.3s forwards;
}

.sim-card.armed.go .bar-fill-superquote {
  animation: grow 1.2s linear 0.3s forwards;
}

.sim-card.armed.go .bar-value-today {
  animation: fade 0.25s ease-out 3.3s forwards;
}

.sim-card.armed.go .bar-value-superquote {
  animation: pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards;
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Pied de page : les pages légales, l'assistance, le contact et la langue. */

.footer {
  display: grid;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 48px;
  font-size: 15px;
  line-height: 20px;
  color: var(--text-secondary);
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  list-style: none;
}

.footer a {
  display: inline-block;
  padding: 12px 0;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-lang {
  display: flex;
  gap: 24px;
}

.footer-lang a[aria-current] {
  font-weight: 700;
  color: var(--text);
}

/* Dès 768 : des titres plus grands, le simulateur sur deux colonnes. */

@media (min-width: 768px) {
  :root {
    --header-h: 72px;
  }

  .header-bar {
    height: 72px;
  }

  .hero-copy {
    padding-top: 56px;
  }
  .chapter-hero h1 {
    font-size: 72px;
    line-height: 70px;
  }
  .chapter-hero .lead {
    margin-top: 20px;
    font-size: 20px;
    line-height: 30px;
  }
  .chapter-hero .btn {
    margin-top: 32px;
  }
  .chapter {
    padding-top: 96px;
  }
  .chapter h2 {
    font-size: 64px;
    line-height: 62px;
  }
  .chapter .text {
    font-size: 20px;
    line-height: 30px;
  }
  .screen.m-scene {
    margin-top: 48px;
  }

  .sim-card {
    padding: 56px;
    border-radius: 32px;
  }

  .simulator h2 {
    font-size: 48px;
    line-height: 52px;
    letter-spacing: -0.035em;
  }

  .sim-progress {
    width: 72px;
  }

  .sim-restart {
    width: auto;
    padding: 0 14px 0 12px;
  }

  .sim-restart span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  legend {
    margin-bottom: 24px;
    font-size: 32px;
    line-height: 38px;
    letter-spacing: -0.02em;
  }

  .chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .gain-value {
    font-size: 72px;
    line-height: 76px;
    letter-spacing: -0.04em;
  }

  /* Le résultat sur deux colonnes : la durée gagnée et le bouton à gauche, les deux barres à droite. */
  .sim-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "gain bars"
      "cta bars";
    column-gap: 64px;
    align-items: start;
  }

  .gain {
    grid-area: gain;
  }

  .bars {
    grid-area: bars;
    align-self: center;
    margin-top: 0;
  }

  .sim-result .btn {
    grid-area: cta;
    justify-self: start;
    width: auto;
  }

  .footer {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* Bureau : le téléphone collé sous l'en-tête ; une promesse tient la hauteur de l'écran pour l'arrivée de son
   titre, puis `--len` hauteurs pendant lesquelles l'écran de l'app se remplit (0 une fois jouée). */
@media (min-width: 1024px) {
  .is-live .story-pin {
    display: block;
    position: sticky;
    z-index: 2;
    top: var(--header-h);
    height: var(--stage-h);
    overflow: hidden;
    pointer-events: none;
  }
  .is-live .story-chapters {
    position: relative;
    z-index: 1;
    margin-top: calc(-1 * var(--stage-h));
  }
  .is-live .chapter-hero {
    height: var(--stage-h);
  }
  .chapter-hero h1 {
    font-size: clamp(64px, 6.6vw, 96px);
    line-height: 0.95;
  }
  .is-live .chapter {
    height: calc(var(--stage-h) * (1 + var(--len, 1)));
    padding-top: 0;
  }
  .is-live .chapter-hold {
    position: sticky;
    top: var(--header-h);
    height: var(--stage-h);
  }
  .is-live .chapter-inner {
    display: grid;
    align-content: center;
    height: 100%;
    padding-right: calc(var(--phone-w, 340px) + 96px);
  }
  .chapter h2 {
    font-size: clamp(56px, 6.2vw, 92px);
    line-height: 0.96;
  }
  .chapter .text {
    margin-top: 24px;
  }
  .is-live .screen.m-scene {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .screen .wave i {
    transform: scaleY(0.5);
  }
}
