/* ═══════════ DRK AGENCY — feuille de style unique ═══════════ */

@font-face { font-family: "Inter"; src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #0b0718; --bg-elevated: #110a24; --surface: #160e2e; --surface-2: #1d1440;
  --border: #2a1f4d; --border-strong: #3d2e6e;
  --text: #f4f1ff; --text-muted: #b5aed0; --text-subtle: #9a93b5;
  --grid-line: rgba(167, 139, 250, 0.07);
  --volt: #7c3aed; --volt-hover: #8b4ef5; --plasma: #a78bfa; --amethyst: #3b1e8c;
  --mint: #34d399; --amber: #f59e0b; --danger: #f43f5e;
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f4fa; --bg-elevated: #fff; --surface: #fff; --surface-2: #f0edf9;
  --border: #e3def3; --border-strong: #cfc6ec;
  --text: #140c2b; --text-muted: #4d4568; --text-subtle: #6b6388;
  --grid-line: rgba(59, 30, 140, 0.06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--plasma); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(124, 58, 237, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--plasma); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.h3 { font-size: 1.35rem; }
.h4 { font-size: 1.05rem; margin-top: 1.4rem; }
.eyebrow { font: 500 .74rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--plasma); margin-bottom: .9rem; }
.gradient-text { background: linear-gradient(90deg, #c4b5fd, #a78bfa 40%, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Quadrillage signature */
.bg-grid { background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px); background-size: 32px 32px; }
.glow { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(124, 58, 237, .55), rgba(59, 30, 140, 0) 70%); filter: blur(40px); pointer-events: none; z-index: 0; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.25rem; border-radius: 12px; border: 1px solid transparent; font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; color: var(--text); background: var(--surface-2); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, #8b4ef5, #6d28d9); color: #fff; box-shadow: 0 0 0 1px rgba(124, 58, 237, .35), 0 8px 30px -8px rgba(124, 58, 237, .55); }
.btn-primary:hover { background: linear-gradient(180deg, #9a63f7, #7c3aed); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--plasma); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-danger { background: rgba(244, 63, 94, .12); color: #fda4af; border-color: rgba(244, 63, 94, .3); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.02rem; }
.btn-sm { padding: .5rem .85rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { border-color: var(--border); color: var(--text); }

/* Cartes, badges, alertes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.5rem; box-shadow: 0 1px 0 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .6); }
.card-glow { border-color: rgba(124, 58, 237, .4); box-shadow: 0 40px 120px -40px rgba(124, 58, 237, .8); }
.card h3 { font-size: 1.1rem; }
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font: 500 .74rem/1.2 var(--font); border: 1px solid var(--border-strong); color: var(--text-muted); white-space: nowrap; }
.badge-volt { border-color: rgba(124, 58, 237, .45); background: rgba(124, 58, 237, .12); color: #c4b5fd; }
.badge-mint { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); color: #6ee7b7; }
.badge-amber { border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .1); color: #fcd34d; }
.badge-danger { border-color: rgba(244, 63, 94, .35); background: rgba(244, 63, 94, .1); color: #fda4af; }
.alert { padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); margin-bottom: 1rem; font-size: .93rem; }
.alert-success { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.alert-error { border-color: rgba(244, 63, 94, .4); background: rgba(244, 63, 94, .08); }
.alert-info { border-color: rgba(124, 58, 237, .4); background: rgba(124, 58, 237, .08); }
.alert-warning { border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .08); }
.flash-zone { padding-top: 1rem; }
.warning { display: flex; gap: .8rem; align-items: flex-start; text-align: left; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .06); font-size: .93rem; color: var(--text-muted); max-width: 620px; margin: 0 auto; }
.warning svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--amber); fill: none; stroke-width: 2; margin-top: 2px; }
.warning p { margin: 0; } .warning strong { color: var(--text); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--volt), var(--plasma)); border-radius: 99px; }

/* Formulaires */
.form label, label.field { display: block; font-size: .88rem; font-weight: 500; color: var(--text-muted); margin-bottom: 1rem; }
input, select, textarea { width: 100%; margin-top: .35rem; padding: .7rem .85rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text); font: 400 .95rem/1.4 var(--font); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--plasma); box-shadow: 0 0 0 3px rgba(167, 139, 250, .2); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; accent-color: var(--volt); }
.check { display: flex !important; gap: .6rem; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: .25rem; }
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
.grid-3 { display: grid; gap: 0 1rem; grid-template-columns: repeat(3, 1fr); }
.checklist { list-style: none; padding: 0; margin: 1rem 0; font-size: .9rem; }
.checklist .ok { color: var(--mint); } .checklist .ko { color: var(--danger); }
.form-inline { display: inline; }

/* En-tête du site */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 7, 24, .72); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(42, 31, 77, .6); }
[data-theme="light"] .site-header { background: rgba(245, 244, 250, .8); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.05rem/1 var(--display); letter-spacing: .08em; color: var(--text) !important; text-decoration: none !important; }
.logo img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links > a:not(.btn) { color: var(--text-muted); font-size: .93rem; }
.nav-links > a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav-sep { width: 1px; height: 20px; background: var(--border); }
.nav-toggle, .side-toggle { display: none; }
.nav-burger { display: none; width: 40px; height: 40px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 9px; }
.nav-burger span { height: 2px; background: var(--text); border-radius: 2px; }

/* Sections */
section.block { position: relative; padding: 96px 0; border-top: 1px solid var(--border); overflow: hidden; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

.hero { position: relative; padding: 110px 0 90px; text-align: center; overflow: hidden; }
.hero .bg-grid { position: absolute; inset: 0; mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%); }
.hero-inner { position: relative; z-index: 1; }
.hero .lead { font-size: clamp(1.15rem, 2.3vw, 1.5rem); color: var(--text-muted); margin: 1.2rem 0 .6rem; }
.hero .sub { max-width: 640px; margin: 0 auto 2rem; color: var(--text-subtle); }
.hero-ctas { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.pill { display: inline-flex; gap: .6rem; align-items: center; padding: .45rem .9rem; border: 1px solid var(--border-strong); border-radius: 999px; font: 500 .72rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); background: rgba(22, 14, 46, .6); margin-bottom: 1.6rem; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--plasma); box-shadow: 0 0 8px var(--plasma); }

.feature .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(124, 58, 237, .14); color: var(--plasma); margin-bottom: 1rem; }
.feature p { color: var(--text-muted); font-size: .94rem; margin: 0; }
.two-cols { display: grid; gap: 3.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.tick-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text-muted); }
.tick-list li svg { color: var(--plasma); margin-top: 3px; }
.tick-list.mint li svg { color: var(--mint); }
.tick-list.no li svg { color: var(--danger); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 1px solid var(--border-strong); display: grid; gap: .9rem; }
.timeline li { position: relative; color: var(--text-muted); }
.timeline li::before { content: attr(data-n); position: absolute; left: calc(-1.5rem - 9px); top: 3px; width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--volt); border-radius: 50%; background: var(--bg); font: 9px/1 var(--mono); color: var(--plasma); }

.modules { display: grid; gap: .8rem; }
.module-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(22, 14, 46, .6); }
[data-theme="light"] .module-row { background: var(--surface); }
.module-row .num { font: 600 1.3rem/1 var(--mono); color: var(--plasma); }
.module-row h3 { font-size: 1.02rem; margin: 0 0 .2rem; }
.module-row p { margin: 0; color: var(--text-subtle); font-size: .9rem; }
details.module-detail { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: .8rem; }
details.module-detail summary { list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; }
details.module-detail summary::-webkit-details-marker { display: none; }
details.module-detail .inner { padding: 0 1.3rem 1.3rem 5.3rem; }
details.module-detail ol { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--text-muted); }
details.module-detail ol li { margin-bottom: .35rem; }

.months { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.month { padding: 1.3rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.month .m { font: 500 .72rem/1 var(--mono); letter-spacing: .18em; color: var(--plasma); text-transform: uppercase; }
.month h3 { margin: .5rem 0; font-size: 1.1rem; }
.month p { color: var(--text-muted); font-size: .9rem; margin: 0; }

.compare { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
.compare .yes { border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .04); }
.compare .no { border-color: rgba(244, 63, 94, .25); background: rgba(244, 63, 94, .04); }

.price-card { max-width: 760px; margin: 0 auto; padding: 2.5rem; position: relative; z-index: 1; }
.price { font: 600 3.2rem/1 var(--mono); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 500; display: flex; justify-content: space-between; gap: 1.5rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-subtle); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-muted); padding-bottom: 1.1rem; margin: 0; }

.sim { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1.1fr; align-items: start; }
.stats { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elevated); }
.stat .label { font: 500 .7rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-subtle); }
.stat .value { font: 600 1.55rem/1.2 var(--mono); margin-top: .35rem; }
.stat.good .value { color: var(--mint); } .stat.bad .value { color: var(--danger); }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid a:not(.logo) { display: block; color: var(--text-muted); font-size: .9rem; margin-bottom: .45rem; }
.footer-title { font-weight: 600; font-size: .9rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Pages de texte (légal, contenu de leçon) */
.page-head { padding: 72px 0 32px; }
.prose { color: var(--text-muted); line-height: 1.75; }
.prose h1, .prose h2, .prose h3 { color: var(--text); margin-top: 1.8em; }
.prose h2 { font-size: 1.4rem; } .prose h3 { font-size: 1.12rem; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3rem; } .prose li { margin-bottom: .35rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .92rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); }
.prose blockquote { margin: 1.2rem 0; padding: .8rem 1.1rem; border-left: 3px solid var(--volt); background: rgba(124, 58, 237, .07); border-radius: 0 10px 10px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.prose pre { background: var(--bg-elevated); border: 1px solid var(--border); padding: 1rem; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose > :first-child { margin-top: 0; }

/* Connexion / installation */
.auth-body { min-height: 100vh; background-image: radial-gradient(ellipse at top, rgba(124, 58, 237, .18), transparent 60%); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 48px 20px; }
.auth-wrap .logo { margin: 0 auto 1.8rem; display: flex; justify-content: center; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* Espace membre / admin */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px; border-right: 1px solid var(--border); background: var(--bg-elevated); }
.sidebar .logo { margin: 0 6px 22px; }
.side-day { padding: .8rem .9rem; border: 1px solid var(--border-strong); border-radius: 12px; margin-bottom: 1.2rem; font-family: var(--mono); font-size: .88rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; }
.side-day .bar { width: 100%; height: 4px; }
.side-title { font: 500 .66rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text-subtle); margin: 1.2rem 10px .5rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; color: var(--text-muted); font-size: .92rem; margin-bottom: 2px; }
.side-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.side-nav a.active { background: rgba(124, 58, 237, .16); color: var(--text); }
.side-nav a.active .icon { color: var(--plasma); }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(11, 7, 24, .8); backdrop-filter: blur(12px); }
[data-theme="light"] .topbar { background: rgba(245, 244, 250, .85); }
.topbar-title { font-weight: 600; color: var(--text-muted); font-size: .92rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.topbar-right form { margin: 0; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(124, 58, 237, .25); color: #ddd6fe; font-weight: 600; font-size: .85rem; }
.shell-content { padding: 32px 28px 64px; max-width: 1120px; width: 100%; }
.side-overlay { display: none; }
.page-title { margin-bottom: 1.6rem; }
.page-title h1 { font-size: 1.8rem; margin-bottom: .3rem; }
.page-title p { color: var(--text-muted); margin: 0; }

.panel { padding: 1.4rem 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); margin-bottom: 1.2rem; }
.panel-hero { background: linear-gradient(135deg, rgba(124, 58, 237, .16), rgba(22, 14, 46, .2) 60%), var(--surface); position: relative; overflow: hidden; }
.dash-grid { display: grid; gap: 1.2rem; grid-template-columns: 1.4fr 1fr; }
.wall { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; margin-top: 1rem; }
.wall span { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.wall span.on { background: var(--volt); box-shadow: 0 0 6px rgba(124, 58, 237, .6); }
.wall span.today { border: 1px solid var(--plasma); background: rgba(167, 139, 250, .2); }

.task { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: 0; }
.task form { margin: 0; }
.task-box { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--border-strong); background: transparent; display: grid; place-items: center; cursor: pointer; color: #fff; padding: 0; flex-shrink: 0; margin-top: 1px; }
.task-box.done { background: var(--volt); border-color: var(--volt); }
.task-box svg { width: 14px; height: 14px; }
.task.done .label { color: var(--text-subtle); text-decoration: line-through; }
.task .meta { display: block; font-size: .8rem; color: var(--text-subtle); }

.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 12px; margin-bottom: .55rem; background: var(--surface); }
.lesson-list li.locked { opacity: .6; }
.lesson-list .code { font: 500 .8rem/1 var(--mono); color: var(--plasma); width: 42px; flex-shrink: 0; }
.lesson-list .t { flex: 1; min-width: 0; }
.lesson-list .t a, .lesson-list .t span.title { color: var(--text); font-weight: 500; }
.lesson-list .t p { margin: .15rem 0 0; font-size: .85rem; color: var(--text-subtle); }
.status-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; }
.status-dot.done { background: var(--mint); border-color: var(--mint); color: #062; }
.status-dot svg { width: 13px; height: 13px; }

.lesson-layout { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; align-items: start; }
.lesson-toc { position: sticky; top: 88px; font-size: .86rem; }
.lesson-toc a { display: block; padding: .3rem .6rem; color: var(--text-subtle); border-left: 2px solid var(--border); }
.lesson-toc a:hover { color: var(--text); border-left-color: var(--plasma); text-decoration: none; }
.lesson-section { scroll-margin-top: 90px; padding: 1.6rem 0; border-bottom: 1px solid var(--border); }
.lesson-section > h2 { font-size: 1.25rem; display: flex; gap: .7rem; align-items: baseline; }
.lesson-section > h2 .n { font: 500 .78rem/1 var(--mono); color: var(--plasma); }
.video { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #000; margin-bottom: 1.5rem; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.quiz-q { padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.quiz-q:last-of-type { border-bottom: 0; }
.quiz-q p.q { font-weight: 600; color: var(--text); }
.quiz-choice { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .45rem; cursor: pointer; color: var(--text-muted); font-size: .94rem; }
.quiz-choice:hover { border-color: var(--border-strong); }
.quiz-choice.right { border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .08); color: var(--text); }
.quiz-choice.wrong { border-color: rgba(244, 63, 94, .6); background: rgba(244, 63, 94, .08); }
.explain { font-size: .88rem; color: var(--text-subtle); margin-top: .4rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font: 500 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-subtle); background: var(--bg-elevated); }
.table tr:last-child td { border-bottom: 0; }
.table td form { display: inline; margin: 0; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; margin: 0; }

.tool-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tool-card { display: block; padding: 1.3rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text) !important; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--volt); transform: translateY(-2px); }
.tool-card .tag { color: var(--plasma); font-size: .85rem; margin: .2rem 0 .5rem; }
.tool-card p { color: var(--text-subtle); font-size: .88rem; margin: 0; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: .8rem; overflow-x: auto; }
.kanban-col { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px; padding: .8rem; min-height: 200px; }
.kanban-col h4 { font-size: .85rem; margin: 0 0 .7rem; display: flex; justify-content: space-between; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .65rem .75rem; margin-bottom: .5rem; font-size: .88rem; cursor: grab; }
.kcard .sub { color: var(--text-subtle); font-size: .78rem; }
.kanban-col.over { border-color: var(--plasma); }
.chart { width: 100%; height: 220px; }
.copy-box { position: relative; white-space: pre-wrap; font-size: .9rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; color: var(--text-muted); }
.saved-note { font-size: .8rem; color: var(--text-subtle); }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-subtle); border: 1px dashed var(--border-strong); border-radius: 16px; }

/* Impression (business plan, ressources) */
@media print {
  .sidebar, .topbar, .no-print, .site-header, .site-footer { display: none !important; }
  .shell { display: block; } body { background: #fff; color: #000; }
  .panel, .card { border: 1px solid #ccc; box-shadow: none; background: #fff; }
}

/* Responsive */
@media (max-width: 980px) {
  .two-cols, .sim, .dash-grid, .lesson-layout, .compare { grid-template-columns: 1fr; }
  .months { grid-template-columns: 1fr 1fr; }
  .lesson-toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: .8rem 20px 1.2rem; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
  .nav-links > a { padding: .7rem 0; }
  .nav-sep { display: none; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .side-toggle:checked ~ .sidebar { transform: none; }
  .side-toggle:checked ~ .side-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); }
  .shell-burger { display: flex; }
  .shell-content { padding: 22px 16px 56px; }
  .topbar { padding: 0 14px; }
  .hide-sm { display: none; }
  .wall { grid-template-columns: repeat(15, 1fr); }
}
@media (max-width: 600px) {
  .pill { letter-spacing: .1em; font-size: .62rem; }
  section.block { padding: 64px 0; }
  .hero { padding: 72px 0 60px; }
  .grid-2, .grid-3, .months, .stats, .footer-grid { grid-template-columns: 1fr; }
  .module-row, details.module-detail summary { grid-template-columns: 44px 1fr; }
  .module-row .badge, details.module-detail summary .badge { display: none; }
  details.module-detail .inner { padding-left: 1.3rem; }
  .price-card { padding: 1.6rem; }
  .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Aperçu d'embed Discord */
.dc-preview { background: #313338; border-radius: 12px; padding: 16px; color: #dbdee1; font: 15px/1.375 "gg sans", "Inter", sans-serif; min-height: 120px; }
.dc-content { margin-bottom: 6px; }
.dc-embed { display: flex; gap: 16px; background: #2b2d31; border-left: 4px solid #7c3aed; border-radius: 4px; padding: 12px 16px 14px 12px; max-width: 520px; }
.dc-body { flex: 1; min-width: 0; }
.dc-author { font-size: 14px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.dc-title { font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.dc-title a { color: #00a8fc; }
.dc-desc { font-size: 14px; white-space: normal; }
.dc-desc code { background: #1e1f22; padding: 0 4px; border-radius: 3px; }
.dc-quote { display: block; border-left: 4px solid #4e5058; padding-left: 10px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; font-size: 14px; }
.dc-field.full { grid-column: 1 / -1; }
.dc-fname { font-weight: 600; color: #f2f3f5; }
.dc-image { margin-top: 12px; border-radius: 4px; max-width: 100%; }
.dc-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.dc-footer { margin-top: 8px; font-size: 12px; color: #b5bac1; }
.dc-button { display: inline-block; margin-top: 8px; padding: 4px 16px; background: #4e5058; border-radius: 3px; color: #fff; font-size: 14px; }
.stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.stars-input label { font-size: 2.2rem; line-height: 1; color: var(--border-strong); cursor: pointer; margin: 0; width: .5em; overflow: hidden; display: inline-block; }
.stars-input label span { display: inline-block; width: 1em; }
.stars-input label.half-r span { margin-left: -.5em; }
.stars-input label.half-r { margin-right: 6px; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: var(--amber); }
.stars-input:hover input:checked ~ label:not(:hover):not(:hover ~ label) { color: var(--border-strong); }
.stars-input input:focus-visible + label { outline: 2px solid var(--violet, #8b5cf6); outline-offset: 2px; }
.stars-value { order: -1; margin-left: .75rem; font-weight: 600; color: var(--text-muted); font-size: .95rem; }
.stars-show { position: relative; display: inline-block; color: var(--border-strong); letter-spacing: 2px; line-height: 1; }
.stars-show span { position: absolute; inset: 0; width: var(--fill); overflow: hidden; color: var(--amber); white-space: nowrap; }
.stars-show::before { content: "★★★★★"; }
.stars-num { font-size: .85em; color: var(--text-muted); font-weight: 600; }

/* ───── Navigation : menus déroulants ───── */
.nav-links { gap: .4rem; }
.nav-dd { position: relative; }
.nav-dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .3rem; padding: .5rem .7rem; border-radius: 10px; color: var(--text-muted); font-size: .93rem; user-select: none; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary:hover, .nav-dd[open] > summary { color: var(--text); background: var(--surface); }
.chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform .15s; }
details[open] > summary .chev { transform: rotate(180deg); }
.nav-dd-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 250px; max-height: 70vh; overflow-y: auto; padding: .45rem; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg-elevated); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.nav-dd-panel a { display: block; padding: .5rem .7rem; border-radius: 9px; color: var(--text-muted); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.nav-dd-panel a:hover { background: var(--surface-2); color: var(--text); }
.side-group { margin-bottom: 2px; }
.side-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; color: var(--text-muted); font-size: .92rem; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary:hover { background: var(--surface); color: var(--text); }
.side-group > summary .chev { margin-left: auto; }
.side-group-items { margin: .15rem 0 .4rem 1.55rem; padding-left: .55rem; border-left: 1px solid var(--border); }
.side-group-items a { padding: .38rem .6rem; font-size: .86rem; }
.side-nav a span, .side-group summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .nav-links { max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav-dd > summary { padding: .7rem 0; }
  .nav-dd-panel { position: static; box-shadow: none; border: 0; padding: 0 0 .5rem .8rem; max-height: none; background: transparent; }
  .nav-dd-panel a { white-space: normal; }
}

/* ───── Intégrations ───── */
.int-group { margin-bottom: 1.6rem; }
.int-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.int-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.int-card[open] { grid-column: 1 / -1; border-color: var(--border-strong); }
.int-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; }
.int-card > summary::-webkit-details-marker { display: none; }
.int-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(124, 58, 237, .16); color: #c4b5fd; font-weight: 700; flex-shrink: 0; }
.int-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.int-body { padding: 0 1rem 1rem; }

/* Vidéos tutoriels */
.video-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 1.25rem; }
.video-item .video { margin: 0; }

/* Notes libres */
.note-new textarea { min-height: 120px; }
.note-search { max-width: 280px; }
.note-edit summary { list-style: none; display: inline-flex; }
.note-edit summary::-webkit-details-marker { display: none; }
.video-locked { aspect-ratio: 16 / 9; border-radius: 12px; display: grid; place-items: center; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(124, 58, 237, .28), transparent 60%), repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 32px), repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 32px), #0c0818;
  border: 1px solid var(--border); }
.video-lock { display: grid; gap: .4rem; justify-items: center; color: var(--text-muted); padding: 1rem; }
.video-lock svg { color: #c4b5fd; }
.video-lock strong { color: var(--text); font-size: 1.05rem; }

/* Outils : avatars */
.tool-av { width: 56px; height: 56px; border-radius: 50%; display: block; margin-bottom: .75rem; box-shadow: 0 10px 24px -10px rgba(124, 58, 237, .6); }
.tool-card-av { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: start; }
.tool-card-av .tool-av { margin: 0; }
.tool-card-av .tag, .tool-card-av .desc { display: block; }
.tool-card-av .tag { color: var(--plasma); font-size: .85rem; margin: .2rem 0 .45rem; }
.tool-card-av .desc { color: var(--text-subtle); font-size: .88rem; }
.tool-title { display: flex; gap: 1rem; align-items: center; }
.tool-title .tool-av { width: 64px; height: 64px; margin: 0; flex: none; }

/* Assistant IA */
.ai-box { padding: 1.25rem; }
.ai-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.ai-head > div { flex: 1; }
.ai-avatar-lg { width: 64px; height: 64px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(124, 58, 237, .25), 0 12px 30px -10px rgba(56, 189, 248, .5); }
.ai-quota:empty { display: none; }
.ai-off { display: flex; gap: .6rem; align-items: center; padding: 1rem; border-radius: 12px; background: rgba(124, 58, 237, .08); border: 1px dashed var(--border-strong); color: var(--text-muted); }
.ai-experts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.ai-expert { display: flex; gap: .65rem; align-items: center; text-align: left; padding: .65rem .75rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .15s; }
.ai-expert:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.ai-expert.is-on { border-color: var(--volt); background: rgba(124, 58, 237, .14); }
.ai-expert img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ai-expert b { display: block; font-size: .9rem; }
.ai-expert small { display: block; font-size: .72rem; color: var(--text-subtle); line-height: 1.3; }
.ai-main { display: grid; grid-template-columns: 230px 1fr; gap: 1rem; }
.ai-convs { display: grid; gap: .5rem; align-content: start; max-height: 560px; overflow: auto; }
.ai-conv { display: flex; align-items: stretch; border-radius: 10px; border: 1px solid transparent; }
.ai-conv.is-on, .ai-conv:hover { border-color: var(--border); background: var(--surface); }
.ai-conv-open { flex: 1; text-align: left; background: none; border: 0; color: var(--text); padding: .45rem .55rem; cursor: pointer; font: inherit; min-width: 0; }
.ai-conv-open b { display: block; font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-conv-open small { font-size: .7rem; color: var(--text-subtle); }
.ai-conv-del { background: none; border: 0; color: var(--text-subtle); cursor: pointer; padding: 0 .55rem; font-size: 1.1rem; }
.ai-conv-del:hover { color: #f87171; }
.ai-chat { display: flex; flex-direction: column; min-width: 0; }
.ai-log { height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; padding: .25rem .25rem 1rem; }
.ai-msg { max-width: 88%; padding: .75rem 1rem; border-radius: 16px; font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.ai-msg .prose { font-size: inherit; }
.ai-msg .prose > :first-child { margin-top: 0; } .ai-msg .prose > :last-child { margin-bottom: 0; }
.ai-msg table { font-size: .85rem; display: block; overflow-x: auto; }
.ai-user { align-self: flex-end; background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; border-bottom-right-radius: 4px; }
.ai-assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ai-error { border-color: rgba(248, 113, 113, .5) !important; color: #fca5a5; }
.ai-starters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.ai-starter { border: 1px solid var(--border); background: transparent; color: var(--text-muted); border-radius: 999px; padding: .4rem .8rem; font: inherit; font-size: .8rem; cursor: pointer; text-align: left; }
.ai-starter:hover { border-color: var(--volt); color: var(--text); }
.ai-form { display: flex; gap: .6rem; align-items: flex-end; }
.ai-form textarea { flex: 1; resize: vertical; min-height: 54px; max-height: 220px; margin: 0; }
.ai-typing { display: inline-flex; gap: 4px; vertical-align: middle; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--plasma); animation: aiDot 1s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (max-width: 860px) { .ai-main { grid-template-columns: 1fr; } .ai-convs { max-height: 160px; } .ai-log { height: 380px; } }
@media (prefers-reduced-motion: reduce) { .ai-typing i { animation: none; opacity: .7; } }

/* Revenus Shopify */
.rev { margin-top: 1rem; }
.rev-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.rev-ctrl { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.rev-ctrl select { width: auto; margin: 0; padding: .45rem .7rem; font-size: .85rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--text-muted); padding: .4rem .7rem; border-radius: 9px; font: inherit; font-size: .8rem; cursor: pointer; }
.seg button.is-on { background: var(--volt); color: #fff; }
.rev-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1rem 0; }
.rev-kpis > div { padding: .8rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.rev-kpis strong { display: block; font: 600 1.45rem/1.2 var(--font-display, inherit); margin-top: .2rem; }
.rev-kpis em { font-style: normal; font-size: .75rem; }
.rev-kpis em.up { color: #6ee7b7; } .rev-kpis em.down { color: #fca5a5; }
.rev-chart { position: relative; min-height: 220px; }
.rev.is-loading .rev-chart { opacity: .6; transition: opacity .2s; }
.rev-empty { display: grid; place-items: center; height: 240px; color: var(--text-subtle); font-size: .9rem; }
.rsvg { width: 100%; height: auto; display: block; overflow: visible; }
.rsvg .rg { stroke: var(--border); stroke-dasharray: 3 5; }
.rsvg .ry { fill: var(--text-subtle); font-size: 11px; text-anchor: end; }
.rsvg .rx { fill: var(--text-subtle); font-size: 11px; text-anchor: middle; }
.rsvg .rb { fill: url(#rgB); transform-origin: bottom; transform-box: fill-box; animation: revBar .5s cubic-bezier(.2, 0, 0, 1) both; animation-delay: var(--d); }
.rsvg .rl { fill: none; stroke: #c4b5fd; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rsvg .rcur { stroke: rgba(196, 181, 253, .55); stroke-dasharray: 4 4; }
.rsvg .rdot { fill: #fff; stroke: #7c3aed; stroke-width: 3; }
@keyframes revBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .rsvg .rb { animation: none; } }
.rtip { position: absolute; top: 0; transform: translateX(-50%); padding: .5rem .75rem; border-radius: 10px; background: #120b26; border: 1px solid var(--border-strong); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); pointer-events: none; display: grid; gap: .1rem; text-align: center; font-size: .8rem; white-space: nowrap; }
.rtip span { font-weight: 600; font-size: .95rem; } .rtip small { color: var(--text-subtle); }
.rev-cta { margin-top: 1rem; }
.rev-cta img { border-radius: 50%; }
.shop-row { display: flex; gap: .75rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.shop-row:first-of-type { border-top: 0; }
.shop-row img { border-radius: 50%; }
.shop-row .grow { flex: 1; min-width: 200px; }
.shop-err { color: #fca5a5; }
.shop-mode { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
@media (max-width: 640px) { .rev-kpis { grid-template-columns: 1fr; } }
.ai-convs { min-width: 0; }
.ai-convs .btn { width: 100%; white-space: normal; justify-content: center; }
.ai-conv { min-width: 0; overflow: hidden; }

/* ═════════ Comptabilité : interface claire (80 % blanc), en-tête dégradé noir / violet ═════════ */
.cpt { --c-bg: #ffffff; --c-soft: #f7f6fb; --c-line: #e7e5ef; --c-text: #17132a; --c-muted: #6b6785; --c-violet: #6d28d9; --c-in: #047857; --c-out: #b91c1c;
  background: var(--c-bg); color: var(--c-text); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .65); font-size: 14px; position: relative; }
.cpt-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 14px 18px; background: linear-gradient(115deg, #07050f 0%, #1a0d3a 45%, #4c1d95 80%, #7c3aed 100%); color: #fff; }
.cpt-brand { display: flex; gap: 10px; align-items: center; }
.cpt-brand img { border-radius: 50%; }
.cpt-brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.cpt-brand span { font-size: 12px; color: rgba(255, 255, 255, .7); }
.cpt-tabs { display: flex; gap: 4px; background: rgba(255, 255, 255, .08); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.cpt-tabs button { border: 0; background: transparent; color: rgba(255, 255, 255, .78); font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 9px; cursor: pointer; }
.cpt-tabs button.is-on { background: #fff; color: #2e1065; font-weight: 600; }
.cpt-pane { padding: 16px 18px 18px; }
.cpt-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cpt-bar select, .cpt-bar input[type=search] { width: auto; margin: 0; padding: 7px 10px; font-size: 13px; border-radius: 9px; border: 1px solid var(--c-line); background: #fff; color: var(--c-text); }
.cpt-bar input[type=search] { min-width: 170px; }
.cpt-grow { flex: 1; } .cpt-sep { width: 1px; height: 24px; background: var(--c-line); }
.cpt-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--c-line); background: #fff; color: var(--c-text); font: inherit; font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 9px; cursor: pointer; transition: border-color .15s, box-shadow .15s; margin: 0; }
.cpt-btn:hover { border-color: #c4b5fd; box-shadow: 0 2px 10px -4px rgba(109, 40, 217, .35); }
.cpt-btn:disabled { opacity: .6; cursor: wait; }
.cpt-in { background: linear-gradient(135deg, #1a0d3a, #6d28d9); color: #fff; border-color: transparent; }
.cpt-out { background: #fff; color: #4c1d95; border-color: #c4b5fd; }
.cpt-sheet-wrap { border: 1px solid var(--c-line); border-radius: 12px; overflow: auto; max-height: 560px; background: #fff; }
.cpt-sheet { width: 100%; border-collapse: collapse; min-width: 1320px; }
.cpt-sheet th { position: sticky; top: 0; z-index: 1; background: var(--c-soft); color: var(--c-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--c-line); white-space: nowrap; user-select: none; }
.cpt-sheet th[data-sort] { cursor: pointer; } .cpt-sheet th[data-sort]:hover { color: var(--c-violet); }
.cpt-sheet th[data-dir=asc]::after { content: " ▲"; color: var(--c-violet); } .cpt-sheet th[data-dir=desc]::after { content: " ▼"; color: var(--c-violet); }
.cpt-sheet td { border-bottom: 1px solid #f0eef6; padding: 0; height: 36px; }
.cpt-sheet tr:hover td { background: #faf8ff; }
.cpt-sheet tr.is-ok td { background: #f6fdf9; }
.cpt-sheet td input, .cpt-sheet td select { width: 100%; height: 36px; margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--c-text); font: inherit; font-size: 13px; padding: 0 8px; box-shadow: none; }
.cpt-sheet td input:focus, .cpt-sheet td select:focus { outline: 2px solid #8b5cf6; outline-offset: -2px; background: #fff; }
.cpt-sheet td input[type=checkbox] { width: 16px; height: 16px; accent-color: #6d28d9; }
.cpt-sheet .num, .cpt-sheet td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.cpt-sheet td.cpt-ro { padding: 0 8px; color: var(--c-muted); }
.cpt-sheet td.c { text-align: center; white-space: nowrap; }
.cpt-sheet tfoot td { background: var(--c-soft); font-size: 12.5px; padding: 9px 8px; position: sticky; bottom: 0; border-top: 1px solid var(--c-line); }
.cpt .pos { color: var(--c-in); } .cpt .neg { color: var(--c-out); }
.cpt-ico { border: 0; background: none; cursor: pointer; color: var(--c-muted); font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.cpt-ico:hover { background: #f1eefb; color: var(--c-violet); } .cpt-del:hover { color: var(--c-out); background: #fdf0f0; }
.cpt-empty { padding: 36px; text-align: center; color: var(--c-muted); }
.cpt-hint, .cpt-muted { color: var(--c-muted); font-size: 12.5px; margin: 10px 0 0; }
.cpt kbd { background: var(--c-soft); border: 1px solid var(--c-line); border-radius: 5px; padding: 1px 5px; font-size: 11px; color: var(--c-text); }
.cpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cpt-kpi { border: 1px solid var(--c-line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.cpt-kpi:first-child { background: linear-gradient(135deg, #0b0718, #3b1a7a 70%, #6d28d9); color: #fff; border-color: transparent; }
.cpt-kpi:first-child span, .cpt-kpi:first-child small { color: rgba(255, 255, 255, .72); } .cpt-kpi:first-child strong { color: #fff; }
.cpt-kpi span { font-size: 12px; color: var(--c-muted); } .cpt-kpi strong { display: block; font-size: 21px; margin: 2px 0; font-variant-numeric: tabular-nums; } .cpt-kpi small { font-size: 11px; color: var(--c-muted); }
.cpt-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cpt-card { border: 1px solid var(--c-line); border-radius: 14px; padding: 14px 16px; background: #fff; margin-bottom: 14px; }
.cpt-grid2 .cpt-card { margin-bottom: 0; }
.cpt-card h3 { margin: 0 0 10px; font-size: 14px; color: var(--c-text); } .cpt-card h3.mt { margin-top: 18px; }
.cpt-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cpt-row-between select { width: auto; margin: 0; padding: 5px 8px; font-size: 12.5px; border: 1px solid var(--c-line); border-radius: 8px; background: #fff; color: var(--c-text); }
.cpt-svg { width: 100%; height: auto; display: block; }
.cpt-svg .g { stroke: #efedf5; } .cpt-svg .z { stroke: #d9d5e8; }
.cpt-svg .yl { font-size: 10px; fill: #8a86a3; text-anchor: end; } .cpt-svg .xl { font-size: 10px; fill: #8a86a3; text-anchor: middle; }
.cpt-svg .ba { fill: #6d28d9; } .cpt-svg .bb { fill: #c4b5fd; }
.cpt-svg .ln { fill: none; stroke: #6d28d9; stroke-width: 2.4; stroke-linejoin: round; } .cpt-svg .area { fill: rgba(124, 58, 237, .1); } .cpt-svg .pt { fill: #fff; stroke: #6d28d9; stroke-width: 2; }
.cpt-legend { display: flex; gap: 14px; font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.cpt-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cpt-legend .la::before { background: #6d28d9; } .cpt-legend .lb::before { background: #c4b5fd; }
.cpt-donut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cpt-donut svg { width: 180px; height: 180px; flex: none; }
.cpt-donut .dt { font-size: 17px; font-weight: 700; text-anchor: middle; fill: var(--c-text); } .cpt-donut .ds { font-size: 11px; text-anchor: middle; fill: #8a86a3; }
.cpt-donut ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; flex: 1; min-width: 160px; font-size: 12.5px; }
.cpt-donut li { display: flex; align-items: center; gap: 8px; } .cpt-donut li i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .cpt-donut li b { margin-left: auto; font-weight: 600; }
.cpt-limit { margin-bottom: 14px; font-size: 13px; }
.cpt-progress { height: 10px; background: #f1eff7; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.cpt-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4c1d95, #8b5cf6); }
.cpt-progress i.warn { background: linear-gradient(90deg, #d97706, #f59e0b); } .cpt-progress i.over { background: #dc2626; }
.cpt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cpt-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); padding: 8px; border-bottom: 1px solid var(--c-line); background: var(--c-soft); }
.cpt-table td { padding: 8px; border-bottom: 1px solid #f0eef6; } .cpt-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cpt-table tfoot td { font-weight: 600; background: var(--c-soft); }
.cpt-form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--c-muted); margin-bottom: 10px; }
.cpt-form input, .cpt-form select { margin: 0; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 9px; background: #fff; color: var(--c-text); font: inherit; font-size: 13.5px; }
.cpt-form label.cpt-check { display: flex; align-items: center; gap: 8px; color: var(--c-text); }
.cpt-form input[type=checkbox] { width: 16px; height: 16px; accent-color: #6d28d9; }
.cpt-cat { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f3f1f8; font-size: 13px; }
.cpt-cat span:nth-child(2) { flex: 1; }
.cpt .tg { font-size: 10.5px; padding: 2px 7px; border-radius: 99px; font-weight: 600; } .cpt .tg.in { background: #ecfdf5; color: var(--c-in); } .cpt .tg.out { background: #f5f3ff; color: var(--c-violet); }
.cpt-inline { display: flex; gap: 6px; margin-top: 10px; } .cpt-inline input { flex: 1; } .cpt-inline input, .cpt-inline select { margin: 0; padding: 7px 9px; border: 1px solid var(--c-line); border-radius: 9px; font-size: 13px; background: #fff; color: var(--c-text); }
.cpt-toast { position: absolute; right: 18px; bottom: 18px; background: #17132a; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); max-width: 360px; z-index: 5; }
@media (max-width: 720px) { .cpt-grid2 { grid-template-columns: 1fr; } .cpt-bar .cpt-grow { display: none; } }

/* Comparateur */
.cmp-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cmp-tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 10px; padding: .5rem .85rem; font: inherit; font-size: .88rem; cursor: pointer; }
.cmp-tabs button.is-on { border-color: var(--volt); color: var(--text); background: rgba(124, 58, 237, .14); }
.cmp-card h3 { margin: 0; }
.cmp-myprice { text-align: right; } .cmp-myprice strong { display: block; font-size: 1.5rem; color: #c4b5fd; }
.cmp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin: .9rem 0; }
.cmp-kpi { padding: .6rem .75rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.cmp-kpi span { display: block; font-size: .72rem; color: var(--text-subtle); } .cmp-kpi b { font-size: 1.05rem; }
.cmp-kpi b.pos { color: #6ee7b7; } .cmp-kpi b.neg { color: #fca5a5; }
.cmp-strip { width: 100%; height: auto; display: block; }
.cmp-strip .ax { stroke: var(--border-strong); } .cmp-strip .iqr { fill: rgba(124, 58, 237, .18); stroke: rgba(167, 139, 250, .5); }
.cmp-strip .med { stroke: #c4b5fd; stroke-width: 2; } .cmp-strip .dt { fill: rgba(196, 181, 253, .55); }
.cmp-strip .me { fill: #34d399; stroke: #0b0718; stroke-width: 2; } .cmp-strip .lb { fill: var(--text-subtle); font-size: 11px; }
.cmp-verdict { padding: .65rem .85rem; border-radius: 10px; font-size: .9rem; margin: .6rem 0; border-left: 3px solid; }
.cmp-verdict.ok { background: rgba(52, 211, 153, .08); border-color: #34d399; } .cmp-verdict.warn { background: rgba(251, 191, 36, .08); border-color: #fbbf24; } .cmp-verdict.bad { background: rgba(248, 113, 113, .08); border-color: #f87171; }
.cmp-offers td { vertical-align: middle; }
.cmp-hist { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 0 .25rem; }
.cmp-hist > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.cmp-hist i { width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #a78bfa, #6d28d9); }
.cmp-hist span { font-size: .68rem; color: var(--text-subtle); white-space: nowrap; }
.cmp-empty a { color: var(--plasma); }
#tool-mine input, [data-mine-list] input { margin: 0; padding: .35rem .5rem; font-size: .85rem; }

/* Audit */
.aud-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.aud-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.aud-ring { width: 130px; height: 130px; flex: none; }
.aud-ring .bg { fill: none; stroke: var(--surface); stroke-width: 12; } .aud-ring .fg { fill: none; stroke-width: 12; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 65px 65px; }
.aud-ring text { fill: var(--text); font-size: 34px; font-weight: 700; text-anchor: middle; } .aud-ring text.s { font-size: 12px; fill: var(--text-subtle); font-weight: 400; }
.aud-cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.aud-cat { padding: .3rem .65rem; border-radius: 99px; font-size: .78rem; background: var(--surface); border: 1px solid var(--border); }
.aud-cat.ok { border-color: rgba(52, 211, 153, .5); } .aud-cat.warn { border-color: rgba(251, 191, 36, .5); } .aud-cat.bad { border-color: rgba(248, 113, 113, .5); }
.aud-top li { margin-bottom: .35rem; }
.aud-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .5rem; }
.aud-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: .65rem; align-items: start; padding: .6rem .7rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.aud-list li > i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .85rem; }
.aud-list li.ok > i { background: rgba(52, 211, 153, .18); color: #6ee7b7; } .aud-list li.warn > i { background: rgba(251, 191, 36, .18); color: #fcd34d; } .aud-list li.bad > i { background: rgba(248, 113, 113, .18); color: #fca5a5; } .aud-list li.na > i { background: var(--border); color: var(--text-subtle); }
.aud-list b { display: block; font-size: .9rem; } .aud-list span { display: block; font-size: .8rem; color: var(--text-muted); } .aud-list em { display: block; font-style: normal; font-size: .8rem; color: #c4b5fd; margin-top: .2rem; }
.aud-loading { display: flex; gap: .6rem; align-items: center; color: var(--text-muted); }
.aud-err { border-color: rgba(248, 113, 113, .5); color: #fca5a5; }
.ai-ctx { display: flex; gap: .45rem; align-items: center; margin-top: .6rem; color: var(--text-muted); }

.cpt input[type=checkbox] { appearance: auto; -webkit-appearance: checkbox; background: #fff; border: 0; box-shadow: none; padding: 0; }
