/* ═══════════════════════════════════════════════════════════
   Médicap Formation — styles spécifiques (complète style.css)
   ═══════════════════════════════════════════════════════════ */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Header & footer plateforme ───────────────────────────── */
.fheader { position: sticky; top: 0; z-index: 50; background: rgba(6,29,62,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.fheader__inner { display: flex; align-items: center; gap: 26px; padding-block: 14px; }
.fheader__logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
.fheader__logo img { height: 40px; width: auto; display: block; filter: brightness(0) invert(1); }
.fheader__marque { color: var(--ice); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.fheader__menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.fheader__nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.fheader__nav a { color: var(--paper-70); text-decoration: none; font-size: 14.5px; padding: 6px 2px; }
.fheader__nav a:hover { color: var(--paper); }
.fheader__nav a.is-active { color: var(--ice); font-weight: 600; }
.fheader__site { color: var(--paper-55); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.fheader__site:hover { color: var(--ice); }
.ffooter { border-top: 1px solid var(--line); margin-top: 40px; }
.ffooter__inner { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; justify-content: space-between; padding-block: 26px; color: var(--paper-55); font-size: 14px; }
.ffooter__inner p { margin: 0; }
.ffooter__nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ffooter__nav a { color: var(--paper-70); text-decoration: none; }
.ffooter__nav a:hover { color: var(--ice); }
/* Burger : sous 900px la nav ne tient plus sur une ligne à côté du logo.
   Le panneau s'ouvre sous le header sticky ; js/formation.js pose
   .is-open sur .fheader et tient aria-expanded à jour. */
.fheader__burger { display: none; }
@media (max-width: 900px) {
  .fheader__inner { gap: 14px; padding-block: 12px; }
  .fheader__logo img { height: 36px; }
  .fheader__burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-left: auto; padding: 0 11px;
    background: transparent; border: 1.5px solid rgba(147,213,240,.3); border-radius: 12px; cursor: pointer;
  }
  .fheader__burger span { display: block; height: 2px; border-radius: 1px; background: var(--paper); transition: transform .25s ease, opacity .2s ease; }
  .fheader__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .fheader__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .fheader__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .fheader__menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 8px var(--pad-x) 20px;
    background: var(--navy); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .fheader.is-open .fheader__menu { display: flex; }
  .fheader__nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .fheader__nav a { padding: 14px 4px; font-size: 17px; text-align: center; border-bottom: 1px solid var(--line); }
  .fheader__site { padding: 16px 4px 4px; font-size: 15px; text-align: center; }
}
@media (max-width: 360px) {
  .fheader__marque { font-size: 11.5px; letter-spacing: .12em; }
}

/* ── Accueil : hero + progression globale ─────────────────── */
.formation-hero { padding: 60px 0 40px; }
.formation-hero__lead { margin: 20px 0 0; max-width: 620px; color: rgba(248,247,246,.82); font-size: 18.5px; font-weight: 300; line-height: 1.65; }

.progression { margin: 34px 0 0; max-width: 620px; }
.progression__bar { height: 10px; border-radius: 5px; background: rgba(147,213,240,.14); overflow: hidden; }
.progression__bar span { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--steel), var(--ice)); transition: width .6s ease; }
.progression__legende { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; color: var(--paper-70); font-size: 14.5px; }

/* ── Cartes modules ───────────────────────────────────────── */
.modules { padding: 40px 0 90px; }
.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .modules-grid { grid-template-columns: 1fr; } }
.module-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 30px 28px; border-radius: 18px; text-decoration: none;
  background: rgba(147,213,240,.05); border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.module-card:hover { transform: translateY(-4px); border-color: rgba(147,213,240,.4); }
.module-card__num { color: var(--ice); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.module-card__titre { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.35; }
.module-card__intro { margin: 0; color: var(--paper-70); font-size: 14.5px; font-weight: 300; line-height: 1.7; flex: 1; }
.module-card__bar { height: 6px; border-radius: 3px; background: rgba(147,213,240,.14); overflow: hidden; margin-top: 8px; }
.module-card__bar span { display: block; height: 100%; width: 0; background: var(--ice); transition: width .6s ease; }
.module-card__meta { color: var(--paper-55); font-size: 13.5px; }
.module-card__pct { color: var(--ice); font-weight: 600; }

/* ── Page leçon : layout + plan ───────────────────────────── */
.lecon { padding: 40px 0 90px; }
.lecon__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; align-items: start; }
.lecon__plan { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 6px; }
.lecon__plan-toggle { display: none; }
.lecon__nav { display: flex; flex-direction: column; }
.lecon__nav-accueil { color: var(--paper-55) !important; font-size: 13px !important; margin-bottom: 6px; }
.lecon__nav-module { margin: 18px 0 6px; color: var(--ice); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.lecon__nav-module:first-child { margin-top: 0; }
.lecon__nav-chap { margin: 10px 0 4px; color: var(--paper-55); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lecon__nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px; text-decoration: none;
  color: var(--paper-70); font-size: 14px; line-height: 1.4;
}
.lecon__nav a:hover { background: rgba(147,213,240,.08); color: var(--paper); }
.lecon__nav a.is-current { background: rgba(147,213,240,.12); color: var(--paper); font-weight: 600; }
.lecon__nav-coche {
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid rgba(147,213,240,.45); position: relative;
}
.lecon__nav a.is-done .lecon__nav-coche { background: var(--ice); border-color: var(--ice); }
.lecon__nav a.is-done .lecon__nav-coche::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: solid var(--navy);
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ── Page leçon : contenu ─────────────────────────────────── */
.lecon__titre { margin: 6px 0 22px; font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; line-height: 1.2; }
.lecon__video, .yt-facade, .yt-player {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; border-radius: 16px; background: var(--abyss);
}
.yt-facade { position: relative; overflow: hidden; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .25s ease, transform .4s ease; }
.yt-facade:hover img { opacity: 1; transform: scale(1.03); }
.yt-facade__play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--ice); box-shadow: 0 10px 36px rgba(147,213,240,.35);
}
.yt-facade__play svg { width: 34px; height: 34px; fill: var(--navy); margin-left: 4px; }
.yt-facade:hover .yt-facade__play { animation: heartbeat 1.8s ease-in-out infinite; }
.lecon__desc { margin: 22px 0 0; max-width: 62ch; color: var(--paper-70); font-weight: 300; line-height: 1.85; }
.lecon__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
#btnDone.is-done { border-color: var(--ice); color: var(--ice); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lecon { padding-top: 30px; }
  .lecon__layout { grid-template-columns: 1fr; gap: 20px; }
  .lecon__plan { position: static; max-height: none; }
  .lecon__plan-toggle {
    display: block; width: 100%; padding: 13px 18px;
    border: 1.5px solid rgba(147,213,240,.45); border-radius: 12px;
    background: transparent; color: var(--paper);
    font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
  }
  .lecon__plan-toggle::after { content: ' ▾'; }
  .lecon__plan-toggle[aria-expanded="true"]::after { content: ' ▴'; }
  .lecon__nav { display: none; margin-top: 12px; }
  .lecon__plan.is-open .lecon__nav { display: flex; }
}

/* ── Accueil : sections annexes ───────────────────────────── */
.presentiel, .app-medicap, .formation-contact { padding: 70px 0; }
.presentiel { background: rgba(147,213,240,.04); }
.app-medicap__stores, .formation-contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* App : carte claire avec le cœur Médicap */
.app-medicap__carte {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px; align-items: center;
  background: linear-gradient(135deg, var(--paper), var(--ice));
  border-radius: 24px; padding: 54px 58px;
}
.app-medicap__carte .body-lg--dark { margin-bottom: 0; }
.app-medicap__preview { width: clamp(220px, 26vw, 320px); border-radius: 18px; display: block; }
@media (max-width: 700px) {
  .app-medicap__carte { grid-template-columns: 1fr; gap: 26px; padding: 34px 28px; }
  .app-medicap__preview { width: 100%; max-width: 320px; margin-inline: auto; }
}

/* Contact : bloc centré pour casser la répétition */
.formation-contact { text-align: center; }
.formation-contact .body-lg { margin-inline: auto; }
.formation-contact__actions { justify-content: center; }

/* ── Visuels accueil ──────────────────────────────────────── */
.formation-hero__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: 48px; align-items: center; }
.formation-hero__visuel { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.formation-hero__visuel img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
}
.presentiel__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 48px; align-items: center; }
.presentiel__visuel img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); }
.module-card { overflow: hidden; }
.module-card__img { display: block; margin: -30px -28px 4px; }
.module-card__img img { width: 100%; height: 150px; object-fit: cover; display: block; }
.module-card__img--contain { background: var(--paper); }
.module-card__img--contain img { object-fit: contain; padding: 10px; }
@media (max-width: 900px) {
  .formation-hero__layout, .presentiel__layout { grid-template-columns: 1fr; }
  .formation-hero__visuel { order: -1; }
  .formation-hero__visuel img { aspect-ratio: 16 / 9; }
}

/* Visuel logo partenaire (formations complémentaires) */
.presentiel__visuel--logo {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2; padding: 40px;
  background: linear-gradient(135deg, var(--steel), #35598f);
  border: 1px solid var(--line); border-radius: 20px;
}
.presentiel__visuel--logo img {
  width: 78%; height: auto; border: 0; border-radius: 0;
  aspect-ratio: auto; object-fit: contain;
}

/* Contacts partenaire (formation en présentiel) */
.presentiel__contact { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }

/* ── Accueil mobile : texte centré partout ────────────────── */
@media (max-width: 900px) {
  .formation-hero { padding-top: 36px; }
  .formation-hero__texte { text-align: center; }
  .formation-hero .eyebrow { justify-content: center; font-size: 11.5px; letter-spacing: .16em; }
  .formation-hero .h-display { font-size: clamp(26px, 8.6vw, 44px); text-wrap: balance; }
  .formation-hero__lead, .progression { margin-inline: auto; }
  .progression__legende { flex-direction: column; gap: 16px; margin-top: 14px; }
  .progression__legende .btn { width: 100%; max-width: 360px; }
  .modules .h-section, .module-card { text-align: center; }
  .modules { padding-bottom: 70px; }
  .presentiel__layout > div:first-child { text-align: center; }
  .presentiel .body-lg { margin-inline: auto; }
  .presentiel__contact { justify-content: center; }
  .ffooter__inner { flex-direction: column; justify-content: center; text-align: center; }
  .ffooter__nav { justify-content: center; }
}
@media (max-width: 700px) {
  .app-medicap__carte { text-align: center; }
  .app-medicap__carte .body-lg { margin-inline: auto; }
  .app-medicap__stores { justify-content: center; }
}
@media (max-width: 370px) {
  .formation-hero .eyebrow::before { display: none; }
}
