:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --surface-warm: #fff8f5;
  --text: #161a1f;
  --muted: #666b72;
  --line: #e7ddd6;
  --red: #e41420;
  --red-dark: #bd1019;
  --red-soft: #fde8e7;
  --shadow: 0 22px 55px rgba(43, 24, 18, .10);
  --radius: 24px;
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; background: none; }
.shell { width: var(--shell); margin-inline: auto; }
.center { display: flex; justify-content: center; margin-top: 28px; }
.icon-svg { width: 18px; height: 18px; display: block; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,247,243,.92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(50,35,29,.07); }
.header-inner { min-height: 84px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-wordmark { display: flex; flex-direction: column; line-height: .82; font-weight: 900; font-size: 20px; letter-spacing: -.04em; }
.brand-wordmark b { color: var(--red); }
.desktop-nav { display: flex; justify-content: center; gap: 30px; font-weight: 700; font-size: 14px; }
.desktop-nav a { position: relative; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--red); transition: .2s ease; }
.desktop-nav a:hover::after { right: 0; }
.header-cta { white-space: nowrap; }
.menu-toggle, .mobile-nav { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 12px 25px rgba(228,20,32,.17); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: #dcbbb7; background: rgba(255,255,255,.74); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-soft { background: #fff; color: var(--red); border-color: #f1b9ba; }

.hero { padding: 42px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.03fr 1.1fr; align-items: center; min-height: 520px; }
.hero-copy,
.hero-media { min-width: 0; }
.hero-copy { padding: 36px 48px 60px 4px; position: relative; z-index: 4; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 900; letter-spacing: .22em; margin: 0 0 14px; }
.hero h1, .legacy-copy h1 { margin: 0; font-size: clamp(56px, 6.8vw, 104px); line-height: .88; letter-spacing: -.055em; font-weight: 950; text-transform: uppercase; }
.hero h1 span, .legacy-copy h1 span { color: var(--red); }
.hero-lead { max-width: 100%; font-size: 18px; color: #3e4247; margin: 24px 0 26px; overflow-wrap: normal; word-break: normal; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.member-proof { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.member-proof p { margin: 0; font-size: 13px; line-height: 1.25; }
.member-proof span { color: var(--muted); }
.avatar-stack { display: flex; }
.avatar-stack i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #222; color: #fff; font-size: 11px; border: 2px solid var(--bg); font-style: normal; margin-left: -8px; }
.avatar-stack i:first-child { margin-left: 0; background: var(--red); }
.hero-media { min-height: 510px; position: relative; align-self: stretch; }
.hero-media::before { content: ""; position: absolute; inset: 4% auto 7% 0; width: 72px; background: linear-gradient(90deg, var(--bg) 32%, rgba(247,243,238,0)); z-index: 1; }
.hero-media img { width: 100%; height: 100%; min-height: 510px; object-fit: cover; object-position: center; border-radius: 34px 0 0 34px; filter: saturate(.90) contrast(1.04); position: relative; z-index: 2; }
.brush-mark { position: absolute; left: -30px; bottom: 54px; width: 120px; height: 75px; background: var(--red); transform: rotate(-12deg); opacity: .92; clip-path: polygon(0 36%,100% 0,88% 26%,100% 46%,78% 58%,92% 100%,0 78%); z-index: 2; }

.stats-card { margin-top: -48px; position: relative; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.95); border: 1px solid rgba(45,33,28,.08); box-shadow: var(--shadow); border-radius: 18px; padding: 24px 18px; }
.stats-card > div { display: grid; grid-template-columns: 42px auto; grid-template-rows: auto auto; align-items: center; padding: 0 22px; border-right: 1px solid var(--line); }
.stats-card > div:last-child { border-right: 0; }
.stat-icon { grid-row: 1 / span 2; color: var(--red); font-size: 30px; }
.stats-card strong { font-size: 24px; line-height: 1; }
.stats-card small { color: var(--muted); }

.section { padding: 78px 0; }
.section-heading { text-align: center; margin-bottom: 32px; }
.section-heading h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1; letter-spacing: -.035em; margin: 0; }
.section-heading h2 span { color: var(--red); }
.section-heading p { color: var(--muted); margin: 12px 0 0; }
.section-heading.compact { margin-bottom: 28px; }
.section-heading.compact h2 { font-size: clamp(28px, 3vw, 38px); }

.ecosystem { padding-top: 74px; }
.ecosystem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ecosystem-card { display: grid; grid-template-rows: 220px 1fr; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow); background: #fff; transition: transform .25s ease, box-shadow .25s ease; }
.ecosystem-card:hover { transform: translateY(-7px); box-shadow: 0 28px 70px rgba(130,24,26,.16); }
.card-photo { height: 220px; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ecosystem-card:hover .card-photo img { transform: scale(1.04); }
.card-red-panel { position: relative; min-height: 315px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(145deg, #ee1825 0%, #d80f19 100%); color: #fff; padding: 54px 28px 28px; text-align: center; }
.card-red-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.11) 0 1px, transparent 1.5px); background-size: 12px 12px; opacity: .26; }
.round-icon { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--red); border: 5px solid rgba(255,255,255,.35); font-size: 28px; font-weight: 900; z-index: 2; }
.card-red-panel h3 { margin: 0 0 12px; font-size: 27px; letter-spacing: -.025em; }
.card-red-panel p { color: rgba(255,255,255,.92); min-height: 74px; margin-bottom: 10px; }
.card-red-panel > a { position: relative; z-index: 2; margin-top: auto; display: inline-flex; gap: 10px; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 11px; background: #fff; color: var(--red); font-weight: 850; }
.card-red-panel > a:hover { background: #fff3f3; }

.app-platforms { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 15px; }
.platform-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(133,0,8,.22); color: #fff; font-size: 12px; font-weight: 850; letter-spacing: .01em; }
.platform-pill img { width: 15px; height: 15px; object-fit: contain; filter: brightness(0) invert(1); }

.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.story-grid-more { margin-top: 20px; }
.story-grid-more[hidden] { display: none; }
.story-card { background: #fff; border: 1px solid #eee1db; border-radius: 18px; padding: 24px; box-shadow: 0 14px 36px rgba(39,27,22,.07); }
.story-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.story-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(145deg, #2a3038, #11161b); color: #fff; display: grid; place-items: center; font-weight: 900; }
.story-top strong { display: block; }
.story-top span { color: var(--red); font-size: 13px; font-weight: 800; }
.story-card p { color: #4c5056; min-height: 126px; }
.stars { color: var(--red); letter-spacing: 3px; }

.social-section { padding-top: 66px; }
.social-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.social-card { min-height: 145px; border-radius: 18px; padding: 22px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; box-shadow: 0 14px 35px rgba(26,22,20,.10); background: linear-gradient(135deg, #6d5d57, #1e1e20); }
.social-card::after { content:""; position:absolute; inset:0; background: radial-gradient(circle at 88% 15%, rgba(228,20,32,.75), transparent 32%); }
.social-card > * { position: relative; z-index: 2; }
.social-logo { position: absolute; top: 18px; left: 18px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.94); color: var(--red); }
.social-logo .icon-svg { width: 20px; height: 20px; }
.social-card strong { font-size: 20px; }
.social-card small { color: rgba(255,255,255,.82); }

.action-banner { margin-top: 6px; margin-bottom: 18px; display: grid; grid-template-columns: 280px 1fr auto; align-items: center; overflow: hidden; background: #fff; border: 1px solid #eaded8; border-radius: 24px; box-shadow: var(--shadow); }
.action-image { height: 180px; }
.action-image img { width: 100%; height: 100%; object-fit: cover; }
.action-copy { padding: 22px 34px; }
.action-copy h2 { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: -.03em; }
.action-copy h2 span { color: var(--red); }
.action-copy p { color: var(--muted); margin-bottom: 0; }
.action-banner > .btn { margin-right: 32px; }

.legacy-bar { margin-bottom: 42px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; background: var(--red-soft); border: 1px solid #f0c5c5; border-radius: 18px; padding: 16px 20px; }
.legacy-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--red); font-weight: 950; }
.legacy-bar div:nth-child(2) { display: flex; flex-direction: column; }
.legacy-bar span { color: var(--muted); font-size: 14px; }

.site-footer { background: #fff; border-top: 1px solid #eadfd9; padding: 42px 0 22px; }
.footer-minimal { display: grid; gap: 22px; justify-items: center; text-align: center; }
.footer-brand { display: grid; gap: 12px; justify-items: center; }
.footer-brand p { color: var(--muted); max-width: 360px; font-size: 14px; margin: 0; }
.footer-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.footer-social-link { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border: 1px solid #eaded8; border-radius: 999px; background: #fff; color: var(--text); font-weight: 800; box-shadow: 0 8px 20px rgba(39,27,22,.05); }
.footer-social-link:hover { color: var(--red); border-color: #f1b9ba; }
.footer-social-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.footer-bottom { color: var(--muted); font-size: 13px; }

.legacy-page { min-height: calc(100vh - 84px); display: grid; place-items: center; padding: 70px 0; background: radial-gradient(circle at 80% 20%, rgba(228,20,32,.11), transparent 28%), var(--bg); }
.legacy-layout { display: grid; grid-template-columns: 1.08fr .82fr; align-items: center; gap: 70px; }
.legacy-copy h1 { font-size: clamp(50px, 6vw, 82px); }
.legacy-copy > p:not(.eyebrow) { max-width: 620px; color: var(--muted); font-size: 18px; }
.legacy-note { margin-top: 28px; padding: 18px 20px; border-left: 4px solid var(--red); background: #fff; border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 12px 34px rgba(34,25,21,.06); }
.legacy-note span { color: var(--muted); font-size: 14px; }
.access-card { background: #fff; border-radius: 24px; padding: 34px; border: 1px solid #eaded9; box-shadow: var(--shadow); }
.access-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 24px; }
.access-card h2 { font-size: 30px; margin: 18px 0 8px; }
.access-card > p { color: var(--muted); }
.access-form { display: grid; gap: 10px; margin-top: 24px; }
.access-form label { font-size: 13px; font-weight: 800; }
.access-form input { width: 100%; min-height: 52px; border: 1px solid #d9cbc5; border-radius: 10px; padding: 0 14px; background: #fffdfc; outline: none; }
.access-form input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(228,20,32,.10); }
.access-form .btn { margin-top: 6px; }
.demo-result { margin-top: 16px; padding: 12px 14px; background: #eef8ee; border-radius: 10px; color: #276a2d; font-size: 14px; }
.text-link { display: inline-flex; margin-top: 20px; font-size: 14px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .desktop-nav, .header-cta { display: none; }
  .header-inner { grid-template-columns: 1fr auto; min-height: 74px; }
  .menu-toggle { display: grid; width: 46px; height: 46px; border: 0; background: #fff; border-radius: 11px; place-content: center; gap: 5px; box-shadow: 0 8px 24px rgba(31,23,20,.08); }
  .menu-toggle span { width: 22px; height: 2px; background: #111; }
  .mobile-nav { display: none; padding: 8px 20px 20px; background: rgba(250,247,243,.98); border-top: 1px solid #eadfd9; }
  .mobile-nav.is-open { display: grid; gap: 6px; }
  .mobile-nav > a:not(.btn) { padding: 12px 0; font-weight: 800; border-bottom: 1px solid #eee2dc; }
}

@media (max-width: 980px) {
  :root { --shell: min(100% - 28px, 760px); }
  .hero { padding-top: 20px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 28px 0 32px; }
  .hero-media { min-height: 430px; }
  .hero-media img { min-height: 430px; border-radius: 28px; }
  .hero-media::before { display: none; }
  .stats-card { margin-top: 18px; grid-template-columns: repeat(2, 1fr); }
  .stats-card > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px; }
  .stats-card > div:nth-last-child(-n+2) { border-bottom: 0; }
  .ecosystem-grid, .story-grid { grid-template-columns: 1fr; }
  .ecosystem-card { grid-template-rows: 300px 1fr; }
  .card-photo { height: 300px; }
  .card-red-panel { min-height: 270px; }
  .story-card p { min-height: 0; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .social-card:last-child { grid-column: 1 / -1; }
  .action-banner { grid-template-columns: 1fr; }
  .action-image { height: 260px; }
  .action-banner > .btn { margin: 0 28px 28px; }
  .legacy-bar { grid-template-columns: auto 1fr; }
  .legacy-bar .btn { grid-column: 1 / -1; }
  .legacy-layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 620px) {
  :root { --shell: calc(100% - 22px); --radius: 18px; }
  .brand img { width: 44px; height: 44px; }
  .brand-wordmark { font-size: 17px; }
  .hero h1 { font-size: clamp(48px, 16vw, 74px); }
  .hero-lead { font-size: 16px; }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; }
  .hero-media, .hero-media img { min-height: 340px; }
  .stats-card { grid-template-columns: 1fr 1fr; padding: 10px; }
  .stats-card > div { grid-template-columns: 34px auto; padding: 16px 8px; }
  .stat-icon { font-size: 24px; }
  .stats-card strong { font-size: 20px; }
  .stats-card small { font-size: 11px; }
  .section { padding: 56px 0; }
  .section-heading { text-align: left; }
  .ecosystem-card { grid-template-rows: 210px 1fr; }
  .card-photo { height: 210px; }
  .card-red-panel { min-height: 290px; }
  .platform-pill { font-size: 11px; }
  .social-grid { grid-template-columns: 1fr; }
  .social-card:last-child { grid-column: auto; }
  .action-image { height: 210px; }
  .action-copy { padding: 24px; }
  .action-copy h2 { font-size: 29px; }
  .legacy-bar { grid-template-columns: 1fr; text-align: left; }
  .legacy-icon { width: 42px; height: 42px; }
  .footer-socials { gap: 10px; }
  .footer-social-link { width: 100%; justify-content: center; }
  .legacy-page { padding: 42px 0; }
  .legacy-copy h1 { font-size: 48px; }
  .access-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* v0.5 — témoignages + réseaux sociaux */
.story-top { align-items: center; }
.story-top > div:last-child { display: grid; gap: 2px; }
.story-card p { margin-top: 12px; }
.social-card-coming { cursor: default; opacity: .92; }
.footer-social-link-disabled { cursor: default; color: var(--muted); }
.footer-social-link-disabled:hover { color: var(--muted); border-color: #eaded8; }

/* v0.7 — témoignages hiérarchisés, 3 chiffres clés, CTA compact */
.stats-card-three { grid-template-columns: repeat(3, 1fr); }
.stats-card-three > div:last-child { border-right: 0; }

.story-featured-full { margin-bottom: 20px; }
.story-card-wide { width: 100%; padding: 30px 34px; }
.story-card-wide p { min-height: 0; margin-bottom: 0; font-size: 19px; line-height: 1.65; }
.story-grid-recent { grid-template-columns: repeat(3, 1fr); }

/* Le CTA retrouve le format compact des versions précédentes. */
.action-banner { align-items: center; }
.action-image { height: 180px; align-self: auto; }
.action-image img { height: 100%; }
.action-copy { display: block; padding: 22px 34px; }
.action-copy h2 { max-width: none; }

/* Le motif rouge décoratif du hero est volontairement supprimé. */
.brush-mark { display: none; }

@media (max-width: 980px) {
  .stats-card-three { grid-template-columns: 1fr; }
  .stats-card-three > div { border-right: 0; }
  .stats-card-three > div:not(:last-child) { border-bottom: 1px solid var(--line) !important; }
  .stats-card-three > div:last-child { border-bottom: 0 !important; }
  .story-grid-recent { grid-template-columns: 1fr; }
  .story-card-wide p { font-size: 17px; }
  .action-image { height: 260px; }
}

@media (max-width: 620px) {
  .stats-card-three { grid-template-columns: 1fr; }
  .story-card-wide { padding: 24px; }
  .story-card-wide p { font-size: 16px; }
  .action-image { height: 210px; }
}


/* v0.8 — hero plus compact, stats sans overlay */
.hero { padding-top: 24px; }
.hero-grid { min-height: 455px; }
.hero-copy { padding: 24px 44px 36px 4px; }
.hero h1 { font-size: clamp(52px, 6.2vw, 94px); }
.hero-lead { margin: 20px 0 22px; }
.member-proof { margin-top: 22px; }
.hero-media { min-height: 455px; }
.hero-media img { min-height: 455px; }

/* Les chiffres-clés restent sous le hero au lieu de recouvrir l'image. */
.stats-card { margin-top: 18px; }

@media (max-width: 980px) {
  .hero { padding-top: 14px; }
  .hero-grid { min-height: 0; }
  .hero-copy { padding: 22px 0 26px; }
  .hero-media,
  .hero-media img { min-height: 390px; }
  .stats-card { margin-top: 18px; }
}

@media (max-width: 620px) {
  .hero h1 { font-size: clamp(44px, 15vw, 68px); }
  .hero-media,
  .hero-media img { min-height: 310px; }
}


/* v0.10 — ancres ajustées : juste assez d'espace sous le header sticky.
   Les sections ont déjà leur propre padding supérieur, donc on évite de cumuler
   scroll-padding + scroll-margin. */
html { scroll-padding-top: 0; }
section[id] { scroll-margin-top: 18px; }

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  transition: color .2s ease;
}
.footer-contact-link:hover { color: var(--red); }
.footer-contact-link .footer-social-icon { flex: 0 0 auto; }

@media (max-width: 1120px) {
  section[id] { scroll-margin-top: 22px; }
}

/* v0.11 — Legacy Access fonctionnel */
.legacy-alert { margin: 16px 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.legacy-alert-error { background: #fff1f1; border: 1px solid #f1c3c3; color: #8f1118; }
.legacy-privacy { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 14px 0 0; }
.legacy-verify-page { min-height: calc(100vh - 84px); }
.legacy-verify-shell { max-width: 640px; }
.access-card-code { text-align: left; }
.access-card-code h1 { margin: 10px 0 12px; font-size: clamp(34px, 5vw, 52px); line-height: 1; letter-spacing: -.04em; }
.access-card-code > p:not(.eyebrow) { color: var(--muted); }
.legacy-code-input { text-align: center; font-size: 30px; font-weight: 900; letter-spacing: .28em; padding-left: .28em !important; }
.legacy-verify-links { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.legacy-library { padding: 72px 0 88px; min-height: calc(100vh - 84px); }
.legacy-library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 38px; }
.legacy-library-head h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: .95; letter-spacing: -.05em; }
.legacy-library-head p:not(.eyebrow) { margin: 14px 0 0; color: var(--muted); font-size: 17px; max-width: 700px; }
.legacy-course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.legacy-course-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #eaded8;
  box-shadow: 0 18px 44px rgba(43,24,18,.08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.legacy-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(43,24,18,.12);
  border-color: #e2d1ca;
}
.legacy-course-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.legacy-course-card-link:focus-visible { outline: 3px solid rgba(238,24,37,.22); outline-offset: 3px; border-radius: 24px; }
.legacy-course-media {
  position: relative;
  aspect-ratio: 1460 / 754;
  overflow: hidden;
  background: #151515;
}
.legacy-course-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.legacy-course-code {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14,18,22,.72);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.legacy-course-code-fallback {
  position: static;
  min-height: 150px;
  width: 100%;
  border-radius: 0;
  background: linear-gradient(145deg, #ee1825, #ca1019);
  font-size: 48px;
  letter-spacing: -.04em;
}
.legacy-course-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px;
}
.legacy-course-body h2 { margin: 12px 0 8px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.05; letter-spacing: -.04em; }
.legacy-course-body p { color: var(--muted); margin: 0 0 18px; min-height: 0; }
.legacy-course-status { display: inline-flex; align-items: center; gap: 7px; color: #276a2d; background: #eef8ee; border: 1px solid #cce6ce; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; width: fit-content; }
.legacy-course-status::before { content: "✓"; font-weight: 950; }
.legacy-course-cta {
  width: 100%;
  margin-top: auto;
  pointer-events: none;
  justify-content: center;
}
.legacy-library-help { margin-top: 26px; padding: 18px 20px; border-radius: 14px; background: var(--surface-warm); border: 1px solid #eaded8; display: flex; gap: 8px; flex-wrap: wrap; }
.legacy-library-help a { color: var(--red); font-weight: 800; }

.legacy-course-page { padding: 58px 0 88px; min-height: calc(100vh - 84px); }
.legacy-back { margin-bottom: 24px; }
.legacy-course-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; padding: 34px; border-radius: 24px; background: #fff; border: 1px solid #eaded8; box-shadow: var(--shadow); }
.legacy-course-hero h1 { margin: 0; font-size: clamp(46px, 7vw, 88px); line-height: .9; letter-spacing: -.055em; }
.legacy-course-hero p:not(.eyebrow) { color: var(--muted); margin: 14px 0 0; }
.legacy-course-placeholder { margin-top: 24px; padding: 28px; border-radius: 20px; background: var(--red-soft); border: 1px solid #f0c5c5; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.legacy-placeholder-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--red); font-weight: 900; }
.legacy-course-placeholder h2 { margin: 0 0 6px; }
.legacy-course-placeholder p { margin: 0; color: var(--muted); }

@media (max-width: 980px) {
  .legacy-course-grid { grid-template-columns: 1fr; }
  .legacy-library-head { align-items: flex-start; flex-direction: column; }
  .legacy-course-code-fallback { min-height: 120px; }
}

@media (max-width: 620px) {
  .legacy-library { padding-top: 46px; }
  .legacy-library-head .btn { width: 100%; }
  .legacy-course-hero { align-items: flex-start; flex-direction: column; padding: 24px; }
  .legacy-course-placeholder { grid-template-columns: 1fr; }
  .legacy-code-input { font-size: 26px; letter-spacing: .22em; }
  .legacy-verify-links { display: grid; }
}

/* v0.17 — lecteur de formations Vimeo */
.legacy-course-hero-compact { align-items: center; }
.legacy-course-hero-compact h1 { font-size: clamp(38px, 5vw, 66px); }

.course-learning-layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.course-outline {
  position: sticky;
  top: 102px;
  max-height: calc(100vh - 126px);
  overflow: auto;
  background: #fff;
  border: 1px solid #eaded8;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(39,27,22,.06);
}

.course-outline-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #eee4df;
}
.course-outline-head strong { font-size: 18px; }
.course-outline-head span { color: var(--muted); font-size: 12px; font-weight: 800; }

.course-section { border-bottom: 1px solid #f0e6e1; }
.course-section:last-child { border-bottom: 0; }
.course-section summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 15px 18px;
  font-weight: 850;
  line-height: 1.25;
}
.course-section summary::-webkit-details-marker { display: none; }
.course-section summary::after { content: '⌄'; color: var(--red); font-size: 18px; }
.course-section[open] summary::after { content: '⌃'; }
.course-section summary small { display: none; }
.course-section-lessons { padding: 0 8px 10px; }

.course-lesson-link {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 10px 11px 12px;
  margin: 2px 0;
  border-radius: 10px;
  color: #454a50;
  font-size: 13px;
  line-height: 1.3;
}
.course-lesson-link small { color: #92969b; font-size: 11px; white-space: nowrap; }
.course-lesson-link:hover { background: #fff5f4; color: var(--red); }
.course-lesson-link.is-active { background: var(--red-soft); color: var(--red-dark); font-weight: 850; box-shadow: inset 3px 0 0 var(--red); }
.course-lesson-link.is-active small { color: var(--red-dark); }

.course-player-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #eaded8;
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.course-player-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
}
.course-kicker { margin: 0 0 7px; color: var(--red); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.course-player-meta h2 { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.05; letter-spacing: -.03em; }
.course-progress-label { white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 800; padding-top: 5px; }

.course-video-frame { aspect-ratio: 16 / 9; background: #111; }
.course-video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.course-lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 22px;
}
.course-duration { color: var(--muted); font-size: 13px; }
.course-nav-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.course-nav-buttons .btn { min-height: 42px; padding-inline: 15px; font-size: 13px; }

@media (max-width: 980px) {
  .course-learning-layout { grid-template-columns: 1fr; }
  .course-outline { position: static; max-height: none; }
  .course-outline-head { position: static; }
  .course-player-card { order: -1; }
}

@media (max-width: 620px) {
  .legacy-course-hero-compact h1 { font-size: 38px; }
  .course-player-meta { flex-direction: column; padding: 20px; }
  .course-progress-label { padding-top: 0; }
  .course-lesson-footer { align-items: stretch; flex-direction: column; }
  .course-nav-buttons { display: grid; grid-template-columns: 1fr; }
  .course-nav-buttons .btn { width: 100%; }
}


/* v0.18 — TOAP + lecteur qui tient dans le viewport */
.legacy-course-page {
  padding-top: 24px;
  padding-bottom: 48px;
}
.legacy-course-page .legacy-back {
  margin-bottom: 12px;
}
.legacy-course-page .legacy-course-hero-compact {
  padding: 20px 24px;
  border-radius: 18px;
}
.legacy-course-page .legacy-course-hero-compact h1 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: .98;
}
.legacy-course-page .legacy-course-hero-compact p:not(.eyebrow) {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.legacy-course-page .legacy-course-hero-compact .eyebrow {
  margin-bottom: 7px;
}

#lesson-player {
  scroll-margin-top: 94px;
}

@media (min-width: 981px) {
  .course-learning-layout {
    margin-top: 16px;
    gap: 18px;
  }

  .course-outline {
    top: 94px;
    max-height: calc(100vh - 112px);
  }

  .course-player-card {
    position: sticky;
    top: 94px;
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
  }

  .course-player-meta {
    flex: 0 0 auto;
    padding: 14px 18px 12px;
  }

  .course-player-meta h2 {
    font-size: clamp(22px, 2.1vw, 31px);
  }

  .course-kicker {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .course-video-frame {
    flex: 1 1 auto;
    min-height: 0;
    height: clamp(250px, calc(100vh - 325px), 560px);
    aspect-ratio: auto;
  }

  .course-video-frame iframe {
    width: 100%;
    height: 100%;
  }

  .course-lesson-footer {
    flex: 0 0 auto;
    padding: 10px 14px 12px;
  }

  .course-nav-buttons .btn {
    min-height: 38px;
    padding-inline: 13px;
  }
}

@media (max-width: 980px) {
  #lesson-player { scroll-margin-top: 82px; }
  .legacy-course-page { padding-top: 18px; }
  .legacy-course-page .legacy-course-hero-compact { padding: 18px 20px; }
}

/* v0.22 — ressources jointes aux leçons */
.course-resources {
  flex: 0 0 auto;
  padding: 11px 14px 10px;
  border-top: 1px solid #eee4df;
  background: #fffaf8;
}
.course-resources-label {
  display: block;
  margin-bottom: 7px;
  color: #676b70;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.course-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.course-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #e4d7d1;
  border-radius: 9px;
  background: #fff;
  color: #34383d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.course-resource-link:hover {
  border-color: #edb4b7;
  background: #fff3f2;
  color: var(--red-dark);
}
.course-resource-link > span {
  color: var(--red);
  font-size: 14px;
  font-weight: 950;
}

@media (min-width: 981px) {
  .course-resources {
    max-height: 92px;
    overflow: auto;
  }
}

@media (max-width: 620px) {
  .course-resource-links { display: grid; grid-template-columns: 1fr; }
  .course-resource-link { width: 100%; }
}


/* v0.23 — ressources enrichies et mises en avant Film Rebellion Studio */
.course-resource-promos {
  display: grid;
  gap: 8px;
  margin-bottom: 9px;
}
.course-resource-promo {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #f0c5c5;
  border-radius: 11px;
  background: linear-gradient(135deg, #fff, #fff3f2);
}
.course-resource-promo strong {
  display: block;
  color: #23262a;
  font-size: 12px;
  font-weight: 950;
}
.course-resource-promo p {
  margin: 3px 0 0;
  color: #6d7075;
  font-size: 11px;
  line-height: 1.35;
}
.course-resource-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.course-resource-promo-link:hover { background: var(--red-dark); color: #fff; }
.course-resource-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 9px;
}
.course-resource-groups.is-single { grid-template-columns: 1fr; }
.course-resource-group {
  min-width: 0;
  padding: 9px;
  border: 1px solid #eaded8;
  border-radius: 10px;
  background: #fff;
}
.course-resource-group-title {
  display: block;
  margin: 0 0 7px;
  color: #35393e;
  font-size: 11px;
  font-weight: 950;
}
.course-resource-group-links {
  display: grid;
  gap: 6px;
}
.course-resource-group .course-resource-link {
  width: 100%;
  min-height: 31px;
  padding: 6px 8px;
  font-size: 11px;
}
.course-resource-note {
  margin: 7px 2px 0;
  color: #777b80;
  font-size: 10px;
  line-height: 1.35;
  font-style: italic;
}
@media (min-width: 981px) {
  .course-resources {
    max-height: 152px;
    overflow: auto;
    scrollbar-width: thin;
  }
}
@media (max-width: 720px) {
  .course-resource-promo { grid-template-columns: 1fr; }
  .course-resource-promo-link { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .course-resource-groups { grid-template-columns: 1fr; }
}

/* v0.23 final — fin de formation / écosystème Film Rebellion */
.course-ecosystem-cta { display: grid; gap: 8px; }
.course-ecosystem-intro { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.course-ecosystem-intro strong { color: #25282d; font-size: 12px; font-weight: 950; }
.course-ecosystem-intro span { color: #6e7277; font-size: 11px; }
.course-ecosystem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.course-ecosystem-grid a {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #eaded8;
  border-radius: 10px;
  background: #fff;
  color: #34383d;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.course-ecosystem-grid a:hover { transform: translateY(-1px); border-color: #edb4b7; background: #fff3f2; }
.course-ecosystem-grid a > span { display: inline-block; margin-right: 5px; font-size: 14px; }
.course-ecosystem-grid a strong { font-size: 11px; font-weight: 950; }
.course-ecosystem-grid a small { display: block; margin-top: 3px; color: #777b80; font-size: 9.5px; line-height: 1.25; }
@media (max-width: 720px) {
  .course-ecosystem-grid { grid-template-columns: 1fr; }
  .course-ecosystem-grid a { padding: 10px; }
  .course-ecosystem-grid a small { font-size: 10.5px; }
}

/* v0.25 — ressources sans scroll interne + démarrage Vimeo avec son */
.course-video-frame {
  position: relative;
}
.course-video-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.course-video-start[hidden] { display: none !important; }
.course-video-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.14));
  pointer-events: none;
}
.course-video-start-icon,
.course-video-start > span:last-child {
  position: relative;
  z-index: 1;
}
.course-video-start-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding-left: 4px;
  border-radius: 18px;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
  font-size: 24px;
}
.course-video-start > span:last-child {
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(20,20,20,.72);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}
.course-video-frame.is-playing .course-video-start { display: none; }

@media (min-width: 981px) {
  /* Une leçon riche en ressources utilise le scroll naturel de la page :
     aucun lien n'est enfermé dans un petit ascenseur interne. */
  .course-player-card:has(.course-resources) {
    position: relative;
    top: auto;
    max-height: none;
    overflow: hidden;
  }

  .course-player-card:has(.course-resources) .course-video-frame {
    flex: 0 0 auto;
    height: clamp(250px, 42vh, 460px);
  }

  .course-player-card:has(.course-resources) .course-resources {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .course-video-start-icon { width: 54px; height: 54px; border-radius: 16px; font-size: 21px; }
  .course-video-start > span:last-child { font-size: 12px; }
}
