/* =========================================================================
   Arch Overview — design system
   Direction : fond clair chaud, texte presque noir, bleu architectural,
   traits de cote utilisés avec parcimonie. Contrastes AA, focus visibles.
   ========================================================================= */

:root {
  --bg: #f7f5f1;
  --bg-raised: #fffdf9;
  --bg-sunken: #efece6;
  --ink: #16181d;
  --ink-soft: #4b4f58;
  --ink-faint: #787d87;
  --line: #dcd8cf;
  --line-strong: #b9b4a8;
  --accent: #2b50e0;
  --accent-ink: #1d3aad;
  --accent-soft: #e3e9fc;
  --warn: #b45309;
  --warn-soft: #fdeeda;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 24, 29, 0.06), 0 8px 24px rgba(22, 24, 29, 0.07);
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Consolas", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Aucun défilement horizontal : le viewport reste à la largeur de l'écran
   (indispensable pour les éléments fixed sur mobile, ex. la console 3D). */
html, body { max-width: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ------------------------------------------------------------- layout -- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 24px; height: 60px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 750; font-size: 1.05rem; color: var(--ink);
  text-decoration: none; letter-spacing: -0.01em;
}
/* Logo « œil + équerre » (généré, PNG transparent). */
.logo-mark {
  width: 36px; height: 36px; display: block; object-fit: contain;
}
.logo-wordmark { height: 52px; display: block; object-fit: contain; }
/* Illustrations des cartes d'étapes (même trait que le logo). */
.step-illu { width: 84px; height: 84px; object-fit: contain; margin-bottom: 10px; }
/* Bouton vedette du héros (aperçu client). */
.btn-xl {
  padding: 15px 30px; font-size: 1.08rem; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(43, 80, 224, 0.28);
  transition: transform 0.12s ease;
}
.btn-xl:hover { transform: scale(1.04); }

/* Galerie de rendus réels. */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--line); background: #dfe4ea; display: block;
}
.gallery figcaption { font-size: 0.82rem; color: var(--ink-faint); margin-top: 8px; }
@media (max-width: 900px) {
  /* Mobile : carrousel horizontal. */
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .gallery figure { flex: 0 0 78%; scroll-snap-align: start; }
}

/* Bloc Zone IA — volontairement discret, en bas de page. */
.ai-banner.compact {
  display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 14px;
  padding: 16px 20px; max-width: 760px;
}
.ai-banner.compact .ai-banner-illu { width: 96px; object-fit: contain; }
.ai-banner.compact p { color: var(--ink-soft); font-size: 0.92rem; }
@media (max-width: 720px) {
  .ai-banner.compact { grid-template-columns: 64px 1fr; }
  .ai-banner.compact .ai-banner-illu { width: 64px; }
}
/* Version mise en valeur sur la landing. */
.hero-logo {
  width: 84px; height: 84px; object-fit: contain; display: block;
  margin-bottom: 14px; filter: drop-shadow(0 4px 10px rgba(43, 80, 224, 0.18));
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-sunken); }

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius); font-size: 0.96rem;
  font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary {
  background: var(--bg-raised); color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink-faint); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: currentcolor; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  background:
    linear-gradient(var(--bg) 0 0) padding-box,
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(43, 80, 224, 0.05) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(43, 80, 224, 0.05) 47px 48px);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(320px, 1fr) minmax(340px, 1.1fr);
  gap: 48px; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 99px; padding: 5px 14px;
  margin-bottom: 18px;
}
.hero p.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.hero-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 10px; }
.hero-viewer {
  aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden; background: #e8e6e0; position: relative;
}
.hero-viewer canvas { width: 100%; height: 100%; display: block; }
.hero-viewer-tag {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(255, 253, 249, 0.9); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 8px; font-size: 0.78rem; color: var(--ink-soft);
}

/* ----------------------------------------------------------- sections -- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-raised); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  position: relative;
}
.step-num {
  font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink);
  border: 1px dashed var(--accent); border-radius: 6px;
  display: inline-block; padding: 2px 8px; margin-bottom: 14px;
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; background: var(--bg);
}
.feature h3 { font-size: 1rem; }
.feature p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); margin-bottom: 10px; padding: 0 18px;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding-bottom: 14px; margin: 0; }

.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0; margin-top: 40px;
  font-size: 0.88rem; color: var(--ink-faint);
}
.site-footer .container { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--ink-soft); }

/* --------------------------------------------------------------- demo -- */
.workbench { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.stepper {
  display: flex; gap: 6px; align-items: center; padding: 12px 20px;
  border-bottom: 1px solid var(--line); background: var(--bg-raised);
  flex-wrap: wrap;
}
.stepper .crumb {
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 0.88rem; font-weight: 600; color: var(--ink-faint);
  padding: 6px 12px; border-radius: 8px;
}
.stepper .crumb.active { color: var(--accent-ink); background: var(--accent-soft); }
.stepper .crumb.done { color: var(--ok); }
.stepper .sep { color: var(--line-strong); }
.stepper .spacer { margin-left: auto; }

.dropzone {
  margin: 40px auto; max-width: 640px; width: calc(100% - 40px);
  border: 2px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--bg-raised); padding: 48px 32px; text-align: center;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .hint { color: var(--ink-faint); font-size: 0.9rem; }
.import-progress { max-width: 640px; margin: 24px auto; width: calc(100% - 40px); }
.progress-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.92rem; }
.progress-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.progress-row.doing .dot { background: var(--accent); }
.progress-row.done .dot { background: var(--ok); }
.progress-row.error .dot { background: var(--danger); }

.page-picker { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ------------------------------------------------------------- editor -- */
.editor-shell { display: grid; grid-template-columns: 240px 1fr 280px; flex: 1; min-height: 0; }
.editor-panel {
  background: var(--bg-raised); border-right: 1px solid var(--line);
  padding: 14px; overflow-y: auto; font-size: 0.88rem;
}
.editor-panel.right { border-right: 0; border-left: 1px solid var(--line); }
.editor-canvas-wrap { position: relative; background: var(--bg-sunken); overflow: hidden; min-height: 420px; }
.editor-canvas-wrap svg { display: block; width: 100%; height: 100%; touch-action: none; }
.panel-title {
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint); font-weight: 700; margin: 14px 0 8px;
}
.panel-title:first-child { margin-top: 0; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft);
  border-radius: 8px; padding: 7px 8px; font-size: 0.8rem; cursor: pointer; text-align: left;
}
.tool-btn.active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.check-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.check-row input { accent-color: var(--accent); }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.inspector label { display: block; font-size: 0.78rem; color: var(--ink-faint); margin-top: 10px; }
.inspector input[type="number"], .inspector select, .inspector input[type="text"] {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line-strong);
  border-radius: 7px; background: var(--bg); font-family: inherit; font-size: 0.88rem;
}
.inspector .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.badge.review { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: #dcf5e5; color: var(--ok); }
.editor-toolbar-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }
.calib-box {
  border: 1px solid var(--accent); background: var(--accent-soft);
  padding: 10px; border-radius: 8px; margin-top: 8px; font-size: 0.85rem;
}

/* --------------------------------------------- viewer + panneau import -- */
.viewer-with-import { display: grid; grid-template-columns: 250px 1fr; flex: 1; min-height: 0; }
.import-side { border-right: 1px solid var(--line); }
.dropzone.mini {
  margin: 0; padding: 14px 12px; border-width: 1.5px; border-radius: var(--radius);
  text-align: center;
}
.import-progress.compact { margin: 10px 0 0; width: auto; font-size: 0.82rem; }
.import-progress.compact .progress-row { font-size: 0.8rem; padding: 3px 0; }
@media (max-width: 980px) {
  .viewer-with-import { grid-template-columns: 1fr; }
  .import-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 34vh; }
}

/* ------------------------------------------------------------- viewer -- */
.viewer-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
/* Vue client : viewer seul, pleine largeur et pleine hauteur. */
.viewer-shell.client { grid-template-columns: minmax(0, 1fr); }
.preview-page { display: flex; flex-direction: column; height: calc(100dvh - 61px); min-height: 480px; }
@media (max-width: 900px) {
  /* Tablette : le header peut replier ses liens sur deux lignes. */
  .preview-page { height: calc(100dvh - 120px); min-height: 420px; }
}
@media (max-width: 680px) {
  /* Mobile : liens masqués, header à une seule ligne (~61 px). */
  .preview-page { height: calc(100dvh - 61px); min-height: 420px; }
}
.preview-page .viewer-shell { height: 100%; grid-template-rows: 1fr; }
.preview-page .viewer-canvas-wrap { min-height: 0; height: 100%; overflow: hidden; }
.viewer-canvas-wrap { position: relative; background: #dfe4ea; min-height: 420px; min-width: 0; overflow: hidden; }
.viewer-canvas-wrap canvas { width: 100%; height: 100%; max-width: 100%; display: block; touch-action: none; }
.viewer-hud {
  position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; flex-wrap: wrap;
  align-items: flex-start;
}
.hud-items { display: flex; gap: 8px; flex-wrap: wrap; }
.hud-menu-btn { display: none; }
@media (max-width: 680px) {
  /* Mobile : un seul bouton ☰, les options se déplient en colonne. */
  .hud-menu-btn { display: inline-block; }
  .hud-items { display: none; }
  /* ☰ et les boutons d'appartements restent côte à côte ; le menu déplié
     occupe toute la largeur en dessous. */
  .viewer-hud { flex-direction: row; flex-wrap: wrap; max-width: calc(100vw - 24px); }
  .viewer-hud.open .hud-items {
    flex-basis: 100%;
    display: flex; flex-direction: column; align-items: stretch; gap: 5px;
    background: rgba(255, 253, 249, 0.97); border: 1px solid var(--line);
    border-radius: 10px; padding: 8px; box-shadow: var(--shadow);
    max-height: 58vh; overflow-y: auto;
  }
}
.hud-btn {
  background: rgba(255, 253, 249, 0.92); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; font-size: 0.82rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
}
.hud-btn.active { border-color: var(--accent); color: var(--accent-ink); }
/* ViewCube (vues rapides façon 3ds Max) : grille orientée comme le plan,
   ancrée en bas à droite du viewer — visible aussi sur mobile. */
.viewcube {
  position: absolute; bottom: 14px; right: 12px; display: flex; flex-direction: column;
  gap: 3px; z-index: 5; user-select: none;
}
.cube-grid { display: grid; grid-template-columns: repeat(3, 36px); grid-auto-rows: 30px; gap: 3px; }
.cube-zoom { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.cube-zoom .cube-btn { height: 28px; font-size: 0.95rem; }
.cube-btn {
  background: rgba(255, 253, 249, 0.92); border: 1px solid var(--line);
  border-radius: 6px; padding: 0; font-size: 0.7rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; line-height: 1;
}
.cube-btn:hover { border-color: var(--accent); color: var(--accent-ink); background: #fff; }
.cube-btn.cube-top { height: 26px; }
.cube-btn.cube-home { font-size: 0.95rem; }
/* Le bouton Centrer de la console n'existe que sur mobile (le ⌂ de la
   grille et « Recentrer » du HUD couvrent le desktop). */
.cube-btn.cube-center { display: none; }
@media (max-width: 900px) {
  /* Mobile : console réduite à l'essentiel (Centrer, Haut, + / −) —
     l'orbite au doigt remplace les faces/coins. Ancrée en bas à droite. */
  .viewcube { position: fixed; bottom: 12px; right: 10px; gap: 4px; width: 96px; }
  .cube-grid { display: none; }
  .cube-btn { font-size: 0.72rem; }
  .cube-btn.cube-center {
    display: block; height: 42px; font-size: 0.82rem; font-weight: 700;
    border-color: var(--accent); color: var(--accent-ink);
  }
  .cube-btn.cube-top { height: 32px; }
  .cube-zoom .cube-btn { height: 36px; font-size: 1.05rem; }
}

/* Avant/Après flottant (mobile) + sélection d'appartements de la vue client. */
.compare-fab { display: none; }
.hud-apts { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
@media (max-width: 900px) {
  .compare-fab {
    display: block; position: fixed; bottom: 12px; left: 10px; z-index: 5;
    user-select: none; touch-action: none;
  }
  .hud-items .hud-compare { display: none; }
  .hud-apts .hud-btn { padding: 6px 9px; font-size: 0.74rem; }
}

.room-label {
  position: absolute; transform: translate(-50%, -50%);
  background: rgba(255, 253, 249, 0.85); border: 1px solid var(--line);
  padding: 1px 7px; border-radius: 6px; font-size: 0.72rem; font-weight: 600;
  color: var(--ink-soft); pointer-events: none; white-space: nowrap;
}
.viewer-panel {
  background: var(--bg-raised); border-left: 1px solid var(--line);
  padding: 14px; overflow-y: auto; font-size: 0.88rem;
}
.slider-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.slider-row .val { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint); min-width: 42px; text-align: right; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0; gap: 10px;
}
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px;
  transition: background 0.15s; pointer-events: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform 0.15s;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------ journal -- */
.journal {
  border-top: 1px solid var(--line); background: var(--bg-raised);
  max-height: 45vh; overflow-y: auto; padding: 14px 20px;
}
.journal-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.journal-progress { flex: 1; min-width: 160px; height: 8px; background: var(--bg-sunken); border-radius: 99px; overflow: hidden; }
.journal-progress > div { height: 100%; background: var(--accent); transition: width 0.3s; }
.journal-stats { display: flex; gap: 16px; font-size: 0.82rem; color: var(--ink-soft); flex-wrap: wrap; }
.journal-stats b { color: var(--ink); }
.journal-events { margin-top: 10px; font-size: 0.84rem; }
.jrow { padding: 6px 8px; border-radius: 7px; display: flex; gap: 10px; align-items: baseline; }
.jrow:nth-child(odd) { background: var(--bg); }
.jrow .t { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); flex: none; width: 62px; }
.jrow .status-chip { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 5px; flex: none; }
.status-encours { background: var(--accent-soft); color: var(--accent-ink); }
.status-termine { background: #dcf5e5; color: var(--ok); }
.status-averifier { background: var(--warn-soft); color: var(--warn); }
.status-erreur { background: #fde4e4; color: var(--danger); }
.status-attente { background: var(--bg-sunken); color: var(--ink-faint); }
.jrow details { flex: 1; }
.jrow summary { cursor: pointer; }
.jrow table { font-size: 0.78rem; border-collapse: collapse; margin-top: 6px; }
.jrow td, .jrow th { border: 1px solid var(--line); padding: 3px 8px; text-align: left; }
.jrow img.thumb { max-width: 120px; border: 1px solid var(--line); border-radius: 6px; margin: 4px 4px 0 0; }

/* -------------------------------------------------------------- modal -- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(22, 24, 29, 0.45);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--bg-raised); border-radius: var(--radius-lg);
  max-width: 480px; width: 100%; padding: 26px; box-shadow: var(--shadow);
}
.modal h3 { margin-top: 0; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal input[type="text"], .modal input[type="email"] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong);
  border-radius: 8px; font-family: inherit; font-size: 0.95rem;
}
.note-box {
  background: var(--bg-sunken); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font-size: 0.85rem; color: var(--ink-soft);
}

/* ----------------------------------------------------------- projects -- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-raised); padding: 18px;
}
.project-card h3 { margin-bottom: 4px; }
.project-card .meta { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 12px; }
.empty-state { text-align: center; color: var(--ink-faint); padding: 60px 20px; }

.prose { max-width: 70ch; }
.prose h1 { font-size: 1.8rem; }

/* --------------------------------------------------------- responsive -- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* Mobile : la maquette 3D de démonstration passe EN PREMIER, le texte suit. */
  .hero-grid > .hero-viewer { order: -1; }
  .steps { grid-template-columns: 1fr; }
  .editor-shell { grid-template-columns: 200px 1fr; }
  .editor-panel.right {
    position: fixed; right: 0; top: 60px; bottom: 0; width: 280px; z-index: 40;
    box-shadow: var(--shadow);
  }
  .viewer-shell { grid-template-columns: 1fr; }
  .viewer-panel { border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; }
}
@media (max-width: 680px) {
  .nav-links a:not(.btn) { display: none; }
  .editor-shell { grid-template-columns: 1fr; }
  .editor-panel { border-right: 0; border-bottom: 1px solid var(--line); max-height: 30vh; }
  .editor-panel.right { position: static; width: auto; box-shadow: none; }
}
