/* VISIONCND — feuille de style commune (site public + application). Palette sobre : marine, bleu, sarcelle, gris. Aucun orange. */
:root {
  --navy: #17283d; --navy-2: #213a58; --blue: #2c5f94; --teal: #1f7a8c; --teal-bg: #e6f2f4;
  --bg: #f6f8fb; --card: #fff; --line: #dbe2ea; --ink: #1c2733; --muted: #5d6c7e;
  --ok: #1f7a4d; --ok-bg: #e5f3ec; --bad: #a3303a; --bad-bg: #f8e8ea; --info-bg: #e9f0f8;
  --radius: 12px; --shadow: 0 1px 2px rgba(23,40,61,.06), 0 4px 14px rgba(23,40,61,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1722; --card: #162232; --line: #27374b; --ink: #e6ecf3; --muted: #9db0c4; --navy: #0d1824; --navy-2: #1a2d44;
    --blue: #6fa6dd; --teal: #5cb6c6; --teal-bg: #12303a; --info-bg: #15283d; --ok: #5fc08d; --ok-bg: #12301f; --bad: #e57a84; --bad-bg: #3a1a1f;
    --shadow: none;
  }
}
:root[data-theme="dark"] { --bg: #0f1722; --card: #162232; --line: #27374b; --ink: #e6ecf3; --muted: #9db0c4; --navy: #0d1824; --navy-2: #1a2d44; --blue: #6fa6dd; --teal: #5cb6c6; --teal-bg: #12303a; --info-bg: #15283d; --ok: #5fc08d; --ok-bg: #12301f; --bad: #e57a84; --bad-bg: #3a1a1f; --shadow: none; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
mark.todo { background: var(--info-bg); color: var(--ink); padding: 0 .3em; border-radius: 4px; }

/* ---- boutons et formulaires ---- */
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--btn); color: #fff; border: 1px solid var(--btn); padding: .7rem 1.2rem; min-height: 44px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s; }
.button:hover { background: var(--btn-hover); }
.button.small { padding: .4rem .9rem; min-height: 36px; font-size: .9rem; }
.button.ghost, .ghostbtn { background: transparent; color: var(--strong); border-color: var(--line); }
:root[data-theme="dark"] .button.ghost, :root[data-theme="dark"] .ghostbtn { color: var(--ink); }
.button.ghost:hover, .ghostbtn:hover { background: var(--info-bg); }
.button.danger { background: var(--bad); border-color: var(--bad); }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.textlink { font-weight: 600; text-decoration: none; }
.form { display: grid; gap: 1rem; }
.form label, .field { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; min-height: 44px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--teal); }
.hp { position: absolute; left: -9999px; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }

/* ---- site public ---- */
.top { display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 4vw, 2.5rem); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.top nav { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; }
.top nav a { padding: .4rem .7rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { background: var(--info-bg); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: .02em; color: var(--strong); text-decoration: none; }
:root[data-theme="dark"] .brand { color: var(--ink); }
.brand .light { font-weight: 400; color: var(--teal); }
.brandmark { display: block; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.tagline { font-size: .85rem; color: var(--muted); margin: .2rem 0 0; }
.tagline em { font-style: normal; opacity: .8; }
.section { padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 3rem); max-width: 1160px; margin: 0 auto; }
.section.narrow { max-width: 780px; }
.section.tinted { max-width: none; background: var(--info-bg); }
.section.tinted > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.page-head { padding-bottom: 1rem; }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.eyebrow { font-size: .75rem; letter-spacing: .14em; font-weight: 700; color: var(--teal); margin-bottom: .6rem; }
.hero { max-width: 1160px; margin: 0 auto; padding: clamp(2.5rem, 8vw, 5.5rem) clamp(1rem, 5vw, 3rem) 2.5rem; }
.hero h1 em { font-style: normal; color: var(--teal); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; max-width: 640px; }
.hero-stats div { border-left: 3px solid var(--teal); padding-left: .8rem; }
.hero-stats b { display: block; font-size: 1.6rem; color: var(--strong); }
:root[data-theme="dark"] .hero-stats b { color: var(--ink); }
.hero-stats span { color: var(--muted); font-size: .9rem; }
.grid { display: grid; gap: 1.2rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); color: inherit; text-decoration: none; display: block; }
a.card:hover { border-color: var(--teal); }
.card h3 { margin-top: .5rem; }
.card p { color: var(--muted); }
.card-cta { color: var(--blue); font-weight: 600; font-size: .92rem; }
.chip { display: inline-block; background: var(--teal-bg); color: var(--teal); font-weight: 700; font-size: .78rem; padding: .15rem .6rem; border-radius: 99px; letter-spacing: .04em; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.tags span { border: 1px solid var(--line); border-radius: 99px; padding: .1rem .65rem; font-size: .8rem; color: var(--muted); }
.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 2rem; text-align: center; }
.cta-band h2 { color: #fff; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--teal); }
.plan ul { padding-left: 1.1rem; color: var(--muted); flex: 1; }
.price { font-size: 1.9rem; font-weight: 800; margin: .3rem 0; }
.price-year { color: var(--muted); font-size: .9rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 2rem; align-items: center; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.article { line-height: 1.75; }
.article h2 { margin-top: 1.8em; }
.disc, .foot .disc { font-size: .82rem; color: #c8d4e2; max-width: 900px; }
.foot { background: var(--navy); color: #c8d4e2; padding: 2.5rem clamp(1rem, 5vw, 3rem) 1.5rem; margin-top: 3rem; }
.foot .brand { color: #fff; } .foot .muted { color: #9db0c4; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: 1160px; margin: 0 auto 1.5rem; }
.foot h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.foot a { display: block; color: #c8d4e2; text-decoration: none; padding: .15rem 0; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .disc, .foot .small { max-width: 1160px; margin: 0 auto .6rem; }
.cookie { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: 0 8px 30px rgba(0,0,0,.18); display: flex; gap: 1rem; align-items: center; z-index: 50; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; font-size: .88rem; }
.fig, figure.fig { margin: 1.5rem 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }
.fig svg { display: block; width: 100%; height: auto; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
th { background: var(--info-bg); }
code { background: var(--info-bg); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
blockquote { margin: 1em 0; padding: .6em 1em; border-left: 4px solid var(--teal); background: var(--teal-bg); border-radius: 0 8px 8px 0; }

/* ---- application ---- */
body.app { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #c8d4e2; padding: 1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: .2rem; }
.side .brand { color: #fff; padding: .4rem .6rem 1.2rem; }
.side a.nav { display: flex; gap: .7rem; align-items: center; padding: .6rem .8rem; border-radius: 9px; color: #c8d4e2; text-decoration: none; font-weight: 500; min-height: 44px; }
.side a.nav:hover { background: rgba(255,255,255,.07); }
.side a.nav[aria-current=page] { background: rgba(255,255,255,.14); color: #fff; }
.side .sep { margin: .8rem .8rem .2rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #8aa0b8; }
.side .grow { flex: 1; }
.main { padding: clamp(1rem, 3vw, 2rem); max-width: 1100px; width: 100%; }
.mobilebar { display: none; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.pagehead h1 { font-size: 1.7rem; margin: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.15rem; }
.row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat b { display: block; font-size: 1.6rem; } .stat span { color: var(--muted); font-size: .85rem; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .3s; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: transparent; padding: .55rem 1rem; min-height: 44px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--btn); color: #fff; }
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border: 0; }
.list a, .list .item { display: flex; gap: .8rem; align-items: center; padding: .8rem .3rem; color: inherit; text-decoration: none; min-height: 48px; }
.list a:hover { background: var(--info-bg); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; background: var(--info-bg); color: var(--blue); }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.lock { background: var(--line); color: var(--muted); }
.notice { border-left: 4px solid var(--blue); background: var(--info-bg); padding: .8rem 1rem; border-radius: 0 10px 10px 0; margin-bottom: 1rem; }
.notice.bad { border-color: var(--bad); background: var(--bad-bg); } .notice.ok { border-color: var(--ok); background: var(--ok-bg); }
.lesson { max-width: 780px; line-height: 1.75; }
.lesson h2 { margin-top: 1.8em; border-bottom: 1px solid var(--line); padding-bottom: .3em; }
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.q-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.q-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.scenario { background: var(--info-bg); border-radius: 10px; padding: .9rem 1rem; margin-bottom: 1rem; }
.opt { display: flex; gap: .7rem; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: .75rem .9rem; margin-bottom: .6rem; cursor: pointer; background: var(--card); width: 100%; text-align: left; font: inherit; color: inherit; min-height: 48px; }
.opt:hover { border-color: var(--teal); }
.opt[aria-checked=true] { border-color: var(--blue); background: var(--info-bg); }
.opt.good { border-color: var(--ok); background: var(--ok-bg); } .opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt .mark { flex: none; width: 1.4rem; height: 1.4rem; border: 2px solid var(--line); border-radius: 50%; margin-top: .1rem; }
.opt.multi .mark { border-radius: 5px; }
.opt[aria-checked=true] .mark { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--card); }
.explain { margin-top: 1rem; border-radius: 10px; padding: 1rem; background: var(--info-bg); }
.explain.ok { background: var(--ok-bg); } .explain.bad { background: var(--bad-bg); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15rem; padding: .3rem .8rem; border-radius: 99px; background: var(--info-bg); }
.timer.low { background: var(--bad-bg); color: var(--bad); }
.qnav { display: flex; flex-wrap: wrap; gap: .4rem; }
.qnav button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.qnav button.done { background: var(--teal-bg); border-color: var(--teal); } .qnav button.cur { outline: 3px solid var(--blue); }
.qnav button.good { background: var(--ok-bg); border-color: var(--ok); } .qnav button.wrong { background: var(--bad-bg); border-color: var(--bad); }
.tablewrap { overflow-x: auto; }
.auth { max-width: 440px; margin: 6vh auto; padding: 0 1rem; }
.auth .panel { padding: 1.6rem; }
.toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 10px; z-index: 90; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); }
.modal-bg { position: fixed; inset: 0; background: rgba(10,20,32,.55); display: grid; place-items: center; z-index: 80; padding: 1rem; }
.modal { background: var(--card); border-radius: var(--radius); padding: 1.4rem; max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; }
.editor { width: 100%; min-height: 300px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 25% 0 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; height: 100%; width: 78%; max-width: 300px; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(10,20,32,.5); }
  .mobilebar { display: flex; align-items: center; gap: .8rem; background: var(--navy); color: #fff; padding: .5rem 1rem; position: sticky; top: 0; z-index: 30; }
  .mobilebar button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; padding: .4rem .7rem; min-height: 40px; font-size: 1.1rem; }
  .top nav { order: 3; width: 100%; }
}
@media print {
  .side, .mobilebar, .top, .foot, .cookie, .no-print, .toast, .skip { display: none !important; }
  body, .panel, .card { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .app-shell { display: block; } .main { max-width: none; padding: 0; }
  .lesson, .panel { border: 0; }
  a { color: #000; }
  .fig { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
button.nav { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; color: #c8d4e2; display: flex; gap: .7rem; align-items: center; padding: .6rem .8rem; border-radius: 9px; min-height: 44px; }
button.nav:hover { background: rgba(255,255,255,.07); }
/* schémas : lisibles sur mobile (défilement horizontal plutôt que texte microscopique) */
.fig { overflow-x: auto; }
@media (max-width: 640px) { .fig svg { min-width: 560px; } }
@media print { .fig svg { min-width: 0; } }

/* ---- partie 1 : experts, emplois, communauté ---- */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--teal-bg); }
.avatar.big { width: 104px; height: 104px; }
.avatar.ph { display: grid; place-items: center; font-weight: 800; color: var(--teal); font-size: 1.3rem; }
.avatar.big.ph { font-size: 2.2rem; }
.expert-card { display: flex; gap: 1rem; align-items: flex-start; }
.expert-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; background: var(--teal-bg); color: var(--teal); margin: 0 .3rem .3rem 0; }
.chip { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 99px; color: inherit; text-decoration: none; font-weight: 600; font-size: .9rem; background: var(--card); }
.chip.on { background: var(--btn); color: #fff; border-color: var(--btn); }
.filterbar, .filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.filters select, .filters input { min-height: 44px; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.5rem 0; }
.job-card h2, .job-card h3 { margin-top: 0; }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.cpost { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: .8rem; }
.cpost.masked { opacity: .6; border-style: dashed; }
.cpost header { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .4rem; }
.cbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.cform textarea { width: 100%; min-height: 110px; }
.form-msg { color: var(--bad); min-height: 1.2em; margin: 0; }
.linklike { background: none; border: 0; padding: .4rem 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; min-height: 44px; }
.thread { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .6rem; background: var(--card); }
.msg.mine { background: var(--info-bg); }
.msg header { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }

.cimg { display: block; max-width: 100%; max-height: 420px; border-radius: 10px; margin-top: .6rem; border: 1px solid var(--line); }
.cform label.small { display: block; margin-top: .6rem; }
/* mobile : les tableaux larges défilent dans leur cadre au lieu d'élargir la page */
.app-shell > *, .main, .main > *, .panel { min-width: 0; max-width: 100%; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

.langsw { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .85rem; }
.langsw:hover { background: var(--info-bg); }

/* Boutons et textes forts : bleu nuit en clair, teintes plus claires en mode sombre (--navy y est presque noir). */
:root { --btn: var(--navy); --btn-hover: var(--navy-2); --strong: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --btn: #2b4a6f; --btn-hover: #36597f; --strong: var(--ink); } .cta-band { border: 1px solid var(--line); } }
:root[data-theme="dark"] { --btn: #2b4a6f; --btn-hover: #36597f; --strong: var(--ink); }
:root[data-theme="dark"] .cta-band { border: 1px solid var(--line); }
