/* formations.arthurvillecourt.com · refonte du 2026-11-24
   La CSP interdit les style="" : aucune valeur dynamique en ligne, les progressions passent par <progress>. */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --raised: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --hair: #e8e8ed;
  --track: #e3e3e8;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #ffffff;
  --link: #0066cc;
  --ok: #248a3d;
  --ok-bg: #e3f5e8;
  --err: #d70015;
  --err-bg: #fdecee;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --glass: #f5f5f7cc;
  --shadow-sm: 0 1px 2px #0000000a, 0 2px 8px #0000000a;
  --shadow: 0 2px 6px #0000000a, 0 12px 32px #00000012;
  --shadow-lg: 0 8px 24px #0000001a, 0 24px 64px #0000001f;
  --radius: 18px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --spring: cubic-bezier(.2, .9, .3, 1.15);
  /* anciens noms, utilisés par l'admin */
  --paper: var(--bg);
  --card: var(--surface);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --raised: #2c2c2e;
    --ink: #f5f5f7;
    --ink-2: #d1d1d6;
    --muted: #98989d;
    --line: #3a3a3c;
    --hair: #2c2c2e;
    --track: #3a3a3c;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --link: #2997ff;
    --ok: #30d158;
    --ok-bg: #0f2a17;
    --err: #ff453a;
    --err-bg: #2c1210;
    --warn: #ffd60a;
    --warn-bg: #2e2706;
    --glass: #161617cc;
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: 0 24px 64px #00000099;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss03";
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif; }
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.07; letter-spacing: -.028em; font-weight: 700; margin: 0 0 .4em; }
h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; margin: 0 0 .5em; }
h3 { font-size: 1rem; letter-spacing: -.01em; margin: 1.2em 0 .4em; font-weight: 600; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
code { font-size: .88em; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.lead { color: var(--ink-2); font-size: 1.12rem; line-height: 1.45; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 0 0 .4em; }
.eyebrow.accent { color: var(--accent); }
.ico { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -.15em; }

/* ---------- En-tête translucide ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top-in { max-width: 980px; height: 56px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.top-in.wide { max-width: 1200px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 1.05rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a { color: var(--ink-2); padding: 7px 12px; border-radius: 99px; font-size: .9rem; transition: background .2s var(--ease), color .2s var(--ease); }
.nav a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--ink); font-weight: 600; }
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: 6px; padding: 0 !important;
  border-radius: 50%; background: linear-gradient(160deg, #4f8dfd, #2a3fd6); color: #fff !important;
  font-weight: 600; font-size: .85rem; letter-spacing: 0;
}
.avatar.xl { width: 64px; height: 64px; font-size: 1.6rem; margin: 0; flex: none; }

/* ---------- Logo animé (le triangle s'envole) ---------- */
.mark { position: relative; display: block; width: 36px; height: 36px; flex: none; }
.mark-base { display: block; width: 36px; height: 36px; filter: drop-shadow(0 1px 2px #0002); }
.mark-play, .mark-trail i {
  position: absolute; top: 0; left: 0;
  offset-path: path("M18.6 17.9L17.49 16.9C10.73 10.82 12.29 2.33 19.59 -3.3C26.88 -8.92 38.27 -8.56 45.02 -2.47C51.78 3.6 51.33 13.1 44.04 18.73C36.74 24.35 26.47 24.98 19.71 18.9L18.6 17.9");
  offset-rotate: 0deg;
}
.mark-play { width: 7px; height: 7.7px; offset-distance: 0%; z-index: 2; }
.mark-play svg { display: block; width: 100%; height: 100%; }
.mark-trail { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 1; }
.mark-trail i { width: 3px; height: 1.6px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 55%, transparent); offset-rotate: auto; }
.mark-trail i:nth-child(1) { offset-distance: 5%; --at: .144; }
.mark-trail i:nth-child(2) { offset-distance: 15%; --at: .253; }
.mark-trail i:nth-child(3) { offset-distance: 25%; --at: .333; }
.mark-trail i:nth-child(4) { offset-distance: 35%; --at: .403; }
.mark-trail i:nth-child(5) { offset-distance: 45%; --at: .468; }
.mark-trail i:nth-child(6) { offset-distance: 55%; --at: .532; }
.mark-trail i:nth-child(7) { offset-distance: 65%; --at: .597; }
.mark-trail i:nth-child(8) { offset-distance: 75%; --at: .667; }
.mark-trail i:nth-child(9) { offset-distance: 85%; --at: .747; }
.mark-trail i:nth-child(10) { offset-distance: 95%; --at: .856; }
@keyframes mark-loop { to { offset-distance: 100%; } }
@keyframes mark-lift { 50% { transform: scale(1.35); } }
@keyframes mark-dash-in { from { opacity: 0; } }
@keyframes mark-trail-fade { to { opacity: 0; } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .brand { --flight: 1.4s; }
  .brand[data-flying] .mark-play { animation: var(--flight) cubic-bezier(.37, 0, .63, 1) both; animation-name: mark-loop, mark-lift; }
  .brand[data-flying] .mark-trail { opacity: 1; animation: .7s cubic-bezier(0, 0, .2, 1) 2.1s forwards mark-trail-fade; }
  .brand[data-flying] .mark-trail i { animation: mark-dash-in .2s cubic-bezier(.23, 1, .32, 1) calc(var(--at) * var(--flight)) both; }
}

/* ---------- Mise en page ---------- */
main { width: 100%; max-width: 980px; margin: 0 auto; padding: 40px 16px 80px; flex: 1; }
main.wide { max-width: 1200px; }
main.bare { display: grid; align-items: center; padding-top: 24px; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 24px 16px 32px; }
.foot p { margin: 0; }
.page-head { margin-bottom: 28px; }
.page-head h1 { margin: 0; }
.crumbs { margin: 0 0 .3em; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: .95rem; margin: -8px 0 20px -4px; padding: 4px 8px 4px 4px; border-radius: 99px; }
.facts { color: var(--muted); font-size: .98rem; margin: 0 0 1em; }

/* ---------- Boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); border: 0;
  font: inherit; font-weight: 600; font-size: .95rem; letter-spacing: -.01em; line-height: 1.2;
  cursor: pointer; text-decoration: none !important;
  transition: background .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn .ico { width: 1em; height: 1em; }
.btn.ghost { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.btn.ghost.on-dark { background: #ffffff26; color: #fff; }
.btn.ghost.on-dark:hover { background: #ffffff40; }
.btn.small { min-height: 34px; padding: 6px 14px; font-size: .85rem; }
.btn.danger { background: var(--err); color: #fff; }
.btn.wide { width: 100%; }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.05rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .85rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.stack > label:not(.check) { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.stack input:not([type=checkbox]):not([type=file]), .stack select, .stack textarea { width: 100%; }
.narrow { max-width: 520px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; width: 100%; display: flex; flex-direction: column; gap: 6px; }
legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.flash { padding: 12px 16px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-size: .95rem; }
.flash.error, .error { background: var(--err-bg); color: var(--err); }
li.error { background: none; }
.notice { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.notice p { margin: .3em 0; }

/* ---------- Progression ---------- */
progress.meter, progress.bar {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 99px;
  background: var(--track); color: var(--accent); overflow: hidden;
}
progress.meter::-webkit-progress-bar, progress.bar::-webkit-progress-bar { background: var(--track); border-radius: 99px; }
progress.meter::-webkit-progress-value, progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; transition: width .6s var(--ease); }
progress.meter::-moz-progress-bar, progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
progress.bar { display: inline-block; width: 72px; height: 6px; vertical-align: middle; }

/* ---------- Connexion ---------- */
.auth { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-card { background: var(--surface); border-radius: 28px; padding: 40px 32px 32px; box-shadow: var(--shadow); text-align: center; }
.auth-card h1 { font-size: 1.9rem; margin-top: 18px; }
.auth-card .lead { font-size: 1.02rem; }
.auth-logo { width: 64px; height: 64px; display: block; margin: 0 auto; filter: drop-shadow(0 6px 14px #0b3ad04d); }
.auth-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-top: 18px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.auth-ico .ico { width: 28px; height: 28px; }
.auth-ico + h1 { margin-top: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.auth-form input { width: 100%; text-align: center; min-height: 50px; }
.auth-card .btn { margin-top: 4px; }
.auth-card .flash { text-align: left; }

/* ---------- Accueil ---------- */
.resume {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 0;
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 48px;
  color: var(--ink); box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.resume:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.resume-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.resume-art .cover { transition: transform .6s var(--ease); }
.resume:hover .resume-art .cover { transform: scale(1.03); }
.play {
  position: absolute; left: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: #0000004d;
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  transition: transform .3s var(--spring), background .3s var(--ease);
}
.play .ico { width: 26px; height: 26px; margin-left: 3px; }
.resume:hover .play { transform: scale(1.08); background: #00000066; }
.resume-body { padding: 28px 36px; }
.resume-body h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); letter-spacing: -.025em; margin-bottom: .25em; }
.resume-body .meter { margin-top: 18px; max-width: 360px; }
.resume-body .small { margin-top: 8px; }
.resume-body .btn { margin-top: 10px; }
.shelf { margin-bottom: 44px; }
.shelf-title { font-size: 1.45rem; letter-spacing: -.025em; margin-bottom: 16px; }
.posters { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.poster { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.poster:hover { text-decoration: none; }
.art { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm); transition: box-shadow .35s var(--ease), transform .35s var(--ease); isolation: isolate; }
.poster:hover .art { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.art .cover { position: absolute; inset: 0; transition: transform .6s var(--ease); }
.poster:hover .art .cover { transform: scale(1.045); }
.veil { position: absolute; inset: 0; background: linear-gradient(to top, #000000b3 0%, #00000040 38%, #00000000 62%); }
.art-title { position: absolute; left: 18px; right: 18px; bottom: 14px; margin: 0; color: #fff; font-size: 1.22rem; line-height: 1.18; letter-spacing: -.022em; font-weight: 700; text-shadow: 0 1px 12px #0006; text-wrap: balance; }
.badge { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; color: #fff; background: #0000004d; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.poster-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; color: var(--muted); padding: 0 2px; }
.poster-meta .pct { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.poster .meter { height: 3px; margin: -2px 2px 0; width: auto; }
.cover-fallback { background: linear-gradient(135deg, #5e5ce6, #0a84ff); }
.cover-fallback.hue-1 { background: linear-gradient(135deg, #ff375f, #ff9f0a); }
.cover-fallback.hue-2 { background: linear-gradient(135deg, #30d158, #0a84ff); }
.cover-fallback.hue-3 { background: linear-gradient(135deg, #bf5af2, #5e5ce6); }
.cover-fallback.hue-4 { background: linear-gradient(135deg, #ff9f0a, #ffd60a); }
.cover-fallback.hue-5 { background: linear-gradient(135deg, #64d2ff, #5e5ce6); }
.empty { background: var(--surface); border-radius: var(--radius-lg); padding: 40px 32px; text-align: center; max-width: 560px; margin: 0 auto; box-shadow: var(--shadow-sm); }

/* ---------- Formation ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 56px; }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-lg); background: var(--surface-2); }
.hero-body h1 { text-wrap: balance; }
.hero-progress { max-width: 380px; margin: 4px 0 24px; }
.hero-progress .small { margin-top: 8px; }
.hero-cta .small { margin-top: 12px; }
.syllabus { max-width: 860px; }

.module { background: var(--surface); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.module > summary { display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer; list-style: none; user-select: none; }
.module > summary::-webkit-details-marker { display: none; }
.module > summary:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.mod-head { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mod-n { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mod-t { font-weight: 600; font-size: 1.05rem; letter-spacing: -.015em; }
.mod-c { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mod-c.ok { color: var(--ok); font-weight: 600; }
.chev { color: var(--muted); transition: transform .25s var(--ease); }
details[open] > summary .chev { transform: rotate(90deg); }
.rows { list-style: none; margin: 0; padding: 0 10px 10px; }
.rows a { display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink); line-height: 1.35; transition: background .15s var(--ease); }
.rows a:hover { background: var(--surface-2); text-decoration: none; }
.rows .current a { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rows .current .row-t { font-weight: 600; color: var(--accent); }
.row-n { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.row-d { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.done .row-t { color: var(--ink-2); }
.tick { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-block; flex: none; transition: background .25s var(--ease), border-color .25s var(--ease); }
.done > a .tick, .is-done .tick { background: var(--ok); border-color: var(--ok); }
.done > a .tick::after, .is-done .tick::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tick.pop { animation: pop .45s var(--spring); }
@keyframes pop { 40% { transform: scale(1.3); } }

/* ---------- Leçon ---------- */
.lesson-grid { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.player { position: relative; background: #000; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 26px; box-shadow: var(--shadow-lg); }
.player video { width: 100%; height: 100%; display: block; }
.upnext {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 24px; color: #fff; background: #000000a6; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: fade-in .35s var(--ease);
}
.upnext[hidden] { display: none; }
.upnext .eyebrow { color: #ffffffb3; }
.upnext-title { font-size: clamp(1.2rem, 1rem + 1.4vw, 1.9rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; max-width: 640px; margin-bottom: 22px; text-wrap: balance; }
.upnext-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@keyframes fade-in { from { opacity: 0; } }
.lesson-head h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); margin-bottom: .2em; text-wrap: balance; }
.prose { font-size: 1.06rem; line-height: 1.6; max-width: 68ch; overflow-wrap: anywhere; color: var(--ink-2); margin-top: 8px; }
.prose p { margin: 0 0 1em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose strong { color: var(--ink); }
.prose pre { background: var(--surface); padding: 14px 16px; border-radius: 14px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose .cta { margin: 1.4em 0; }
.prose .btn { color: var(--accent-ink); }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.2em; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.files { margin-top: 32px; }
.files h2 { font-size: 1.15rem; }
.files ul { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.files li + li { border-top: 1px solid var(--hair); }
.files a { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--ink); }
.files a:hover { background: var(--surface-2); text-decoration: none; }
.files a > .ico { color: var(--accent); }
.file-kind { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.file-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; font-weight: 500; }
.lesson-actions { margin-top: 36px; display: flex; flex-direction: column; gap: 22px; }
.done-btn .tick { border-color: #ffffffb3; width: 18px; height: 18px; }
.done-btn.is-done .tick { border-color: var(--ok); }
.done-btn.is-done .tick::after { left: 5px; top: 2px; width: 4px; height: 9px; }
.undo { color: var(--muted); font-weight: 500; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.pager-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.pager-card .eyebrow { margin: 0; }
.pager-card.next { text-align: right; grid-column: 2; }
.pager-card.next .eyebrow { color: var(--accent); }
.pager-t { font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.side { position: sticky; top: 76px; }
.side-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.side-box > summary { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; cursor: pointer; list-style: none; }
.side-box > summary::-webkit-details-marker { display: none; }
.side-box > summary > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-title { font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.side-box > .meter { margin: 0 18px 10px; width: auto; }
.side-scroll { max-height: calc(100vh - 220px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 8px; border-top: 1px solid var(--hair); }
.side .module { box-shadow: none; margin: 0; border-radius: 0; background: none; }
.side .module > summary { padding: 12px 18px; }
.side .mod-t { font-size: .92rem; }
.side .rows { padding: 0 6px 6px; }
.side .rows a { grid-template-columns: 20px minmax(0, 1fr) auto; font-size: .9rem; padding: 9px 12px; }
.side .row-n { display: none; }
.side .tick { width: 18px; height: 18px; }
.side .done > a .tick::after { left: 5px; top: 2px; width: 4px; height: 9px; }

/* ---------- Compte ---------- */
.account-card { display: flex; align-items: center; gap: 18px; background: var(--surface); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); max-width: 560px; margin-bottom: 16px; }
.account-card p { margin: 0; overflow-wrap: anywhere; }
.account-name { font-weight: 650; font-size: 1.15rem; letter-spacing: -.015em; }
.p-account main > .small { max-width: 560px; }

/* ---------- Admin (hérite des tokens) ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.stats { list-style: none; padding: 0; margin: 0 0 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.stats li { background: var(--surface); border-radius: 14px; padding: 12px 18px; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.stats strong { color: var(--ink); font-size: 1.2rem; margin-right: 4px; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; min-width: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-row td { font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.tag { display: inline-block; font-size: .72rem; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--err-bg); color: var(--err); }
.panel { background: var(--surface); border-radius: var(--radius); padding: 22px; margin: 20px 0; box-shadow: var(--shadow-sm); }
.panel.danger { box-shadow: inset 0 0 0 1px var(--err-bg); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.copy { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 24px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.inline-edit { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.inline-edit:last-child { border-bottom: 0; }
.inline-edit input[name=title] { flex: 1; min-width: 200px; padding: 6px 10px; }
.inline-edit .check input { margin-top: 2px; }
.filters { flex-wrap: wrap; }
.filters select { width: auto; }
.days { display: flex; gap: 6px; align-items: flex-end; height: 140px; padding-top: 8px; }
.day { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.day-bar { width: 100%; max-width: 28px; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.day-n { font-size: 12px; font-variant-numeric: tabular-nums; }
.day-d { font-size: 11px; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--hair); }
.timeline li:last-child { border-bottom: 0; }
.p-admin .pager, main.wide > .pager { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Adaptatif ---------- */
@media (max-width: 1020px) {
  .lesson-grid { grid-template-columns: 1fr; gap: 24px; }
  .side { position: static; order: 2; }
  .side-scroll { max-height: 60vh; }
}
@media (max-width: 820px) {
  .resume { grid-template-columns: 1fr; }
  .resume-body { padding: 22px 22px 26px; }
  .hero { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding-top: 24px; }
  .nav a:not(.avatar) { padding: 7px 9px; font-size: .85rem; }
  .nav a[href="/"] { display: none; } /* le logo mène déjà à « Mes formations » */
  .player { margin-left: -16px; margin-right: -16px; border-radius: 0; }
  .upnext-title { margin-bottom: 14px; }
  .auth-card { padding: 32px 20px 24px; border-radius: 24px; }
  .hero-cta .btn, .done-btn { width: 100%; }
  .pager { grid-template-columns: 1fr; }
  .pager-card.next { grid-column: auto; }
  .rows a { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .rows .row-n { display: none; }
  .module > summary { padding: 16px 16px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: 10px; }
  .art-title { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
