/* EdgeFun — page d'accueil (vitrine), d'après « Refonte design-3 ».
   Cette page garde toujours ses propres couleurs, quel que soit le thème choisi dans l'app. */

body.home { background: #F3F6FD; color: #0E1733; font-family: Nunito, system-ui, sans-serif; color-scheme: light; }
.home a { color: inherit; }
.home :focus-visible { outline: 3px solid #4F84FF; outline-offset: 3px; }

/* ---------- Boutons ---------- */
.home-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 0; font-family: inherit; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .08s ease, filter .15s ease, box-shadow .08s ease; }
.home-btn:hover { filter: brightness(1.06); }
.home-btn:active { transform: translateY(3px); }
.home-btn--lg { height: 52px; padding: 0 26px; font-size: 16px; font-weight: 800; }
.home-btn--md { height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 800; }
.home-btn--blue { background: linear-gradient(180deg, #4F84FF 0%, #2A62F0 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 4px 0 #163A9E; color: #FFFFFF !important; }
.home-btn--blue:active { box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 1px 0 #163A9E; }
.home-btn--white { background: #FFFFFF; box-shadow: 0 4px 0 #B9C7E6; color: #0E1733 !important; }
.home-btn--white:active { box-shadow: 0 1px 0 #B9C7E6; }
.home-btn--glass { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); color: #FFFFFF !important; font-weight: 700; }
.home-btn--glass:hover { background: rgba(255,255,255,0.18); }
.home-btn--outline { background: #FFFFFF; border: 1px solid #D6DFEF; color: #33405F !important; font-weight: 700; border-radius: 14px; }
.home-btn--md.home-btn--blue { border-radius: 14px; flex: 1 1 auto; }
.home-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: #FFFFFF !important; font-weight: 600; font-size: 15px; text-decoration: none; }
.home-link:hover { background: rgba(255,255,255,0.08); }
.home-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #E3EDFF; color: #1B45B5; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }

/* ---------- Héros ---------- */
.home-hero { position: relative; background: linear-gradient(180deg, #05070D 0%, #0A1230 34%, #1B45B5 70%, #4F84FF 88%, #F3F6FD 100%); color: #FFFFFF; padding: 0 32px; overflow: hidden; overflow: clip; }
.home-header { max-width: 1160px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.home-header__logo img { display: block; width: 115px; height: 46px; object-fit: contain; }
.home-header__logo { border-radius: 8px; }
.home-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.home-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: #C9D6F5 !important; font-weight: 600; font-size: 15px; text-decoration: none; }
.home-nav a:hover { color: #FFFFFF !important; background: rgba(255,255,255,0.08); }
.home-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.lang { position: relative; }
.lang__btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #FFFFFF; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.lang__btn:hover { background: rgba(255,255,255,0.14); }
.lang__flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.lang__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 200px; margin: 0; padding: 6px; list-style: none; background: #FFFFFF; color: #0E1733; border-radius: 16px; box-shadow: 0 18px 40px rgba(5,7,13,.3); }
.lang__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.lang__item.is-current { background: #E3EDFF; color: #1B45B5; }
.lang__item.is-soon { color: #8A97B5; }
.lang__item small { font-size: 12px; font-weight: 600; }

.home-hero__text { max-width: 860px; margin: 0 auto; padding: 120px 0 64px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.home-hero__text h1 { margin: 0; font-size: clamp(2.4rem, 6.4vw, 4.25rem); line-height: 1.08; }
.home-hero__text p { margin: 22px 0 0; max-width: 580px; font-size: 1.2rem; line-height: 1.55; color: #D6E1FA; }
.home-hero__ctas { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.home-preview { position: relative; max-width: 1000px; margin: 0 auto; }
.home-preview__frame { border-radius: 28px 28px 0 0; padding: 10px 10px 0; background: rgba(255,255,255,0.18); box-shadow: 0 -20px 60px rgba(5,7,13,0.35); }
.home-preview__app { border-radius: 20px 20px 0 0; background: #0A0D14; display: flex; overflow: hidden; height: 440px; }
.home-preview__side { width: 180px; flex: none; padding: 18px 12px; border-right: 1px solid #1A2130; background: #0E121B; display: flex; flex-direction: column; gap: 6px; }
.home-preview__side img { display: block; width: 75px; height: 30px; object-fit: contain; margin: 0 8px 12px; }
.home-preview__side div { height: 34px; padding: 0 10px; border-radius: 10px; display: flex; align-items: center; color: #96A0B8; font-weight: 600; font-size: 13px; }
.home-preview__side .is-active { background: #172444; color: #A9C8FF; font-weight: 700; }
.home-preview__main { flex: 1; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; color: #EEF1F7; }
.home-preview__banner { border-radius: 18px; background: #2A62F0; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.home-preview__banner small { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #DCE7FF; }
.home-preview__banner strong { font-size: 22px; }
.home-preview__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home-preview__stats div { background: #121722; border: 1px solid #252D3F; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.home-preview__stats small { font-size: 11px; color: #96A0B8; }
.home-preview__stats b { font-size: 22px; }
.home-preview__path { position: relative; height: 120px; margin-top: 6px; }
.home-preview__path .track { position: absolute; left: 30px; right: 30px; top: 38px; height: 10px; border-radius: 999px; background: #1A2130; }
.home-preview__path .track--done { right: auto; width: 52%; background: #F5B93A; }
.home-preview__path .dots { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: flex-start; }
.home-preview__path i { width: 54px; height: 50px; margin-top: 16px; border-radius: 50%; background: radial-gradient(circle at 34% 26%, #3A4561 0%, #1C2333 100%); box-shadow: 0 6px 0 #0F141E; }
.home-preview__path i.g { background: radial-gradient(circle at 34% 26%, #FFE7A3 0%, #F8C24A 40%, #D18F12 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 6px 0 #9C6C06; }
.home-preview__path i.b { width: 66px; height: 62px; margin-top: 10px; background: radial-gradient(circle at 34% 26%, #9DBDFF 0%, #4F84FF 36%, #1F4FD6 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 6px 0 #163A9E, 0 0 0 6px rgba(79,132,255,0.3); animation: hp-pulse 2.4s ease-in-out infinite; }
@keyframes hp-pulse { 50% { box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 6px 0 #163A9E, 0 0 0 12px rgba(79,132,255,0.12); } }
/* Brume blanche : fond l'aperçu de l'app dans la page, sur toute la largeur (sans bords visibles).
   Son bord supérieur ondule lentement, et elle monte quand on fait défiler (data-parallax-grow). */
.home-hero > .home-mist { position: absolute; z-index: 2; overflow: hidden; left: 0; right: 0; bottom: -1px; height: 250px; pointer-events: none; transform-origin: 50% 100%; background: linear-gradient(180deg, rgba(243,246,253,0) 0%, rgba(243,246,253,.5) 42%, rgba(243,246,253,.92) 72%, #F3F6FD 90%); }
.home-mist::before, .home-mist::after { content: ""; position: absolute; left: -25%; right: -25%; top: 0; height: 210px; background-repeat: no-repeat; will-change: translate; }
.home-mist::before { background-image: radial-gradient(38% 58% at 18% 72%, rgba(243,246,253,.78), rgba(243,246,253,0) 70%), radial-gradient(30% 50% at 52% 80%, rgba(255,255,255,.62), rgba(255,255,255,0) 70%), radial-gradient(36% 56% at 84% 74%, rgba(243,246,253,.72), rgba(243,246,253,0) 70%); animation: mistA 16s ease-in-out infinite alternate; }
.home-mist::after { background-image: radial-gradient(32% 52% at 32% 78%, rgba(255,255,255,.52), rgba(255,255,255,0) 70%), radial-gradient(40% 60% at 70% 70%, rgba(243,246,253,.58), rgba(243,246,253,0) 70%); animation: mistB 23s ease-in-out infinite alternate; }
@keyframes mistA { from { translate: -6% 0; } to { translate: 6% -10px; } }
@keyframes mistB { from { translate: 7% -6px; } to { translate: -7% 4px; } }

/* ---------- Sections ---------- */
.home-section { padding: 72px 32px 96px; }
.home-section--tight { padding: 24px 32px 104px; }
.home-wrap { max-width: 1100px; margin: 0 auto; }
.home-wrap--center { max-width: 1160px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.home-h2 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 2.5rem); line-height: 1.15; }
.home-lead { margin: 16px 0 0; max-width: 600px; font-size: 1.1rem; line-height: 1.55; color: #5B6887; }

/* Démo offre / demande */
.demo { margin-top: 44px; width: 100%; background: #FFFFFF; border: 1px solid #D6DFEF; border-radius: 28px; padding: 28px; box-shadow: 0 20px 50px rgba(14,23,51,0.08); text-align: left; display: flex; flex-wrap: wrap; gap: 28px; }
.demo__controls { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.demo__intro { display: flex; flex-direction: column; gap: 6px; }
.demo__intro h3 { margin: 0; font-size: 1.6rem; line-height: 1.25; }
.demo__intro p { margin: 0; font-size: 15px; line-height: 1.5; color: #5B6887; }
.demo__field { display: flex; flex-direction: column; gap: 8px; }
.demo__row { display: flex; justify-content: space-between; align-items: baseline; }
.demo__row label { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.demo__row .display { font-size: 18px; }
.sw { width: 10px; height: 10px; border-radius: 3px; }
.sw--buy { background: #22B573; }
.sw--sell { background: #F0625F; }
.demo__range { width: 100%; height: 44px; margin: 0; cursor: pointer; }
.demo__range--buy { accent-color: #22B573; }
.demo__range--sell { accent-color: #F0625F; }
.demo__help { font-size: 13px; color: #5B6887; }
.demo__label { font-size: 13px; font-weight: 800; color: #33405F; }
.force-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #EDF2FC; }
.force-bar__buy { background: #22B573; transition: width .25s ease; }
.force-bar__sell { background: #F0625F; transition: width .25s ease; }
.demo__legend { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #5B6887; }
.demo__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.demo__buttons button:disabled { opacity: .6; cursor: progress; }
.demo__chart { flex: 1.6 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; background: #F7F9FE; border: 1px solid #E3E9F5; border-radius: 20px; padding: 20px; }
.demo__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.demo__ticker { font-size: 13px; font-weight: 700; color: #5B6887; }
.demo__price { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.demo__change { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #DDF6E7; color: #146C3F; font-weight: 800; font-size: 14px; }
.demo__change.is-down { background: #FDE6E6; color: #A42927; }
.demo__change.is-down svg { transform: rotate(180deg); }
.demo__change.is-flat { background: #EDF2FC; color: #5B6887; }
.demo__svg svg { display: block; width: 100%; height: auto; }
.demo__msg { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #FFFFFF; border: 1px solid #E3E9F5; }
.demo__msg-icon { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #DDF6E7; color: #146C3F; display: flex; align-items: center; justify-content: center; }
.demo__msg-icon.is-down { background: #FDE6E6; color: #A42927; }
.demo__msg-icon.is-down svg { transform: scaleY(-1); }
.demo__msg-icon.is-flat { background: #EDF2FC; color: #5B6887; }
.demo__msg p { margin: 0; font-size: 15px; line-height: 1.45; color: #33405F; }
.demo__msg strong { color: #0E1733; }

/* Bibliothèque */
.home-split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.home-split__text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.home-count__label { margin-top: 32px; font-size: 13px; font-weight: 700; color: #5B6887; }
.home-count { font-size: 3rem; line-height: 1.1; margin-bottom: 8px; }
.libcard { flex: 1.3 1 440px; min-width: 0; background: #FFFFFF; border: 1px solid #D6DFEF; border-radius: 24px; padding: 20px; box-shadow: 0 20px 50px rgba(14,23,51,0.08); display: flex; flex-direction: column; gap: 14px; }
.libcard__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.libcard__head strong { font-weight: 800; }
.libcard__head span { font-size: 13px; color: #5B6887; }
.libcard__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.libcard__grid .t { border-radius: 12px; background: #E3EDFF; border-left: 3px solid #2A62F0; padding: 12px; font-weight: 700; font-size: 14px; }
.libcard__grid .t--new { background: #FDEFC9; border-left-color: #F5B93A; display: flex; flex-direction: column; gap: 2px; }
.libcard__grid .t--new small { font-size: 12px; font-weight: 700; color: #8A5A00; }
.libcard__grid .t--lock { background: #F3F6FD; border-left: 0; display: flex; align-items: center; gap: 6px; color: #5B6887; }
.libcard__legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; font-weight: 700; color: #5B6887; }
.libcard__legend span { display: flex; align-items: center; gap: 6px; }
.libcard__legend i { width: 10px; height: 10px; border-radius: 3px; }

/* Série */
.streakband { max-width: 1000px; margin: 0 auto; border-radius: 32px; background: linear-gradient(180deg, #05070D 0%, #0A1230 40%, #1B45B5 85%, #2A62F0 100%); color: #FFFFFF; padding: 64px 48px 48px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.streakband > p { margin: 14px 0 0; font-size: 1.05rem; color: #C9D6F5; }
.streakband__num { margin-top: 40px; display: flex; align-items: baseline; gap: 10px; }
.streakband__num .display { font-size: clamp(4.5rem, 12vw, 7rem); line-height: 1; }
.streakband__num span:last-child { font-size: 1.4rem; font-weight: 700; color: #C9D6F5; }
.streakband__grid { margin-top: 24px; width: 100%; max-width: 640px; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; }
.streakband__grid span { height: 28px; border-radius: 4px; background: rgba(255,255,255,0.16); }
.streakband__grid span.on { background: #FF9A4D; }
.streakband__axis { margin-top: 8px; width: 100%; max-width: 640px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #C9D6F5; }
.streakband__facts { margin-top: 48px; width: 100%; display: flex; flex-wrap: wrap; gap: 24px; text-align: left; }
.streakband__facts div { flex: 1 1 200px; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 16px; display: flex; flex-direction: column; }
.streakband__facts small { font-size: 13px; font-weight: 700; color: #DCE7FF; }
.streakband__facts b { margin-top: 4px; font-size: 1.6rem; }

/* Programme */
.chapters { margin-top: 40px; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; text-align: left; }
.chap { background: #FFFFFF; border: 1px solid #D6DFEF; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.chap--start { border: 2px solid #2A62F0; box-shadow: 0 16px 40px rgba(42,98,240,0.12); }
.chap__top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chap__num { width: 44px; height: 44px; border-radius: 14px; background: #E3EDFF; color: #1B45B5; display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 18px; }
.chap--start .chap__num { background: radial-gradient(circle at 34% 26%, #9DBDFF 0%, #4F84FF 40%, #1F4FD6 100%); color: #FFFFFF; box-shadow: inset 0 2px 0 rgba(255,255,255,0.45), 0 4px 0 #163A9E; }
.chap--done .chap__num { background: radial-gradient(circle at 34% 26%, #FFE7A3 0%, #F8C24A 40%, #D18F12 100%); color: #5A3A00; }
.chap__tag { font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: #2FCB7C; color: #062014; }
.chap__tag--done { background: #FDEFC9; color: #8A5A00; }
.chap__title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.chap__goal { font-size: 15px; line-height: 1.5; color: #5B6887; }
.chap__meta { margin-top: auto; font-size: 13px; font-weight: 700; color: #8A97B5; }

/* Appel final et pied de page */
.home-final { background: linear-gradient(180deg, #F3F6FD 0%, #4F84FF 22%, #1B45B5 55%, #0A1230 80%, #05070D 100%); color: #FFFFFF; padding: 140px 32px 40px; }
.home-final__text { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.home-final__text h2 { margin: 0; font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.12; }
.home-final__text p { margin: 16px 0 0; font-size: 1.15rem; color: #DCE7FF; }
.home-footer { max-width: 1160px; margin: 140px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.home-footer img { display: block; width: 85px; height: 34px; object-fit: contain; }
.home-footer p { margin: 0; max-width: 620px; font-size: 13px; line-height: 1.5; color: #96A0B8; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .home-nav { display: none; }
}
@media (max-width: 720px) {
  .home-hero, .home-section, .home-section--tight, .home-final { padding-left: 16px; padding-right: 16px; }
  .home-hero__text { padding: 64px 0 40px; }
  .home-header__actions .home-link { display: none; }
  .home-preview__side { display: none; }
  .home-preview__app { height: 360px; }
  .home-preview__main { padding: 14px; }
  .home-preview__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-preview__path i { width: 30px; height: 28px; margin-top: 26px; }
  .home-preview__path i.b { width: 38px; height: 36px; margin-top: 22px; }
  .home-preview__path .track { left: 14px; right: 14px; }
  .demo { padding: 18px; }
  .demo__chart { padding: 14px; }
  .home-split { gap: 32px; }
  .libcard__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .streakband { padding: 44px 20px 32px; border-radius: 24px; }
  .streakband__grid { gap: 2px; }
  .streakband__grid span { height: 22px; border-radius: 3px; }
  .chapters { grid-template-columns: minmax(0, 1fr); }
  .home-final { padding-top: 100px; }
  .home-footer { margin-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-preview__path i.b { animation: none; }
}

/* =========================================================
   Animations de l'accueil (assets/js/motion.js)
   ========================================================= */
/* Entrée du haut de page (classe « motion » posée dans le <head>, sauf si les animations sont réduites) */
.motion .home-hero__text > * { animation: heroIn .8s cubic-bezier(.2,.7,.2,1) both; }
.motion .home-hero__text > :nth-child(2) { animation-delay: .08s; }
.motion .home-hero__text > :nth-child(3) { animation-delay: .16s; }
.motion .home-preview__frame { animation: heroRise 1s cubic-bezier(.2,.7,.2,1) .22s both; }
@keyframes heroIn { from { opacity: 0; translate: 0 18px; } }
@keyframes heroRise { from { opacity: 0; translate: 0 48px; } }

/* Lueur qui suit le curseur dans le haut de page */
.home-hero > * { position: relative; z-index: 1; }
.home-header { z-index: 5; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(560px circle at var(--gx, 50%) var(--gy, 20%), rgba(127, 174, 255, .17), transparent 62%); opacity: 0; transition: opacity .6s ease; }
.home-hero.is-glowing::before { opacity: 1; }
.home-preview__frame { transform-origin: 50% 100%; }

/* Reflet sous le curseur sur les cartes interactives */
[data-spotlight] { position: relative; isolation: isolate; }
[data-spotlight]::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(42, 98, 240, .08), transparent 70%); opacity: 0; transition: opacity .3s ease; }
[data-spotlight]:hover::after { opacity: 1; }

/* Liens du menu : soulignement qui glisse */
.home-nav a { position: relative; }
.home-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 9px; height: 2px; border-radius: 2px; background: #7FAEFF; scale: 0 1; transform-origin: left center; transition: scale .25s ease; }
.home-nav a:hover::after, .home-nav a:focus-visible::after { scale: 1 1; }

/* Menu de langue */
.lang__menu:not([hidden]) { animation: menuIn .18s ease; transform-origin: top right; }
@keyframes menuIn { from { opacity: 0; scale: .96; translate: 0 -4px; } }

/* Cartes des chapitres : ce sont des liens, elles se soulèvent au survol */
a.chap { text-decoration: none; color: inherit; transition: translate .25s ease, border-color .25s ease, box-shadow .25s ease; }
@media (hover: hover) and (pointer: fine) {
  .home-btn { transition: transform .08s ease, filter .15s ease, box-shadow .08s ease, translate .15s ease; }
  .home-btn:hover { translate: 0 -1px; }
  a.chap:hover { translate: 0 -3px; border-color: #A9C1F5; box-shadow: 0 16px 34px rgba(14, 23, 51, .08); }
  a.chap--start:hover { border-color: #2A62F0; box-shadow: 0 18px 40px rgba(42, 98, 240, .16); }
}

/* Démo : le prix se colore brièvement quand il monte ou descend */
.demo__price { transition: color .45s ease; }
.demo__price.is-up { color: #146C3F; transition-duration: .1s; }
.demo__price.is-down { color: #A42927; transition-duration: .1s; }

/* Série : les cases se remplissent l'une après l'autre à l'apparition */
.streakband__grid span { transition: background .35s ease; transition-delay: calc(var(--i, 0) * 45ms); }
.reveal-ready .streakband__grid[data-reveal]:not(.is-in) span.on { background: rgba(255, 255, 255, .16); }

/* =========================================================
   Bougie sur l'aperçu, tarifs, FAQ, liens légaux
   ========================================================= */
/* Bougie en bas à droite de l'écran : un clic, un conseil */
.bougie-dock { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.bougie-dock__btn { pointer-events: auto; flex: none; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #E3EDFF 100%); box-shadow: 0 10px 28px rgba(14, 23, 51, .22), 0 0 0 1px rgba(42, 98, 240, .14); transition: translate .2s ease, box-shadow .2s ease; }
.bougie-dock__btn .mascot { width: 40px; height: auto; margin-top: -2px; }
.bougie-dock__bubble { pointer-events: auto; max-width: 260px; margin: 0 0 22px; padding: 12px 14px; border-radius: 16px 16px 4px 16px; background: #FFFFFF; color: #0E1733; font-family: Nunito, sans-serif; font-weight: 700; font-size: 14px; line-height: 1.45; box-shadow: 0 14px 34px rgba(14, 23, 51, .2); }
.bougie-dock__bubble[hidden] { display: none; }
.bougie-dock.is-talking .bougie-dock__bubble { animation: bubbleIn .3s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes bubbleIn { from { scale: .92; opacity: .4; } }
@media (hover: hover) and (pointer: fine) {
  .bougie-dock__btn:hover { translate: 0 -2px; box-shadow: 0 14px 32px rgba(14, 23, 51, .26), 0 0 0 1px rgba(42, 98, 240, .22); }
  .bougie-dock__btn:hover .mascot__body { animation: m-jump .5s ease; }
}

.plans { margin-top: 40px; width: 100%; max-width: 880px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; text-align: left; }
.plan { position: relative; background: #FFFFFF; border: 1px solid #D6DFEF; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.plan--premium { border: 2px solid #2A62F0; box-shadow: 0 20px 50px rgba(42, 98, 240, .14); }
.plan__badge { position: absolute; top: -13px; left: 24px; background: #2FCB7C; color: #062014; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.plan__name { font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #5B6887; }
.plan__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan__price .display { font-size: 2.5rem; line-height: 1; }
.plan__price small { font-size: 14px; font-weight: 700; color: #5B6887; }
.plan__desc { margin: 0; font-size: 15px; line-height: 1.5; color: #5B6887; }
.plan__list { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan__list li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; }
.plan__list li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: #DDF6E7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23146C3F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.plan .home-btn { margin-top: auto; width: 100%; }
.plans__note { margin: 20px 0 0; font-size: 14px; color: #5B6887; }

.faq { max-width: 860px; }
.faq__head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.faq__head .home-lead { margin-top: 8px; }
.faq__bougie { flex: none; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq__item { background: #FFFFFF; border: 1px solid #D6DFEF; border-radius: 18px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq__item[open] { border-color: #A9C1F5; box-shadow: 0 12px 30px rgba(14, 23, 51, .06); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 800; font-size: 16px; border-radius: 18px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #E3EDFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B45B5' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat; transition: rotate .25s ease, background-color .2s ease; }
.faq__item[open] summary::after { rotate: 45deg; background-color: #D2E1FF; }
.faq__a { padding: 0 22px 20px; font-size: 15px; line-height: 1.6; color: #33405F; }
.faq__a p { margin: 0; }
.faq__item[open] .faq__a { animation: faqIn .25s ease; }
@keyframes faqIn { from { opacity: 0; translate: 0 -4px; } }
.faq__chapters { margin: 12px 0 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.faq__chapters li span { display: block; font-size: 14px; color: #5B6887; }
.faq__done { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #FDEFC9; color: #8A5A00; font-size: 12px; font-weight: 800; }
@media (hover: hover) and (pointer: fine) {
  .faq__item:not([open]):hover { border-color: #A9C1F5; }
}

.home-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.home-footer__links a { color: #C9D6F5 !important; font-size: 13px; font-weight: 600; text-decoration: none; }
.home-footer__links a:hover { color: #FFFFFF !important; text-decoration: underline; }

@media (max-width: 720px) {
  .bougie-dock { right: 14px; bottom: 14px; }
  .bougie-dock__btn { width: 60px; height: 60px; }
  .bougie-dock__btn .mascot { width: 32px; }
  .bougie-dock__bubble { max-width: calc(100vw - 110px); font-size: 13px; margin-bottom: 16px; }
  .faq__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .faq__bougie .mascot { width: 52px; height: auto; }
  .plan { padding: 24px 20px; }
}

/* =========================================================
   Pages légales
   ========================================================= */
.legal-page { background: #F3F6FD; }
.legal-top { max-width: 820px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.legal-top img { display: block; width: 100px; height: 40px; object-fit: contain; filter: invert(1) hue-rotate(180deg) saturate(1.4); }
.legal-back { font-weight: 700; font-size: 14px; color: #1B45B5 !important; text-decoration: none; }
.legal-back:hover { text-decoration: underline; }
.legal { max-width: 820px; margin: 0 auto; padding: 8px 24px 64px; color: #33405F; font-size: 16px; line-height: 1.65; }
.legal h1 { margin: 18px 0 4px; font-size: clamp(2rem, 5vw, 2.6rem); color: #0E1733; }
.legal h2 { margin: 32px 0 8px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.3rem; color: #0E1733; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { padding-left: 1.3em; }
.legal-date { font-size: 14px; color: #5B6887; }
.legal-draft { padding: 14px 16px; border-radius: 14px; background: #FDEFC9; color: #6B4700; font-size: 14px; line-height: 1.5; }
.legal mark.todo { background: #FDEFC9; color: #6B4700; padding: 1px 6px; border-radius: 6px; font-weight: 700; }
.legal-foot { max-width: 820px; margin: 0 auto; padding: 24px; border-top: 1px solid #D6DFEF; font-size: 13px; color: #5B6887; }
.legal-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.legal-foot a { color: #1B45B5 !important; font-weight: 600; text-decoration: none; }
.legal-foot a:hover { text-decoration: underline; }
