/* =========================================================
   Invest Academy : styles communs à toutes les pages
   Les couleurs se changent ici, dans :root.
   ========================================================= */
:root {
  --bg: #000;
  --panel: #0a0a0f;
  --panel-2: #12121a;
  --panel-3: #1a1a24;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #f4f4f7;
  --muted: #9b9bab;
  --dim: #62627a;
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --grad: linear-gradient(100deg, var(--cyan), var(--blue) 45%, var(--violet));
  --max: 1240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font-family: "Inter Tight", system-ui, sans-serif; font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; border: 0; cursor: pointer; white-space: nowrap; transition: transform .2s ease, background .2s ease, box-shadow .3s ease; }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(139,92,246,.25), 0 10px 40px -8px rgba(139,92,246,.7); }
.btn-dark { background: #1c1c22; color: var(--text); }
.btn-dark:hover { background: #26262e; }
.btn-glow { background: var(--grad); color: #fff; box-shadow: 0 10px 40px -10px rgba(99,102,241,.9); }
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(139,92,246,1); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.link-arrow span { color: var(--muted); }
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Navigation */
nav.top { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
nav.top.scrolled { background: rgba(0,0,0,.7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-color: var(--line); }
nav.top .wrap { height: 72px; display: flex; align-items: center; gap: 40px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.logo svg { flex: none; }
.nav-links { display: flex; gap: 30px; font-size: 16px; color: #d4d4dc; }
.nav-links a:hover, .nav-links a.on { color: #fff; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav-right .price-mini { color: var(--muted); font-size: 15px; }
nav .btn { padding: 9px 16px; font-size: 15px; border-radius: 10px; }

/* Titres de section */
section { padding: 130px 0; position: relative; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 48px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(34px, 5vw, 64px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 600; max-width: 820px; }
.kicker { font-size: 15px; color: var(--violet-2); font-weight: 500; margin-bottom: 14px; display: block; }

/* Couverture générée (ebooks sans image) */
.gcover { position: relative; aspect-ratio: 5/8; border-radius: 8px; overflow: hidden; padding: 9% 9% 10%; display: flex; flex-direction: column; background: #070a18; container-type: inline-size; }
.gcover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 45% at 85% 0%, var(--c1), transparent 70%), radial-gradient(60% 40% at 0% 100%, var(--c2), transparent 70%); opacity: .55; }
.gcover::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 8cqw 8cqw; }
.gcover > * { position: relative; z-index: 1; }
.gcover .gc-top { display: flex; justify-content: space-between; align-items: center; font-size: 4.2cqw; font-weight: 700; letter-spacing: .12em; }
.gcover .gc-top em { font-style: normal; font-weight: 500; font-family: "JetBrains Mono", monospace; letter-spacing: .08em; padding: .6cqw 2.4cqw; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; font-size: 3.6cqw; }
.gcover .gc-bars { display: flex; align-items: flex-end; gap: 3cqw; height: 34%; margin-top: 12%; }
.gcover .gc-bars i { flex: 1; border-radius: 2cqw; background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 80%, #fff), color-mix(in srgb, var(--c2) 40%, transparent)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); opacity: .9; }
.gcover .gc-kick { margin-top: auto; font-family: "JetBrains Mono", monospace; font-size: 3.6cqw; letter-spacing: .2em; text-transform: uppercase; color: color-mix(in srgb, var(--c1) 70%, #fff); }
.gcover h4 { font-size: 10cqw; line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; margin-top: 3cqw; }
.gcover .gc-year { font-size: 17cqw; line-height: 1; font-weight: 700; letter-spacing: -0.05em; margin-top: 1cqw; background: linear-gradient(100deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Cartes du catalogue */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ecard { border-radius: 26px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); padding: 14px; display: flex; flex-direction: column; transition: box-shadow .3s ease, transform .4s cubic-bezier(.2,.8,.2,1); position: relative; }
.ecard:hover { box-shadow: inset 0 0 0 1px rgba(139,92,246,.5), 0 30px 80px -40px rgba(139,92,246,.8); transform: translateY(-4px); }
.ecard .shelf { border-radius: 18px; background: #111116; padding: 36px 0; display: grid; place-items: center; position: relative; overflow: hidden; }
.ecard .shelf::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--glow, #8b5cf6); filter: blur(60px); opacity: .35; transition: opacity .4s ease; }
.ecard:hover .shelf::before { opacity: .6; }
.ecard .shelf > * { width: 46%; position: relative; box-shadow: 0 30px 50px -15px #000, 0 0 0 1px var(--line-2); border-radius: 8px; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.ecard:hover .shelf > * { transform: translateY(-6px) rotate(-2deg) scale(1.03); }
.ecard .shelf img { aspect-ratio: 5/8; object-fit: cover; }
.ecard .meta { padding: 22px 12px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ecard .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--panel-3); color: #d4d4dc; }
.tag.live { background: rgba(52,211,153,.12); color: var(--green); }
.tag.soon { background: rgba(139,92,246,.16); color: var(--violet-2); }
.ecard h3 { font-size: 23px; letter-spacing: -0.03em; font-weight: 600; line-height: 1.15; margin-top: 6px; }
.ecard p { color: var(--muted); font-size: 15px; }
.ecard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; }
.ecard .price b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.ecard .price s { color: var(--dim); margin-left: 6px; font-size: 15px; }
.ecard .foot .btn { padding: 10px 16px; font-size: 15px; }
.ecard a.cover-link::after { content: ""; position: absolute; inset: 0; border-radius: 26px; }
.ecard .foot .btn, .ecard .notify { position: relative; z-index: 2; }

/* Pied de page */
footer { border-top: 1px solid var(--line); padding: 60px 0 40px; color: var(--muted); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h5 { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.foot-grid ul { list-style: none; display: grid; gap: 10px; }
.foot-grid a:hover { color: #fff; }
.foot-grid .about { max-width: 300px; margin-top: 14px; }
.disclaimer { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); line-height: 1.7; max-width: 920px; }

/* Barre mobile + toast */
.sticky-buy { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: none; padding: 10px 10px 10px 18px; border-radius: 16px; align-items: center; justify-content: space-between; gap: 10px; background: rgba(18,18,26,.92); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px rgba(0,0,0,.7); transform: translateY(140%); transition: transform .4s ease; }
.sticky-buy.show { transform: none; }
.sticky-buy b { display: block; font-size: 14px; }
.sticky-buy small { color: var(--muted); font-size: 12.5px; }
.sticky-buy .btn { padding: 10px 16px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 70; padding: 12px 18px; border-radius: 12px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; transition: all .3s ease; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); filter: blur(6px); transition: opacity 1s cubic-bezier(.2,.8,.2,1), transform 1s cubic-bezier(.2,.8,.2,1), filter 1s ease; }
.reveal.in { opacity: 1; transform: none; filter: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.word { display: inline-block; opacity: 0; transform: translateY(40%); filter: blur(8px); animation: wordIn .9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes wordIn { to { opacity: 1; transform: none; filter: none; } }
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .word { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 1080px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-links, .nav-right .price-mini { display: none; }
  section { padding: 90px 0; }
  .cat-grid { grid-template-columns: 1fr; }
  .sticky-buy { display: flex; }
  footer { padding-bottom: 110px; }
}
