/* Pop-up « En savoir plus » : Molten Ring Carousel (port natif, molten-ring.js) au milieu de la home.
   Surface du composant : bg-background / text-foreground (jetons clairs de la home), libellés de part et d'autre de l'arc. */
.ring-modal { position: fixed; z-index: 400; inset: 0; display: grid; place-items: center; }
.ring-modal[hidden] { display: none; }
.ring-modal-backdrop { position: absolute; inset: 0; background: rgb(10 18 23 / 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: ring-fade 200ms ease both; }
.ring-modal-panel {
  position: relative; width: min(1080px, 92vw); height: min(640px, 84vh); overflow: hidden; border-radius: 20px;
  box-shadow: 0 0 0 1px rgb(10 18 23 / 0.06), 0 30px 80px -20px rgb(10 18 23 / 0.45);
  animation: ring-pop 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes ring-fade { from { opacity: 0; } }
@keyframes ring-pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } }

.molten-ring {
  position: relative; width: 100%; height: 100%; min-height: 24rem; overflow: hidden; color: #0a1217; background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: none; -webkit-user-select: none;
}
.molten-ring-canvas { position: absolute; inset: 0; width: 100%; height: 100%; color: #0a1217; cursor: grab; touch-action: pan-x; outline: none; }
.molten-ring-canvas:active { cursor: grabbing; }
/* pas de contour de focus : bord noir retiré de la pop-up (demande de l'utilisateur, 2026-09-29) */
.molten-ring-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.molten-ring-brand { position: absolute; top: 6%; left: 5%; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; pointer-events: none; }
.molten-ring-caption { position: absolute; top: 50%; left: 5%; max-width: 30%; transform: translateY(-50%); pointer-events: none; }
.molten-ring-index { color: #6b7280; font-size: 12px; font-variant-numeric: tabular-nums; }
.molten-ring-title { margin-top: 4px; font-size: 20px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.molten-ring-meta { position: absolute; top: 50%; right: 5%; max-width: 26%; transform: translateY(-50%); color: #6b7280; font-size: 12px; text-align: right; pointer-events: none; }
.molten-ring-meta[hidden] { display: none; }

/* Sans WebGL2 : liste à défilement accroché, mêmes images */
.molten-ring-fallback { display: flex; height: 100%; margin: 0; padding: 6% 0; flex-direction: column; align-items: center; gap: 12px; overflow-y: auto; list-style: none; scroll-snap-type: y mandatory; }
.molten-ring-fallback li { width: 62%; flex-shrink: 0; scroll-snap-align: center; }
.molten-ring-fallback img { display: block; width: 100%; border-radius: 8px; object-fit: cover; background: #f3f4f6; }

@media (prefers-reduced-motion: reduce) { .ring-modal-backdrop, .ring-modal-panel { animation: none; } }

/* Page d'entrée avant l'étape 01 (2026-10-03) : port du composant hero-section-2 (Tailwind + framer-motion) fourni par
   l'utilisateur. Texte à gauche (p-16, titre text-5xl gras leading-tight avec le logo Alto à la place du mot, sous-titre
   max-w-md atténué), visuel à droite découvert en biais (clip-path 1,2 s circOut) ; éléments en fondu montant (y 20 -> 0,
   0,5 s easeOut, décalés de 0,15 s après 0,2 s). Primaire = bleu des tags choisis. Sans les libellés de la démo. */
.ring-entree {
  position: absolute; z-index: 4; inset: 0; display: flex; overflow: hidden; color: #0a1217; background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: ring-fade 300ms ease backwards; transition: opacity 300ms ease;   /* backwards : la sortie en fondu reste possible */
}
.ring-entree[hidden] { display: none; }
.ring-entree.is-sortie { opacity: 0; pointer-events: none; }
/* bloc de texte centré sur la hauteur de la page (2026-10-03) */
.ring-entree-texte { display: flex; width: 58%; box-sizing: border-box; padding: 64px; flex-direction: column; justify-content: center; }
/* contrepoids de la flèche (32 px de marge + 44 px) : c'est le texte, titre et phrase, qui tombe au milieu */
.ring-entree-texte::before { content: ""; flex: 0 0 76px; }
/* titre : « Personnalisez », puis le logo Alto à la place du mot (sur-titre et barre bleue retirés, 2026-10-03) */
.ring-entree-titre { margin: 0; color: #0a1217; font-size: 48px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.ring-entree-alto { display: block; height: 46px; width: auto; margin-top: 8px; color: #0a1217; }
.ring-entree-sous { max-width: 28rem; margin: 28px 0 32px; color: #6b7280; font-size: 16px; line-height: 1.5; }
.ring-entree-go {
  display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0;
  padding: 0; border: 0; border-radius: 999px; color: #2563eb; background: transparent; cursor: pointer; transition: color 150ms ease;
}
.ring-entree-go:hover { color: rgb(37 99 235 / 0.8); }
.ring-entree-go:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.ring-entree-go svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: re-invite 1.6s ease-in-out 1.6s infinite; }
/* visuel : fond chaud ; l'image est teintée par un filtre SVG (son fond blanc prend la teinte du panneau : mix-blend-mode
   ne s'applique pas sous l'animation du clip-path), décalée pour rester dans le biais */
.ring-entree-visuel {
  position: relative; width: 42%; background: #f4f1ed;
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
  animation: re-biais 1.2s cubic-bezier(0, 0.55, 0.45, 1) both;
}
.ring-entree-visuel img { position: absolute; top: 0; right: 0; bottom: 0; left: 16%; width: 84%; height: 100%; object-fit: contain; filter: url(#ringEntreeTeinte); }
.ring-entree-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ring-entree .re-item { animation: re-monte 500ms ease-out both; }
.ring-entree .re-item:nth-child(1) { animation-delay: 200ms; }
.ring-entree .re-item:nth-child(2) { animation-delay: 350ms; }
.ring-entree .re-item:nth-child(3) { animation-delay: 500ms; }
@keyframes re-monte { from { opacity: 0; transform: translateY(20px); } }
@keyframes re-biais { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); } }
@keyframes re-invite { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (max-width: 760px) {
  .ring-entree { flex-direction: column; }
  .ring-entree-texte { width: 100%; padding: 32px; }
  .ring-entree-texte::before { display: none; }
  .ring-entree-alto { height: 36px; }
  .ring-entree-titre { font-size: 36px; }
  .ring-entree-visuel { width: 100%; min-height: 0; flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-entree, .ring-entree .re-item, .ring-entree-visuel, .ring-entree-go svg { animation: none; }
  .ring-entree { transition: none; }
}

/* visuel du duo Alto en bas à gauche des 3 slides (2026-10-03) : sous le titre de l'étape, décoratif ; fond blanc de
   l'image fondu dans celui de la pop-up ; la page d'entrée le recouvre */
.ring-duo {
  position: absolute; z-index: 1; left: 4%; bottom: 3%; height: auto; pointer-events: none;
  /* image carrée : 38 % de la hauteur de la pop-up au plus, pour rester sous le titre centré */
  width: min(24%, calc(min(640px, 84vh) * 0.38));
  filter: brightness(1.012); mix-blend-mode: multiply;   /* fond 253 de l'image ramené au blanc de la pop-up */
}
@media (max-width: 720px) { .ring-duo { display: none; } }

/* « Offert » au-dessus de 01 + titre (2026-10-03) : gros, italique, hors du flux de la légende centrée */
.molten-ring-offre {
  position: absolute; bottom: calc(100% + 10px); left: 0;
  font-size: 40px; font-style: italic; font-weight: 600; line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
}
.molten-ring-offre[hidden] { display: none; }
/* mention longue (« 1 tag sélectionné = +9.99€ » sur 02) : retour à la ligne dans la colonne gauche (30 % du panneau),
   la mention grandit vers le haut sans toucher le carrousel */
.molten-ring-offre { width: max-content; max-width: min(324px, 27.6vw); white-space: normal; }

/* pastille Stripe en bas à droite des 3 slides (2026-10-03) : image de 580 × 199 px (capture en 2x, soit 290 px à
   l'écran), réduite de 35 % (189 px), alignée sur le bord droit du bloc de tags ; la page d'entrée la recouvre */
.ring-paiement { position: absolute; z-index: 1; right: calc(5% + 10px); bottom: 14px; width: 189px; height: auto; pointer-events: none; }
@media (max-width: 760px) { .ring-paiement { display: none; } }
/* pastille Stripe dans l'angle bas droit de la pop-up, taille réduite de 30 % (189 → 132 px) (2026-10-03) */
.ring-paiement { right: 16px; bottom: 12px; width: 132px; }

/* Page finale après « Valider » de 03 (2026-10-03) : port du composant FinancialHero (Tailwind + framer-motion) fourni par
   l'utilisateur. Grille de 3rem aux traits de bordure sous un voile blanc dégradé (from-background via-background/80
   to-background) ; texte à gauche (titre text-6xl gras tracking-tight, phrase text-lg atténuée max-w-xl, bouton lg h-12
   px-8) ; deux cartes h-80 rounded-2xl shadow-2xl inclinées (dos -6° décalée à droite, devant 6° à gauche). Animations :
   enfants décalés de 0,2 s (fondu + 20 px, 0,5 s), cartes depuis +50 px (0,8 s easeOut, décalées de 0,3 s), survol :
   -10 px et rotation de ±5°. Le bandeau Stripe reste visible par-dessus. */
.ring-final {
  position: absolute; z-index: 5; inset: 0; overflow: hidden; color: #0a1217; background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: ring-fade 300ms ease both;
}
.ring-final[hidden] { display: none; }
.ring-modal-panel.is-final .ring-paiement { z-index: 6; }
/* fond blanc uni : grille et voile retirés (2026-10-03) */
.ring-final-contenu {
  position: relative; display: flex; height: 100%; box-sizing: border-box; padding: 48px 64px; align-items: center;
  justify-content: space-between; gap: 48px;
}
.ring-final-texte { display: flex; width: 50%; flex-direction: column; align-items: flex-start; text-align: left; }
.ring-final-titre { margin: 0; font-size: 52px; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.ring-final-titre span { color: #2563eb; font-weight: 300; } /* « est prêt ! » en light, bleu des tags (2026-10-03) */
.ring-final-desc { max-width: 28rem; margin: 24px 0 0; color: #6b7280; font-size: 16px; line-height: 1.5; } /* comme .ring-entree-sous (2026-10-03) */
.ring-final-prix { display: block; margin-top: 12px; } /* montant détaillé, même police, taille et gris que la page d'entrée (2026-10-03) */
.ring-final-cta { margin-top: 32px; }
.ring-final-go {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 32px; border: 0; border-radius: 6px;
  color: #fff; background: #0a1217; font: 500 16px / 1 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; white-space: nowrap;
  cursor: pointer; transition: background-color 150ms ease;
}
.ring-final-go:hover { background: rgb(10 18 23 / 0.9); }
.ring-final-go:focus-visible { outline: 2px solid #0a1217; outline-offset: 2px; }
.ring-final-go svg { width: 20px; height: 20px; margin-left: 8px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ring-final-note { min-height: 18px; margin: 12px 0 0; color: #0a1217; font-size: 13px; line-height: 1.4; }
.ring-final-cartes { position: relative; display: flex; width: 50%; height: 100%; align-items: center; justify-content: center; }
.rf-carte { position: absolute; }
.ring-final-cartes:not(.is-arrivee) .rf-carte { opacity: 0; }
.rf-carte img, .rf-carte video {
  display: block; height: min(320px, 52vh); width: auto; aspect-ratio: 1; border-radius: 16px; object-fit: cover; background: #fff;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); transition: transform 300ms ease;
}
.rf-devant video { opacity: 0; transition: transform 300ms ease, opacity 400ms ease; }
.rf-devant video.is-lecture { opacity: 1; }
/* vignette 1 glisse d'abord (dès que la vidéo joue), puis vignette 2 en opacité (2026-10-03) */
.is-arrivee .rf-devant { animation: rf-glisse 800ms ease-out both; }
.is-arrivee .rf-dos { animation: rf-fondu 700ms ease-out 700ms both; }
.rf-dos img { height: min(272px, 44.2vh); transform: translateX(96px) rotate(-6deg); } /* vignette 2 réduite de 15 % (2026-10-03) */
.rf-devant img, .rf-devant video { transform: translateX(-64px) rotate(6deg); }
.rf-dos img:hover { transform: translateX(96px) translateY(-10px) rotate(-5deg); }
.rf-devant img:hover, .rf-devant video:hover { transform: translateX(-64px) translateY(-10px) rotate(5deg); }
.ring-final .rf-item { animation: re-monte 500ms ease-out both; }
.ring-final .rf-item:nth-child(1) { animation-delay: 0ms; }
.ring-final .rf-item:nth-child(2) { animation-delay: 200ms; }
.ring-final .rf-item:nth-child(3) { animation-delay: 400ms; }
@keyframes rf-glisse { from { opacity: 0; transform: translateX(50px); } }
/* Carte de code « Activer mon duo Alto » (2026-10-03), port natif d'OTPVerification (21st.dev) : rounded-3xl p-8 max-w-sm
   shadow-lg, voile blanc à 80 % sur le globe d'Alto (à la place du GIF du CDN), sans logo (retiré, 2026-10-03),
   titre text-2xl, 4 cases w-14 h-16 ring-2 qui montent en ressort (décalées de 50 ms) et se lèvent de 5 px au focus ;
   erreur : secousse de 0,3 s et cadre rouge ; réussite : les cases glissent vers la gauche (décalées de 60 ms), puis la coche
   verte apparaît en ressort. Elle prend la place des deux vignettes, à droite. */
.ring-final-cartes[hidden] { display: none; }
.ring-otp {
  position: relative; width: 100%; max-width: 384px; margin: 0 auto; box-sizing: border-box; padding: 32px;
  border-radius: 24px; overflow: hidden; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  animation: rf-glisse 600ms ease-out both;
}
.ring-final-contenu > .ring-otp { width: 50%; flex: 0 1 384px; }
.ring-otp[hidden] { display: none; }
/* fond : globe d'Alto de VOICE page 2 (spirale, encre de la pop-up), centré et agrandi sous le voile (2026-10-03) */
.ring-otp-fond { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #0a1217; background: #fff; }
.ring-otp-globe { position: relative; display: block; width: 84.5%; aspect-ratio: 1; flex: none; } /* réduit de 35 % (2026-10-03) */
.ring-otp-voile { position: absolute; inset: 0; border-radius: 24px; background: rgb(255 255 255 / 0.8); }
.ring-otp-corps { position: relative; z-index: 1; text-align: center; }
.ring-otp-titre { margin: 0 0 8px; color: #111827; font-size: 24px; font-weight: 600; line-height: 1.33; }
.ring-otp-form { transition: opacity 200ms ease; }
.ring-otp-form.is-sortie { opacity: 0; }
.ring-otp-desc { margin: 8px 0 32px; color: #4b5563; font-size: 16px; line-height: 1.5; }
.ring-otp-desc span { color: #1f2937; font-weight: 500; }
.ring-otp-zone { position: relative; display: flex; height: 80px; margin-bottom: 40px; align-items: center; justify-content: center; }
.ring-otp-cases { display: flex; align-items: center; justify-content: center; gap: 16px; }
.ring-otp-cases.is-secoue { animation: ring-otp-secoue 300ms ease both; }
.ring-otp-case {
  width: 56px; height: 64px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 2px #e5e7eb;
  transform: translate(var(--x, 0), 0);
  transition: box-shadow 300ms ease, transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: ring-otp-monte 450ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i) * 50ms) backwards;
}
.ring-otp-case:focus-within { box-shadow: 0 0 0 2px #9ca3af, inset 0 2px 4px 0 rgb(0 0 0 / 0.05); transform: translate(var(--x, 0), -5px); }
.ring-otp[data-etat="error"] .ring-otp-case { box-shadow: 0 0 0 2px #f87171; }
.ring-otp[data-etat="success"] .ring-otp-case {
  box-shadow: 0 0 0 2px #22c55e; transform: translate(var(--x, 0), 0);
  transition: box-shadow 300ms ease, transform 500ms cubic-bezier(0.22, 1.2, 0.36, 1) calc(var(--i) * 60ms);
}
.ring-otp-case input {
  display: block; width: 100%; height: 100%; box-sizing: border-box; padding: 0; border: 0; outline: none; text-align: center;
  color: #0a1217; background: #f3f4f6; caret-color: #111827; font: 600 30px / 1 Inter, ui-sans-serif, system-ui, sans-serif;
}
.ring-otp-erreur {
  position: absolute; bottom: -32px; left: 0; width: 100%; min-height: 20px; margin: 0; color: #ef4444; font-size: 15px; font-weight: 500;
}
.ring-otp-erreur:not(:empty) { animation: re-monte 200ms ease-out both; }
.ring-otp-renvoi { margin: 0; color: #4b5563; font-size: 15px; line-height: 1.5; }
.ring-otp-gris { color: #6b7280; }
.ring-otp-renvoyer {
  padding: 0; border: 0; border-radius: 4px; color: #111827; background: none; font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.5; cursor: pointer;
}
.ring-otp-renvoyer:hover { text-decoration: underline; }
.ring-otp-renvoyer:focus-visible { outline: 2px solid #9ca3af; }
.ring-otp-demo { margin: 10px 0 0; color: #9ca3af; font-size: 12px; line-height: 1.4; }
.ring-otp-ok { display: flex; height: 232px; align-items: center; justify-content: center; gap: 16px; animation: re-monte 300ms ease-out both; }
.ring-otp-ok[hidden] { display: none; }
.ring-otp-coche {
  display: flex; width: 64px; height: 64px; flex: none; align-items: center; justify-content: center; border-radius: 999px;
  color: #fff; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7;
  animation: ring-otp-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 300ms both;
}
.ring-otp-coche svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ring-otp-ok p { margin: 0; color: #16a34a; font-size: 18px; font-weight: 600; animation: ring-otp-entre 400ms ease-out 400ms both; }
@keyframes ring-otp-monte { from { opacity: 0; transform: translate(0, 10px); } }
@keyframes ring-otp-secoue { 20% { transform: translateX(5px); } 40% { transform: translateX(-5px); } 60% { transform: translateX(5px); } 80% { transform: translateX(-5px); } }
@keyframes ring-otp-pop { from { opacity: 0; transform: scale(0.5); } }
@keyframes ring-otp-entre { from { opacity: 0; transform: translateX(-10px); } }
@media (max-height: 640px) {
  .ring-otp { padding: 20px 24px; }
  .ring-otp-titre { font-size: 20px; }
  .ring-otp-desc { margin: 4px 0 12px; font-size: 14px; }
  .ring-otp-zone { height: 72px; margin-bottom: 28px; }
  .ring-otp-ok { height: 180px; }
}
@keyframes rf-fondu { from { opacity: 0; } }
@media (max-width: 760px) {
  .ring-final-contenu { flex-direction: column; padding: 32px 24px; overflow-y: auto; }
  .ring-final-texte { width: 100%; align-items: center; text-align: center; }
  .ring-final-titre { font-size: 36px; }
  .ring-final-cartes { width: 100%; min-height: 220px; }
  .rf-carte img, .rf-carte video { height: 192px; }
  .rf-dos img { height: 163px; }
  .ring-final-contenu > .ring-otp { width: 100%; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-final, .ring-final .rf-item, .rf-carte, .is-arrivee .rf-carte { animation: none; }
  .ring-otp, .ring-otp-corps * { animation: none !important; transition: none !important; }
  .rf-carte img, .rf-carte video { transition: none; }
}
