/* Hallmark · shape: la facture d'Alyo en trois lignes en tête, un calculateur du mois (forfaits d'appels et de SMS en contrôles segmentés, total qui roule), ce que comprend la licence et ce qui se chiffre à part, la démo · genre: modern-minimal · theme: custom · redesign: full · job: sign up · idea: "On voit ce qu'on paiera : l'installation une fois, la licence dès le premier mois, des forfaits à son volume." · vibe: "pro, sobre, Apple, papier clair, une menthe"
 * paper: oklch(97.2% 0.005 165) · accent: oklch(82% 0.17 161.3) · display: Sora · body: Hanken Grotesk · hero: le titre à gauche, à droite la facture d'Alyo dont les trois lignes se posent puis le total · nav: pilule flottante, logo, quatre liens, une action · footer: déclaration (le slogan en grand) puis les liens · imagery: aucune image, la facture et le calculateur construits dans le langage du site · signature: le total qui roule vers le haut ou vers le bas quand on change de forfait
 * axes: light/grotesk-heavy/chromatic-green · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Pas de bouton Pause (décision de Sam, 26/10) : rien ne tourne en boucle ici ; la facture se pose une fois, le calculateur ne bouge que quand on le touche. */
@import url("./accueil.css?v=34");

/* ---------- le premier écran : la facture en trois lignes --------------------------------- */
.facture { margin: 0; justify-self: end; width: 100%; max-width: 580px; padding: var(--space-xl); border-radius: var(--radius-frame); background: var(--color-surface); border: 1px solid color-mix(in oklab, var(--color-ink) 8%, transparent); box-shadow: 0 1px 2px color-mix(in oklab, var(--color-ink) 5%, transparent), 0 12px 24px -8px color-mix(in oklab, var(--color-ink) 10%, transparent), 0 40px 80px -24px color-mix(in oklab, var(--color-ink) 18%, transparent); }
.facture__titre { display: flex; align-items: center; gap: var(--space-xs); margin: 0 0 var(--space-md); font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.facture__titre svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.facture__ht { margin-left: auto; font-weight: 400; }
.facture__lignes { list-style: none; margin: 0; padding: 0; }
.facture__ligne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-md); min-height: 80px; border-top: 1px solid var(--color-rule); }
.facture__ligne .tile { width: 40px; height: 40px; }
.facture__ligne .feed__text b { font-size: var(--text-md); }
.facture__ligne .feed__text span { white-space: normal; }
.facture__prix { display: grid; justify-items: end; font: 700 var(--text-lg)/1.15 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facture__prix .des { font: 400 var(--text-sm)/1 var(--font-body); letter-spacing: 0; color: var(--color-ink-2); }
.facture__prix small { font: 400 var(--text-xs)/1.4 var(--font-body); letter-spacing: 0; color: var(--color-ink-2); }
.facture__trait { display: block; height: 2px; border-radius: 1px; background: var(--color-ink); transform-origin: left center; }
.facture__total { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-md); padding-top: var(--space-lg); }
.facture__total .feed__text span { white-space: normal; }
.facture__somme { margin: 0; display: grid; justify-items: end; gap: var(--space-2xs); }
.facture__somme b { font: 700 clamp(2.25rem, 1.6vw + 1.4rem, 3rem)/1 var(--font-display); letter-spacing: var(--tracking-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.eur { font-size: 0.62em; letter-spacing: -0.01em; }
.facture__somme > span { font-size: var(--text-sm); color: var(--color-ink-2); }
/* la facture se pose : trois lignes, le trait du total, puis la somme */
.js .facture__trait { transform: scaleX(0); transition: transform 700ms var(--ease-in-out) 800ms; }
.js .facture.is-in .facture__trait { transform: none; }
.js .facture .facture__total { transition-delay: 1350ms; }

/* ---------- le calculateur : deux contrôles segmentés et le mois qui se compte ----------- */
.calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border-radius: var(--radius-frame); background: var(--color-surface); box-shadow: var(--shadow-card); }
.calc__choix { display: grid; align-content: start; gap: var(--space-xl); padding: var(--space-xl); }
.seg { min-width: 0; margin: 0; padding: 0; border: 0; }
.seg legend { padding: 0; margin-bottom: var(--space-sm); font: 700 var(--text-lg)/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--color-ink); }
.seg__track { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: var(--space-2xs); border-radius: var(--radius-card); background: var(--color-paper-2); }
.seg__opt { position: relative; z-index: 1; display: grid; align-content: center; justify-items: center; gap: var(--space-3xs); min-width: 0; min-height: 64px; padding: var(--space-xs) var(--space-2xs); border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.seg__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg__opt b { font-weight: 600; font-size: var(--text-md); color: var(--color-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg__opt span { font-size: var(--text-xs); color: var(--color-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color var(--dur-short) var(--ease-out); }
.seg__opt:has(input:checked) span { color: var(--color-ink); }
.seg__opt:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.seg__opt:active { transform: scale(0.97); transition: transform var(--dur-micro) var(--ease-out); }
.seg__thumb { position: absolute; top: 0; left: 0; border-radius: 16px; background: var(--color-surface); box-shadow: 0 1px 2px color-mix(in oklab, var(--color-ink) 10%, transparent), 0 0 0 1px var(--color-rule); }
.calc.is-pret .seg__thumb { transition: transform var(--dur-long) var(--ease-out); }
/* sans script, la case choisie se marque d'elle-même ; la grille se lit en clair */
html:not(.js) .seg__thumb { display: none; }
html:not(.js) .seg__opt:has(input:checked) { background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-rule); }
.seg__note { margin: var(--space-sm) 0 0; font-size: var(--text-sm); color: var(--color-ink-2); }

.calc__mois { display: grid; align-content: start; gap: var(--space-md); padding: var(--space-xl); border-left: 1px solid var(--color-rule); }
.calc__titre { margin: 0; font: 700 var(--text-xl)/1.15 var(--font-display); letter-spacing: -0.02em; }
html:not(.js) .calc__js, .js .calc__nojs { display: none; }
.mois { margin: 0; }
.mois div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-sm) 0; border-top: 1px solid var(--color-rule); }
.mois dt { font-weight: 600; }
.mois dt span { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-ink-2); }
.mois dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mois__total { display: grid; gap: var(--space-xs); padding-top: var(--space-md); border-top: 2px solid var(--color-ink); }
.mois__total > span { font-size: var(--text-sm); color: var(--color-ink-2); }
.mois__total b { font: 700 var(--text-display-s)/1 var(--font-display); letter-spacing: var(--tracking-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mois__note { margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.mois__libre { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-ink); }
.mois__libre svg { width: 18px; height: 18px; margin-top: 1px; stroke: var(--color-accent-text); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* le chiffre qui change roule : l'ancien part dans le sens du changement, le nouveau arrive de l'autre côté */
.roule { display: inline-grid; justify-items: end; }
.roule__v { grid-area: 1 / 1; transition: transform 380ms var(--ease-out), opacity 260ms var(--ease-out); }
.js .roule__v.de-bas { transform: translateY(0.45em); opacity: 0; transition: none; }
.js .roule__v.de-haut { transform: translateY(-0.45em); opacity: 0; transition: none; }
.js .roule__v.vers-haut { transform: translateY(-0.45em); opacity: 0; }
.js .roule__v.vers-bas { transform: translateY(0.45em); opacity: 0; }

/* ---------- ce que comprend chaque mois ---------------------------------------------------- */
.compris { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); align-items: start; }
.compris__col { display: grid; gap: var(--space-md); justify-items: start; }
.compris__col h3 { font-size: var(--text-xl); }
.compris__list { list-style: none; margin: 0; padding: 0; width: 100%; }
.compris__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); align-items: start; padding: var(--space-md) 0; border-top: 1px solid var(--color-rule); }
.compris__list svg { width: 20px; height: 20px; margin-top: var(--space-3xs); stroke: var(--color-ink-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compris__list--oui svg { stroke: var(--color-accent-text); stroke-width: 2.2; }
.compris__list .feed__text span { font-size: var(--text-md); white-space: normal; }
.compris__col .link { margin-top: var(--space-xs); }

/* ---------- petits écrans ------------------------------------------------------------------- */
@media (max-width: 60rem) {
  .facture { justify-self: stretch; max-width: none; padding: var(--space-lg); }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc__choix, .calc__mois { padding: var(--space-lg); }
  .calc__mois { border-left: 0; border-top: 1px solid var(--color-rule); }
  .compris { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
}
@media (max-width: 40rem) {
  .seg__track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seg__opt { min-height: 56px; }
  .facture__ligne { gap: var(--space-sm); min-height: 72px; padding: var(--space-sm) 0; }
  .facture__ligne .tile { width: 34px; height: 34px; }
  .facture__ligne .tile svg { width: 18px; height: 18px; }
  .facture__ligne .feed__text span { font-size: var(--text-xs); }
  .facture__prix { font-size: var(--text-md); }
  .facture__total { grid-template-columns: minmax(0, 1fr); }
  .facture__somme { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .js .facture__trait { transform: none; transition: none; }
  .calc.is-pret .seg__thumb, .roule__v { transition: none; }
}
