/* =================================================================
   Ardoise : fluidité (ScrollCraft sur les pages intérieures, transitions)
   Chargé en dernier, sur toutes les pages.
   ================================================================= */

/* Fondu doux d'une page à l'autre (navigateurs récents ; ignoré ailleurs) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }

/* Sans JavaScript, rien ne doit rester caché */
html:not(.js) [data-sc-in], html:not(.js) [data-sc-stagger] > * { opacity: 1; transform: none; }

/* Apparitions : courtes et légères */
body.app [data-sc-in], body.app [data-sc-stagger] > * { transition-duration: 520ms; }
.subj { transition: opacity 520ms var(--sc-ease-out), transform 220ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out), border-color 160ms var(--sc-ease-out); }

/* Bandeau : le titre se pose, la craie se dessine */
@keyframes band-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes chalk-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.band__crumbs { animation: band-rise 500ms var(--sc-ease-out) both; }
.band__head   { animation: band-rise 620ms var(--sc-ease-out) 60ms both; }
.band__stats  { animation: band-rise 620ms var(--sc-ease-out) 160ms both; }
.band__chalk path, .band__chalk circle { stroke-dasharray: 1; animation: chalk-draw 900ms var(--sc-ease-out) both; }
.band__chalk g > :nth-child(1) { animation-delay: 200ms; }
.band__chalk g > :nth-child(2) { animation-delay: 380ms; }
.band__chalk g > :nth-child(3) { animation-delay: 520ms; }
.band__chalk g > :nth-child(4) { animation-delay: 300ms; }
.band__chalk g > :nth-child(5) { animation-delay: 640ms; }
.band__chalk > path { animation-delay: 820ms; animation-duration: 520ms; }

/* Le bandeau se raccorde à la page par un bord arrondi */
.band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; background: #F3F5FA; border-radius: 22px 22px 0 0; z-index: 2; }
.band { padding-bottom: calc(var(--sc-7) + 22px); }
.band__chalk { bottom: 22px; }
.wrap--band { padding-top: var(--sc-6); }

/* Panneau de connexion : même entrée */
.auth__panel h2 { animation: band-rise 620ms var(--sc-ease-out) both; }
.auth__list li { animation: band-rise 620ms var(--sc-ease-out) both; }
.auth__list li:nth-child(1) { animation-delay: 120ms; } .auth__list li:nth-child(2) { animation-delay: 200ms; } .auth__list li:nth-child(3) { animation-delay: 280ms; }
.auth__side .formpage { animation: band-rise 620ms var(--sc-ease-out) 80ms both; }

/* Détails de finition */
html { scroll-padding-top: 88px; }
.bar { transition: box-shadow 240ms var(--sc-ease-out); }
.bar.is-scrolled { box-shadow: 0 6px 24px -12px hsl(228 45% 28% / .28); }
.sec-title { display: flex; align-items: center; gap: .7rem; }
.sec-title::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--m, var(--sc-accent)); }
.band__icon { outline: 1px solid rgba(255,255,255,.18); outline-offset: -1px; }
.panel { border: 1px solid #E6EAF3; }
.step .calc { transition: background-color 200ms var(--sc-ease-out); }
.btn { transition: background-color 160ms var(--sc-ease-out), transform 120ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:not(.btn--ghost):hover { box-shadow: 0 8px 20px -8px color-mix(in oklab, var(--sc-accent) 70%, transparent); } }

@media (max-width: 600px) { .band::after { height: 16px; border-radius: 16px 16px 0 0; } .band { padding-bottom: calc(var(--sc-6) + 16px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .band__crumbs, .band__head, .band__stats, .auth__panel h2, .auth__list li, .auth__side .formpage { animation: none; }
  .band__chalk path, .band__chalk circle { animation: none; stroke-dasharray: none; }
}
@media print { [data-sc-in], [data-sc-stagger] > * { opacity: 1 !important; transform: none !important; } }

/* Accueil, téléphone : la formule mise en avant ne dépasse plus de l'écran */
@media (max-width: 900px) { .plans .plans__list .plan--main { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; } }
