/* L'Atelier — feuille de style
   Direction : carnet de croquis. Papier chaud, encre, accent terre cuite. */

:root {
  --paper: #f5f0e6;
  --paper-2: #ece5d6;
  --card: #fffdf8;
  --ink: #1f1c18;
  --ink-2: #4a443c;
  --muted: #8a8174;
  --line: #ddd4c3;
  --accent: #c8553d;
  --accent-ink: #9e3d29;
  --ok: #4f7a43;
  --warn: #b7862b;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(31, 28, 24, .04), 0 8px 24px -12px rgba(31, 28, 24, .18);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-variation-settings: 'opsz' 120; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
em.hand { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }

/* ---------- Navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 240, 230, .97);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: .25rem; }
.nav a {
  padding: .45rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .94rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .4rem;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--paper); }
.badge { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; }
.nav a.active .badge { background: var(--paper); color: var(--ink); }
.user-menu { margin-left: auto; position: relative; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-weight: 600; font-size: .85rem; border: 0; cursor: pointer; font-family: var(--sans);
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; padding: .4rem; display: none;
}
.dropdown.open { display: block; }
.dropdown .who { padding: .6rem .75rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: .55rem .75rem; border-radius: 8px; color: var(--ink);
  text-decoration: none; background: none; border: 0; font: inherit; font-size: .94rem; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--paper); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--ink); }

@media (max-width: 1040px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1rem;
  }
  .nav.open { display: flex; }
  .user-menu { margin-left: auto; }
}

/* ---------- Boutons & formulaires ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.2rem; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: transparent; color: #a23a2a; border-color: #e0b7ad; }
.btn.danger:hover { background: #fbeae6; }
.btn.sm { padding: .4rem .85rem; font-size: .85rem; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: #a23a2a; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field { margin-bottom: 1.1rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  min-height: 46px;
  width: 100%; padding: .72rem .9rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); font: inherit; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .88rem; min-height: 320px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(200, 85, 61, .18); }
input[type=color] { width: 56px; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; background: var(--card); }
.checkbox { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Messages ---------- */
.alert { padding: .85rem 1.1rem; border-radius: 12px; margin-bottom: 1.25rem; font-weight: 500; border: 1px solid; }
.alert.error { background: #fbeae6; border-color: #eec2b7; color: #8a2f1f; }
.alert.success { background: #ecf3e8; border-color: #c6dbbd; color: #35572c; }
.toast-wrap { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 50; width: min(520px, 100% - 2rem); }
.toast-wrap .alert { box-shadow: var(--shadow); animation: rise .3s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Cartes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.page-head { padding: 2.5rem 0 1.5rem; }
.page-head p { color: var(--ink-2); max-width: 60ch; }
section + section { margin-top: 2.5rem; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.course-card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.course-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(31, 28, 24, .3); }
.course-cover {
  height: 132px; position: relative; overflow: hidden;
  background: var(--c, var(--accent));
}
.course-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.course-cover .level {
  position: absolute; top: .9rem; left: .9rem; background: rgba(255, 253, 248, .92); color: var(--ink);
  font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; letter-spacing: .03em;
}
.course-cover .draft { left: auto; right: .9rem; background: var(--ink); color: var(--paper); }
.course-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.course-body p { color: var(--ink-2); font-size: .93rem; flex: 1; }
.course-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }

/* Barre de progression façon trait de crayon */
.progress { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--accent)); transition: width .4s ease; }

/* ---------- Accueil public ---------- */
.hero { padding: 5rem 0 4rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; margin: 1.25rem 0 2rem; }
.hero-art { aspect-ratio: 1; position: relative; }
.hero-art svg { width: 100%; height: 100%; }
.lock-note { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); margin-top: 1.25rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding-bottom: 5rem; }
.feature { padding: 1.5rem; border-top: 2px solid var(--ink); }
.feature .num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.6rem; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-art { max-width: 320px; }
  .features { grid-template-columns: 1fr; }
}

/* ---------- Auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: 3rem 1.25rem 4rem; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 2rem; }
.auth-card .card { padding: 2rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: .92rem; color: var(--ink-2); }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-family: ui-monospace, Menlo, monospace; font-weight: 600; text-align: center; }

/* ---------- Tableau de bord ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.stat b { display: block; font-family: var(--serif); font-size: 2.1rem; line-height: 1.1; }
.stat span { font-size: .86rem; color: var(--muted); }
.stat.hot b { color: var(--accent); }

.continue {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center;
  background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 1.5rem 1.75rem; text-decoration: none;
}
.continue .eyebrow { color: #b9b0a2; }
.continue h3 { margin: .2rem 0 0; font-size: 1.4rem; }
.continue .play { width: 54px; height: 54px; border-radius: 50%; background: var(--c, var(--accent)); display: grid; place-items: center; }
.continue:hover .play { transform: scale(1.06); }
.continue .play { transition: transform .15s ease; }
@media (max-width: 640px) { .continue { grid-template-columns: 1fr; } }

.feedback-item { display: grid; grid-template-columns: 84px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.feedback-item:last-child { border-bottom: 0; }
.thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--paper-2); border: 1px solid var(--line); }
.quote { background: var(--paper); border-left: 3px solid var(--accent); padding: .75rem 1rem; border-radius: 0 10px 10px 0; white-space: pre-wrap; font-size: .95rem; }

.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Page cours ---------- */
.course-hero { padding: 3rem 0 2rem; display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: end; }
.course-hero .tag { display: inline-block; background: var(--c); color: #fff; font-weight: 700; font-size: .75rem; padding: .25rem .7rem; border-radius: 999px; margin-bottom: 1rem; }
@media (max-width: 860px) { .course-hero { grid-template-columns: 1fr; } }
.lesson-list { list-style: none; margin: 0; padding: 0; counter-reset: l; }
.lesson-list li a {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem;
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; margin-bottom: .6rem;
  text-decoration: none; color: inherit; transition: border-color .12s, transform .12s;
}
.lesson-list li a:hover { border-color: var(--ink); transform: translateX(3px); }
.lesson-num {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; color: var(--ink-2);
}
.lesson-list li.done .lesson-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.lesson-list li .t { font-weight: 600; }
.lesson-list li .s { font-size: .88rem; color: var(--muted); }

/* ---------- Leçon ---------- */
.lesson-layout { display: grid; grid-template-columns: 290px 1fr; gap: 2rem; padding: 2rem 0 4rem; align-items: start; }
.lesson-side { position: sticky; top: 84px; }
.lesson-side .card { padding: 1.1rem; }
.side-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.side-list a {
  display: flex; gap: .65rem; align-items: center; padding: .5rem .6rem; border-radius: 8px;
  text-decoration: none; color: var(--ink-2); font-size: .9rem; line-height: 1.35;
}
.side-list a:hover { background: var(--paper); }
.side-list a.current { background: var(--paper-2); color: var(--ink); font-weight: 600; }
.dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.dot.done { background: var(--ok); border-color: var(--ok); }
.dot.done::after { content: ''; width: 6px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
@media (max-width: 960px) { .lesson-layout { grid-template-columns: 1fr; } .lesson-side { position: static; order: 2; } }

.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); box-shadow: var(--shadow); }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.video-empty { aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted); background: var(--card); }

.prose { font-size: 1.04rem; color: var(--ink-2); }
.prose h3, .prose h4 { color: var(--ink); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .3rem; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--card); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink); }

.exercise {
  margin: 2.5rem 0; padding: 1.5rem 1.6rem; border-radius: var(--radius); position: relative;
  background: #fff8e8; border: 1.5px solid #ecd9a8;
}
.exercise .eyebrow { color: var(--warn); }
.exercise p { margin: .4rem 0 0; white-space: pre-wrap; }

.lesson-actions { display: flex; gap: .75rem; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 2rem 0; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.75rem; text-align: center; cursor: pointer;
  background: var(--card); transition: border-color .15s, background .15s; position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #fff8f4; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img { max-height: 260px; margin: 0 auto 1rem; border-radius: 8px; }

.sub { display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.sub img { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 560px) { .sub { grid-template-columns: 1fr; } .sub img { width: 100%; height: auto; } }
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.status.wait { background: #f6ecd3; color: #7d5b17; }
.status.done { background: #e2eedd; color: #35572c; }

/* ---------- Galerie ---------- */
.gallery { columns: 3 260px; column-gap: 1.25rem; }
.gallery .item { break-inside: avoid; margin-bottom: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery .item img { width: 100%; cursor: zoom-in; }
.gallery .item .body { padding: 1rem 1.1rem; }

.lightbox { position: fixed; inset: 0; background: rgba(20, 18, 15, .92); display: none; place-items: center; z-index: 100; padding: 2rem; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; }

/* ---------- Tableaux (coach) ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: .85rem 1rem; border-bottom: 1px solid var(--line); background: var(--paper); }
td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .progress { width: 120px; }
.code-chip { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .08em; background: var(--paper); padding: .25rem .55rem; border-radius: 6px; border: 1px solid var(--line); }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.pill.green { background: #e2eedd; color: #35572c; }
.pill.grey { background: var(--paper-2); color: var(--muted); }
.pill.red { background: #fbeae6; color: #8a2f1f; }

.review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.review + .review { margin-top: 1.5rem; }
.review img { width: 100%; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; max-height: 520px; object-fit: contain; background: var(--paper); }
@media (max-width: 860px) { .review { grid-template-columns: 1fr; } }

.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty svg { width: 72px; height: 72px; margin: 0 auto 1rem; opacity: .6; }

.coach-strip { background: var(--ink); color: var(--paper); font-size: .82rem; }
.coach-strip .container { display: flex; align-items: center; gap: .75rem; height: 34px; }
.coach-strip a { color: #f0c2b6; }

footer.site { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; margin-top: 3rem; }

/* Finitions */
.continue + section, .card.flat + section { margin-top: 1.25rem; }
.link-btn.small { font-size: .875rem; }
.page-head + .stats { margin-bottom: 1rem; }
input[type=number], select { height: 46px; }

/* =========================================================
   v2 — Avatars & ornements
   ========================================================= */
.av { --s: 40px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; vertical-align: middle; }
.av-in { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--ink); color: var(--paper); display: grid; place-items: center; position: relative; z-index: 1; }
.av-in img { width: 100%; height: 100%; object-fit: cover; }
.av-ini { font-weight: 600; font-size: calc(var(--s) * .36); letter-spacing: .02em; }
.av::before { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.av-deco { position: absolute; inset: -18%; width: 136%; height: 136%; z-index: 2; pointer-events: none; overflow: visible; }
button.av { border: 0; padding: 0; background: none; cursor: pointer; }

/* Élève */
.orn-graphite::before { inset: -4px; border: 2px dashed #8a8174; }
.orn-terre::before { inset: -4px; border: 3px solid var(--accent); box-shadow: 0 0 0 2px var(--paper) inset; }
.orn-esquisse .av-deco { inset: -12%; width: 124%; height: 124%; }

/* VIP */
.orn-or::before, .orn-aurore::before, .orn-couronne::before {
  inset: calc(var(--s) * -.1);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
}
.orn-or::before { background: conic-gradient(#f7e08a, #c9921d, #fff4c2, #b07a12, #f7e08a); animation: orn-spin 6s linear infinite; }
.orn-aurore::before { background: conic-gradient(#c8553d, #e2b13c, #6b8f4e, #3d6c8c, #8a5ca8, #c8553d); animation: orn-spin 5s linear infinite; filter: saturate(1.2); }
.orn-aurore .av-in { box-shadow: 0 0 10px rgba(200, 85, 61, .35); }
.orn-couronne::before { background: conic-gradient(#f2d272, #c9921d, #f2d272); }
.orn-couronne .av-deco { inset: -30% -18% -18%; height: 148%; }

/* Formateur */
.orn-laurier::before { inset: -3px; border: 2px solid #d9a73a; }
.orn-laurier .av-deco { inset: -22%; width: 144%; height: 144%; }
.orn-pinceau::before { inset: -4px; border: 3px solid var(--ink); }
.orn-pinceau::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid rgba(200, 85, 61, .5); pointer-events: none; animation: orn-pulse 2.6s ease-out infinite; }
.orn-pinceau .av-deco { inset: -26%; width: 152%; height: 152%; }
.orn-pinceau .drop { animation: orn-drip 2.6s ease-in-out infinite; }
.orn-pinceau .d2 { animation-delay: .4s; }
.orn-palette::before { inset: -3px; border: 2px solid var(--line); }
.orn-palette .av-deco { inset: -16%; width: 132%; height: 132%; }
.av-deco.spin { animation: orn-spin 14s linear infinite; }

@keyframes orn-spin { to { transform: rotate(360deg); } }
@keyframes orn-pulse { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.32); opacity: 0; } }
@keyframes orn-drip { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .av::before, .av::after, .av-deco, .av, .drop, .av * { animation: none !important; } }

.role-tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 999px; vertical-align: middle; }
.role-tag.coach { background: var(--ink); color: #f2d272; }
.role-tag.vip { background: linear-gradient(90deg, #f7e08a, #e2b13c); color: #5a3f06; }

.orn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .9rem; }
.orn-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 1.4rem .5rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); text-align: center; }
.orn-opt:hover { border-color: var(--ink); }
.orn-opt input { position: absolute; opacity: 0; }
.orn-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 85, 61, .18); }
.orn-opt.locked { opacity: .45; cursor: not-allowed; }
.orn-opt .small { line-height: 1.25; }

/* =========================================================
   Slider avant / après
   ========================================================= */
.ba { --pos: 50%; position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); user-select: none; touch-action: pan-y; cursor: ew-resize; outline: none; }
.ba img { display: block; width: 100%; height: auto; pointer-events: none; }
.ba .ba-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; clip-path: inset(0 0 0 var(--pos)); }
.ba .ba-before { object-fit: contain; }
.ba .ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .35); pointer-events: none; }
.ba .ba-knob { position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); display: grid; place-items: center; color: #333; font-size: 1.1rem; pointer-events: none; }
.ba:focus-visible .ba-knob { box-shadow: 0 0 0 3px var(--accent), 0 2px 10px rgba(0, 0, 0, .3); }
.ba .ba-label { position: absolute; top: .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(31, 28, 24, .72); color: #fff; padding: .25rem .6rem; border-radius: 999px; pointer-events: none; }
.ba .ba-label.l { left: .7rem; }
.ba .ba-label.r { right: .7rem; background: var(--accent); }

/* =========================================================
   Éditeur de paint-over
   ========================================================= */
.po-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; padding: 1.5rem 0 3rem; align-items: start; }
@media (max-width: 960px) { .po-wrap { grid-template-columns: 1fr; } }
.po-stage { position: relative; background: #2a2723; border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 140px); display: grid; place-items: center; padding: 1rem; }
.po-canvas-box { position: relative; line-height: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.po-canvas-box canvas { display: block; max-width: 100%; height: auto; touch-action: none; }
.po-canvas-box #po-draw { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.po-tools { position: sticky; top: 84px; }
.po-tools .card { padding: 1.1rem; }
.po-tools h4 { font-family: var(--sans); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem 0 .5rem; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.tool-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.tool-btn { padding: .55rem .3rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font: 600 .8rem var(--sans); cursor: pointer; color: var(--ink); }
.tool-btn.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tool-btn:disabled { opacity: .4; cursor: default; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.po-status { font-size: .85rem; margin-top: .75rem; min-height: 1.2em; }

/* =========================================================
   Challenges
   ========================================================= */
.ch-hero { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: stretch; }
@media (max-width: 900px) { .ch-hero { grid-template-columns: 1fr; } }
.ch-today { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 2rem 2.2rem; }
.ch-today .eyebrow { color: #b9b0a2; }
.ch-today h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: .4rem 0 .8rem; }
.ch-today p { color: #ddd5c6; white-space: pre-line; max-width: 58ch; }
.ch-today .daynum { position: absolute; right: -10px; bottom: -40px; font-family: var(--serif); font-style: italic; font-size: 11rem; line-height: 1; color: rgba(255, 253, 248, .06); pointer-events: none; }
.cat-chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--accent); color: #fff; }
.cat-chip.Objet { background: #c8553d; } .cat-chip.Animal { background: #6b8f4e; } .cat-chip.Personnage { background: #3d6c8c; }
.cat-chip.Décor { background: #8a5ca8; } .cat-chip.Étude { background: #7a6a55; } .cat-chip.Imagination { background: #b7862b; } .cat-chip.Défi { background: #1f1c18; border: 1px solid #5a544b; }
.streak { display: flex; flex-direction: column; justify-content: center; gap: .3rem; text-align: center; }
.streak b { font-family: var(--serif); font-size: 3.4rem; line-height: 1; }
.streak .flame { font-size: 1.8rem; }
.ch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.ch-item { display: block; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: inherit; position: relative; }
.ch-item:hover { border-color: var(--ink); }
.ch-item .t { font-weight: 600; line-height: 1.3; margin: .4rem 0 .2rem; }
.ch-item .done-mark { position: absolute; top: .8rem; right: .9rem; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .75rem; }
.entries { columns: 4 200px; column-gap: 1rem; }
.entry { break-inside: avoid; margin-bottom: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.entry img.shot { width: 100%; cursor: zoom-in; }
.entry .who { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; font-size: .88rem; }
.cal-month h3 { margin: 1.8rem 0 .7rem; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .35rem; }
.cal-day { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.cal-day:hover { border-color: var(--ink); }
.cal-day.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.cal-day.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-day.future { opacity: .35; pointer-events: none; }
.toggle { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font-weight: 500; }
.toggle input { width: 42px; height: 24px; appearance: none; background: var(--line); border-radius: 99px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(18px); }
.dash-challenge { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem 1.4rem; border-radius: var(--radius); border: 1.5px dashed var(--accent); background: #fff8f4; text-decoration: none; color: inherit; margin-top: 1rem; }

/* =========================================================
   Forum
   ========================================================= */
.forum-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .forum-layout { grid-template-columns: 1fr; } }
.cat-nav { display: flex; flex-direction: column; gap: .2rem; position: sticky; top: 84px; }
.cat-nav a { padding: .5rem .8rem; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.cat-nav a:hover { background: var(--paper-2); }
.cat-nav a.on { background: var(--ink); color: var(--paper); }
@media (max-width: 860px) { .cat-nav { flex-direction: row; flex-wrap: wrap; position: static; } }
.topic { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; margin-bottom: .6rem; }
.topic:hover { border-color: var(--ink); }
.topic .t { font-weight: 600; font-size: 1.02rem; }
.topic .meta { font-size: .82rem; color: var(--muted); }
.topic .count { text-align: center; min-width: 54px; font-size: .78rem; color: var(--muted); }
.topic .count b { display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--ink); }
.tag-solved { background: #e2eedd; color: #35572c; }
.tag-pin { background: #f6ecd3; color: #7d5b17; }
.tag-lock { background: var(--paper-2); color: var(--muted); }
.tag-coach { background: var(--ink); color: #f2d272; }
.post { display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.post.first { border-top: 0; }
.post .bubble { background: var(--card); border: 1px solid var(--line); border-radius: 0 14px 14px 14px; padding: 1rem 1.2rem; }
.post.by-coach .bubble { border-color: #e7cfa0; background: #fffaf0; }
.post .head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; font-size: .9rem; }
.post .prose { font-size: .98rem; }
.post .prose p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .post { grid-template-columns: 1fr; } }
.av-btn { background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 50%; }
.nav a { padding: .45rem .7rem; }
@media (max-width: 1100px) { .topbar .container { gap: .8rem; } .nav a { padding: .4rem .55rem; font-size: .9rem; } }
.sub.has-po { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
@media (max-width: 760px) { .sub.has-po { grid-template-columns: 1fr; } }
.gallery .item .ba { border-radius: 0; border: 0; }
[hidden] { display: none !important; }
.ch-hero + section, .page-head + .ch-hero { margin-top: 2.5rem; }
.page-head + .ch-hero { margin-top: 0; }
.av-btn { padding: 12px 4px 2px; }

/* =========================================================
   v3 — nouveaux ornements
   ========================================================= */
.orn-cappuccino::before { inset: -4px; border: 3px solid #6f4a32; box-shadow: 0 0 0 2px #e8d5bd inset; }
.orn-cappuccino .av-deco { inset: -20%; width: 140%; height: 140%; }
.orn-cappuccino .steam path { animation: orn-steam 2.8s ease-in-out infinite; }
.orn-cappuccino .steam .s2 { animation-delay: 1.2s; }
@keyframes orn-steam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-6px); } }
.orn-copeaux::before { inset: -4px; border: 3px solid #e9cfa6; box-shadow: 0 0 0 1px #9b7448; }
.orn-copeaux .av-deco { inset: -22%; width: 144%; height: 144%; }
.orn-encre::before { inset: -3px; border: 3px solid #1f1c18; }
.orn-encre .av-deco { inset: -22%; width: 144%; height: 144%; }
.orn-aquarelle::before { inset: calc(var(--s) * -.16); z-index: 0; background: conic-gradient(from 20deg, #f2a38f, #f6d48b, #a9cf9a, #8fc0e0, #c3a6dc, #f2a38f); filter: blur(calc(var(--s) * .07)); opacity: .9; animation: orn-spin 9s linear infinite; }
.orn-etoiles::before { inset: -4px; border: 2px solid #2c3566; box-shadow: 0 0 10px rgba(242, 210, 114, .45); }
.orn-etoiles .av-deco { inset: -24%; width: 148%; height: 148%; }
.orn-etoiles .twinkle { transform-box: fill-box; transform-origin: center; animation: orn-twinkle 2.2s ease-in-out infinite; }
@keyframes orn-twinkle { 50% { opacity: .25; transform: scale(.6); } }
.dash-challenge + section, .dash-game + section { margin-top: 1.25rem; }

/* =========================================================
   v3 — Notifications
   ========================================================= */
.bell-menu { margin-left: auto; position: relative; }
.bell-menu + .user-menu { margin-left: .2rem; }
.bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.bell:hover { background: var(--paper-2); color: var(--ink); }
.bell-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--paper); }
.bell-dd { width: min(360px, 92vw); max-height: 70vh; overflow-y: auto; }
.notif { display: grid !important; grid-template-columns: 30px 1fr; gap: .6rem; align-items: start; padding: .65rem .75rem; border-radius: 10px; text-decoration: none; color: var(--ink); line-height: 1.4; }
.notif:hover { background: var(--paper); }
.notif.unread { background: #fff5f0; }
.notif.unread .notif-ico { background: var(--accent); color: #fff; }
.notif-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.notif-list .notif { background: var(--card); border: 1px solid var(--line); margin-bottom: .5rem; padding: .9rem 1rem; }
.notif-list .notif.unread { border-color: #eec2b7; background: #fff8f4; }
.mention { background: #fbeae6; color: var(--accent-ink); font-weight: 600; padding: 0 .25rem; border-radius: 5px; }
.mention-box { position: absolute; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .3rem; min-width: 200px; }
.mention-box button { display: block; width: 100%; text-align: left; padding: .45rem .7rem; border: 0; background: none; border-radius: 7px; font: inherit; font-size: .92rem; cursor: pointer; }
.mention-box button.on, .mention-box button:hover { background: var(--paper-2); }

/* =========================================================
   v3 — Expérience
   ========================================================= */
.lvl-badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .02em; padding: .15rem .55rem; border-radius: 999px; background: linear-gradient(135deg, #3d6c8c, #2c4f68); color: #fff; vertical-align: middle; }
.lvl-badge.sm { font-size: .64rem; padding: .08rem .45rem; }
.tagline { font-style: italic; color: var(--muted); margin: -.2rem 0 .5rem; }
.progress.xp > span { background: linear-gradient(90deg, #3d6c8c, #6b8f4e, #e2b13c); }
.xp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem 1rem; margin-top: .4rem; }
.xp-grid b { font-family: var(--serif); font-size: 1.1rem; }
.levels { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.levels span { font-size: .74rem; padding: .25rem .6rem; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.levels span b { margin-right: .3rem; }
.levels span.on { background: var(--ink); color: var(--paper); }

/* =========================================================
   v3 — La Mosaïque
   ========================================================= */
.mosaic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .mosaic-layout { grid-template-columns: 1fr; } }
.mosaic { display: grid; gap: 2px; background: var(--line); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.mosaic .tile { position: relative; aspect-ratio: var(--ratio, 1); background: var(--card); display: grid; place-items: center; overflow: hidden; }
.mosaic .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic .tile.empty { background: repeating-linear-gradient(45deg, #f7f2e8, #f7f2e8 6px, #f1ebde 6px, #f1ebde 12px); }
.mosaic .tile.gold.empty { background: repeating-linear-gradient(45deg, #fbf1d6, #fbf1d6 6px, #f6e6b8 6px, #f6e6b8 12px); box-shadow: inset 0 0 0 2px #e2b13c; }
.mosaic .tile.busy { background: #fff8f4; }
.mosaic .tile.busy .tile-icon { animation: busy 1.4s ease-in-out infinite; color: var(--accent); }
@keyframes busy { 50% { transform: rotate(-18deg) translateY(-2px); } }
.mosaic .tile-icon { font-size: 1.2rem; color: #c9a43c; }
.mosaic .tile.filled.gold::after { content: '✦'; position: absolute; top: 3px; right: 5px; color: #e2b13c; font-size: .8rem; text-shadow: 0 0 3px rgba(0, 0, 0, .5); }
.mosaic .tile.mine { outline: 3px solid var(--accent); outline-offset: -3px; }
.mosaic .tile-who { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: .35rem; padding: .3rem .4rem; background: linear-gradient(transparent, rgba(20, 18, 15, .75)); color: #fff; font-size: .72rem; font-weight: 600; opacity: 0; transition: opacity .15s; }
.mosaic .tile:hover .tile-who { opacity: 1; }
.reveal-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.3rem; border-radius: var(--radius); background: linear-gradient(120deg, #fff4d6, #fbe3d8); border: 1px solid #ecd9a8; text-decoration: none; color: inherit; margin-bottom: 1.5rem; }
.play-card { background: var(--ink); color: var(--paper); border: 0; }
.play-card .eyebrow { color: #b9b0a2; }
.play-card .muted { color: #b9b0a2; }
.quota { display: flex; gap: .4rem; margin-top: .6rem; }
.quota span { width: 26px; height: 26px; border-radius: 6px; border: 2px dashed #6d655a; }
.quota span.used { background: var(--accent); border: 2px solid var(--accent); }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.mini-stats div { background: var(--paper); border-radius: 10px; padding: .6rem .7rem; }
.mini-stats b { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.mini-stats span { font-size: .78rem; color: var(--muted); }
.perks { list-style: none; padding: 0; margin: .6rem 0 0; }
.perks li { padding: .25rem 0 .25rem 1.4rem; position: relative; color: var(--muted); }
.perks li::before { content: '🔒'; position: absolute; left: 0; font-size: .75rem; top: .35rem; }
.perks li.on { color: var(--ink); }
.perks li.on::before { content: '✓'; color: var(--ok); font-weight: 700; font-size: .9rem; top: .2rem; }
.tile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; padding-bottom: 3rem; }
@media (max-width: 960px) { .tile-layout { grid-template-columns: 1fr; } }
.tile-stage { background: #2a2723; border-radius: var(--radius); padding: 1.2rem; display: grid; place-items: center; }
.tile-box { position: relative; width: min(100%, 620px); background: #fffdf8; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.tile-box canvas { position: relative; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.tile-guide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; pointer-events: none; }
.tile-guide.gray, .tile-ref.gray { filter: grayscale(1) contrast(1.1); }
.tile-ref { width: 100%; border-radius: 8px; margin-top: .6rem; object-fit: cover; cursor: zoom-in; }
.tl-h { font-family: var(--sans); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem 0 .5rem; }
.tl-h:first-child { margin-top: 0; }
.neigh { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: .6rem; background: var(--line); border-radius: 8px; overflow: hidden; }
.neigh > div { aspect-ratio: var(--ratio, 1); background: #f4efe4; display: grid; place-items: center; }
.neigh img { width: 100%; height: 100%; object-fit: cover; }
.neigh .center { background: #fbeae6; outline: 2px solid var(--accent); outline-offset: -2px; font-size: .72rem; font-weight: 700; color: var(--accent); }
.neigh .out { background: transparent; }
.timer { font-family: var(--serif); font-size: 2rem; padding: .2rem 1rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-width: 110px; text-align: center; }
.timer.over { color: var(--ok); }
.dash-game { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding: 1.1rem 1.4rem; border-radius: var(--radius); border: 1.5px dashed var(--accent); background: #fff8f4; text-decoration: none; color: inherit; margin-top: 1rem; }
.dash-game-grid { display: grid; grid-template-columns: repeat(4, 12px); gap: 2px; }
.dash-game-grid span { width: 12px; height: 12px; border-radius: 2px; background: #eadfcf; }
.dash-game-grid span.on { background: var(--accent); }
@media (max-width: 640px) { .dash-game, .reveal-banner { grid-template-columns: 1fr; } }
.archive-cover { overflow: hidden; background: var(--paper-2); }
.archive-cover img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-ba { padding: 0; border: 0; background: none; }
.mosaic-ba .mosaic { border-radius: 12px; }
.mosaic-ba .ba-after { border-radius: 12px; object-fit: cover; }
.mosaic-ba .tile-who { display: none; }
.mn-preview { display: grid; gap: 2px; margin: 0 0 1.2rem; border-radius: 10px; overflow: hidden; background: var(--line); }
.mn-preview div { aspect-ratio: 1; background-repeat: no-repeat; }
.mn-preview div.gold { box-shadow: inset 0 0 0 3px #e2b13c; }
.mosaic-ba .tile.mine { outline: none; }
.topic .row { row-gap: .3rem; }
.topic .pill { font-size: .7rem; padding: .12rem .5rem; line-height: 1.4; white-space: nowrap; }
.topic .meta { margin-top: .25rem; line-height: 1.6; }
.topic .meta .role-tag { vertical-align: 1px; }
.import-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding: .9rem 1.1rem; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--card); }
.import-bar > div { flex: 1; min-width: 220px; }
mark.todo { background: #fff1b8; color: #7d5b17; padding: 0 .3rem; border-radius: 4px; font-weight: 600; font-size: .92em; }
.legal { padding-bottom: 3rem; }
.legal h3 { margin-top: 2rem; }
.perks li { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.perks li span { flex: 1; }
.perks li b { font-size: .72rem; color: var(--muted); font-weight: 700; }
.perks li em { flex-basis: 100%; font-style: normal; font-size: .76rem; color: var(--muted); }
.legal-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--ink); text-decoration: underline; }
.danger-zone { border-color: #eec2b7; }
.danger-zone h3 { color: #8a2f1f; }

/* =========================================================
   v5 — Atelier de dessin plein écran (éditeur de case)
   ========================================================= */
body.studio-page footer.site { display: none; }
body.studio-page main { display: flex; flex-direction: column; }
.studio { flex: 1; display: flex; flex-direction: column; background: #2a2723; color: var(--paper); min-height: calc(100dvh - 64px); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.studio-top { display: flex; align-items: center; gap: .7rem; padding: .55rem 1rem; background: #1f1c18; border-bottom: 1px solid #3a3530; }
.studio-top .btn.ghost { color: var(--paper); border-color: #5a544b; }
.studio-top .btn.ghost:hover { background: #3a3530; }
.studio-top .link-btn { color: #c9bfae; }
.studio-back { color: var(--paper); text-decoration: none; font-size: 1.3rem; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.studio-back:hover { background: #3a3530; }
.studio-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.studio-status { font-size: .8rem; color: #c9bfae; }
.gold-pill { background: #e2b13c; color: #3b2a06; }
.studio .timer { font-size: 1.2rem; padding: .15rem .7rem; min-width: 76px; background: #2f2b27; border-color: #4a443c; color: var(--paper); }
.studio .timer.over { color: #9fd18b; }

.studio-stage { position: relative; flex: 1; display: grid; place-items: center; padding: 1rem 1rem 1rem 6rem; overflow: hidden; touch-action: none; }
.studio-canvas { position: relative; background: #fffdf8; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); border-radius: 4px;
  /* La plus grande taille possible qui tient dans l'écran */
  width: min(calc(100vw - 8rem), calc((100dvh - 64px - 56px - 7.5rem) * var(--ar, 1))); max-width: 1100px; }
.studio-canvas canvas { position: relative; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 4px; }
.studio-canvas .tile-guide { border-radius: 4px; }

.tb { position: absolute; z-index: 5; background: rgba(31, 28, 24, .92); backdrop-filter: blur(8px); border: 1px solid #3f3934; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.tb-tools { left: 1rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: .3rem; padding: .45rem; }
.tb-btn { width: 58px; padding: .45rem .2rem; border: 0; border-radius: 11px; background: transparent; color: #e9e1d3; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .1rem; touch-action: manipulation; font-family: var(--sans); }
.tb-btn span { font-size: 1.15rem; line-height: 1; }
.tb-btn small { font-size: .62rem; opacity: .8; }
.tb-btn:hover { background: #3a3530; }
.tb-btn.on { background: var(--accent); color: #fff; }
.tb-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.tb-sep { height: 1px; background: #3f3934; margin: .2rem .3rem; }

.tb-palette { left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; padding: .55rem .9rem; max-width: calc(100% - 2rem); }
.swatches-row { display: flex; gap: .35rem; align-items: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #1f1c18; box-shadow: 0 0 0 1px #5a544b; cursor: pointer; padding: 0; flex: none; touch-action: manipulation; }
.sw.on { box-shadow: 0 0 0 2px var(--paper); transform: scale(1.12); }
.sw-free { position: relative; overflow: hidden; background: conic-gradient(#e23b2e, #f2c230, #2e9e5b, #2f6fd6, #8a5ca8, #e23b2e); }
.sw-free input { position: absolute; inset: -6px; width: 150%; height: 150%; opacity: 0; cursor: pointer; }
.size-row { display: flex; align-items: center; gap: .6rem; }
.size-row input[type=range] { width: 140px; }
.size-dot { width: 8px; height: 8px; border-radius: 50%; background: #1f1c18; box-shadow: 0 0 0 1px #8a8174; flex: none; }
.size-val { font-size: .8rem; color: #c9bfae; min-width: 1.6rem; }

.ref-panel { position: absolute; right: 1rem; top: 1rem; z-index: 6; width: 230px; background: rgba(255, 253, 248, .97); color: var(--ink); border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); overflow: hidden; }
.ref-head { display: flex; align-items: center; gap: .2rem; padding: .3rem; border-bottom: 1px solid var(--line); }
.ref-tab { flex: 1; border: 0; background: none; padding: .4rem .3rem; border-radius: 8px; font: 600 .78rem var(--sans); color: var(--muted); cursor: pointer; }
.ref-tab.on { background: var(--paper-2); color: var(--ink); }
.ref-toggle { border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 1rem; transition: transform .15s; }
.ref-body { padding: .6rem; display: block; }
.ref-body [data-pane] { display: flex; flex-direction: column; gap: .45rem; }
.ref-body [data-pane][hidden] { display: none; }
.ref-body .tile-ref { margin: 0; }
.ref-panel.collapsed .ref-body { display: none; }
.ref-panel.collapsed .ref-toggle { transform: rotate(-90deg); }
#tl-import-clear { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(31, 28, 24, .9); color: #f0c2b6; padding: .3rem .8rem; border-radius: 99px; }

/* iPad et petits écrans : barres d'outils en bas, toile en pleine largeur */
@media (max-width: 900px) {
  .studio-stage { padding: .6rem .6rem 8.6rem; place-items: start center; }
  .studio-canvas { width: min(calc(100vw - 1.2rem), calc((100dvh - 64px - 56px - 9.6rem) * var(--ar, 1))); }
  .tb-tools { position: fixed; left: .5rem; right: .5rem; top: auto; bottom: 4.6rem; transform: none; flex-direction: row; justify-content: space-between; overflow-x: auto; padding: .3rem; }
  .tb-btn { width: auto; flex: 1; min-width: 48px; }
  .tb-sep { width: 1px; height: auto; margin: .2rem; }
  .tb-palette { position: fixed; left: .5rem; right: .5rem; bottom: .5rem; transform: none; max-width: none; overflow-x: auto; justify-content: flex-start; gap: .8rem; padding: .5rem .6rem; }
  .swatches-row { flex: none; }
  .size-row input[type=range] { width: 110px; }
  .ref-panel { top: .6rem; right: .6rem; width: min(210px, 48vw); }
  .hide-sm { display: none !important; }
}
@media (max-width: 520px) {
  .tb-btn small { display: none; }
  .tb-btn span { font-size: 1.25rem; padding: .15rem 0; }
  .sw { width: 28px; height: 28px; }
  .studio-top { gap: .45rem; padding: .45rem .6rem; }
  .studio .timer { min-width: 0; font-size: 1rem; padding: .1rem .5rem; }
}

/* =========================================================
   v5 — Skins
   ========================================================= */
/* Skin de site : Coffee shop (niv. 10) */
body.skin-coffee {
  --paper: #efe3d3; --paper-2: #e3d2bc; --card: #fbf5ec; --ink: #3b2418; --ink-2: #5d4030; --muted: #8f7461;
  --line: #dbc5ac; --accent: #a5532c; --accent-ink: #7c3a1c;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='none' stroke='%238b5e3c' stroke-opacity='.08'%3E%3Ccircle cx='80' cy='90' r='46' stroke-width='7'/%3E%3Ccircle cx='82' cy='92' r='38' stroke-width='2'/%3E%3Ccircle cx='330' cy='300' r='54' stroke-width='6'/%3E%3C/g%3E%3Cg fill='%236f4a32' fill-opacity='.07'%3E%3Cellipse cx='300' cy='70' rx='9' ry='13' transform='rotate(30 300 70)'/%3E%3Cellipse cx='150' cy='330' rx='9' ry='13' transform='rotate(-20 150 330)'/%3E%3C/g%3E%3C/svg%3E");
}
body.skin-coffee .topbar { background: rgba(59, 36, 24, .96); border-bottom-color: #2a1910; }
body.skin-coffee .topbar .brand, body.skin-coffee .topbar .nav a, body.skin-coffee .bell, body.skin-coffee .menu-toggle { color: #f3e6d4; }
body.skin-coffee .topbar .nav a:hover, body.skin-coffee .bell:hover { background: #5d3a26; color: #fff; }
body.skin-coffee .topbar .nav a.active { background: #f3e6d4; color: #3b2418; }
body.skin-coffee .brand svg rect { fill: #a5532c; }
body.skin-coffee .continue, body.skin-coffee .play-card { background: #3b2418; }
body.skin-coffee .alert.success { background: #f1e6d2; border-color: #dcc3a0; color: #5d4030; }
body.skin-coffee footer.site::before { content: '☕ '; }
@media (max-width: 1040px) { body.skin-coffee .nav { background: #3b2418; } }

/* Skin de curseur : mug de café (niv. 20) */
body.cursor-mug, body.cursor-mug a, body.cursor-mug button, body.cursor-mug label, body.cursor-mug select {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M11 3c-2 3 2 4 0 7M16 3c-2 3 2 4 0 7' stroke='%23b49a86' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M5 12h18l-2 14a3 3 0 0 1-3 3H10a3 3 0 0 1-3-3z' fill='%23fbf4ea' stroke='%233b2418' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M23 15c5 0 5 7-1 7' fill='none' stroke='%233b2418' stroke-width='1.8'/%3E%3Cellipse cx='14' cy='12.5' rx='8' ry='1.8' fill='%23a5532c'/%3E%3C/svg%3E") 4 2, auto;
}
body.cursor-mug input, body.cursor-mug textarea { cursor: text; }
body.cursor-mug canvas { cursor: crosshair !important; }

/* Skin de bordure d'image : grains de café (niv. 30) */
body.frame-beans .gallery .item img, body.frame-beans .sub > img, body.frame-beans .thumb, body.frame-beans .entry img.shot,
body.frame-beans .review > div > img, body.frame-beans .archive-cover, body.frame-beans .tile-ref, body.frame-beans .sub .ba, body.frame-beans .gallery .ba {
  border: 16px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='60' height='60' fill='%236f4a32'/%3E%3Cg fill='%233b2418'%3E%3Cellipse cx='10' cy='10' rx='5.5' ry='7.5' transform='rotate(35 10 10)'/%3E%3Cellipse cx='30' cy='10' rx='5.5' ry='7.5' transform='rotate(-55 30 10)'/%3E%3Cellipse cx='50' cy='10' rx='5.5' ry='7.5' transform='rotate(-35 50 10)'/%3E%3Cellipse cx='10' cy='30' rx='5.5' ry='7.5' transform='rotate(10 10 30)'/%3E%3Cellipse cx='50' cy='30' rx='5.5' ry='7.5' transform='rotate(-10 50 30)'/%3E%3Cellipse cx='10' cy='50' rx='5.5' ry='7.5' transform='rotate(-35 10 50)'/%3E%3Cellipse cx='30' cy='50' rx='5.5' ry='7.5' transform='rotate(55 30 50)'/%3E%3Cellipse cx='50' cy='50' rx='5.5' ry='7.5' transform='rotate(35 50 50)'/%3E%3C/g%3E%3Cg stroke='%23c69c72' stroke-width='1.3' fill='none' stroke-linecap='round'%3E%3Cpath d='M7 5c3 3 1 7 6 10M27 13c2-3 4-3 6-6M47 6c3 2 3 6 6 8M8 26c2 3 2 6 4 8M48 26c2 3 1 6 4 8M7 54c2-3 4-5 6-8M27 47c2 3 4 4 6 6M47 46c3 3 3 6 6 8'/%3E%3C/g%3E%3C/svg%3E") 20 round;
  border-radius: 0;
}

/* Profil : apparence */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.skin-opt { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.skin-opt.locked { opacity: .55; }
.skin-opt.soon { border-style: dashed; opacity: .6; }
.skin-prev { height: 70px; border-radius: 8px; display: grid; place-items: center; font-size: 1.8rem; }
.skin-prev.coffee { background: linear-gradient(135deg, #3b2418, #a5532c 60%, #efe3d3); }
.skin-prev.mug { background: #fbf5ec; }
.skin-prev.beans { background: #6f4a32; }
.skin-prev.soon { background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 8px, var(--paper-2) 8px, var(--paper-2) 16px); color: var(--muted); font-size: 1rem; }
/* Mode atelier : on masque l'en-tête du site pour donner toute la place au dessin */
body.studio-page .topbar, body.studio-page .coach-strip { display: none; }
body.studio-page .studio { min-height: 100dvh; }
.studio-canvas { width: min(calc(100vw - 8rem), calc((100dvh - 56px - 6rem) * var(--ar, 1))); }
@media (max-width: 900px) {
  .studio-stage { place-items: center; }
  .studio-canvas { width: min(calc(100vw - 1.2rem), calc((100dvh - 56px - 10rem) * var(--ar, 1))); }
}

/* =========================================================
   v6 — Succès (achievements)
   ========================================================= */
.ach-wrap { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 200; display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; pointer-events: none; }
.ach { pointer-events: auto; display: flex; align-items: center; gap: .8rem; min-width: 260px; max-width: 340px; padding: .75rem 1rem .75rem .8rem; border-radius: 14px; background: #1f1c18; color: #f5f0e6; text-decoration: none; box-shadow: 0 12px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px #3f3934; transform: translateX(120%); opacity: 0; transition: transform .45s cubic-bezier(.2, .9, .3, 1.2), opacity .3s; }
.ach.in { transform: none; opacity: 1; }
.ach.big { box-shadow: 0 12px 30px rgba(0, 0, 0, .35), inset 0 0 0 1.5px #e2b13c; }
.ach-ico { width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 1.35rem; background: linear-gradient(135deg, #3b332c, #2a2520); box-shadow: inset 0 0 0 1px #4a423a; }
.ach.big .ach-ico { background: linear-gradient(135deg, #f7e08a, #c9921d); animation: ach-pop .6s ease .3s; }
.ach strong { display: block; font-size: .92rem; line-height: 1.25; }
.ach small { display: block; font-size: .78rem; color: #c9bfae; margin-top: .1rem; line-height: 1.3; }
.ach-k { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: #e2b13c; font-weight: 700; }
@keyframes ach-pop { 50% { transform: scale(1.18) rotate(-6deg); } }
@media (max-width: 600px) { .ach-wrap { left: .6rem; right: .6rem; bottom: .6rem; align-items: stretch; } .ach { max-width: none; } }

/* =========================================================
   v6 — Capybaras cachés
   ========================================================= */
.capy { position: absolute; z-index: 15; border: 0; background: none; padding: 0; cursor: pointer;
  transform: rotate(var(--rot, 0deg)) scaleX(var(--flip, 1)) scale(0); opacity: 0;
  transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .3s;
  /* Effet sticker : liseré blanc + petite ombre portée */
  filter: drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff)
          drop-shadow(0 4px 5px rgba(31, 28, 24, .22)); }
.capy svg { display: block; }
.capy.peek { opacity: 1; transform: rotate(var(--rot, 0deg)) scaleX(var(--flip, 1)) scale(1); }
.capy.peek:hover { transform: rotate(calc(var(--rot, 0deg) * -1)) scaleX(var(--flip, 1)) scale(1.12); }
.capy.caught { animation: capy-jump .8s ease forwards; }
@keyframes capy-jump {
  30% { transform: rotate(0deg) scaleX(var(--flip, 1)) scale(1.3) translateY(-12px); }
  100% { transform: rotate(0deg) scaleX(var(--flip, 1)) scale(.2) translateY(-40px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .capy { transition: opacity .3s; } }
.capy-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .7rem; }
.capy-col > div { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .4rem; border-radius: 12px; background: var(--paper); text-align: center; font-size: .78rem; }
.capy-col > div.off { color: var(--muted); }

/* =========================================================
   v6 — Nouveaux skins
   ========================================================= */
/* Skin de site : Atelier de nuit (niv. 15) */
body.skin-nuit {
  --paper: #1c1b22; --paper-2: #26252e; --card: #23222b; --ink: #ece6da; --ink-2: #c8c1b4; --muted: #8e8899;
  --line: #34323e; --accent: #e8925c; --accent-ink: #f2ab7d;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .7);
  background-color: var(--paper);
  background-image: radial-gradient(ellipse 900px 520px at 80% -10%, rgba(242, 182, 120, .12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='30' cy='40' r='.9' opacity='.35'/%3E%3Ccircle cx='190' cy='90' r='.7' opacity='.3'/%3E%3Ccircle cx='260' cy='220' r='1' opacity='.25'/%3E%3Ccircle cx='90' cy='250' r='.6' opacity='.3'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}
body.skin-nuit .topbar { background: rgba(22, 21, 27, .98); border-bottom-color: #2c2a35; }
body.skin-nuit .btn { background: var(--ink); color: #1c1b22; border-color: var(--ink); }
body.skin-nuit .btn.accent { background: var(--accent); border-color: var(--accent); color: #1c1b22; }
body.skin-nuit .btn.ghost { background: transparent; color: var(--ink); border-color: #4a4756; }
body.skin-nuit .btn.ghost:hover { background: #2e2c37; }
body.skin-nuit .btn.danger { background: transparent; color: #f19a8a; border-color: #6b3a33; }
body.skin-nuit .nav a.active { background: var(--ink); color: #1c1b22; }
body.skin-nuit .avatar, body.skin-nuit .av-in { background: #3a3846; }
body.skin-nuit .continue, body.skin-nuit .play-card { background: #121117; box-shadow: inset 0 0 0 1px #2c2a35; }
body.skin-nuit .exercise { background: #2a2620; border-color: #4a3f2a; }
body.skin-nuit .dash-game, body.skin-nuit .reveal-banner, body.skin-nuit .notif.unread, body.skin-nuit .notif-list .notif.unread { background: #2b2229; border-color: #5a3a35; }
body.skin-nuit .alert.success { background: #1f2b22; border-color: #33503a; color: #a9d7a0; }
body.skin-nuit .alert.error { background: #2e1d1c; border-color: #5a2f2b; color: #f3aa9e; }
body.skin-nuit .mosaic .tile.empty { background: repeating-linear-gradient(45deg, #24232c, #24232c 6px, #2a2932 6px, #2a2932 12px); }
body.skin-nuit .post.by-coach .bubble, body.skin-nuit .quote { background: #2a2620; }
body.skin-nuit .mention { background: #3a2a24; }
body.skin-nuit img { opacity: .97; }
body.skin-nuit .brand svg rect { fill: #e8925c; }

/* Curseur pinceau (niv. 25). Le curseur natif utilise la même image, à la même taille et au même point
   de clic que le pinceau animé (public/js/app.js) : le passage de l'un à l'autre ne se voit pas. */
body.cursor-pinceau, body.cursor-pinceau a, body.cursor-pinceau button, body.cursor-pinceau label, body.cursor-pinceau select, body.cursor-pinceau summary {
  cursor: url("/static/img/cursor-brush-44.png") 0 40, auto;
}
body.cursor-pinceau input, body.cursor-pinceau textarea, body.cursor-pinceau [contenteditable] { cursor: text; }
body.cursor-pinceau canvas { cursor: crosshair !important; }
/* Pinceau animé actif : plus aucun curseur natif nulle part (boutons, liens, images…), sauf là où le curseur
   habituel est plus pratique : champs de texte, listes, zone de dessin, vidéos. */
body.cursor-pinceau.brush-live, body.cursor-pinceau.brush-live * { cursor: none !important; }
body.cursor-pinceau.brush-live :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=range]):not([type=file]):not([type=color]), textarea, [contenteditable]) { cursor: text !important; }
body.cursor-pinceau.brush-live select { cursor: default !important; }
body.cursor-pinceau.brush-live canvas { cursor: crosshair !important; }
body.cursor-pinceau.brush-live iframe, body.cursor-pinceau.brush-live video { cursor: auto !important; }
.brush-cursor {
  position: fixed; left: 0; top: 0; width: 44px; height: 44px; pointer-events: none; z-index: 10002;
  transform-origin: 0 90.6%; will-change: transform; opacity: 0; visibility: hidden;
  filter: drop-shadow(1px 2px 2px rgba(31, 28, 24, .25));
}
.brush-cursor.on { opacity: 1; visibility: visible; }
.brush-cursor img { width: 100%; height: 100%; display: block; }

/* Bordure washi tape (niv. 35) */
body.frame-washi .gallery .item img, body.frame-washi .sub > img, body.frame-washi .thumb, body.frame-washi .entry img.shot,
body.frame-washi .review > div > img, body.frame-washi .archive-cover, body.frame-washi .tile-ref, body.frame-washi .sub .ba, body.frame-washi .gallery .ba {
  border: 14px solid transparent; border-radius: 0;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cdefs%3E%3Cpattern id='a' width='8' height='8' patternUnits='userSpaceOnUse' patternTransform='rotate(45)'%3E%3Crect width='8' height='8' fill='%23f6c1b5'/%3E%3Crect width='3.5' height='8' fill='%23fbe2d9'/%3E%3C/pattern%3E%3Cpattern id='b' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Crect width='10' height='10' fill='%23b9d8c9'/%3E%3Ccircle cx='5' cy='5' r='1.8' fill='%23fff' opacity='.8'/%3E%3C/pattern%3E%3C/defs%3E%3Cpath d='M0 0h60v20H0z' fill='url(%23a)' opacity='.9'/%3E%3Cpath d='M0 40h60v20H0z' fill='url(%23a)' opacity='.9'/%3E%3Cpath d='M0 0h20v60H0z' fill='url(%23b)' opacity='.85'/%3E%3Cpath d='M40 0h20v60H40z' fill='url(%23b)' opacity='.85'/%3E%3Cpath d='M0 20l3-2 3 2 3-2 3 2 3-2 3 2v20l-3 2-3-2-3 2-3-2-3 2-3-2z' fill='%23f8d58a' opacity='.9'/%3E%3C/svg%3E") 20 round;
}

/* Cadre capybara (collection complète) */
body.frame-capybara .gallery .item img, body.frame-capybara .sub > img, body.frame-capybara .thumb, body.frame-capybara .entry img.shot,
body.frame-capybara .review > div > img, body.frame-capybara .archive-cover, body.frame-capybara .tile-ref, body.frame-capybara .sub .ba, body.frame-capybara .gallery .ba {
  border: 18px solid transparent; border-radius: 0;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Crect width='72' height='72' fill='%23e9d8bf'/%3E%3Cg fill='%23a8734d'%3E%3Cellipse cx='12' cy='13' rx='8' ry='5.5'/%3E%3Cellipse cx='36' cy='13' rx='8' ry='5.5'/%3E%3Cellipse cx='60' cy='13' rx='8' ry='5.5'/%3E%3Cellipse cx='12' cy='36' rx='8' ry='5.5'/%3E%3Cellipse cx='60' cy='36' rx='8' ry='5.5'/%3E%3Cellipse cx='12' cy='59' rx='8' ry='5.5'/%3E%3Cellipse cx='36' cy='59' rx='8' ry='5.5'/%3E%3Cellipse cx='60' cy='59' rx='8' ry='5.5'/%3E%3C/g%3E%3Cg fill='%23a8734d'%3E%3Crect x='15' y='8' width='7' height='6' rx='3'/%3E%3Crect x='39' y='8' width='7' height='6' rx='3'/%3E%3Crect x='63' y='8' width='7' height='6' rx='3'/%3E%3Crect x='15' y='31' width='7' height='6' rx='3'/%3E%3Crect x='63' y='31' width='7' height='6' rx='3'/%3E%3Crect x='15' y='54' width='7' height='6' rx='3'/%3E%3Crect x='39' y='54' width='7' height='6' rx='3'/%3E%3Crect x='63' y='54' width='7' height='6' rx='3'/%3E%3C/g%3E%3Cg fill='%23f2b632'%3E%3Ccircle cx='17' cy='7' r='2.4'/%3E%3Ccircle cx='41' cy='7' r='2.4'/%3E%3Ccircle cx='65' cy='7' r='2.4'/%3E%3Ccircle cx='17' cy='53' r='2.4'/%3E%3Ccircle cx='65' cy='53' r='2.4'/%3E%3C/g%3E%3Cg fill='%232a1a10'%3E%3Ccircle cx='18.5' cy='10.5' r='.9'/%3E%3Ccircle cx='42.5' cy='10.5' r='.9'/%3E%3Ccircle cx='66.5' cy='10.5' r='.9'/%3E%3Ccircle cx='18.5' cy='33.5' r='.9'/%3E%3Ccircle cx='66.5' cy='33.5' r='.9'/%3E%3Ccircle cx='18.5' cy='56.5' r='.9'/%3E%3Ccircle cx='42.5' cy='56.5' r='.9'/%3E%3Ccircle cx='66.5' cy='56.5' r='.9'/%3E%3C/g%3E%3C/svg%3E") 24 round;
}
.skin-prev.nuit { background: radial-gradient(circle at 75% 20%, #6b4a3a, #1c1b22 60%); color: #f2ab7d; }
.skin-prev.pinceau { background: #fbf5ec; }
.skin-prev.washi { background: repeating-linear-gradient(45deg, #f6c1b5, #f6c1b5 6px, #fbe2d9 6px, #fbe2d9 10px); }
.skin-prev.capybara { background: #e9d8bf; }
.skin-group + .skin-group { margin-top: 1.4rem; }
.skin-group h4 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .6rem; }
.skin-opt input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
.skin-opt.chosen { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 85, 61, .15); }

/* =========================================================
   v6 — Éditeur : opacité, taille stable, sélecteur de couleur
   ========================================================= */
.slider-row { display: flex; align-items: center; gap: .5rem; flex: none; }
.slider-row input[type=range] { width: 110px; }
.slider-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #2f2b27; overflow: hidden; }
#tl-op-ico span { width: 18px; height: 18px; border-radius: 50%; background: #1f1c18; box-shadow: 0 0 0 1px #8a8174;
  background-image: linear-gradient(45deg, rgba(255,255,255,.0) 0, rgba(255,255,255,0) 100%); }
#tl-op-ico { background: repeating-conic-gradient(#3a3530 0 25%, #2a2622 0 50%) 0 0 / 10px 10px; }
.slider-ico .size-dot { box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.size-row { display: none; }
.sw-free { background: conic-gradient(#e23b2e, #f2c230, #2e9e5b, #2f6fd6, #8a5ca8, #e23b2e); display: grid; place-items: center; }
.sw-free span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.sw-free span:not([style*="background"]) { display: none; }

.cp { position: absolute; left: 50%; bottom: 5.4rem; transform: translateX(-50%); z-index: 20; width: 252px; padding: .8rem; border-radius: 16px;
  background: rgba(31, 28, 24, .97); border: 1px solid #3f3934; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: .65rem; }
.cp[hidden] { display: none; }
.cp-sv { width: 100%; height: 140px; border-radius: 10px; cursor: crosshair; touch-action: none; display: block; }
.cp-hue { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 99px; outline: none;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cp-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #1f1c18; box-shadow: 0 0 0 1px #fff; cursor: pointer; }
.cp-hue::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #1f1c18; cursor: pointer; }
.cp-row { display: flex; gap: .5rem; align-items: center; }
.cp-preview { width: 34px; height: 34px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); flex: none; }
.cp-hex { flex: 1; min-width: 0; background: #2a2622 !important; color: var(--paper) !important; border: 1px solid #4a443c !important; border-radius: 9px !important;
  padding: .45rem .6rem !important; font: 600 .9rem ui-monospace, Menlo, monospace !important; min-height: 0 !important; height: 34px; text-transform: uppercase; }
.cp-recent { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.cp-recent span { width: 100%; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #8a8174; }
.cp-recent .sw { width: 24px; height: 24px; }
@media (max-width: 900px) {
  .cp { position: fixed; bottom: 9.6rem; }
  .slider-row input[type=range] { width: 90px; }
}
.free-sub { margin-bottom: 2rem; border: 1.5px solid #eec2b7; background: linear-gradient(180deg, #fff8f4, var(--card)); }
.free-sub-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.free-sub-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1rem; align-items: start; }
@media (max-width: 760px) { .free-sub-form { grid-template-columns: 1fr; } }
body.skin-nuit .free-sub { background: var(--card); border-color: #5a3a35; }
.capy.mini svg { width: 36px; height: 29px; }
.capy.mini { filter: drop-shadow(1.8px 0 0 #fff) drop-shadow(-1.8px 0 0 #fff) drop-shadow(0 1.8px 0 #fff) drop-shadow(0 -1.8px 0 #fff) drop-shadow(0 3px 4px rgba(31, 28, 24, .22)); }
.member-admin { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .member-admin { grid-template-columns: 1fr; } }
.pill.warn { background: #f6ecd3; color: #7d5b17; }
input[type=date] { width: 100%; min-height: 46px; padding: .6rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; color: var(--ink); }
input[type=date]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(200, 85, 61, .18); }
body.skin-nuit input[type=date] { color-scheme: dark; }
.role-tag.explorer { background: #e6e2da; color: #7a756c; }
.role-tag.gold { background: linear-gradient(90deg, #6f4a32, #a5532c); color: #f7e0b5; }
body.skin-nuit .role-tag.explorer { background: #34323e; color: #a8a2b3; }

/* =========================================================
   v8 — CappuGold / paywall
   ========================================================= */
.btn.gold { background: linear-gradient(135deg, #6f4a32, #a5532c); border-color: #6f4a32; color: #f7e0b5; }
.btn.gold:hover { filter: brightness(1.08); }
.nav a.nav-gold { color: #a5532c; font-weight: 600; }
.gold-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: linear-gradient(120deg, #3b2418, #6f4a32 60%, #a5532c); color: #f7e8d2; box-shadow: var(--shadow); }
.gold-cta strong { font-family: var(--serif); font-size: 1.2rem; }
.gold-cta p { margin: .2rem 0 0; font-size: .9rem; color: #e9d3b5; }
.gold-cta .btn.gold { background: #f7e0b5; color: #3b2418; border-color: #f7e0b5; }
.gold-cup { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 1.6rem; }
@media (max-width: 640px) { .gold-cta { grid-template-columns: 1fr; text-align: left; } }
.course-cover .lock-badge { top: auto; bottom: .8rem; background: rgba(31, 28, 24, .85); color: #f7e0b5; }
.lesson-list li.locked a { opacity: .75; }
.lesson-list li.locked .lesson-num { font-size: .85rem; background: var(--paper-2); }
.paywall { text-align: center; padding: 2.5rem 2rem; margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.paywall h1 { margin: 0; }
.paywall-lock { font-size: 2.4rem; }
.paywall-blur { width: 100%; display: grid; gap: .5rem; filter: blur(3px); opacity: .5; }
.paywall-blur div { height: 12px; border-radius: 99px; background: var(--line); }
.paywall-blur div:nth-child(2) { width: 85%; } .paywall-blur div:nth-child(3) { width: 60%; }
.corr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.corr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.corr > img { width: 100%; cursor: zoom-in; }
.corr .ba { border-radius: 0; border: 0; }
.corr .body { padding: 1rem 1.1rem 1.2rem; }
.cg-hero { margin-top: 2rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding: 2.4rem 2.6rem; border-radius: 22px;
  background: radial-gradient(circle at 85% 30%, #a5532c, #6f4a32 45%, #3b2418); color: #f7ead6; box-shadow: var(--shadow); }
.cg-hero h1 { color: #fff7ea; font-size: clamp(2.4rem, 5vw, 3.6rem); margin: .3rem 0 .6rem; }
.cg-hero p { max-width: 52ch; color: #ecd8bd; font-size: 1.08rem; }
.cg-price { display: inline-block; margin-top: .4rem; font-family: var(--serif); font-size: 1.6rem; background: rgba(255, 255, 255, .1); padding: .3rem 1rem; border-radius: 12px; }
.cg-cup .steam path { animation: orn-steam 2.8s ease-in-out infinite; } .cg-cup .steam .s2 { animation-delay: 1s; }
@media (max-width: 700px) { .cg-hero { grid-template-columns: 1fr; padding: 1.8rem; } .cg-cup { display: none; } }
.cg-compare { padding: 0; overflow: hidden; }
.cg-compare th { background: var(--paper); text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); text-align: center; }
.cg-compare th:first-child { text-align: left; }
.cg-compare td.c { text-align: center; width: 120px; }
.cg-compare .gold-col { background: rgba(165, 83, 44, .07); }
.cg-compare th.gold-col { background: #3b2418; color: #f7e0b5; }
.cg-compare .yes { color: var(--ok); font-weight: 800; font-size: 1.1rem; }
.cg-compare .no { color: var(--muted); }

/* =========================================================
   v9 — En-tête, accueil, Mon atelier
   ========================================================= */
.hdr-gold { margin-left: auto; padding: .45rem .9rem; box-shadow: 0 4px 14px -6px rgba(111, 74, 50, .7); white-space: nowrap; }
.hdr-gold + .bell-menu { margin-left: .4rem; }
@media (max-width: 520px) { .hdr-gold span { display: none; } }
.preview-strip { background: #3d6c8c; color: #fff; font-size: .85rem; }
.preview-strip .container { height: 38px; gap: .5rem; }
.preview-strip a { color: #fff; font-weight: 600; }

.home-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 860px; margin: 0 auto 4rem; }
.home-plans .plan { padding: 1.8rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: .4rem; box-shadow: var(--shadow); }
.home-plans .plan h3 { font-size: 1.6rem; margin: 0; }
.home-plans .plan-price { font-family: var(--serif); font-size: 1.3rem; color: var(--accent); margin-bottom: .4rem; }
.home-plans ul { list-style: none; padding: 0; margin: 0 0 1.2rem; flex: 1; }
.home-plans li { padding: .35rem 0 .35rem 1.5rem; position: relative; font-size: .95rem; color: var(--ink-2); }
.home-plans li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.home-plans .plan.gold { background: radial-gradient(circle at 90% 10%, #a5532c, #6f4a32 50%, #3b2418); color: #f7ead6; border: 0; }
.home-plans .plan.gold .eyebrow { color: #e9c99a; } .home-plans .plan.gold h3 { color: #fff7ea; }
.home-plans .plan.gold .plan-price { color: #f7e0b5; } .home-plans .plan.gold li { color: #ecd8bd; } .home-plans .plan.gold li::before { color: #f2d272; }
.home-plans .plan.gold .btn.gold { background: #f7e0b5; color: #3b2418; border-color: #f7e0b5; }
@media (max-width: 760px) { .home-plans { grid-template-columns: 1fr; } }

.me-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 1.8rem; align-items: center; margin: 2rem 0 1.2rem; padding: 1.6rem 1.8rem;
  border-radius: 20px; background: linear-gradient(120deg, var(--card), var(--paper-2)); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.me-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 85, 61, .12), transparent 70%); pointer-events: none; }
.me-avatar { display: block; padding: 12px; text-decoration: none; }
.me-main h1 { margin: .2rem 0 .5rem; }
.me-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.me-title strong { font-family: var(--serif); font-size: 1.15rem; }
.me-hero .tagline { margin: .35rem 0 0; }
.me-xp { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; max-width: 520px; }
.me-xp .progress { flex: 1; height: 8px; }
.me-chips { display: grid; gap: .5rem; }
.me-chips div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .9rem; min-width: 150px; }
.me-chips b { font-family: var(--serif); font-size: 1.3rem; margin-right: .3rem; }
.me-chips span { font-size: .8rem; color: var(--muted); }
@media (max-width: 900px) { .me-hero { grid-template-columns: auto 1fr; } .me-chips { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); } .me-chips div { min-width: 0; } }
@media (max-width: 560px) { .me-hero { grid-template-columns: 1fr; text-align: left; padding: 1.2rem; } .me-avatar { padding: 10px 0 0 10px; } .me-xp { flex-direction: column; align-items: stretch; gap: .3rem; } }

/* =========================================================
   v9 — Wiki
   ========================================================= */
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.wiki-card { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, transform .15s; }
.wiki-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.wiki-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; font-size: 1.3rem; }
.wiki-title { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
a.wiki-title:hover { color: var(--accent-ink); text-decoration: underline; }
.wiki-body p { margin: .3rem 0 .6rem; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.wiki-prices { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .8rem; }
.wiki-prices a { font-size: .78rem; padding: .25rem .6rem; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); text-decoration: none; }
.wiki-prices a.on { background: var(--ink); color: var(--paper); }
.wiki-pending { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; padding: .8rem 0; border-top: 1px solid #ecd9a8; flex-wrap: wrap; }
.wiki-pending > div:first-child { flex: 1; min-width: 240px; }
body.skin-nuit #a-valider { background: var(--card) !important; border-color: #5a4a2a !important; }

/* ---------- Rubriques de cours ---------- */
.course-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.5rem 0 2rem; }
.course-tabs a { padding: .45rem .9rem; border-radius: 999px; background: var(--paper-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.course-tabs a span { margin-left: .3rem; font-size: .75rem; color: var(--muted); }
.course-tabs a:hover { background: var(--ink); color: var(--paper); }
.course-tabs a:hover span { color: inherit; }
.cat-section { margin-bottom: 3rem; scroll-margin-top: 90px; }
.cat-head { margin-bottom: 1.1rem; }
.cat-head h2 { margin: 0 0 .25rem; display: flex; align-items: center; gap: .5rem; }
.cat-head p { margin: 0; color: var(--muted); }
.cat-section.is-phare { background: linear-gradient(135deg, #fbf1de, #f3e3c3); border: 1px solid #e3c98f; border-radius: 22px; padding: 1.6rem; }
.cat-section.is-phare .cat-head h2 { color: #6b4a14; }
.cat-section.is-phare .course-card { box-shadow: 0 10px 26px -16px rgba(107, 74, 20, .55); }
.course-cover .cover-ico { position: absolute; right: 1.1rem; bottom: .55rem; font-size: 2.9rem; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.course-cover .draft ~ .cover-ico, .course-cover .lock-badge ~ .cover-ico { bottom: .55rem; }
@media (max-width: 640px) { .cat-section.is-phare { padding: 1rem; margin-inline: -.5rem; } }

/* ---------- Colonne avatar du forum : titre de niveau ---------- */
.post { grid-template-columns: 86px 1fr; }
.post-side { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.post-title { font-size: .7rem; line-height: 1.2; text-align: center; color: var(--muted); font-weight: 600; max-width: 86px; }
@media (max-width: 560px) {
  .post { grid-template-columns: 1fr; }
  .post-side { flex-direction: row; gap: .7rem; }
  .post-title { max-width: none; text-align: left; }
}

/* ---------- Encre de Chine autour des messages du formateur ---------- */
.post .bubble { position: relative; }
.ink-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.post .bubble > :not(.ink-fx) { position: relative; z-index: 1; }
.ink-fx i {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s);
  background: #1f1c18; border-radius: var(--r, 50%); opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  animation: ink-drift var(--d, 8s) ease-in-out var(--delay, 0s) infinite;
}
.ink-fx i.tail { border-radius: 50% 50% 50% 0; }
@keyframes ink-drift {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(.6); }
  25%  { opacity: var(--o, .32); }
  60%  { opacity: calc(var(--o, .32) * .8); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) rotate(var(--rot, 0deg)) scale(1); }
}
body.skin-nuit .ink-fx i { background: #e8dcc6; }
@media (prefers-reduced-motion: reduce) {
  .ink-fx i { animation: none; opacity: calc(var(--o, .32) * .7); }
}

/* ---------- Bibliothèque de cours (coach) ---------- */
.lib-all { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.lib-cat { margin: 2rem 0 .8rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.lib-item { display: flex; flex-direction: column; gap: .5rem; border-top: 4px solid var(--c); }
.lib-top { display: flex; gap: .7rem; align-items: center; }
.lib-top h3 { margin: 0; font-size: 1.05rem; }
.lib-ico { font-size: 1.8rem; }
.lib-item p { margin: 0; color: var(--ink-2); flex: 1; }
.lib-item details ol { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--ink-2); }
.lib-done { margin-top: .3rem; align-items: center; }
.pill.ok { background: #e3f1e4; color: #2f6b38; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }


/* ---------- Image mise en avant des cours (miniature) ---------- */
.course-cover { height: 172px; }
.course-cover .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.course-cover:has(.cover-img)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.2), transparent 40%, transparent 70%, rgba(0,0,0,.2)); pointer-events: none; }
.course-cover .level, .course-cover .cover-ico { z-index: 1; }
.cover-field { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.cover-prev { height: 110px; border-radius: 10px; overflow: hidden; background: var(--c); display: grid; place-items: center; color: rgba(255,255,255,.85); font-size: .8rem; font-weight: 600; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .cover-field { grid-template-columns: 1fr; } .course-cover { height: 150px; } }
.course-thumb { width: 64px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; font-size: 1.1rem; }

/* =========================================================
   FrappuGold (offre premium) — mocha, caramel et crème
   ========================================================= */
.role-tag.frappu { background: linear-gradient(90deg, #2e211a, #7a4e33 60%, #c98b4b); color: #fbe7c6; box-shadow: inset 0 0 0 1px rgba(251, 231, 198, .25); }
.btn.frappu { background: linear-gradient(135deg, #3a281e, #7a4e33 55%, #c98b4b); border-color: #3a281e; color: #fdf0dc; }
.btn.frappu:hover { filter: brightness(1.08); }
.cg-hero.fg-hero { background: radial-gradient(circle at 85% 20%, #c98b4b 0, #7a4e33 32%, #2e211a 75%); }
.cg-hero.fg-hero .cg-price { color: #fbe7c6; }
.cg-compare .frappu-col { background: #f6ead8; }
.cg-compare th.frappu-col { background: linear-gradient(135deg, #3a281e, #7a4e33); color: #fbe7c6; }
.fg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.fg-card h2 { margin: .2rem 0 .6rem; }
.fg-wide { grid-column: 1 / -1; }
.fg-state { padding: .7rem .9rem; border-radius: 10px; font-weight: 600; font-size: .95rem; margin: .4rem 0; }
.fg-state.done { background: #e3f1e4; color: #2f6b38; }
.fg-state.planned { background: #f6ead8; color: #5a3825; }
.fg-state.wait { background: var(--paper-2); color: var(--ink-2); }
.fg-videos { list-style: none; margin: 0; padding: 0; }
.fg-videos li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.fg-packs { display: flex; flex-direction: column; gap: .6rem; }
.fg-pack { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.fg-pack .grow { flex: 1; min-width: 0; }
.fg-pack-ico { font-size: 1.6rem; }
.fg-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .8rem; margin-top: 1rem; }
.fg-member { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; background: var(--paper); }
.fg-member .grow { flex: 1; min-width: 0; }
.fg-member-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; }
.fg-member-form input[type=text] { flex: 1 1 160px; padding: .4rem .6rem; font-size: .85rem; }
.pill.fg-wait { background: #fdf0d2; color: #7a5a12; }
.pill.fg-planned { background: #f6ead8; color: #5a3825; }
.fg-teaser { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: #fbe7c6; background: linear-gradient(135deg, #2e211a, #7a4e33); border: 0; }
.fg-teaser:hover { filter: brightness(1.06); }
.home-plans { grid-template-columns: repeat(3, 1fr); max-width: 1140px; }
.home-plans .plan.frappu { background: radial-gradient(circle at 90% 10%, #c98b4b, #7a4e33 45%, #2e211a); color: #f7ead6; border: 0; }
.home-plans .plan.frappu .eyebrow { color: #f1d3a6; } .home-plans .plan.frappu h3 { color: #fff7ea; }
.home-plans .plan.frappu .plan-price { color: #fbe7c6; } .home-plans .plan.frappu li { color: #ecd8bd; } .home-plans .plan.frappu li::before { color: #f2d272; }
@media (max-width: 900px) { .home-plans { grid-template-columns: 1fr; } .fg-grid { grid-template-columns: 1fr; } }
.fb-video { margin-top: .8rem; }
.fb-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; margin-top: .35rem; }
.fb-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video.fb-video-frame { display: block; }
.fg-grid > .card { margin: 0; }
.home-plans .plan.frappu .btn.frappu { background: #fbe7c6; color: #2e211a; border-color: #fbe7c6; }
.cg-hero.fg-hero .cg-price { background: rgba(251, 231, 198, .12); }

/* Logo du site (pinceau) */
.brand-logo { width: 40px; height: 40px; object-fit: contain; flex: none; margin: -4px 0; transition: transform .25s ease; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-logo { transform: none; } }

/* ---------- Corrections (coach) : onglets, galerie des corrigées ---------- */
.rv-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.5rem 0 1.5rem; }
.rv-tabs a { padding: .5rem .95rem; border-radius: 999px; background: var(--paper-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.rv-tabs a span { margin-left: .35rem; font-size: .75rem; color: var(--muted); font-weight: 700; }
.rv-tabs a.on { background: var(--ink); color: var(--paper); }
.rv-tabs a.on span { color: inherit; opacity: .75; }
.rv-search { display: flex; gap: .5rem; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; }
.rv-search input[type=search] { flex: 1 1 260px; min-height: 42px; padding: .5rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.rv-month { grid-column: 1 / -1; margin: .8rem 0 0; font-size: 1.1rem; color: var(--ink-2); }
.rv-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.rv-card:hover { transform: translateY(-2px); }
.rv-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); }
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-tag { position: absolute; left: .5rem; bottom: .5rem; background: rgba(31, 28, 24, .8); color: #fff; font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; }
.rv-tag-r { left: auto; right: .5rem; }
.rv-body { padding: .75rem .85rem .85rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.rv-fb { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .2rem 0; }
.rv-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; }
.rv-card.is-golden { box-shadow: 0 0 0 2px #e2b13c, 0 10px 24px -12px rgba(160, 110, 10, .6); }
.course-tabs a.on { background: var(--ink); color: var(--paper); }

/* =========================================================
   Brush d'or & célébrations
   ========================================================= */
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10001; }
.brush-or-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem .18rem .3rem; border-radius: 999px; font-size: .72rem; font-weight: 800;
  background: linear-gradient(120deg, #fff3b0, #f2d272 40%, #e2b13c 60%, #fff3b0); color: #5a3a08; box-shadow: inset 0 0 0 1px #c8962a;
  position: relative; overflow: hidden; isolation: isolate; }
.brush-or-badge::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%); transform: translateX(-100%); animation: bo-shine 3.5s linear infinite; }
.brush-or-badge img { width: 18px; height: 18px; }
@keyframes bo-shine { 0%, 40% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.is-golden { position: relative; box-shadow: 0 0 0 2px #e2b13c, 0 12px 30px -14px rgba(160, 110, 10, .7) !important; }
.sub.is-golden, .entry.is-golden { border-radius: 14px; }
/* Case à cocher du formateur */
.brush-or-toggle { display: block; margin-top: .75rem; cursor: pointer; }
.brush-or-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.brush-or-toggle .bo-box { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-radius: 12px; border: 1.5px dashed #d9c08a; background: #fffaf0; transition: all .2s; }
.brush-or-toggle .bo-box img { filter: grayscale(.8) opacity(.65); transition: filter .25s, transform .25s; }
.brush-or-toggle strong { display: block; font-size: .9rem; color: #6b4a14; }
.brush-or-toggle small { color: var(--muted); }
.brush-or-toggle input:checked + .bo-box { border-style: solid; border-color: #e2b13c; background: linear-gradient(120deg, #fff6d6, #fde7a8); box-shadow: 0 6px 18px -10px rgba(160, 110, 10, .8); }
.brush-or-toggle input:checked + .bo-box img { filter: none; transform: rotate(-12deg) scale(1.12); }
.brush-or-toggle input:focus-visible + .bo-box { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Fenêtre de célébration */
.celebrate { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 1rem; background: rgba(20, 16, 10, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.celebrate.in { opacity: 1; } .celebrate.out { opacity: 0; }
.cel-card { position: relative; width: min(440px, 100%); padding: 2.2rem 1.8rem 1.6rem; border-radius: 26px; text-align: center; overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #fff8e0, #fbf3e2 60%); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), inset 0 0 0 2px #e9cf8e;
  transform: scale(.7) translateY(30px); transition: transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.celebrate.in .cel-card { transform: none; }
.cel-rays { position: absolute; left: 50%; top: 150px; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(242, 210, 114, .45) 0 10deg, transparent 10deg 24deg); border-radius: 50%; animation: cel-spin 14s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 62%); mask: radial-gradient(circle, #000 25%, transparent 62%); }
@keyframes cel-spin { to { transform: rotate(360deg); } }
.cel-brush { position: relative; width: 150px; height: 150px; animation: cel-pop .9s cubic-bezier(.2, 1.5, .4, 1) both, cel-float 3s ease-in-out .9s infinite; filter: drop-shadow(0 10px 18px rgba(160, 110, 10, .55)); }
@keyframes cel-pop { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1) rotate(-8deg); } }
@keyframes cel-float { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-8px); } }
.cel-chest { position: relative; width: 160px; height: 140px; overflow: visible; }
.cel-chest .cel-lid { transform-origin: 22px 66px; animation: cel-open .8s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
.cel-chest .cel-glow { opacity: 0; animation: cel-glow .6s ease .9s both; }
@keyframes cel-open { from { transform: rotate(0); } to { transform: rotate(-38deg) translate(-6px, -10px); } }
@keyframes cel-glow { to { opacity: 1; } }
.cel-eyebrow { position: relative; margin-top: .6rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: #a0721c; }
.cel-card h2 { position: relative; margin: .3rem 0 .5rem; font-size: 1.8rem; color: #3b2414; }
.cel-card p { position: relative; color: #5d4030; margin: 0 0 1.3rem; }
.cel-actions { position: relative; display: flex; gap: .6rem; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .cel-rays, .cel-brush, .brush-or-badge { animation: none; } .cel-chest .cel-lid { animation-duration: .01s; } }

/* ---------- Objectif & espace parent ---------- */
.pk-goal { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .45rem; border: 1px solid #e3d3b4; background: linear-gradient(180deg, var(--card), #fdf6e8); }
.pk-goal.reached { border-color: #b9d8b0; background: linear-gradient(180deg, var(--card), #eef6ea); }
.pk-goal-num strong { font-family: var(--serif); font-size: 1.6rem; }
.pk-goal-bar { position: relative; height: 22px; border-radius: 999px; background: var(--paper-2); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.12); margin: .3rem 0; }
.pk-goal-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #e2b13c, #c8553d); transition: width 1s ease; }
.pk-goal.reached .pk-goal-bar span { background: linear-gradient(90deg, #8fbf6e, #4f8a3b); }
.pk-goal-bar b { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .72rem; color: var(--ink); }
.goal-bar span { background: linear-gradient(90deg, #e2b13c, #c8553d); }
.me-goal { margin-bottom: 1rem; }
.stat.gold { background: linear-gradient(135deg, #fff6d6, #fde7a8); border-color: #e9cf8e; }
.stat.gold b { color: #8a5a0c; }
.pk-hero { display: flex; gap: 1.2rem; align-items: center; }
.pk-hero .grow { flex: 1; min-width: 0; }
.pk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-top: 1.25rem; }
.pk-stats .stat { padding: 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; }
.pk-stats .stat b { font-family: var(--serif); font-size: 1.8rem; }
.pk-stats .stat span { font-size: .85rem; color: var(--muted); }
.pk-work { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.pk-item { padding: 0; overflow: hidden; }
.pk-item > img, .pk-item .ba { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pk-item-body { padding: .8rem .9rem 1rem; }
.parent-list { list-style: none; margin: 0; padding: 0; }
.parent-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.copy-row { display: flex; gap: .4rem; }
.copy-row input { flex: 1; min-width: 0; font-size: .8rem; padding: .4rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); }

/* =========================================================
   Cours façon RPG : la carte de quête et ses checkpoints
   ========================================================= */
.quest-card .quest-count { font-family: var(--serif); font-size: 1.1rem; margin-top: .3rem; }
.quest-card .quest-count b { font-size: 2.2rem; }
.quest-card .quest-count span { color: var(--muted); font-size: .95rem; font-family: var(--sans, inherit); }
.quest-xp { display: flex; justify-content: space-between; gap: .5rem; color: var(--ink-2); flex-wrap: wrap; }
.quest { position: relative; margin: .5rem 0 1rem; border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--c) 14%, transparent), transparent 40%),
    radial-gradient(circle at 85% 70%, color-mix(in srgb, var(--c) 12%, transparent), transparent 45%),
    repeating-linear-gradient(0deg, rgba(120, 90, 50, .035) 0 2px, transparent 2px 6px),
    #f7efdf;
  box-shadow: inset 0 0 0 2px #e6d6b4, inset 0 0 60px rgba(150, 110, 50, .18); }
.quest-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.quest-path path { fill: none; stroke-linecap: round; }
.qp-todo { stroke: #c9b48c; stroke-width: 5; stroke-dasharray: 2 12; }
.qp-done { stroke: #e2b13c; stroke-width: 7; filter: drop-shadow(0 2px 0 #b07a2a); }
.quest-deco { position: absolute; opacity: .55; transform: translate(-50%, -50%); pointer-events: none; user-select: none; }
.quest-start { position: absolute; left: 50%; transform: translate(-50%, -50%); background: var(--ink); color: var(--paper); font-weight: 700; font-size: .8rem;
  padding: .35rem .8rem; border-radius: 999px; display: flex; align-items: center; gap: .35rem; z-index: 2; }
/* Checkpoint */
.qn { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; z-index: 3; }
.qn.lbl-left { flex-direction: row-reverse; }
.qn.lbl-left .qn-label { text-align: right; align-items: flex-end; }
.qn-dot { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
  background: radial-gradient(circle at 35% 30%, #fff, #ddd3c2); color: #6b5a44; box-shadow: 0 4px 0 #b9a888, 0 8px 16px -6px rgba(0, 0, 0, .35), inset 0 0 0 3px #fff;
  transition: transform .2s; }
.qn:hover .qn-dot { transform: translateY(-3px) scale(1.05); }
.qn-done .qn-dot { background: radial-gradient(circle at 35% 30%, #fff3b0, #e2b13c 60%, #c8962a); color: #5a3a08; box-shadow: 0 4px 0 #9a6a14, 0 8px 18px -6px rgba(160, 110, 10, .6), inset 0 0 0 3px #fff6d0; }
.qn-current .qn-dot { width: 70px; height: 70px; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--c) 35%, #fff)); color: var(--ink);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000), 0 0 0 6px color-mix(in srgb, var(--c) 25%, transparent); animation: qn-pulse 2s ease-in-out infinite; }
@keyframes qn-pulse { 50% { box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000), 0 0 0 14px color-mix(in srgb, var(--c) 8%, transparent); } }
.qn-locked .qn-dot { background: #e9e2d4; color: #9a8f7d; box-shadow: 0 4px 0 #c9bfae; filter: grayscale(.4); }
.qn-locked .qn-label { opacity: .6; }
.qn-boss .qn-dot { width: 74px; height: 74px; font-size: 1.9rem; border-radius: 24px; }
.qn-boss.qn-todo .qn-dot, .qn-boss.qn-current .qn-dot { background: radial-gradient(circle at 35% 30%, #ffd9c9, #c8553d); color: #fff; box-shadow: 0 5px 0 #7c2f1d, 0 10px 20px -6px rgba(124, 47, 29, .55); }
.qn-me { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: qn-bob 1.6s ease-in-out infinite; }
.qn-me em { font-style: normal; font-size: .65rem; font-weight: 800; background: var(--ink); color: var(--paper); padding: .1rem .45rem; border-radius: 999px; margin-top: 2px; white-space: nowrap; }
@keyframes qn-bob { 50% { transform: translate(-50%, -5px); } }
.qn-label { display: flex; flex-direction: column; gap: .15rem; width: min(250px, 38vw); background: rgba(255, 253, 248, .94); border: 1px solid #e6d6b4; border-radius: 14px; padding: .55rem .75rem; box-shadow: 0 6px 16px -10px rgba(90, 60, 20, .5); }
.qn-eyebrow { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: color-mix(in srgb, var(--c) 75%, #000); }
.qn-title { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.qn-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .2rem; }
.qn.lbl-left .qn-chips { justify-content: flex-end; }
.qn-chips span { font-size: .68rem; padding: .1rem .45rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; }
.qn-chips span.won { background: #e3f1e4; color: #2f6b38; }
.qn-chips span.gold { background: #fde7a8; color: #6b4a14; }
.qn-current .qn-label { border-color: color-mix(in srgb, var(--c) 60%, #fff); box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--c) 70%, #000); }
/* Coffre final */
.quest-chest { position: absolute; left: 50%; transform: translate(-50%, -10%); display: flex; align-items: center; gap: .7rem; z-index: 3;
  padding: .6rem 1rem .6rem .7rem; border-radius: 18px; background: linear-gradient(135deg, #6e3d1c, #a0612f); color: #fde7c4; box-shadow: 0 6px 0 #3b2414, 0 14px 26px -10px rgba(0,0,0,.5); }
.quest-chest .qc-ico { font-size: 2.2rem; filter: grayscale(.25); }
.quest-chest .qc-txt { display: flex; flex-direction: column; }
.quest-chest small { color: #f1d3a6; }
.quest-chest.open { background: linear-gradient(135deg, #e2b13c, #f2d272); color: #3b2414; box-shadow: 0 6px 0 #9a6a14, 0 0 0 8px rgba(242, 210, 114, .35), 0 14px 26px -10px rgba(160,110,10,.6); }
.quest-chest.open small { color: #6b4a14; }
.quest-chest.open .qc-ico { filter: none; animation: cel-float 3s ease-in-out infinite; }
/* Petit écran : chemin vertical à gauche, étiquettes à droite */
@media (max-width: 760px) {
  .quest-path { display: none; }
  .quest::before { content: ''; position: absolute; left: 44px; top: 40px; bottom: 90px; border-left: 5px dotted #c9b48c; }
  .qn { left: 44px !important; transform: translate(-29px, -50%); flex-direction: row !important; }
  .qn.lbl-left .qn-label { text-align: left; align-items: flex-start; }
  .qn.lbl-left .qn-chips { justify-content: flex-start; }
  .qn-label { width: calc(100vw - 140px); }
  .quest-deco { display: none; }
  .quest-start { left: 44px; }
}
@media (prefers-reduced-motion: reduce) { .qn-current .qn-dot, .qn-me, .quest-chest.open .qc-ico { animation: none; } }

/* =========================================================
   Portfolio, galerie et fil de l'atelier
   ========================================================= */
.pf-grid { column-width: 260px; column-gap: 1rem; }
.pf-card { break-inside: avoid; margin-bottom: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.pf-img img { width: 100%; display: block; cursor: zoom-in; background: var(--paper-2); }
.pf-body { padding: .7rem .85rem .75rem; display: flex; flex-direction: column; gap: .3rem; }
.pf-author { display: flex; align-items: center; gap: .45rem; color: inherit; text-decoration: none; font-size: .88rem; }
.pf-author:hover strong { text-decoration: underline; }
.pf-title { font-weight: 700; }
.pf-desc { margin: 0; font-size: .88rem; color: var(--ink-2); }
.pf-foot { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; flex-wrap: wrap; }
.pf-like { display: inline-flex; align-items: center; gap: .3rem; border: 1.5px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 999px; padding: .2rem .6rem; font: inherit; font-size: .82rem; cursor: pointer; }
.pf-like .heart { font-size: 1rem; line-height: 1; transition: transform .2s; }
.pf-like.on { color: #c8553d; border-color: #f0c4b6; background: #fdf0ec; }
.pf-like.pop .heart { animation: pf-pop .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes pf-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
.pf-like-form { margin: 0; }
.pf-new { margin-bottom: 1.5rem; }
.pf-new summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pf-new summary::-webkit-details-marker { display: none; }
.pf-new[open] summary .btn { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.pf-hero { display: flex; gap: 1.4rem; align-items: center; margin: 2rem 0 1.5rem; flex-wrap: wrap; }
.pf-hero .grow { flex: 1; min-width: 220px; }
.feed { margin-top: 2.5rem; }
.pf-feed { column-width: 230px; }
@media (prefers-reduced-motion: reduce) { .pf-like.pop .heart { animation: none; } }
.pk-pf { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .5rem; }
.pk-pf img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
/* Correctifs : images de la case Brush d'or et vignettes des corrections */
.review .brush-or-toggle .bo-box img, .brush-or-toggle .bo-box img { width: 34px !important; height: 34px !important; max-width: none; aspect-ratio: auto; object-fit: contain; border: 0 !important; border-radius: 0; background: none; box-shadow: none; flex: none; margin: 0; padding: 0; }
.review .brush-or-badge img, .brush-or-badge img { width: 18px !important; height: 18px !important; border: 0 !important; border-radius: 0; background: none; box-shadow: none; aspect-ratio: auto; margin: 0; }
.rv-thumb { overflow: hidden; }
.rv-thumb img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }

/* Célébration Brush d'or : la créa au centre, le pinceau doré posé dessus comme un sceau */
.cel-art { position: relative; display: flex; justify-content: center; align-items: center; margin: 0 auto; min-height: 150px; }
.cel-brush { display: block; margin: 0 auto; }
.cel-work { display: block; max-width: min(300px, 100%); max-height: 230px; width: auto; height: auto; object-fit: contain; border-radius: 12px; background: #fff;
  border: 6px solid #fff; box-shadow: 0 0 0 3px #e2b13c, 0 18px 36px -14px rgba(120, 80, 10, .55); transform: rotate(-2deg);
  animation: cel-work-in .6s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes cel-work-in { from { transform: scale(.6) rotate(-10deg); opacity: 0; } to { transform: rotate(-2deg); opacity: 1; } }
.cel-brush.is-seal { position: absolute; right: calc(50% - min(150px, 50%) - 30px); bottom: -26px; width: 104px; height: 104px; margin: 0;
  animation: cel-pop .9s cubic-bezier(.2, 1.5, .4, 1) .35s both, cel-float 3s ease-in-out 1.3s infinite; }
@media (max-width: 480px) { .cel-brush.is-seal { right: -8px; width: 84px; height: 84px; } .cel-work { max-height: 190px; } }
@media (prefers-reduced-motion: reduce) { .cel-work { animation: none; } }

/* Portfolio : la créa la plus aimée en fond, très discrète (20 % → 0 % en diagonale).
   Même URL que la carte (une seule image téléchargée), sans flou ni position fixe : rien à recalculer au défilement. */
.pf-page { position: relative; isolation: isolate; }
.pf-backdrop { position: absolute; inset: 0 0 auto 0; height: min(92vh, 900px); z-index: -1; overflow: hidden; pointer-events: none; contain: strict;
  -webkit-mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .55) 35%, transparent 70%);
          mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .55) 35%, transparent 70%); }
.pf-backdrop img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 30%; opacity: .2; }
body.skin-nuit .pf-backdrop img { opacity: .16; }
@media print { .pf-backdrop { display: none; } }
.cel-art:has(.cel-work) { margin-bottom: 2.4rem; }
.cel-brush.is-seal { bottom: -34px; }
.pf-backdrop { top: -2.5rem; }
/* Fond du portfolio v2 : fondu diagonal ET fondu vers le bas (plus de démarcation, même avec une illustration pleine page) */
.pf-backdrop {
  -webkit-mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .6) 40%, transparent 78%), linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .6) 40%, transparent 78%), linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
          mask-composite: intersect;
}

/* ---------- Signalement & modération ---------- */
.report-box { position: relative; display: inline-block; }
.report-box > summary { list-style: none; cursor: pointer; font-size: .78rem; color: var(--muted); padding: .15rem .45rem; border-radius: 999px; user-select: none; }
.report-box > summary::-webkit-details-marker { display: none; }
.report-box > summary:hover, .report-box[open] > summary { color: #b3412b; background: #fbeae6; }
.report-box > summary span { margin-left: .15rem; }
.report-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(300px, 80vw); display: flex; flex-direction: column; gap: .5rem;
  padding: .8rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .35); text-align: left; }
.report-form select, .report-form textarea { width: 100%; font: inherit; font-size: .85rem; padding: .4rem .55rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); min-height: 0; height: auto; }
.mod-item { display: flex; gap: 1rem; align-items: flex-start; }
.mod-item .grow { flex: 1; min-width: 0; }
.mod-thumb img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; display: block; }
.mod-reports { margin: .3rem 0 0; padding-left: 1.1rem; color: var(--ink-2); }
.pill.mod-hot { background: #fbeae6; color: #8a2f1f; }
.role-tag.staff { background: #2f5d73; color: #e6f3f8; }
/* Badge « Cappu originel » : façon café latte (mousse de lait, anneau de café, latte art) */
.role-tag.originel { display: inline-flex; align-items: center; gap: .3rem; padding-left: .3rem;
  background: radial-gradient(120% 160% at 30% 20%, #fdf7ee 0%, #f1dfc6 38%, #d9b48c 72%, #b88a5a 100%);
  color: #5a3825; box-shadow: inset 0 0 0 1px #b88a5a, 0 1px 0 rgba(90, 56, 37, .15); text-shadow: 0 1px 0 rgba(255, 250, 240, .6); }
.role-tag.originel svg { flex: none; filter: drop-shadow(0 1px 1px rgba(90, 56, 37, .3)); }

/* ---------- Portfolio : réseaux et réorganisation ---------- */
.pf-socials { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.pf-social { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; color: var(--ink); text-decoration: none; box-shadow: 0 2px 6px -4px rgba(0,0,0,.25); }
.pf-social:hover { background: var(--ink); color: var(--paper); }
.pf-socials-edit { margin-top: .4rem; }
.pf-socials-edit summary { cursor: pointer; color: var(--accent-ink, var(--accent)); width: fit-content; }
.pf-socials-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem .8rem; margin-top: .6rem; padding: .9rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; max-width: 720px; }
.pf-socials-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; }
.pf-socials-form input { font: inherit; font-size: .85rem; font-weight: 400; padding: .4rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); }
.pf-socials-form button { grid-column: 1 / -1; justify-self: start; }
.pf-reorder-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: -.5rem 0 1rem; }
.pf-move { display: none; }
.pf-grid.reorder { column-width: auto; columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.pf-grid.reorder .pf-card { margin: 0; cursor: grab; position: relative; outline: 2px dashed transparent; transition: outline-color .15s, transform .15s; }
.pf-grid.reorder .pf-card:hover { outline-color: var(--accent); }
.pf-grid.reorder .pf-card.dragging { opacity: .4; transform: scale(.97); }
.pf-grid.reorder .pf-img img { aspect-ratio: 1; object-fit: cover; pointer-events: none; }
.pf-grid.reorder .pf-body { display: none; }
.pf-grid.reorder .pf-move { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; justify-content: space-between; align-items: center;
  padding: .3rem; background: linear-gradient(transparent, rgba(31, 28, 24, .7)); color: #fff; }
.pf-move button { border: 0; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .8rem; width: 32px; height: 28px; cursor: pointer; }
/* ---------- Encart Discord ---------- */
.discord-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 18px; text-decoration: none; color: #eef0ff;
  background: radial-gradient(circle at 90% 0%, #7983f5 0%, #5865f2 40%, #3c45a5 100%); box-shadow: 0 12px 28px -16px rgba(60, 69, 165, .8); margin: 1.25rem 0; }
.discord-card:hover { filter: brightness(1.06); }
.discord-card .dc-ico { font-size: 1.9rem; flex: none; }
.discord-card .dc-txt { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.discord-card strong { font-size: 1.05rem; color: #fff; }
.discord-card small { color: #dfe2ff; }
.discord-card .dc-btn { flex: none; background: #fff; color: #3c45a5; font-weight: 800; font-size: .85rem; padding: .5rem .9rem; border-radius: 999px; }
.discord-card.compact { padding: .7rem .9rem; margin: 0 0 1rem; }
.discord-card.compact small { display: none; }
@media (max-width: 560px) { .discord-card .dc-btn { display: none; } }

/* =========================================================
   Progression d'un cours : une ligne pleine largeur (checkpoints)
   ========================================================= */
.qline { margin: 0 0 2rem; padding: 1.1rem 1.2rem 1rem; }
.qline-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .4rem; }
.qline-track { display: grid; grid-template-columns: repeat(var(--n), minmax(118px, 1fr)); overflow-x: auto; scroll-snap-type: x proximity; padding: .2rem 0 .4rem; scrollbar-width: thin; }
.qs { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: inherit; scroll-snap-align: center; padding: 0 .35rem; }
/* Le trait : moitié gauche + moitié droite de chaque étape, doré quand l'étape est franchie */
.qs::before, .qs::after { content: ''; position: absolute; top: 58px; height: 6px; background: #e6dccb; z-index: 0; }
.qs::before { left: 0; right: 50%; }
.qs::after { left: 50%; right: 0; }
.qs:first-child::before, .qs:last-child::after { display: none; }
.qs.seg-done::before, .qs.seg-done::after, .qs.seg-done + .qs::before { background: linear-gradient(90deg, #e2b13c, #f2d272); }
.qs-top { height: 36px; display: flex; align-items: flex-end; }
.qs-dot { position: relative; z-index: 1; width: 44px; height: 44px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem;
  background: var(--card); color: var(--muted); border: 3px solid #e6dccb; transition: transform .15s; }
a.qs:hover .qs-dot { transform: scale(1.1); }
.qs-done .qs-dot { background: radial-gradient(circle at 35% 30%, #fff3b0, #e2b13c 65%); border-color: #c8962a; color: #5a3a08; }
.qs-current .qs-dot { width: 52px; height: 52px; margin-top: -2px; border-color: var(--c, var(--accent)); color: var(--ink); background: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c, var(--accent)) 20%, transparent); animation: qn-pulse 2s ease-in-out infinite; }
.qs-locked .qs-dot { background: var(--paper-2); }
.qs-boss .qs-dot { border-radius: 14px; }
.qs-boss.qs-todo .qs-dot, .qs-boss.qs-current .qs-dot { background: radial-gradient(circle at 35% 30%, #ffd9c9, #c8553d); color: #fff; border-color: #7c2f1d; }
.qs-chest .qs-dot { border-radius: 12px; background: linear-gradient(135deg, #6e3d1c, #a0612f); border-color: #3b2414; font-size: 1.3rem; }
.qs-chest.open .qs-dot { background: linear-gradient(135deg, #e2b13c, #f2d272); border-color: #9a6a14; }
.qs-me { display: flex; flex-direction: column; align-items: center; animation: qn-bob 1.6s ease-in-out infinite; }
.qs-me em { font-style: normal; font-size: .6rem; font-weight: 800; background: var(--ink); color: var(--paper); padding: .05rem .4rem; border-radius: 999px; margin-top: 1px; white-space: nowrap; }
.qs-label { display: flex; flex-direction: column; gap: .1rem; margin-top: .5rem; max-width: 150px; }
.qs-eyebrow { font-size: .6rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.qs-current .qs-eyebrow { color: color-mix(in srgb, var(--c, var(--accent)) 80%, #000); }
.qs-title { font-size: .8rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qs-locked .qs-title { color: var(--muted); }
.qs-meta { font-size: .68rem; color: var(--muted); }
.qs-done .qs-meta { color: #2f6b38; }
/* Liste détaillée sous la ligne */
.lesson-list li.is-current a { border-color: color-mix(in srgb, var(--c) 60%, #fff); box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--c) 70%, #000); }
.lesson-chips { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.lesson-chips span { font-size: .68rem; padding: .08rem .45rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.lesson-chips span.won { background: #e3f1e4; color: #2f6b38; }
.lesson-chips span.gold { background: #fde7a8; color: #6b4a14; }
@media (prefers-reduced-motion: reduce) { .qs-current .qs-dot, .qs-me { animation: none; } }
.qs-top { height: 56px; }
.qs::before, .qs::after { top: 77px; }

/* =========================================================
   Ligne de progression v3 : le chemin du coffee shop
   ========================================================= */
.qs-top { height: 30px; }
/* Le trait : des grains de café à venir… et du latte une fois franchi */
.qs::before, .qs::after { top: 56px; height: 10px; border-radius: 999px; background:
  radial-gradient(ellipse 4px 5.5px at 50% 50%, #8a5a3c 92%, transparent 100%) 0 50% / 14px 10px repeat-x; opacity: .45; }
.qs.seg-done::before, .qs.seg-done::after, .qs.seg-done + .qs::before { opacity: 1;
  background: linear-gradient(180deg, #f3e3cf 0 3px, #c69c72 3px 6px, #8a5a3c 6px 100%); box-shadow: 0 1px 0 rgba(59, 36, 24, .25); }
/* Tasses : vide (crème) à venir, espresso avec crema une fois franchie */
.qs-dot { width: 46px; height: 46px; margin-top: 0; border: 3px solid #c69c72; background: #fbf3e6; color: #6f4a32; font-family: var(--serif); font-size: 1.05rem;
  box-shadow: 0 3px 0 #b88a5a; }
.qs-done .qs-dot { background: radial-gradient(circle at 50% 45%, #e9c99a 0 30%, #a86f45 52%, #5a3825 78%, #3b2418 100%); border-color: #3b2414; color: #fff8ee;
  box-shadow: 0 3px 0 #2a1910; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.qs-locked .qs-dot { background: #efe6d8; border-color: #d9c8b0; color: #a08e78; box-shadow: none; }
.qs-boss .qs-dot { border-radius: 14px; }
.qs-boss.qs-todo .qs-dot { background: radial-gradient(circle at 35% 30%, #ffd9c9, #c8553d); color: #fff; border-color: #7c2f1d; box-shadow: 0 3px 0 #5e2416; }
/* Checkpoint en cours : grand cercle avec la photo, sans animation, la vapeur de café au-dessus */
.qs-current .qs-dot.qs-photo { width: 76px; height: 76px; margin-top: -15px; padding: 0; overflow: visible; animation: none; background: #fbf3e6;
  border: 4px solid #c69c72; box-shadow: 0 0 0 4px #f3e3cf, 0 0 0 6px #8a5a3c, 0 8px 18px -8px rgba(59, 36, 24, .6); }
.qs-photo img, .qs-photo .qs-ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.qs-photo .qs-ini { background: #3b2418; color: #f3e3cf; font-weight: 800; font-size: 1.3rem; font-family: var(--sans, inherit); }
.qs-num { position: absolute; right: -6px; bottom: -4px; min-width: 24px; height: 24px; padding: 0 .3rem; border-radius: 999px; display: grid; place-items: center;
  background: #3b2418; color: #fff8ee; font-size: .75rem; font-weight: 800; border: 2px solid #f3e3cf; font-family: var(--sans, inherit); }
.qs-steam { width: 34px; height: 20px; margin-bottom: 10px; }
.qs-steam path { stroke: #b49a86; opacity: .8; }
.qs-current .qs-eyebrow { color: #a0612f; }
.qs-label { margin-top: .55rem; }
/* La récompense brille : halo doré et rayons qui tournent lentement */
.qs-chest .qs-dot { position: relative; overflow: visible; width: 54px; height: 54px; margin-top: -4px; border-radius: 14px; border-color: #9a6a14;
  background: linear-gradient(135deg, #f2d272, #e2b13c 55%, #c8962a); box-shadow: 0 3px 0 #7a5410, 0 0 18px 4px rgba(242, 210, 114, .75); animation: qs-glow 2.4s ease-in-out infinite; }
.qs-chest-ico { position: relative; z-index: 1; font-size: 1.5rem; }
.qs-shine { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(242, 210, 114, .55) 0 12deg, transparent 12deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: cel-spin 9s linear infinite; }
.qs-chest .qs-title { color: #a0721c; }
@keyframes qs-glow { 50% { box-shadow: 0 3px 0 #7a5410, 0 0 30px 10px rgba(242, 210, 114, .95); transform: scale(1.06); } }
.qline-track { padding-top: .6rem; }
/* Skin Atelier de nuit : textes lisibles */
body.skin-nuit .qs-eyebrow { color: #a49cb0; }
body.skin-nuit .qs-current .qs-eyebrow, body.skin-nuit .qs-chest .qs-title { color: #f2ab7d; }
body.skin-nuit .qs-todo .qs-dot { background: #2e2a33; color: #e9c99a; }
body.skin-nuit .qs-locked .qs-dot { background: #26252e; border-color: #4a4756; color: #8e8899; }
body.skin-nuit .qs-current .qs-dot.qs-photo { background: #2e2a33; box-shadow: 0 0 0 4px #3b2f2a, 0 0 0 6px #c69c72, 0 8px 18px -8px rgba(0, 0, 0, .7); }
@media (prefers-reduced-motion: reduce) { .qs-chest .qs-dot, .qs-shine { animation: none; } }

.qs::before, .qs::after { border-radius: 0; }
.qs:first-child::after { border-radius: 999px 0 0 999px; }
.qs:last-child::before { border-radius: 0 999px 999px 0; }

/* ==========================================================================
   FORUM — fond « trame » façon rossdraws.com : minuscules points carrés sur une
   grille de 6 px, sur la moitié droite de l'écran, bord gauche qui se dissout et
   trame plus serrée en bas à droite. Couleur des points selon le thème.
   Calque fixe et immobile : dessiné une seule fois, rien à repeindre au défilement.
   ========================================================================== */
body.forum-page { --dot: rgba(31, 28, 24, .11); background-color: var(--paper); background-image: none; }
body.skin-nuit.forum-page { --dot: rgba(255, 255, 255, .12); }
body.skin-coffee.forum-page { --dot: rgba(96, 62, 36, .16); }
body.forum-page::before, body.forum-page::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  /* un carré de 1,5 px dans le coin de chaque case de 6 px */
  background: conic-gradient(from 270deg at 1.5px 1.5px, var(--dot) 25%, transparent 0) 0 0 / 6px 6px;
}
/* Trame principale : la moitié droite, bord gauche en fondu irrégulier */
body.forum-page::before {
  -webkit-mask-image: linear-gradient(97deg, transparent 0 40%, rgba(0, 0, 0, .35) 46%, #000 54%);
          mask-image: linear-gradient(97deg, transparent 0 40%, rgba(0, 0, 0, .35) 46%, #000 54%);
}
/* Deuxième trame décalée d'un demi-pas : plus dense en bas à droite (effet tramé) */
body.forum-page::after {
  background-position: 3px 3px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 100% 100%, #000 0 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 55% at 100% 100%, #000 0 35%, transparent 100%);
}
@media (max-width: 760px) {
  body.forum-page::before { -webkit-mask-image: linear-gradient(170deg, transparent 0 20%, #000 60%); mask-image: linear-gradient(170deg, transparent 0 20%, #000 60%); }
}

.forum-shell { width: min(1000px, 100% - 2rem); margin: 2.6rem auto 4rem; }
.forum-shell.wide { width: min(1240px, 100% - 2rem); }
.fcard, .fcat-list, .fbox, .fpost, .freply-form, .fempty {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 28px -18px rgba(0, 0, 0, .35);
}
.fcat-list { overflow: hidden; }

/* Barre du haut : retour + recherche */
.ftop { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.fcrumbs { flex: 1; display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.fcrumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.fcrumbs a:hover { color: var(--ink); }
.fcrumbs .sep { color: var(--line); }
.fsearch { display: flex; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.fsearch:focus-within { border-color: var(--ink-2); }
.fsearch input { background: transparent; border: 0; padding: .5rem 1rem; font-size: .88rem; min-width: 0; box-shadow: none; }
.fsearch input:focus { outline: none; }
.fsearch button { border: 0; background: transparent; color: var(--muted); width: 42px; cursor: pointer; display: grid; place-items: center; }
.fsearch button:hover { color: var(--ink); }

/* Titre de page */
.fhead { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 2rem; }
.fhead h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.15; }
.fhead p { margin: .35rem 0 0; color: var(--muted); }
.ftopic-head h1 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }

/* Rubriques */
.fcat { margin-bottom: 2.4rem; scroll-margin-top: 90px; }
.fcat:last-child { margin-bottom: 0; }
.fcat h2 { margin: 0 0 .8rem .2rem; color: var(--muted); font: 700 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.frow { display: grid; grid-template-columns: 46px minmax(0, 1fr) 100px 230px; gap: 1.2rem; align-items: center; padding: 1.15rem 1.4rem; }
.frow + .frow { border-top: 1px solid var(--line); }
.frow:hover { background: color-mix(in srgb, var(--paper-2) 45%, var(--card)); }
.frow-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--paper-2); object-fit: cover; }
.frow-name { font-weight: 700; font-size: 1.04rem; color: var(--ink); text-decoration: none; }
.frow-name:hover { color: var(--accent-ink); }
.frow-desc { font-size: .86rem; color: var(--muted); margin-top: .15rem; }
.frow-count { font-size: .82rem; color: var(--muted); text-align: right; }
.frow-count b { color: var(--ink); font-size: .96rem; }
.frow-last { display: flex; gap: .7rem; align-items: center; min-width: 0; }
.frow-last-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.frow-last-txt a { font-size: .86rem; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.frow-last-txt a:hover { color: var(--accent-ink); }
.frow-last-txt small { font-size: .76rem; color: var(--muted); }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .frow { grid-template-columns: 40px minmax(0, 1fr); gap: .35rem .9rem; padding: 1rem 1.1rem; }
  .frow-count { display: none; }
  .frow-last { grid-column: 2; }
  .frow-last .av { display: none; }
}
.is-coach { color: #a0612f !important; font-weight: 700; }
.is-staff { color: #2f7fb5 !important; font-weight: 700; }
body.skin-nuit .is-coach { color: #f0b37e !important; }
body.skin-nuit .is-staff { color: #8cc6f0 !important; }

/* Préfixes */
.fprefix { display: inline-block; background: var(--c, #888); color: #fff; font: 700 .64rem/1 var(--sans); letter-spacing: .04em; padding: .3rem .45rem .26rem; border-radius: 4px; margin-right: .5rem; vertical-align: 3px; white-space: nowrap; }
.fprefix.none { background: transparent; color: var(--muted); border: 1px dashed var(--line); }

/* Liste des sujets */
.ftopic { display: grid; grid-template-columns: 38px minmax(0, 1fr) 100px 160px; gap: 1.1rem; align-items: center; padding: 1rem 1.4rem; }
.ftopic + .ftopic { border-top: 1px solid var(--line); }
.ftopic:hover { background: color-mix(in srgb, var(--paper-2) 45%, var(--card)); }
.ftopic.pinned { background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.ftopic-title { color: var(--ink); text-decoration: none; font-weight: 600; }
.ftopic-title:hover { color: var(--accent-ink); }
.ftopic-meta { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.ftopic-meta a { color: inherit; }
.ftopic-nums { font-size: .8rem; color: var(--muted); text-align: right; display: flex; flex-direction: column; line-height: 1.35; }
.ftopic-nums b { color: var(--ink); }
.ftopic-nums small { font-size: .74rem; }
.ftopic-last { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.ftopic-last-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ftopic-last-txt b { font-size: .82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftopic-last-txt small { font-size: .74rem; color: var(--muted); }
.fempty { padding: 2.2rem; text-align: center; color: var(--muted); }
.fcat-list .fempty { border: 0; box-shadow: none; border-radius: 0; }
@media (max-width: 680px) {
  .ftopic { grid-template-columns: 32px minmax(0, 1fr); padding: .9rem 1.1rem; }
  .ftopic-nums, .ftopic-last { display: none; }
}
.fpager { display: flex; gap: .35rem; justify-content: center; margin: 1.6rem 0; }
.fpager a { min-width: 36px; text-align: center; padding: .35rem .6rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .85rem; }
.fpager a:hover { border-color: var(--ink-2); }
.fpager a.on { background: var(--ink); border-color: var(--ink); color: var(--card); font-weight: 700; }
.fpager .gap { color: var(--muted); padding: .35rem .2rem; }

/* Discussion */
.ftools { display: flex; gap: .45rem; align-items: center; }
.fmove { position: relative; }
.fmove summary { list-style: none; cursor: pointer; }
.fmove summary::-webkit-details-marker { display: none; }
.fmove-form { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .9rem; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; width: 260px; }
.fmove-move { display: flex; flex-direction: column; gap: .45rem; align-self: stretch; padding: .6rem 0; border-block: 1px solid var(--line); }
.fpost { display: grid; grid-template-columns: 160px minmax(0, 1fr); margin-bottom: 1.25rem; }
.fpost-user { padding: 1.5rem 1rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; border-right: 1px solid var(--line); }
.fpost-user .av { margin: 0 auto .4rem; }
.fpost-name { font-weight: 700; color: var(--ink); text-decoration: none; word-break: break-word; }
.fpost-name:hover { color: var(--accent-ink); }
.fpost-tags { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: center; }
.fpost-lvl { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.fpost-main { min-width: 0; padding: 1.2rem 1.6rem 1.3rem; display: flex; flex-direction: column; }
.fpost-top { display: flex; align-items: center; gap: .7rem; font-size: .8rem; color: var(--muted); margin-bottom: .7rem; }
.fpost-num { color: var(--muted); text-decoration: none; }
.fpost-body { position: relative; flex: 1; }
.fpost-body > :not(.ink-fx) { position: relative; z-index: 1; }
.fpost-body .prose { font-size: 1.02rem; line-height: 1.7; }
.fpost-body .prose p:last-child { margin-bottom: 0; }
.fpost.by-coach { border-color: #d9b98a; box-shadow: 0 0 0 1px #d9b98a, 0 12px 28px -18px rgba(0, 0, 0, .35); }
.freacts { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: 1.1rem; }

.freact { border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; font-size: .8rem; color: var(--ink-2); padding: .18rem .6rem; border-radius: 999px; display: inline-flex; gap: .25rem; align-items: center; }
.freact span { font-size: .95rem; }
.freact:hover:not(:disabled) { border-color: var(--ink-2); }
.freact.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.freact:disabled { cursor: default; }
.freact-add { position: relative; }
.freact-add summary { list-style: none; cursor: pointer; font-size: .8rem; color: var(--muted); padding: .18rem .6rem; border-radius: 999px; border: 1px dashed var(--line); }
.freact-add summary::-webkit-details-marker { display: none; }
.freact-add summary:hover, .freact-add[open] summary { color: var(--ink); border-color: var(--ink-2); }
.freact-menu { position: absolute; z-index: 20; left: 0; bottom: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); padding: .25rem .4rem; display: flex; }
.freact-menu button { border: 0; background: none; cursor: pointer; padding: .2rem .3rem; font-size: 1.35rem; line-height: 1; }
.freact-menu button span { display: inline-block; transition: transform .12s; }
.freact-menu button:hover span { transform: scale(1.3) translateY(-2px); }
.fpost-pm { margin-top: .5rem; font-size: .76rem; text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: .2rem .65rem; color: var(--ink-2); }
.fpost-pm:hover { border-color: var(--ink-2); }
.freply { margin-top: 2rem; }
.freply-form { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; padding: 1.2rem 1.4rem; }
.freply-form textarea { min-height: 120px; margin-bottom: .7rem; }
@media (max-width: 640px) {
  .forum-shell, .forum-shell.wide { width: calc(100% - 1.2rem); margin-top: 1.4rem; }
  .fpost { grid-template-columns: 1fr; }
  .fpost-user { flex-direction: row; flex-wrap: wrap; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: .8rem 1.1rem; gap: .5rem; }
  .fpost-user .av { --s: 36px !important; margin: 0; }
  .fpost-main { padding: 1rem 1.1rem; }
  .freply-form { grid-template-columns: 1fr; }
  .freply-form > .av { display: none; }
  .ftop { flex-direction: column; align-items: stretch; }
  .fsearch { width: 100%; }
}

/* Nouvelle discussion */
.fcard { padding: 1.6rem 1.7rem; }
.fprefix-pick { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .3rem; }
.fprefix-pick label { cursor: pointer; margin: 0; }
.fprefix-pick input { position: absolute; opacity: 0; pointer-events: none; }
.fprefix-pick .fprefix { opacity: .45; font-size: .7rem; padding: .38rem .55rem .34rem; }
.fprefix-pick input:checked + .fprefix { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c, var(--line)); }
.fprefix-pick input:focus-visible + .fprefix { outline: 2px solid var(--ink); }
.forum-shell > .alert { margin-bottom: 1.2rem; }

/* Accueil : barre latérale */
.fgrid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 2rem; align-items: start; }
@media (max-width: 1040px) { .fgrid { grid-template-columns: 1fr; } }
.fgrid .frow { grid-template-columns: 46px minmax(0, 1fr) 96px 210px; }
@media (max-width: 760px) { .fgrid .frow { grid-template-columns: 40px minmax(0, 1fr); } }
.fside { display: flex; flex-direction: column; gap: 1.2rem; padding-top: 1.54rem; }
.fbox { overflow: hidden; }
.fbox h3 { margin: 0; padding: .85rem 1.1rem; font: 700 .84rem/1.2 var(--sans); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .45rem; }
.fbox h3 small { margin-left: auto; background: var(--paper-2); color: var(--muted); border-radius: 99px; padding: .1rem .55rem; font-size: .72rem; }
.fbox-empty { margin: 0; padding: .9rem 1.1rem; font-size: .84rem; color: var(--muted); }
.fteam { display: flex; gap: .7rem; align-items: center; padding: .6rem 1.1rem; text-decoration: none; color: inherit; }
.fteam:first-of-type { padding-top: .8rem; }
.fteam:last-child { padding-bottom: .8rem; }
.fteam:hover { background: var(--paper-2); }
.fteam span { display: flex; flex-direction: column; line-height: 1.25; }
.fteam small { font-size: .72rem; color: var(--muted); }
.fonline { margin: 0; padding: .9rem 1.1rem; font-size: .85rem; line-height: 1.75; color: var(--muted); }
.fonline a { color: var(--ink-2); text-decoration: none; }
.fonline a:hover { text-decoration: underline; }
.flatest { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .7rem; align-items: center; padding: .7rem 1.1rem; text-decoration: none; color: inherit; }
.flatest + .flatest { border-top: 1px solid var(--line); }
.flatest:hover { background: var(--paper-2); }
.flatest span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.flatest b { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flatest small { font-size: .74rem; color: var(--muted); }
.fstats { display: grid; grid-template-columns: auto 1fr; gap: .45rem .8rem; margin: 0; padding: .9rem 1.1rem; font-size: .86rem; }
.fstats dt { color: var(--muted); }
.fstats dd { margin: 0; text-align: right; font-weight: 600; }
.fstats dd a { color: inherit; }
@media (max-width: 1040px) { .fside { padding-top: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

/* ---------- Messages privés ---------- */
.pm-link { position: relative; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); display: grid; place-items: center; margin-left: auto; }
.pm-link:hover { background: var(--paper-2); }
.pm-link + .bell-menu { margin-left: 0; }
.hdr-gold + .pm-link { margin-left: .4rem; }
.pm-page { margin-top: 1.5rem; margin-bottom: 2rem; }
.pm-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; height: calc(100vh - 150px); min-height: 480px; }
.pm-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.pm-list-head { padding: 1rem 1rem .8rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.pm-list-head h1 { font-size: 1.4rem; margin: 0 0 .6rem; }
.pm-new { display: flex; gap: .4rem; }
.pm-new input { padding: .45rem .7rem; font-size: .88rem; }
.pm-none { padding: 1rem; color: var(--muted); font-size: .9rem; }
.pm-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .7rem 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.pm-item:hover { background: var(--paper-2); }
.pm-item.on { background: color-mix(in srgb, var(--accent) 9%, var(--card)); }
.pm-item-txt { min-width: 0; display: flex; flex-direction: column; }
.pm-item-top { display: flex; gap: .5rem; align-items: baseline; }
.pm-item-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-item-top small { margin-left: auto; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.pm-item-prev { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-item.unread .pm-item-prev { color: var(--ink); font-weight: 600; }
.pm-badge { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 99px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.pm-pane { display: flex; flex-direction: column; min-height: 0; }
.pm-empty { margin: auto; text-align: center; padding: 2rem; max-width: 420px; }
.pm-empty-ico { font-size: 2.6rem; }
.pm-empty h2 { margin: .4rem 0; }
.pm-head { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.pm-who { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.pm-back { display: none; text-decoration: none; font-size: 1.3rem; color: var(--ink); padding: 0 .3rem; }
.pm-head .fmove-form a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.pm-thread { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; background: var(--paper); }
.pm-start { text-align: center; margin: auto 0 1rem; }
.pm-day { text-align: center; margin: .8rem 0 .4rem; }
.pm-day span { font-size: .72rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: .15rem .7rem; }
.pm-msg { max-width: min(560px, 80%); align-self: flex-start; display: flex; flex-direction: column; }
.pm-msg.mine { align-self: flex-end; align-items: flex-end; }
.pm-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: .55rem .85rem; }
.pm-msg.mine .pm-bubble { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.pm-msg.mine .pm-bubble a { color: #fff; }
.pm-bubble .prose { font-size: .95rem; line-height: 1.5; }
.pm-bubble .prose p { margin: 0 0 .4rem; }
.pm-bubble .prose > :last-child { margin-bottom: 0; }
.pm-meta { font-size: .68rem; color: var(--muted); margin: .15rem .3rem 0; display: flex; gap: .5rem; align-items: center; }
.pm-meta .report-box summary span { display: none; }
.pm-meta .report-box { opacity: 0; transition: opacity .15s; }
.pm-msg:hover .pm-meta .report-box, .pm-meta .report-box[open] { opacity: 1; }
.pm-form { display: flex; gap: .6rem; align-items: flex-end; padding: .8rem 1rem; border-top: 1px solid var(--line); }
.pm-form textarea { min-height: 46px; max-height: 200px; resize: vertical; }
.pm-blocked { padding: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; text-align: center; }
@media (max-width: 760px) {
  .pm-layout { grid-template-columns: 1fr; height: calc(100vh - 110px); }
  .pm-layout.has-other .pm-list { display: none; }
  .pm-layout:not(.has-other) .pm-pane { display: none; }
  .pm-back { display: block; }
  .pm-page { margin-top: .6rem; }
}
.pm-meta .report-form { left: 0; right: auto; z-index: 30; }
.pm-meta .report-box { position: relative; }
@media (max-width: 480px) {
  .topbar .container { gap: .45rem; }
  .pm-link, .bell { width: 34px; height: 34px; }
  .hdr-gold { padding-inline: .55rem; }
}

/* Petits avatars (listes, barre latérale, en-tête) : ornements immobiles — des dizaines
   d'animations en même temps rendaient le défilement saccadé. */
.av-mini::before, .av-mini::after, .av-mini .av-deco, .av-mini .av-deco *, .av-mini .drop { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .brush-or-badge::after, .ink-fx i { animation: none !important; } }
.forum-shell section + section { margin-top: 0; }
.fhead-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .fhead-actions { width: 100%; } .fhead-actions .fsearch { flex: 1; } }

/* ==========================================================================
   EN-TÊTE — menu principal court, icônes regroupées à droite, « Plus ▾ » pour
   le formateur, panneau latéral sur mobile (burger tout à droite).
   ========================================================================== */
.topbar .container { gap: 1rem; }
.topbar .nav { margin-left: 1.2rem; gap: .15rem; align-items: center; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.hdr-actions > * { margin-left: 0 !important; }
.hdr-actions .hdr-gold { margin-right: .5rem !important; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn .bell-count { position: absolute; top: 3px; right: 2px; }
.user-menu .av-btn { padding: 3px; margin-left: .2rem; }
.nav-more { position: relative; }
.nav-more > button { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .8rem; border-radius: 999px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .94rem; font-weight: 500; cursor: pointer; }
.nav-more > button:hover { background: var(--paper-2); color: var(--ink); }
.nav-more > button.active { background: var(--ink); color: var(--paper); }
.more-dd { left: 0; right: auto; min-width: 240px; }
.dd-title { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .7rem .75rem .25rem; }
.dd-title:first-child { padding-top: .35rem; }
.dd-sep { height: 1px; background: var(--line); margin: .3rem .2rem; }
.dropdown a.on { background: var(--paper-2); font-weight: 600; }
.dd-ico { display: inline-block; width: 1.6em; text-align: center; margin-right: .35rem; }
body.skin-coffee .icon-btn, body.skin-coffee .nav-more > button { color: #f3e6d4; }
body.skin-coffee .icon-btn:hover, body.skin-coffee .nav-more > button:hover { background: #5d3a26; color: #fff; }
body.skin-coffee .nav-more > button.active { background: #f3e6d4; color: #3b2418; }

/* Panneau mobile */
.menu-toggle { display: none; }
.mnav, .mnav-overlay { display: none; }
@media (max-width: 1040px) {
  .topbar .nav, .topbar .hdr-gold { display: none !important; }
  .menu-toggle { display: grid; }
  .mnav-overlay { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(20, 16, 12, .4); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .mnav { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(330px, 86vw);
    background: var(--card); box-shadow: -18px 0 40px -20px rgba(0, 0, 0, .45); transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; visibility: hidden; }
  body.mnav-open { overflow: hidden; }
  body.mnav-open .mnav-overlay { opacity: 1; pointer-events: auto; }
  body.mnav-open .mnav { transform: none; visibility: visible; }
  .mnav-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem .8rem .8rem 1.1rem; border-bottom: 1px solid var(--line); }
  .mnav-head .brand { font-size: 1.2rem; }
  .mnav-head .brand-logo { width: 34px; height: 34px; }
  .mnav-links { display: flex; flex-direction: column; padding: .6rem; gap: .1rem; }
  .mnav-links a { display: flex; align-items: center; min-height: 48px; padding: 0 .8rem; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.02rem; }
  .mnav-links a:hover { background: var(--paper-2); }
  .mnav-links a.on { background: var(--ink); color: var(--paper); }
  .mnav-links a .badge { margin-left: auto; }
  .mnav-links .dd-title { padding: 1rem .8rem .3rem; }
  .mnav-gold { margin: auto .9rem 1rem; padding: .9rem 1rem; border-radius: 14px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #8a5a3c, #a5532c); display: flex; flex-direction: column; gap: .2rem; }
  .mnav-gold span { font-size: .82rem; opacity: .9; }
}
@media (max-width: 1040px) and (prefers-reduced-motion: reduce) { .mnav, .mnav-overlay { transition: none; } }
@media (max-width: 480px) {
  .hdr-actions { gap: .1rem; }
  .icon-btn { width: 38px; height: 38px; }
  .brand { font-size: 1.2rem; }
}
/* Onglets Galerie ↔ Corrections */
.gtabs { display: inline-flex; gap: .25rem; padding: .3rem; margin-top: 1.6rem; background: var(--paper-2); border-radius: 999px; flex-wrap: wrap; }
.gtabs a { padding: .45rem 1rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .92rem; }
.gtabs a:hover { color: var(--ink); }
.gtabs a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.gtabs + .page-head { padding-top: 1.2rem; }

/* ==========================================================================
   PAGE D'ACCUEIL PUBLIQUE — pinceau de Matte, chiffres, contenu de l'atelier,
   cours réels, démo de correction (avant / après), étapes, formateur, formules, FAQ.
   ========================================================================== */
.home .hero { padding: 4.5rem 0 2.5rem; }
.hero-brush { position: relative; display: grid; place-items: center; }
.hero-brush .hero-splash { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-brush img { position: relative; width: 78%; height: auto; filter: drop-shadow(0 18px 22px rgba(60, 40, 20, .18)); animation: brush-float 6s ease-in-out infinite; }
@keyframes brush-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-brush img { animation: none; } }
body.skin-nuit .hero-splash path:first-child { fill: #2b2833; }

.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.home-stats > div { padding: 1.3rem 1.2rem; text-align: center; display: flex; flex-direction: column; gap: .15rem; }
.home-stats > div + div { border-left: 1px solid var(--line); }
.home-stats b { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--accent); }
.home-stats span { font-size: .86rem; color: var(--muted); }
@media (max-width: 700px) { .home-stats { grid-template-columns: 1fr 1fr; } .home-stats > div:nth-child(3) { border-left: 0; } .home-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.home-sec { padding-block: 4.5rem; }
.home-band { background: var(--paper-2); border-block: 1px solid var(--line); }
.home-head { margin-bottom: 2.2rem; max-width: 640px; }
.home-head.center { text-align: center; margin-inline: auto; }
.home-head h2, .home-demo h2, .home-coach h2, .home-cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; margin: .35rem 0 .5rem; }
.home-head p { margin: 0; }
.row-head { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.home-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .home-feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .home-feats { grid-template-columns: 1fr; } }
.hfeat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem 1.5rem 1.3rem; transition: transform .2s ease, box-shadow .2s ease; }
.hfeat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(60, 40, 20, .35); }
.hfeat-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--paper-2); margin-bottom: .9rem; }
.hfeat h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.hfeat p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.55; }

.home-courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .home-courses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .home-courses { grid-template-columns: 1fr; } }
.hcourse { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.hcourse:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(60, 40, 20, .4); }
.hcourse-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.hcourse-img.emoji { display: grid; place-items: center; font-size: 3rem; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--card)), color-mix(in srgb, var(--c) 45%, var(--card))); }
.hcourse-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.hcourse-cat { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hcourse strong { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.hcourse-desc { font-size: .88rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hcourse-meta { margin-top: auto; padding-top: .5rem; font-size: .8rem; color: var(--accent-ink); font-weight: 600; }

.home-demo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .home-demo { grid-template-columns: 1fr; } }
.lead-sm { font-size: 1.05rem; color: var(--ink-2); line-height: 1.6; }
.home-checks { list-style: none; padding: 0; margin: 1.2rem 0; }
.home-checks li { padding: .4rem 0 .4rem 1.8rem; position: relative; }
.home-checks li::before { content: '✓'; position: absolute; left: 0; top: .35rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.home-ba { box-shadow: 0 24px 50px -28px rgba(60, 40, 20, .5); border-radius: 18px; background: #fbf8f1; }

.home-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: s; }
@media (max-width: 800px) { .home-steps { grid-template-columns: 1fr; } }
.home-steps li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; position: relative; }
.home-steps li > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 1.3rem; margin-bottom: .9rem; }
.home-steps h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.home-steps p { margin: 0; color: var(--ink-2); font-size: .93rem; }

.home-coach { display: grid; grid-template-columns: 180px 1fr; gap: 2.5rem; align-items: center; max-width: 900px; }
.home-coach-photo { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 4px solid var(--card); box-shadow: 0 0 0 2px var(--accent), 0 20px 40px -24px rgba(0, 0, 0, .5); }
.home-coach-photo.initial { display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 4rem; }
@media (max-width: 640px) { .home-coach { grid-template-columns: 1fr; text-align: center; } .home-coach-photo { margin: 0 auto; } }

.home .home-plans { margin-bottom: 0; }

.home-faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .home-faq { grid-template-columns: 1fr; gap: 0; } }
.home-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: .7rem; }
.home-faq summary { cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; font-weight: 600; position: relative; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after { content: '+'; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--accent); transition: transform .2s ease; }
.home-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.home-faq details p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--ink-2); line-height: 1.6; }

.home-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; padding: 2.2rem 2.5rem; border-radius: 24px; color: #fff7ea;
  background: radial-gradient(circle at 85% 20%, #c8553d, #8a4a2e 55%, #3b2418); box-shadow: 0 30px 60px -30px rgba(60, 30, 15, .6); }
.home-cta img { width: 110px; height: auto; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); }
.home-cta h2 { color: #fff7ea; margin: 0 0 .3rem; }
.home-cta p { margin: 0; color: #f0dcc4; }
.home-cta .btn.accent { background: #fff7ea; color: #3b2418; border-color: #fff7ea; }
@media (max-width: 760px) { .home-cta { grid-template-columns: 1fr; text-align: center; padding: 2rem 1.4rem; } .home-cta img { margin: 0 auto; width: 80px; } }
.home-discord { max-width: 860px; margin: 2rem auto 0; }
.home > section:last-child { padding-bottom: 1rem; }
@media (max-width: 580px) {
  .home-sec { padding-block: 3rem; }
  .home .hero { padding-top: 2.5rem; }
  .home .hero-brush { max-width: 250px; margin: 0 auto; }
  .hfeat { display: grid; grid-template-columns: 44px 1fr; gap: .2rem .9rem; padding: 1rem 1.1rem; }
  .hfeat-ico { width: 44px; height: 44px; font-size: 1.3rem; margin: 0; grid-row: span 2; }
  .hfeat h3 { font-size: 1.02rem; margin: 0; align-self: end; }
  .hfeat p { font-size: .88rem; }
  .home-courses { gap: .7rem; }
  .hcourse { flex-direction: row; }
  .hcourse-img { width: 92px; height: auto; min-height: 100%; flex: none; }
  .hcourse-img.emoji { font-size: 2rem; }
  .hcourse-body { padding: .8rem .9rem; gap: .2rem; }
  .hcourse strong { font-size: 1.05rem; }
  .hcourse-desc { display: none; }
  .home-steps li { padding: 1.1rem 1.2rem; }
}

/* ==========================================================================
   OFFRES D'EMPLOI (illustration / 2D)
   ========================================================================== */
.jobs-page { padding-bottom: 3rem; }
.jobs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.jobs-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.jobs-actions .btn.on { border-color: var(--accent); color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.jobs-tabs { margin: .4rem 0 1rem; }
.gtabs .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--card); font-size: .72rem; font-weight: 700; margin-left: .2rem; }
.gtabs a.on .count { background: var(--paper-2); }
.gtabs .count.hot { background: var(--accent); color: #fff; }
.jobs-filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .7rem; margin-bottom: 1.4rem; }
.jobs-filters input[type=search] { flex: 1 1 220px; min-width: 0; }
.jobs-filters select { flex: 0 1 auto; width: auto; }
.jobs-filters input, .jobs-filters select { padding: .5rem .7rem; font-size: .9rem; }
.jobs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.6rem; align-items: start; }
@media (max-width: 980px) { .jobs-grid { grid-template-columns: 1fr; } }
.jobs-count { margin: 0 0 .6rem; }
.jobs-empty { text-align: center; padding: 2.5rem 1.5rem; }
.job-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 1rem; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; margin-bottom: .8rem; transition: border-color .15s, box-shadow .15s; }
.job-card:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); box-shadow: 0 10px 26px -18px rgba(60, 40, 20, .4); }
.job-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--paper-2); }
.job-ico.lg { width: 64px; height: 64px; font-size: 1.9rem; border-radius: 16px; flex: none; }
.job-title { font-weight: 700; font-size: 1.08rem; color: var(--ink); text-decoration: none; line-height: 1.3; }
.job-title:hover { color: var(--accent-ink); }
.job-co { font-size: .88rem; color: var(--muted); margin-top: .15rem; }
.job-co strong { color: var(--ink-2); font-weight: 600; }
.job-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.job-chips .chip { font-size: .74rem; padding: .2rem .6rem; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); border: 0; }
.job-chips .chip.k-freelance { background: #e7f1ea; color: #2f6b3f; }
.job-chips .chip.k-cdi, .job-chips .chip.k-cdd { background: #e6eef6; color: #2f5d85; }
.job-chips .chip.k-stage, .job-chips .chip.k-alternance { background: #f3ebf7; color: #6d4a86; }
.job-chips .chip.k-appel { background: #fbefdc; color: #8a5a17; }
.job-chips .chip.pay { background: transparent; border: 1px solid var(--line); }
.job-chips .chip.st-pending { background: #fff4d6; color: #7a5a00; }
.job-chips .chip.st-rejected { background: #fbe3e0; color: #9a2f22; }
.job-chips .chip.st-archived { background: var(--paper-2); color: var(--muted); }
body.skin-nuit .job-chips .chip[class*="k-"] { background: var(--paper-2); color: var(--ink-2); }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; text-align: right; }
.job-new { background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 99px; }
.job-dl { color: var(--accent-ink); font-weight: 600; }
.job-save { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); padding: .2rem; }
.job-save:hover, .job-save.on { color: #d4a017; }
@media (max-width: 600px) {
  .job-card { grid-template-columns: 40px minmax(0, 1fr); }
  .job-ico { width: 40px; height: 40px; font-size: 1.2rem; }
  .job-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .6rem; text-align: left; }
}
.jobs-side { display: flex; flex-direction: column; gap: 1rem; }
.jobs-side .card, .job-apply .card { padding: 1.2rem 1.3rem; }
.jobs-side h3, .job-apply h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.jobs-links { list-style: none; padding: 0; margin: 0; }
.jobs-links li { padding: .5rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.jobs-links li:first-child { border-top: 0; padding-top: 0; }
.jobs-links a { font-weight: 600; color: var(--ink); text-decoration: none; }
.jobs-links a:hover { color: var(--accent-ink); }
.jobs-links span { font-size: .8rem; color: var(--muted); }
.jobs-tip { background: color-mix(in srgb, var(--paper-2) 60%, var(--card)); }

.job-back { margin: 1.6rem 0 1rem; }
.job-back a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.job-back a:hover { color: var(--ink); }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.6rem; align-items: start; }
@media (max-width: 900px) { .job-layout { grid-template-columns: 1fr; } }
.job-detail { padding: 1.8rem 2rem; }
.job-detail-head { display: flex; gap: 1.1rem; align-items: center; }
.job-detail h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; line-height: 1.15; }
.job-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 1.5rem 0; }
.job-facts > div { background: var(--card); padding: .75rem .9rem; }
.job-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.job-facts dd { margin: .15rem 0 0; font-weight: 600; font-size: .92rem; }
@media (max-width: 600px) { .job-facts { grid-template-columns: 1fr 1fr; } .job-detail { padding: 1.3rem; } }
.job-desc { font-size: 1rem; line-height: 1.7; }
.job-foot { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 1.5rem; }
.job-apply { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 84px; }
.job-apply .btn.block + .btn.block { margin-top: .5rem; }
.job-mod form { margin-top: .5rem; }
.job-reject input { margin-bottom: .4rem; font-size: .85rem; padding: .45rem .6rem; }
@media (max-width: 900px) { .job-apply { position: static; } }
.job-form { padding: 1.6rem 1.8rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; background: var(--paper-2); flex-wrap: wrap; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .4rem .85rem; border-radius: 99px; font-size: .88rem; color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); }
.jobs-side > section + section, .job-apply > section + section { margin-top: 0; }
@media (max-width: 600px) {
  .jobs-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .jobs-filters input[type=search], .jobs-filters button, .jobs-filters > a { grid-column: 1 / -1; }
  .jobs-filters select { width: 100%; }
  .jobs-filters select[name=lieu] { grid-column: 1 / -1; }
}

/* Paint-over : importer sa version retouchée */
.po-import { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.po-import h4 { margin-top: 0; }
.po-import .btn.block { margin-top: .45rem; }
.po-import-btn { cursor: pointer; text-align: center; }
.po-fit { margin-top: .7rem; padding: .7rem; border-radius: 10px; background: #fff4d6; color: #5d4500; }
.po-fit[hidden] { display: none !important; }
.po-fit p { margin: 0 0 .5rem; }
.po-stage.drop-on { outline: 3px dashed var(--accent); outline-offset: -8px; }
/* Liens parent : supprimer un lien en attente */
.copy-row form { display: contents; }
.btn.danger-ghost { color: #b4382a; }
.btn.danger-ghost:hover { border-color: #b4382a; }
.copy-exp { margin: -.1rem 0 .4rem; }
#po-orig-size { display: block; font-weight: 400; }
/* Comptes parent dans la liste des membres */
.role-tag.parent { background: #eaf2f7; color: #2f5d85; }
.role-tag.parent a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
body.skin-nuit .role-tag.parent { background: #26323d; color: #a9cbe6; }
tr.row-parent td { background: color-mix(in srgb, #eaf2f7 35%, transparent); }
.role-tag.parent { font-family: var(--sans); vertical-align: middle; }

/* ==========================================================================
   OBJECTIFS MULTIPLES (principal, intermédiaires, annexes)
   ========================================================================== */
.goals-board { margin: 1.25rem 0 1rem; display: flex; flex-direction: column; gap: .8rem; }
.goals-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.goals-board .pk-goal { margin-top: 0; }
.goal-tier { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.goal-tier.t-principal { color: #a0612f; }
.goal-main-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.goals-sub { display: grid; gap: .8rem; }
.goals-sub.two { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 760px) { .goals-sub.two { grid-template-columns: 1fr; } }
.goals-steps, .goals-side { padding: 1.1rem 1.2rem; }
.goals-steps h4, .goals-side h4 { margin: 0 0 .7rem; font-size: .95rem; }
.goals-steps ol { list-style: none; padding: 0; margin: 0; position: relative; }
.goals-steps ol::before { content: ''; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.goals-steps li { display: grid; grid-template-columns: 24px 1fr; gap: .7rem; padding: .35rem 0 .65rem; position: relative; }
.step-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9b48f; background: var(--card); display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: #fff; position: relative; z-index: 1; }
.goals-steps li.done .step-dot { background: #5d9a46; border-color: #5d9a46; }
.goals-steps li.done strong { text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.step-body { min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.mini-bar { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.mini-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e2b13c, #c8553d); }
.goals-side ul { list-style: none; padding: 0; margin: 0; }
.goals-side li { display: grid; grid-template-columns: 20px 1fr; gap: .55rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.goals-side li:first-child { border-top: 0; padding-top: 0; }
.side-check { color: var(--muted); font-weight: 700; text-align: center; }
.goals-side li.done .side-check { color: #5d9a46; }
.goals-side li.done span:not(.side-check) { color: var(--muted); }

/* Côté formateur */
.goals-admin { grid-column: 1 / -1; }
.ga-group { display: flex; flex-direction: column; gap: .5rem; }
.ga-group-title { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.ga-item { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; display: flex; flex-direction: column; gap: .4rem; background: var(--card); }
.ga-item.done { background: color-mix(in srgb, #eef6ea 70%, var(--card)); border-color: #cfe3c6; }
.ga-item .goal-bar { margin: 0; }
.ga-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ga-actions form { margin: 0; }
.ga-edit { width: 100%; order: 10; }
.ga-edit summary { list-style: none; cursor: pointer; display: inline; }
.ga-edit summary::-webkit-details-marker { display: none; }
.ga-edit[open] { padding-top: .6rem; border-top: 1px dashed var(--line); }
.ga-actions .ga-edit:not([open]) { width: auto; order: 0; }
.ga-add summary { list-style: none; cursor: pointer; display: inline-flex; }
.ga-add summary::-webkit-details-marker { display: none; }
.ga-add[open] > summary { margin-bottom: .8rem; }
.seg label.off span { opacity: .4; cursor: not-allowed; }

/* Objectifs : consignes et pièces jointes */
.goal-brief { margin-top: .35rem; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--paper-2) 45%, var(--card)); }
.goal-brief > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .6rem; padding: .5rem .75rem; font-size: .88rem; }
.goal-brief > summary::-webkit-details-marker { display: none; }
.goal-brief > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.goal-brief[open] > summary::after { transform: rotate(180deg); }
.gb-label { font-weight: 700; }
.gb-meta { color: var(--muted); font-size: .8rem; }
.gb-body { padding: 0 .75rem .75rem; display: flex; flex-direction: column; gap: .7rem; }
.gb-text { margin: 0; white-space: pre-line; line-height: 1.55; }
.gb-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.gb-thumb { width: 104px; height: 104px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.gb-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gb-thumb:hover img { transform: scale(1.04); }
.gb-video { margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.gb-video video { width: 100%; max-height: 360px; border-radius: 10px; background: #000; }
.gb-docs { display: flex; flex-wrap: wrap; gap: .5rem; }
.gb-doc { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .7rem .45rem .45rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; color: inherit; max-width: 100%; }
.gb-doc:hover { border-color: #c8553d; }
.gb-doc-ic { font-size: .66rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: #c8553d; border-radius: 6px; padding: .5rem .4rem; }
.gb-doc-name { display: flex; flex-direction: column; font-size: .88rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.gb-doc-name small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.goals-steps .goal-brief, .goals-side .goal-brief { margin-top: .25rem; }
.goals-side .gb-thumb { width: 84px; height: 84px; }

/* Formulaire : zone de dépôt */
.gf-drop { position: relative; display: flex; flex-direction: column; gap: .2rem; align-items: center; justify-content: center; text-align: center; padding: 1rem; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.gf-drop:hover, .gf-drop.over { border-color: #c8553d; background: color-mix(in srgb, #c8553d 6%, transparent); }
.gf-drop.bad { border-color: #b3261e; }
.gf-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gf-drop-txt { font-size: .9rem; }
.gf-list:empty { display: none; }
.gf-files { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.gf-files li { display: flex; justify-content: space-between; gap: .8rem; align-items: center; font-size: .88rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.gf-files li span { min-width: 0; overflow-wrap: anywhere; }
.gf-rm { display: inline-flex; gap: .3rem; align-items: center; color: var(--muted); font-size: .82rem; white-space: nowrap; cursor: pointer; }

/* Menu du haut : jamais de libellé sur deux lignes */
.nav a { white-space: nowrap; }
@media (max-width: 1280px) { .nav .nav-xl { display: none; } }
@media (max-width: 1180px) { .nav { gap: 0; } .nav a { padding: .4rem .5rem; } }

/* Notifications push */
.push-card h3 { margin: 0; }
.push-ok { margin: 0 0 .5rem; font-weight: 600; color: #3f7a2c; }
.push-btns { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.push-help { padding: .8rem 1rem; border-radius: 12px; background: var(--paper-2); font-size: .92rem; }
.push-help p { margin: 0 0 .4rem; }
.push-help ol, .push-help ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .25rem; }
.push-share { display: inline-block; padding: 0 .3rem; border: 1px solid var(--line); border-radius: 5px; background: var(--card); font-size: .8rem; }
.push-msg { margin: 0; color: #3f7a2c; }
.push-msg.bad { color: #b3261e; }
.push-sub { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.push-devices ul { list-style: none; margin: 0; padding: 0; }
.push-devices li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.push-devices li:first-child { border-top: 0; }
.push-devices li small { display: block; }
.push-devices form { margin: 0; }
.push-this { color: #3f7a2c; font-weight: 600; }
.push-cats { display: flex; flex-direction: column; gap: .35rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.bell-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: .3rem; }
.bell-foot a { padding: .55rem .75rem; }
.bell-foot a[hidden] { display: none; }
.push-cats .btn { align-self: flex-start; }
.push-diag { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.push-diag > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.push-diag > ul li { display: flex; flex-direction: column; }
.push-diag > ul li small { color: var(--muted); padding-left: 1.5rem; }
.push-diag > ul li.ko span { color: #b3261e; font-weight: 600; }
.push-err { display: block; color: #b3261e; }

/* Galerie / corrections séparées */
.gal-note { margin: .4rem 0 0; color: var(--muted); }
.pf-warn { padding: .7rem .9rem; border-radius: 12px; background: color-mix(in srgb, #e2b13c 16%, var(--card)); border: 1px solid color-mix(in srgb, #e2b13c 45%, var(--line)); line-height: 1.5; }
.pf-correct { font-weight: 700; color: #c8553d; text-decoration: none; white-space: nowrap; }
.pf-correct:hover { text-decoration: underline; }
.pc-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .pc-card { grid-template-columns: 1fr; } }
.pc-img { border-radius: 12px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.pc-img img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.pc-title { font-family: var(--serif); font-size: 1.25rem; margin-top: .3rem; }
.pc-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.pc-choice legend { margin-bottom: .35rem; }
.pc-side { gap: 1rem; }

/* Aperçu de l'espace parent (formateur) */
.pv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; margin: 1.2rem 0 0; padding: .8rem 1rem; border-radius: 14px; border: 2px dashed #7aa7c7; background: color-mix(in srgb, #7aa7c7 12%, var(--card)); }
.pv-pick { display: flex; align-items: center; gap: .5rem; margin: 0; }
.pv-pick select { width: auto; min-height: 36px; height: 36px; padding: .25rem .6rem; }

/* Dessins reliés à un objectif */
.goal-works { display: flex; flex-direction: column; gap: .35rem; margin-top: .35rem; }
.gw-label { color: var(--muted); font-weight: 600; }
.gw-thumbs { display: flex; flex-wrap: wrap; gap: .4rem; }
.gw-thumb { position: relative; width: 52px; height: 52px; border-radius: 9px; overflow: hidden; border: 2px solid var(--line); background: var(--paper-2); }
.gw-thumb.done { border-color: #7fb069; }
.gw-thumb.wait { border-color: #e2b13c; }
.gw-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gw-st { position: absolute; right: 2px; bottom: 2px; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; font-size: .66rem; font-weight: 800; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.gw-thumb.done .gw-st { background: #5d9a46; color: #fff; }

/* Carte de correction : liens objectif / leçon */
.rv-link { border: 1px solid var(--line); border-radius: 12px; padding: .5rem .7rem; }
.rv-link > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.rv-link > summary::-webkit-details-marker { display: none; }
.rv-link-tag { font-size: .8rem; padding: .2rem .55rem; border-radius: 99px; background: var(--paper-2); color: var(--muted); }
.rv-link-tag.on { background: color-mix(in srgb, #e2b13c 22%, var(--card)); color: var(--ink); font-weight: 600; }
.rv-link > summary .link-btn { margin-left: auto; }
.rv-link[open] > summary { margin-bottom: .7rem; }
.rv-link-form { display: flex; flex-direction: column; gap: .7rem; }
.rv-link-form .field { margin: 0; }

/* Version bêta */
.beta-tag { display: inline-flex; align-items: center; margin-left: .45rem; padding: .12rem .42rem; border-radius: 6px; font-family: var(--sans, inherit); font-size: .62rem; font-weight: 800; letter-spacing: .1em; line-height: 1.2; color: #fff; background: #c8553d; vertical-align: middle; position: relative; top: -1px; }
.beta-bar { background: color-mix(in srgb, #e2b13c 18%, var(--paper)); border-bottom: 1px solid color-mix(in srgb, #e2b13c 40%, var(--line)); font-size: .86rem; }
.beta-bar .container { display: flex; align-items: center; gap: .6rem; padding-top: .45rem; padding-bottom: .45rem; }
.beta-bar .beta-tag { margin-left: 0; flex: none; }
.beta-text { flex: 1; min-width: 0; }
.beta-link { white-space: nowrap; font-weight: 600; }
.beta-close { flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .95rem; padding: .2rem .35rem; border-radius: 6px; }
.beta-close:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
@media (max-width: 600px) { .beta-bar .container { flex-wrap: wrap; row-gap: .2rem; } .beta-bar .beta-tag { display: none; } .beta-text { flex-basis: calc(100% - 2.2rem); } }
.beta-foot { white-space: normal; }
.beta-foot .beta-tag { margin-left: 0; margin-right: .25rem; font-size: .56rem; }

/* Bandeau de consentement (statistiques) */
.consent { position: fixed; left: 1rem; bottom: 1rem; z-index: 90; width: min(440px, calc(100vw - 2rem)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.consent[hidden] { display: none; }
.consent-body strong { font-size: .98rem; }
.consent-body p { margin: .35rem 0 0; font-size: .86rem; line-height: 1.5; color: var(--muted); }
.consent-btns { display: flex; gap: .6rem; justify-content: flex-end; }
.consent-btns .btn { min-width: 110px; justify-content: center; }
.legal-links .link-btn { font: inherit; color: inherit; }

/* ==========================================================================
   SALLE FOCUS
   ========================================================================== */
.focus-wrap { padding-bottom: 2rem; }
.focus-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 1rem; flex-wrap: wrap; }
.focus-head h1 { margin: .1rem 0 0; }
.fx-scene { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 960 / 440; min-height: 360px; box-shadow: 0 18px 50px rgba(40, 25, 10, .18); isolation: isolate;
  --wall: #efd9bb; --wall2: #e6caa4; --floor: #b98b5e; --sky1: #9fd1ee; --sky2: #f6e2c2; --hill: #8fb37a; --hill2: #6f9a63; --moon: #fff6d8; --frame: #8a5a36; --glow: .35; }
.fx-scene[data-tod="evening"] { --wall: #e8b98f; --wall2: #d99f74; --floor: #9c6a45; --sky1: #f08a5d; --sky2: #f7c76d; --hill: #7d6a8f; --hill2: #5e4f73; --glow: .7; }
.fx-scene[data-tod="night"] { --wall: #3b3456; --wall2: #2f2946; --floor: #2a2238; --sky1: #141c3d; --sky2: #3c3a6e; --hill: #232a4a; --hill2: #1a2040; --moon: #fdf2c4; --frame: #5c4635; --glow: 1; }
.fx-room { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-wall { fill: var(--wall); }
.fx-floor { fill: var(--floor); }
.fx-sky1 { stop-color: var(--sky1); } .fx-sky2 { stop-color: var(--sky2); }
.fx-hills { fill: var(--hill); } .fx-hills2 { fill: var(--hill2); }
.fx-moon { fill: var(--moon); opacity: 0; transition: opacity .6s; }
.fx-scene[data-tod="night"] .fx-moon, .fx-scene[data-tod="evening"] .fx-moon { opacity: 1; }
.fx-scene[data-tod="evening"] .fx-moon { fill: #ffe7a8; transform: translateY(60px); }
.fx-frame { fill: none; stroke: var(--frame); stroke-width: 10; }
.fx-frame-bar { stroke: var(--frame); stroke-width: 6; }
.fx-sill { fill: var(--frame); }
.fx-leaf { stroke: #5f8f4e; stroke-width: 7; fill: none; stroke-linecap: round; }
.fx-pot { fill: #c8553d; }
.fx-shelf, .fx-desk { fill: #8a5a36; } .fx-desk-leg { fill: #6e4529; }
.fx-book.b1 { fill: #3d6c8c; } .fx-book.b2 { fill: #e2b13c; } .fx-book.b3 { fill: #c8553d; } .fx-book.b4 { fill: #6f9a63; }
.fx-art { fill: #fbf4ea; stroke: var(--frame); stroke-width: 6; } .fx-art-in { fill: #8fb37a; } .fx-art-sun { fill: #e2b13c; }
.fx-glow { opacity: var(--glow); transition: opacity .6s; }
.fx-lamp-shade { fill: #e2b13c; } .fx-lamp-foot { fill: #3a2c22; }
.fx-sketch { fill: #fbf4ea; } .fx-pencil { stroke: #e2b13c; stroke-width: 5; stroke-linecap: round; }
.fx-mug { fill: #fbf4ea; } .fx-mug-handle { fill: none; stroke: #fbf4ea; stroke-width: 4; }
.fx-steam path { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 3; stroke-linecap: round; animation: fxSteam 3.2s ease-in-out infinite; }
.fx-steam path:nth-child(2) { animation-delay: 1.4s; }
@keyframes fxSteam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-14px); } }
.fx-rain line { stroke: rgba(255, 255, 255, .55); stroke-width: 1.6; animation: fxRain .9s linear infinite; }
.fx-rain line:nth-child(3n) { animation-duration: .75s; } .fx-rain line:nth-child(4n) { animation-duration: 1.1s; animation-delay: -.4s; }
@keyframes fxRain { from { transform: translate(0, -40px); } to { transform: translate(-12px, 180px); } }
/* capybara */
.fx-capy { position: absolute; left: 39.5%; bottom: 20.5%; width: 15.6%; transition: opacity .5s, transform .5s; transform-origin: 50% 100%; }
.fx-capy svg { width: 100%; height: auto; }
.fx-capy-break { opacity: 0; }
.fx-scene[data-mode="break"] .fx-capy-focus { opacity: 0; }
.fx-scene[data-mode="break"] .fx-capy-break { opacity: 1; }
.fx-scene.running[data-mode="focus"] .fx-capy-focus { animation: fxBob 1.6s ease-in-out infinite; }
.fx-scene.running[data-mode="break"] .fx-capy-break { animation: fxBreath 3.6s ease-in-out infinite; }
@keyframes fxBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes fxBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025, .985); } }
/* minuteur */
.fx-timer { position: absolute; right: 3.5%; bottom: 7%; width: min(340px, 42%); background: rgba(255, 250, 242, .9); color: #2a211a; border-radius: 20px; padding: 1rem 1.1rem 1.1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.fx-scene[data-tod="night"] .fx-timer { background: rgba(32, 27, 48, .88); color: #f4ecff; }
.fx-modes { display: flex; gap: .25rem; background: rgba(0, 0, 0, .06); border-radius: 99px; padding: .2rem; }
.fx-scene[data-tod="night"] .fx-modes { background: rgba(255, 255, 255, .08); }
.fx-modes button { border: 0; background: none; color: inherit; font: inherit; font-size: .78rem; font-weight: 700; padding: .3rem .7rem; border-radius: 99px; cursor: pointer; opacity: .7; }
.fx-modes button.on { background: #c8553d; color: #fff; opacity: 1; }
.fx-time { font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fx-label { opacity: .75; text-align: center; min-height: 1.2em; }
.fx-btns { display: flex; align-items: center; gap: .5rem; }
.fx-go { min-width: 150px; justify-content: center; }
.fx-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); background: transparent; color: inherit; font-size: 1.05rem; cursor: pointer; }
.fx-scene[data-tod="night"] .fx-icon { border-color: rgba(255, 255, 255, .2); }
.fx-icon:hover { background: rgba(0, 0, 0, .06); }
.fx-dots { display: flex; gap: .35rem; }
.fx-dots span { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #c8553d; }
.fx-dots span.on { background: #c8553d; }
.fx-toast { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); background: #2a211a; color: #fff; padding: .55rem 1rem; border-radius: 99px; font-weight: 600; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.fx-toast.show { animation: fxToast .35s ease-out; }
@keyframes fxToast { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* panneaux */
.fx-panels { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.fx-panels > section + section { margin-top: 0; }
.fx-panel h3 { margin: 0; font-size: 1.05rem; }
.fx-panel select, .fx-panel input[type=text] { width: 100%; margin-top: .25rem; }
.fx-sounds { display: flex; flex-direction: column; gap: .45rem; }
.fx-sound { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: .6rem; }
.fx-sound-btn { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 600; border-radius: 99px; padding: .35rem .75rem .35rem .4rem; cursor: pointer; transition: background-color .15s, border-color .15s; }
.fx-sound-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); }
.fx-sound.on .fx-sound-btn { background: color-mix(in srgb, #c8553d 14%, var(--card)); border-color: #c8553d; }
.fx-sound.on .fx-sound-ic { background: #c8553d; }
.fx-sound input[type=range] { width: 100%; accent-color: #c8553d; opacity: .45; }
.fx-sound.on input[type=range] { opacity: 1; }
.fx-master { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: .6rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); color: var(--muted); }
.fx-master input { accent-color: #2a211a; }
.fx-settings { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.fx-settings summary { cursor: pointer; color: var(--muted); }
.fx-set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .6rem 0; }
.fx-set-grid label { display: flex; flex-direction: column; gap: .2rem; }
.fx-set-grid input { width: 4.2rem; }
.fx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .7rem 0 .9rem; }
.fx-stats div { display: flex; flex-direction: column; }
.fx-stats b { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.fx-stats span { font-size: .76rem; color: var(--muted); }
.fx-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; height: 84px; align-items: end; }
.fx-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .2rem; }
.fx-bar span { width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, #c8553d 35%, var(--paper-2)); transition: height .5s; }
.fx-bar.today span { background: #c8553d; }
.fx-bar small { font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.fx-level { margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.fx-level .progress { width: 100%; }
@media (max-width: 980px) { .fx-panels { grid-template-columns: 1fr 1fr; } .fx-panels > :first-child { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .fx-scene { aspect-ratio: auto; min-height: 0; height: auto; display: flex; flex-direction: column; }
  .fx-room { position: relative; height: 230px; }
  .fx-capy { left: 37%; bottom: auto; top: 118px; width: 28%; }
  .fx-timer { position: relative; right: auto; bottom: auto; width: auto; margin: -1.4rem .8rem .8rem; }
  .fx-panels { grid-template-columns: 1fr; }
  .fx-sound, .fx-master { grid-template-columns: 118px 1fr; }
}
/* mode zen */
body.focus-zen .topbar, body.focus-zen .beta-bar, body.focus-zen footer, body.focus-zen .focus-head, body.focus-zen .fx-panels, body.focus-zen .consent { display: none !important; }
body.focus-zen .focus-wrap { max-width: none; padding: 0; }
body.focus-zen .fx-scene { border-radius: 0; height: 100vh; aspect-ratio: auto; box-shadow: none; }
body.focus-zen .fx-room { height: 100%; }
.fx-sound-btn { white-space: nowrap; }

/* Page « Mes corrections » */
.cx-steps { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.cx-steps li { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.cx-steps b { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #c8553d; color: #fff; font-family: var(--serif); }
.cx-steps span { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.cx-steps strong { color: var(--ink); font-size: .92rem; }
@media (max-width: 760px) { .cx-steps { grid-template-columns: 1fr; } }
.cx-mine { margin-top: 2.2rem; }
.cx-mine-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.cx-mine-head h2 { margin: 0; }

/* Mon atelier (recentré) */
.dash-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; margin: 1.4rem 0 .4rem; }
@media (max-width: 760px) { .dash-actions { grid-template-columns: 1fr; } }
.dash-act { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; border-radius: 18px; text-decoration: none; color: inherit; border: 1px solid var(--line); background: var(--card); transition: transform .15s, box-shadow .15s; }
.dash-act:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(40, 25, 10, .1); }
.dash-act-send { background: #c8553d; border-color: #c8553d; color: #fff; }
.dash-act-ic { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255, 255, 255, .18); }
.dash-act-focus .dash-act-ic { background: var(--paper-2); }
.dash-act-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.dash-act-txt strong { font-size: 1.08rem; }
.dash-act-txt span { font-size: .86rem; opacity: .85; }
.dash-act-focus .dash-act-txt span { color: var(--muted); opacity: 1; }
.dash-act-go { margin-left: auto; font-size: 1.3rem; opacity: .8; }
.dash-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.dash-sec-head h2 { margin: 0; }
.dash-corr { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 900px) { .dash-corr { grid-template-columns: 1fr; } }
.dash-corr-item { display: flex; gap: .8rem; padding: .7rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: inherit; }
.dash-corr-item:hover { border-color: #c8553d; }
.dash-corr-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; background: var(--paper-2); }
.dash-corr-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.dash-corr-q { color: var(--ink); opacity: .85; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gb-video { max-width: 560px; }
/* Petits écrans : le badge BETA du logo cède la place (le bandeau bêta reste) */
@media (max-width: 440px) { .topbar .brand .beta-tag { display: none; } .hdr-actions { gap: .15rem; } }

/* ---------- Studio : liste des séances ---------- */
.st-head { margin: 1.6rem 0 1.2rem; }
.st-new { padding: 1.3rem 1.4rem; margin-bottom: 1.6rem; }
.st-new h2 { font-size: 1.3rem; }
.st-who { border: 0; padding: 0; margin: .4rem 0 1rem; }
.st-who legend { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.st-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.st-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem .3rem .4rem; border: 1px solid var(--line); border-radius: 99px; background: var(--card); cursor: pointer; font-size: .9rem; }
.st-chip:has(input:checked) { border-color: var(--accent); background: #fbeee9; }
.st-chip input { accent-color: var(--accent); margin: 0; }
.st-all { padding-left: .7rem; font-weight: 600; }
.st-who:has([data-st-all]:checked) [data-st-list] { opacity: .45; pointer-events: none; }
.st-sec { font-size: 1.25rem; margin: 1.6rem 0 .8rem; }
.st-empty { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.2rem; }
.st-empty span { font-size: 1.6rem; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.st-card { display: flex; flex-direction: column; gap: .55rem; padding: .7rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.st-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.st-card .btn { align-self: flex-start; }
.st-thumb { aspect-ratio: 16 / 10; border-radius: 11px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.st-thumb img { width: 100%; height: 100%; object-fit: contain; }
.st-thumb-live { background: repeating-linear-gradient(135deg, #fbf6ee 0 14px, #f4ecdf 14px 28px); }
.st-thumb-live span { font-size: .82rem; font-weight: 600; color: var(--accent-ink); background: var(--card); padding: .25rem .7rem; border-radius: 99px; border: 1px solid var(--line); }
.st-meta { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.st-meta strong { font-size: 1rem; }

/* ---------- Studio : la toile ---------- */
/* Plein écran : l'en-tête du site laisse la place à la toile (la flèche ← ramène aux séances) */
body.sx-page { height: 100vh; height: 100dvh; overflow: hidden; }
body.sx-page > main { display: flex; flex-direction: column; min-height: 0; }
body.sx-page footer.site, body.sx-page .topbar, body.sx-page .beta-bar, body.sx-page .coach-strip { display: none; }
.sx { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.sx-bar { display: flex; align-items: center; gap: .8rem; padding: .55rem 1rem; border-bottom: 1px solid var(--line); background: var(--card); }
.sx-back { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 1.1rem; }
.sx-back:hover { background: var(--paper-2); }
.sx-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sx-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.sx-status { font-size: .76rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.sx-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.sx-status[data-kind="ok"]::before { background: #4caf50; box-shadow: 0 0 0 3px rgba(76, 175, 80, .18); }
.sx-status[data-kind="warn"]::before { background: var(--warn); }
.sx-people { display: flex; gap: .35rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.sx-person { font-size: .8rem; font-weight: 600; padding: .18rem .6rem; border-radius: 99px; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, #fff); border: 1px solid color-mix(in srgb, var(--pc) 35%, #fff); white-space: nowrap; }
.sx-person.me { color: #fff; background: var(--pc); }
.sx-bar-actions { display: flex; gap: .45rem; align-items: center; }
.sx-pop { position: relative; }
.sx-pop summary { list-style: none; }
.sx-pop summary::-webkit-details-marker { display: none; }
.sx-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; padding: .9rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(30, 20, 10, .18); display: flex; flex-direction: column; gap: .6rem; }
.sx-invite-list { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; }
.sx-invite-list label { display: flex; gap: .45rem; align-items: center; }

.sx-main { flex: 1; display: grid; grid-template-columns: 56px 1fr 232px; min-height: 0; }
.sx-tools { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem 0; background: var(--card); border-right: 1px solid var(--line); }
.sx-tool { width: 42px; height: 42px; border-radius: 11px; border: 1px solid transparent; background: transparent; font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.sx-tool:hover { background: var(--paper-2); }
.sx-tool.on { background: #fbeee9; border-color: var(--accent); }
.sx-sep { width: 26px; height: 1px; background: var(--line); margin: .3rem 0; }

.sx-stage { position: relative; overflow: hidden; background: #e9e2d4; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.sx-stage[data-tool="hand"], .sx-stage.grab { cursor: grab; }
.sx-stage.panning { cursor: grabbing; }
.sx-stage[data-tool="picker"] { cursor: copy; }
.sx-stage.is-locked { cursor: not-allowed; }
.sx-board { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 18px 50px -18px rgba(40, 25, 10, .35); }
.sx-board canvas, .sx-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sx-bg { object-fit: contain; pointer-events: none; }
.sx-cursors { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.sx-cursor { position: absolute; left: 0; top: 0; transition: transform .09s linear; }
.sx-cursor i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transform: scale(var(--iz, 1)); }
.sx-cursor span { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--iz, 1)) translate(10px, 8px); background: var(--pc); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.sx-lock { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .4rem 1rem; border-radius: 99px; font-size: .88rem; box-shadow: var(--shadow); pointer-events: none; }
.sx-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.sx-zoom button { border: 0; background: transparent; padding: .45rem .75rem; font: 600 .9rem var(--sans); cursor: pointer; color: var(--ink); }
.sx-zoom button:hover { background: var(--paper-2); }
.sx-zoom [data-zoomlabel] { min-width: 64px; border-inline: 1px solid var(--line); font-weight: 500; font-size: .82rem; }

.sx-side { background: var(--card); border-left: 1px solid var(--line); padding: .9rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.1rem; }
.sx-side h3 { font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .45rem; display: flex; justify-content: space-between; }
.sx-side h3 span { color: var(--ink); letter-spacing: 0; }
.sx-current { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.sx-current input[type="color"] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: none; padding: 3px; cursor: pointer; }
.sx-current input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.sx-current input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 9px; }
.sx-current input[type="color"]::-moz-color-swatch { border: 0; border-radius: 9px; }
.sx-palette, .sx-recent { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.sx-recent { margin-top: 6px; }
.sx-palette button, .sx-recent button { aspect-ratio: 1; border-radius: 7px; border: 1px solid rgba(0, 0, 0, .12); background: var(--c); cursor: pointer; padding: 0; }
.sx-palette button.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.sx-side input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0 0 .7rem; }
.sx-preview { height: 72px; border-radius: 12px; background: #fff; border: 1px dashed var(--line); display: grid; place-items: center; }
.sx-preview span { border-radius: 50%; }
.sx-coach { display: flex; flex-direction: column; gap: .6rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.sx-coach .btn { align-self: flex-start; }
.sx-switch { display: flex; gap: .5rem; align-items: center; font-size: .9rem; cursor: pointer; }
.sx-switch input { accent-color: var(--accent); width: 18px; height: 18px; }
.sx-bgpick summary { cursor: pointer; font-size: .92rem; }
.sx-bgpick-body { display: flex; flex-direction: column; gap: .3rem; padding-top: .5rem; }
.sx-file { cursor: pointer; align-self: flex-start; }
.sx-bgthumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.sx-bgthumbs button { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: #fff; }
.sx-bgthumbs img { width: 100%; height: 100%; object-fit: cover; }
.sx-tip { margin: auto 0 0; }
.sx-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .55rem 1.1rem; border-radius: 99px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; max-width: 90vw; text-align: center; }
.sx-toast.on { opacity: 1; transform: translate(-50%, 0); }

.sx-closed { flex: 1; display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; padding: 1.5rem; min-height: 0; overflow: auto; }
.sx-closed-img { background: #e9e2d4; border-radius: 16px; display: grid; place-items: center; padding: 1rem; min-height: 0; }
.sx-closed-img img { max-height: calc(100dvh - 220px); width: auto; box-shadow: var(--shadow); background: #fff; }
.sx-closed-side .btn { display: inline-flex; }

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px) {
  .sx-main { grid-template-columns: 52px 1fr; grid-template-rows: 1fr auto; }
  .sx-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; gap: .8rem 1.2rem; max-height: 34vh; padding: .7rem .9rem; }
  .sx-side > section { flex: 1 1 220px; }
  .sx-preview, .sx-tip { display: none; }
  .sx-coach { border-top: 0; padding-top: 0; }
  .sx-closed { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sx-hide-m { display: none; }
  .sx-title strong { max-width: 40vw; }
  .sx-people { display: none; }
  .sx-bar { gap: .5rem; padding: .45rem .6rem; }
  .sx-side { max-height: 30vh; }
  .sx-palette, .sx-recent { grid-template-columns: repeat(auto-fill, 30px); }
  .sx-current input[type="color"] { height: 32px; }
  .sx-bar .btn { white-space: nowrap; }
}
.dash-act-live { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 85, 61, .15); }
.dash-act-live .dash-act-ic { animation: sxPulse 1.6s ease-in-out infinite; }
@keyframes sxPulse { 50% { transform: scale(1.08); } }
