/* Shared visual layer: preserve the existing views and six theme choices. */
:root {
  --radius: 12px;
  --radius-sm: 7px;
  --sidebar: 236px;
  --brand: #276543;
  --brand-ink: #fff;
  --brand-soft: #e0ebdf;
  --muted: #64645d;
  --good: #276543;
  --warn: #92600b;
  --serious: #a94b20;
  --good-soft: #e0ebdf;
  --warn-soft: #f5eaca;
  --serious-soft: #f9e3d5;
  --grain-opacity: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #11130f; --surface: #191c17; --surface-2: #20241d; --surface-3: #30362b;
    --text: #f2f1e9; --text-2: #b6b9ad; --border: #343a2f;
    --brand: #c5eea5; --brand-ink: #172512; --brand-soft: #263321;
    --muted: #a0a39a; --good: #c5eea5; --warn: #ebc477; --serious: #f6a879;
    --good-soft: #263321; --warn-soft: #382f1f; --serious-soft: #3b2b22;
  }
}
:root:is([data-theme="dark"], [data-theme="slate"], [data-theme="terminal"]) {
  --brand: #c5eea5; --brand-ink: #172512; --brand-soft: #263321;
  --muted: #a0a39a; --good: #c5eea5; --warn: #ebc477; --serious: #f6a879;
  --good-soft: #263321; --warn-soft: #382f1f; --serious-soft: #3b2b22;
}
:root[data-theme="dark"] { --bg: #11130f; --surface: #191c17; --surface-2: #20241d; --surface-3: #30362b; --text: #f2f1e9; --text-2: #b6b9ad; --border: #343a2f; }
:root[data-theme="kraft"] { --brand: #526132; --brand-soft: #dbe0c5; --muted: #71614e; }
:root[data-theme="contrast"] { --brand: #ffd400; --brand-ink: #000; --brand-soft: #242000; }
body::after { display: none; }
body { font-size: 14px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.sidebar { gap: 32px; padding: 30px 18px 20px; background: var(--surface); }
.brand { padding: 0 12px; gap: 12px; }
.brand__mark { width: 28px; height: 28px; color: var(--brand); }
.brand__name { font-size: 30px; }
.nav { gap: 5px; }
.nav a, .nav a:first-child { min-height: 44px; padding: 11px 12px; border: 0; border-radius: 8px; font-size: 13px; }
.nav a::before, .nav a.is-active::after { display: none; }
.nav a .icon { display: block; width: 19px; height: 19px; }
.nav a:hover { padding-left: 12px; background: var(--surface-2); }
.nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.nav__tag { border: 0; color: var(--brand); }
.nav-more { display: contents; }
.nav-more > summary { display: none; }
.nav-more__links { display: contents; }
.nav-label-mobile { display: none; }
.nav [data-nav="settings"] { margin-top: 20px; }
.sidebar__foot::before { content: 'CONSTRUIT ENTRE DEUX PROJETS'; font: 500 9px/1.7 var(--mono); letter-spacing: .08em; color: var(--muted); padding: 0 12px; }
.sidebar__foot { gap: 18px; }
.user { padding: 16px 8px 0; }
.avatar { background: var(--brand-soft); color: var(--brand); border-radius: 10px; width: 36px; height: 36px; }
.topbar { padding: 16px 36px; min-height: 72px; background: var(--bg); backdrop-filter: none; }
.topbar__title { letter-spacing: 0; text-transform: none; font: 13px var(--font); }
.topbar__title .icon { display: block; color: var(--muted); }
.topbar__title::before { content: 'Mon espace /'; color: var(--muted); margin-right: 6px; }
.topbar__title b { font-weight: 500; }
#view { padding: 32px 36px 64px; max-width: 1440px; }
.btn { border-radius: 8px; min-height: 44px; height: auto; padding: 10px 16px; }
.btn--primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 85%, var(--text)); color: var(--brand-ink); border-color: var(--brand); }
.icon-btn { min-width: 44px; min-height: 44px; border-radius: 8px; }
input, select, textarea { border-radius: 7px; }
.year select { min-height: 40px; border-radius: 8px; }
.hero { border: 0; padding: 12px 0 24px; background: none; gap: 24px; }
.hero::before { display: none; }
.hero h1 { font-size: clamp(36px, 4vw, 58px); line-height: 1.06; max-width: 850px; }
.hero p { margin-top: 14px; font-size: 14px; line-height: 1.7; }
.hero__eyebrow { margin-bottom: 14px; color: var(--muted); font-size: 10px; }
.hero__eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.hero .grad { color: var(--brand); }
.hero__side { padding: 10px 0; }
.hero__side .ring { display: none; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-heading > span { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }
.grid--kpi { border: 0; background: none; gap: 14px; }
.grid > * { min-width: 0; }
.grid--kpi > .card, .grid--kpi > .card:first-child, .grid--kpi > .card:nth-child(n+3) { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.kpi { padding: 20px; gap: 9px; position: relative; overflow: hidden; }
.kpi__label { font: 500 12px var(--font); text-transform: none; letter-spacing: 0; color: var(--text-2); gap: 9px; }
.kpi__label .icon { display: block; color: var(--brand); }
.kpi__value { font-size: 36px; margin-top: 4px; }
.kpi__sub { font-size: 12px; }
.grid--2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.card--pad { padding: 24px; }
.card__head h2 { font-size: 16px; letter-spacing: -.03em; }
.card__head p { line-height: 1.6; }
.card { transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
a.card:hover { border-color: var(--brand); transform: translateY(-3px); }
.ring__value { stroke-linecap: round; stroke: var(--good); }
.ring--warn .ring__value { stroke: var(--warn); }
.ring--serious .ring__value { stroke: var(--serious); }
.chart__line, .chart__dot { stroke: var(--brand); }
.chart__dot.is-on { fill: var(--brand); }
.chart__area { fill: var(--brand-soft); }
.meter { height: 5px; border-radius: 8px; }
.meter > i { background: var(--good) !important; border-radius: inherit; }
.section-title { margin-top: 32px; padding-top: 0; border-top: 0; border-bottom: 0; padding-bottom: 0; flex-wrap: wrap; }
.section-title h2::before { display: none; }
.section-title h2 { font: 500 19px var(--font); letter-spacing: -.04em; }
.section-title a { color: var(--text-2); font: 12px var(--font); text-transform: none; letter-spacing: 0; border: 0; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.rcard { padding: 22px; }
.rcard__title h3 { font-family: var(--mono); font-size: 16px; }
.tbar { border-radius: 5px; overflow: hidden; height: 5px; }
.tbar__seg--good { background: var(--good); }
.workspace-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.workspace-link { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.workspace-link > .icon:first-child { color: var(--brand); }
.workspace-link > .icon:last-child { margin-left: auto; color: var(--muted); }
.workspace-link b { display: block; font-weight: 500; font-size: 13px; }
.workspace-link small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.callout { border-radius: 8px; background: var(--surface-2); font-size: 12px; line-height: 1.7; padding: 14px 18px; }
.connect__art { background: #11130f; padding: 40px 48px 72px; gap: 40px; }
.connect__art::before { opacity: .25; }
.connect__art h1 { font-size: clamp(52px,6vw,88px); line-height: .98; }
.connect__art h1 .grad { color: #c5eea5; }
.connect__art p { color: #b6b9ad; line-height: 1.7; }
.connect__top .brand__mark { color: #c5eea5; }
.connect__panel { padding: 48px 40px; }
.connect__box { max-width: 460px; gap: 22px; }
.connect__box h2 { font-size: 50px; }
.connect__box > div:first-child::before { content: 'TON PROCHAIN PROJET COMMENCE ICI'; display: block; color: var(--muted); font: 10px var(--mono); letter-spacing: .06em; margin-bottom: 16px; }
.steps { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.steps li { line-height: 1.65; font-size: 13px; }
.token-option { border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.token-option summary { cursor: pointer; padding: 12px 0; color: var(--text-2); font-size: 13px; min-height: 44px; }
.token-option[open] summary { margin-bottom: 10px; }
.feature b { color: #c5eea5; }
.marquee__inner { animation: none; flex-wrap: wrap; }
.stage { animation: none; }
.phone { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .chart svg { animation: chart-reveal .8s var(--ease) both; }
  .grid--cards > .card { animation: rise .4s var(--ease) both; }
  .grid--cards > .card:nth-child(2) { animation-delay: 50ms; }
  .grid--cards > .card:nth-child(3) { animation-delay: 100ms; }
  #view > :nth-child(2) { animation-delay: 40ms; }
  #view > :nth-child(3) { animation-delay: 80ms; }
  #view > :nth-child(4) { animation-delay: 120ms; }
  .btn .icon { transition: transform .2s var(--ease); }
  .btn:hover .icon:last-child { transform: translateX(2px); }
}
@keyframes chart-reveal { from { clip-path: inset(0 100% 0 0); } }
@media (max-width: 1100px) {
  .grid--2 { grid-template-columns: 1fr; }
  .workspace-links { gap: 10px; }
  .workspace-link { padding: 14px; }
  .workspace-link small { display: none; }
}
@media (max-width: 860px) {
  .sidebar { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); }
  .nav { gap: 4px; justify-content: space-between; }
  .nav > a, .nav-more { flex: 1; min-width: 0; }
  .nav a, .nav a:first-child { padding: 8px 3px; gap: 5px; font-size: 10px; min-height: 52px; }
  .nav a:hover { padding-left: 3px; }
  .nav a .icon { width: 20px; height: 20px; }
  .nav-more { display: block; }
  .nav-more > summary { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 3px; font-size: 10px; color: var(--text-2); cursor: pointer; border-radius: 8px; list-style: none; min-height: 52px; }
  .nav-more > summary::-webkit-details-marker { display: none; }
  .nav-more[open] > summary { background: var(--surface-2); color: var(--brand); }
  .nav-more:has(a.is-active) > summary { background: var(--brand-soft); color: var(--brand); }
  .nav-more__links { display: none; }
  .nav-more[open] .nav-more__links { position: absolute; bottom: calc(100% + 8px); right: 10px; left: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 40px #0003; }
  .nav-more__links a, .nav-more__links a:first-child { flex-direction: row; justify-content: flex-start; padding: 12px; font-size: 13px; gap: 10px; }
  .nav-label-desktop { display: none; }
  .nav-label-mobile { display: inline; }
  .nav [data-nav="settings"] { margin-top: 0; }
  .topbar { min-height: 64px; padding: 10px 18px; }
  .topbar__title::before { display: none; }
  #view { padding: 24px 18px 110px; }
  .hero { padding: 8px 0 16px; gap: 0; }
  .hero h1 { font-size: 42px; }
  .hero__side { display: none; }
  .hero__eyebrow { font-size: 9px; }
  .hero__actions .btn { font-size: 12px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading > span { display: none; }
  .workspace-links { grid-template-columns: 1fr; }
  .workspace-link small { display: block; }
  .grid--kpi { gap: 10px; }
  .kpi { padding: 16px; }
  .kpi__value { font-size: 30px; }
  .kpi__sub { font-size: 11px; line-height: 1.6; }
  .card--pad { padding: 20px; }
  #run-form > .card__head { flex-direction: column; align-items: stretch; }
  #run-form > .card__head .segmented { display: flex; }
  #run-form > .card__head .segmented button { flex: 1; min-height: 44px; padding: 6px 8px; }
  .section-title h2 { font-size: 18px; }
  .connect__art { padding: 28px 24px 48px; gap: 32px; }
  .connect__panel { padding: 32px 24px 48px; }
  .connect__art h1 { font-size: 58px; }
  .connect__art .stage { margin-top: 0; }
  .connect__box h2 { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  a.card:hover { transform: none; }
}
