/* ── Formations courtes (FR /fr/formations, EN /en/formations) ───────────────
   Une seule feuille pour toute la page : mêmes menu, couleurs et typographie que le reste de l'Académie
   (nuit #0a0a14, cyan #00d4ff, or #f59e0b ; DM Sans et DM Serif Display).
   Remplace les trois anciennes feuilles empilées de la page. */
:root { --bg: #0a0a14; --surface: #111125; --card: #161632; --cyan: #00d4ff; --gold: #f59e0b; --green: #10b981;
  --violet: #a855f7; --text: #e2e8f0; --muted: rgba(226,232,240,.62); --border: rgba(255,255,255,.07); }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(0,212,255,.25); color: #fff; }

/* ── Menu (identique aux autres pages de l'Académie) ── */
nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 48px; background: rgba(10,10,20,.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-logo { font-family: Arial, 'Arial Black', sans-serif; font-weight: 900; letter-spacing: 4px; font-size: 22px; display: flex; align-items: center; }
.nav-logo .logo-data { color: #fff; }
.nav-logo .logo-sai { color: var(--cyan); }
.nav-links { list-style: none; display: flex; gap: 28px; align-items: center; }
.nav-links a { color: rgba(255,255,255,.7); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-cta { background: transparent; border: 1px solid var(--cyan); color: var(--cyan); padding: 10px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .3s; white-space: nowrap; }
.nav-cta:hover { background: var(--cyan); color: #0a0a14; }
.nav-user { display: none; align-items: center; gap: 14px; }
.nav-user b { color: var(--cyan); font-weight: 600; }
.nav-user a, .nav-user button { color: var(--cyan); font-size: 13px; background: rgba(0,212,255,.1); border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.nav-user-btn { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.06); }
#nav-auth-area span { font-size: 13px !important; }
#nav-auth-area .nav-cta { padding: 8px 14px !important; font-size: 13px !important; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* Bandeau « email vérifié » */
.verified-banner { display: none; align-items: center; gap: 12px; padding: 14px 48px; background: rgba(16,185,129,.1);
  border-bottom: 1px solid rgba(16,185,129,.3); color: #a7f3d0; font-size: 14px; }
.verified-banner.visible { display: flex; }

/* ── En-tête ── */
.fm-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px; align-items: center; padding: 72px max(48px, calc((100vw - 1200px) / 2 + 48px)) 88px; min-height: min(80vh, 760px);
  background: radial-gradient(900px 520px at 75% 40%, rgba(0,212,255,.10), transparent 70%), #0a0a14; }
.fm-hero.ds-mirage-actif { background: #0a0a14; }
.fm-hero .ds-mirage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.fm-hero > .am-decor { display: none; }
.fm-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,10,20,.5), rgba(10,10,20,0) 55%), linear-gradient(0deg, #0a0a14, rgba(10,10,20,0) 20%); }
.fm-hero .ds-etincelles { z-index: 2 !important; }
.fm-hero .hero-texte, .fm-visuel { position: relative; z-index: 3; }
.fm-sur { font-size: 15px; font-weight: 600; color: var(--gold); margin-bottom: 16px; }
.fm-hero h1 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; color: #fff; font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1.05; letter-spacing: -.012em; margin-bottom: 22px; }
.fm-hero h1 em { font-style: italic; color: var(--cyan); text-shadow: 0 0 28px rgba(0,212,255,.4); }
.fm-hero .hero-sub { font-size: 18px; line-height: 1.65; color: rgba(226,232,240,.76); max-width: 34em; margin-bottom: 30px; }
.fm-hero .hero-sub strong { color: #fff; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-bottom: 40px; }
.fm-btn { display: inline-flex; align-items: center; padding: 16px 28px; border-radius: 12px; background: var(--cyan); color: #0a0a14 !important;
  font-size: 16px; font-weight: 700; box-shadow: 0 14px 34px rgba(0,212,255,.22); transition: transform .2s, box-shadow .2s; }
.fm-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(0,212,255,.32); }
.fm-lien { color: #fff !important; font-size: 16px; font-weight: 600; padding: 6px 0; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1px no-repeat; }
.fm-lien:hover { color: var(--gold) !important; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats > div { border-top: 1px solid rgba(0,212,255,.4); padding-top: 12px; min-width: 96px; }
.hero-stat-num { font-family: 'DM Serif Display', Georgia, serif; font-size: 40px; line-height: 1; color: #fff; }
.hero-stat-label { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Illustration : une pile de cartes de cours qui flottent */
.fm-visuel { position: relative; height: 440px; perspective: 1000px; }
.fm-pile { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .2s ease-out; }
.fm-mini { position: absolute; width: min(340px, 82%); padding: 18px 20px; border-radius: 16px; background: rgba(17,17,37,.92);
  border: 1px solid rgba(255,255,255,.09); box-shadow: 0 30px 70px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.fm-mini small { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.fm-mini b { display: block; font-size: 16px; color: #fff; }
.fm-mini.m1 { top: 6%; left: 4%; animation: fm-flotte 7s ease-in-out infinite; }
.fm-mini.m2 { top: 38%; right: 0; animation: fm-flotte 8s ease-in-out -2.5s infinite; border-color: rgba(16,185,129,.35); }
.fm-mini.m3 { bottom: 4%; left: 12%; animation: fm-flotte 9s ease-in-out -5s infinite; border-color: rgba(245,158,11,.35); }
@keyframes fm-flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.fm-barre { margin-top: 14px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.fm-barre i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), #7dd3fc);
  box-shadow: 0 0 12px rgba(0,212,255,.6); transition: width 2.2s cubic-bezier(.65,0,.35,1) .9s; }
.fm-pret .fm-barre i { width: 72%; }
.fm-mini .fm-pct { position: absolute; top: 18px; right: 20px; font-weight: 700; color: var(--cyan); }
.fm-ok { display: flex; align-items: center; gap: 12px; }
.fm-ok i { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); display: grid; place-items: center; color: #0a0a14; font-style: normal; font-weight: 800; }
.fm-ok svg { width: 18px; height: 18px; }
.fm-ok svg path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s ease 1.6s; }
.fm-pret .fm-ok svg path { stroke-dashoffset: 0; }

/* ── Filtres ── */
.formations-filters { max-width: 1200px; margin: 0 auto; padding: 72px 48px 28px; scroll-margin-top: 80px; }
.filters-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(30px, 3.2vw, 44px); color: #fff; margin-bottom: 10px; }
.filters-title em { font-style: italic; color: var(--cyan); }
.filters-hint { font-size: 16.5px; color: var(--muted); max-width: 44em; margin-bottom: 28px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn { padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03);
  color: rgba(226,232,240,.82); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: all .25s; }
.filter-btn:hover { border-color: rgba(0,212,255,.6); color: #fff; transform: translateY(-1px); }
.filter-btn.active { background: var(--cyan); border-color: var(--cyan); color: #0a0a14; box-shadow: 0 8px 24px rgba(0,212,255,.3); }
.filter-btn:focus-visible, .fm-carte button:focus-visible, .fm-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.filter-select-wrap { display: none; }
.filter-select-wrap label { display: block; font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.filter-select { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: var(--surface); color: #fff; font-size: 16px; }
.filters-count { margin-top: 18px; font-size: 14.5px; color: var(--muted); }

/* ── Catalogue ── */
.formations-grid, .coming-grid { max-width: 1200px; margin: 0 auto; padding: 8px 48px 96px; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.coming-section { padding-top: 8px; }
.coming-section::before { content: attr(data-titre); display: block; max-width: 1200px; margin: 0 auto 22px; padding: 0 48px;
  font-family: 'DM Serif Display', Georgia, serif; font-size: 32px; color: #fff; }
.fm-carte { --acc: var(--cyan); position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); overflow: hidden; isolation: isolate;
  transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .35s; transform-style: preserve-3d; }
.fm-carte::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--acc) 22%, transparent), transparent 60%); }
.fm-carte::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--acc), transparent); }
.fm-carte:hover { border-color: color-mix(in srgb, var(--acc) 55%, transparent); box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--acc) 25%, transparent); }
.fm-carte:hover::before { opacity: 1; }
.fm-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.fm-icone { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px;
  background: color-mix(in srgb, var(--acc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.fm-carte:hover .fm-icone { transform: scale(1.08) rotate(-4deg); }
.fm-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.fm-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: rgba(226,232,240,.85); }
.fm-badge.gratuit { background: rgba(16,185,129,.16); color: #6ee7b7; }
.fm-badge.premium { background: rgba(0,212,255,.14); color: #7dd3fc; }
.fm-badge.bientot { background: rgba(245,158,11,.16); color: #fcd34d; }
.fm-cat { font-size: 13px; font-weight: 600; color: var(--acc); margin-bottom: 6px; }
.fm-titre { font-size: 19px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 10px; }
.fm-desc { font-size: 14.5px; line-height: 1.6; color: var(--muted); flex: 1; margin-bottom: 18px; }
.fm-live { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: #7dd3fc; background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.22); }
.fm-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; border-top: 1px solid var(--border); margin-bottom: 18px; font-size: 13.5px; font-weight: 600; color: rgba(226,232,240,.85); }
.fm-meta .card-rating { color: var(--gold); }
.fm-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-price { font-size: 22px; font-weight: 800; color: #fff; }
.card-price.free { font-size: 16px; color: #6ee7b7; }
.card-price.coming { font-size: 14px; color: #fcd34d; }
.card-price.sur-demande { font-size: 14.5px; color: #7dd3fc; }
.card-cta { padding: 12px 18px; border-radius: 10px; border: 0; background: var(--cyan); color: #0a0a14; font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s; }
.card-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,212,255,.35); }
.card-cta.coming-cta { background: transparent; border: 1px solid rgba(245,158,11,.55); color: #fcd34d; }
.card-cta.coming-cta:hover { background: rgba(245,158,11,.12); box-shadow: none; }
.card-progress { margin-bottom: 14px; }
.card-progress-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.card-progress-pct { color: var(--cyan); }
.progress-bar-track { height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); border-radius: inherit; transition: width .8s ease; }
.card-last-module { font-size: 13px; color: #fcd34d; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); padding: 7px 10px; border-radius: 8px; margin-bottom: 14px; }

/* Entrée des cartes (à l'affichage et à chaque changement de filtre) */
.fm-carte.fm-cache { opacity: 0; translate: 0 28px; scale: .96; filter: blur(4px); }
.fm-carte.fm-entre { transition: opacity .55s ease, translate .7s cubic-bezier(.16,1,.3,1), scale .7s cubic-bezier(.16,1,.3,1), filter .5s ease,
  transform .35s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .35s; transition-delay: calc(var(--i, 0) * 55ms); }

.formations-loading, .filters-empty { grid-column: 1 / -1; padding: 64px 0; text-align: center; color: var(--muted); }
.loading-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); animation: fm-points 1.2s ease infinite; }
.loading-dots span:nth-child(2) { animation-delay: .2s; } .loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes fm-points { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }

/* ── Pied de page ── */
footer { background: #05050a; border-top: 1px solid var(--border); padding: 48px; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: Arial, sans-serif; font-weight: 900; letter-spacing: 4px; font-size: 18px; }
.footer-logo .logo-data { color: #fff; } .footer-logo .logo-sai { color: var(--cyan); }
.footer-copy { color: var(--muted); font-size: 13px; }

/* ── Fenêtre de connexion (repris de l'accueil de l'Académie) ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(8px); z-index: 200; display: none; justify-content: center; align-items: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: #141428; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 48px; max-width: 460px; width: 100%; position: relative; max-height: 92vh; overflow-y: auto; }
.modal-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: rgba(255,255,255,.4); font-size: 24px; cursor: pointer; }
.modal-close:hover { color: var(--cyan); }
.modal-tabs { display: flex; margin-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.08); }
.modal-tab { flex: 1; background: none; border: none; border-bottom: 2px solid transparent; color: rgba(255,255,255,.45); padding: 12px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.modal-tab.active { color: var(--cyan); border-color: var(--cyan); }
.modal-pane { display: none; } .modal-pane.active { display: block; }
.modal-title { font-family: 'DM Serif Display', serif; font-size: 24px; color: #fff; margin-bottom: 6px; }
.modal-sub { font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 24px; line-height: 1.6; }
.modal-msg { font-size: 13px; padding: 10px 14px; margin-bottom: 16px; display: none; border-radius: 10px; }
.modal-msg.visible { display: block; }
.modal-msg.error { background: rgba(255,80,80,.1); border: 1px solid rgba(255,80,80,.25); color: #ff8a8a; }
.modal-msg.success { background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.25); color: var(--cyan); }
.form-group { margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; color: #fff; display: block; margin-bottom: 8px; }
.form-input { width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 13px 14px;
  color: #fff; font-family: 'DM Sans', sans-serif; font-size: 15px; outline: none; transition: border-color .2s; }
.form-input:focus { border-color: rgba(0,212,255,.5); }
.form-input option, .form-input optgroup { background: #141428; color: #fff; }
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { font-size: 12px; color: #ff8a8a; margin-top: 4px; display: none; } .form-error.visible { display: block; }
.form-submit { width: 100%; background: var(--cyan); color: #0a0a14; border: none; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700;
  padding: 14px; border-radius: 10px; cursor: pointer; margin-top: 4px; }
.form-submit:hover { background: #33ddff; } .form-submit:disabled { opacity: .5; cursor: not-allowed; }
.resend-link { font-size: 13px; color: var(--cyan); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s; display: block; margin-top: 12px; text-align: center; }
.resend-link.visible { opacity: 1; pointer-events: auto; }

/* ── Catalogue sur fond blanc : les cartes sombres et leurs couleurs ressortent ── */
body { background: #f5f7fb; }
.formations-filters .filters-title { color: #0f1523; }
.formations-filters .filters-hint { color: #4a5468; }
.filter-btn { background: #fff; border-color: rgba(15,21,35,.14); color: #1f2a3d; box-shadow: 0 1px 2px rgba(15,21,35,.05); }
.filter-btn:hover { border-color: #00b8dd; color: #0f1523; }
.filter-btn.active { background: #00d4ff; border-color: #00d4ff; color: #0a0a14; box-shadow: 0 8px 22px rgba(0,180,220,.28); }
.filter-btn:focus-visible { outline-color: #0f1523; }
.filter-select-wrap label { color: #0f1523; }
.filter-select { background: #fff; color: #0f1523; border-color: rgba(15,21,35,.18); }
.filters-count { color: #5a6478; }
.coming-section::before { color: #0f1523; }
.formations-loading, .filters-empty { color: #5a6478; }
.fm-carte { box-shadow: 0 10px 30px rgba(15,21,35,.14); border-color: rgba(15,21,35,.08); }
.fm-carte:hover { box-shadow: 0 26px 60px rgba(15,21,35,.28), 0 0 0 1px color-mix(in srgb, var(--acc) 35%, transparent); }
.fm-hero { border-bottom: 1px solid rgba(0,212,255,.15); }

/* ── Écrans moyens et téléphones ── */
@media (max-width: 1100px) {
  .formations-grid, .coming-grid { grid-template-columns: 1fr 1fr; }
  .fm-hero { grid-template-columns: 1fr; }
  .fm-visuel { height: 360px; max-width: 560px; }
}
@media (max-width: 900px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; position: fixed; top: 57px; left: 0; right: 0; background: rgba(10,10,20,.98); flex-direction: column; align-items: flex-start;
    padding: 24px 20px; gap: 20px; z-index: 998; border-bottom: 1px solid rgba(0,212,255,.15); }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .nav-right { display: none; }
  .fm-hero { padding: 40px 20px 56px; min-height: 0; gap: 28px; }
  .fm-btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 18px 24px; flex-wrap: wrap; }
  .hero-stats > div { min-width: 0; }
  .fm-visuel { height: 320px; }
  .formations-filters { padding: 56px 20px 20px; }
  .filters-row { display: none; }
  .filter-select-wrap { display: block; }
  .formations-grid, .coming-grid { grid-template-columns: 1fr; padding: 8px 20px 64px; }
  .coming-section::before { padding: 0 20px; }
  footer { flex-direction: column; gap: 16px; text-align: center; padding: 32px 24px; }
  .verified-banner { padding: 14px 20px; }
  .modal-box { padding: 32px 20px; margin: 16px; }
  .form-row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fm-ok svg path { transition: none; stroke-dashoffset: 0; }
  .fm-mini { animation: none; }
  .fm-carte.fm-cache { opacity: 1; translate: none; scale: none; filter: none; }
  .fm-barre i { transition: none; }
}
