/* All HORLOGIS surfaces share the approved October reference.
   Preserve each page's layout and the canonical three-mode controller. */
html[data-visual-reference="2026-10"] {
 --body-bg:var(--bg); --card-bg:var(--bg-surface); --card:var(--bg-surface);
 --navy2:var(--bg-surface-md); --white:var(--text-primary); --text:var(--text-primary);
 --gray:var(--text-muted); --silver:var(--text-secondary);
 --cream-dim:var(--text-secondary); --cream-muted:var(--text-muted); --cream-ghost:var(--border);
 --papier:var(--bg); --encre:var(--text-primary); --or:var(--accent); --doux:var(--text-secondary);
 --trait:var(--border); --carte:var(--bg-surface); --ivory:var(--bg);
 --paper:var(--bg-surface); --ink:var(--text-primary); --ink2:var(--text-secondary);
 --line:var(--border); --line2:var(--border-md); --goldD:var(--accent); --goldL:var(--accent-soft);
 --gold2:var(--accent-soft); --gold-light:var(--accent-soft); --gold-dim:var(--accent);
 --sidebar:264px; --sidebar-w:264px;
}
html[data-visual-reference="2026-10"] { color-scheme:light; }
html[data-visual-reference="2026-10"]:is([data-theme="prestige"],[data-theme="lecture"]) { color-scheme:dark; }
html[data-visual-reference="2026-10"] body { font-family:var(--font-body,Arial,sans-serif); }
html[data-visual-reference="2026-10"] body { background:var(--bg); color:var(--text-primary); }
html[data-visual-reference="2026-10"] :is(button,input,select,textarea) { font-family:inherit; }
html[data-visual-reference="2026-10"] :is(button,input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select) { min-height:44px; }
html[data-visual-reference="2026-10"] :is(input,select,textarea) { max-width:100%; box-sizing:border-box; }
html[data-visual-reference="2026-10"] :is(button,a,input,select,textarea):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
html[data-visual-reference="2026-10"] :is(.rhu-nav-link,.nav-link,.back-link,.h-legal-links a) { min-height:44px; display:inline-flex; align-items:center; }
html[data-visual-reference="2026-10"] :is(.card,.carte,.panel,.feature-card,.stock-card,.step-card,.sf-card,.msg-card,.chat-container) {
 background:var(--bg-surface); border-color:var(--border); border-radius:12px;
}
html[data-visual-reference="2026-10"][data-theme="atelier"] :is(.rhu-hero,.ob-header,.report-header,.page-hero) {
 background:linear-gradient(90deg,#f8f6f1 35%,#f8f6f1c9),url('/assets/images/horlogis-watchmaking-ivory.webp') right center/auto 100% no-repeat;
}
html[data-visual-reference="2026-10"] :is(.btn-gold,.submit-btn,.bouton,.send-btn,button[type="submit"]) {
 background:var(--accent); border-color:var(--accent); color:var(--text-inverse);
}
html[data-visual-reference="2026-10"] :is(.btn-gold,.submit-btn,.bouton,.send-btn,button[type="submit"]):disabled { opacity:.55; }
html[data-visual-reference="2026-10"] :is(.sb-logo-text,.logo-text,.marque,.home-wordmark) { font-weight:700; }
html[data-visual-reference="2026-10"][data-theme="atelier"] :is(.sb-logo-text,.logo-text) { color:var(--text-primary); }
html[data-visual-reference="2026-10"][data-theme="atelier"] :is(.sb-logo-text,.logo-text) span { color:var(--accent); }
html[data-visual-reference="2026-10"] #sidebar .role-toggle { flex-shrink:0; min-height:48px; }
/* Sidebars remain in normal flex flow: do not reserve their width a second time. */
@media(max-width:768px) {
 html[data-visual-reference="2026-10"] :is(.rhu-nav,.rhu-nav-right,.nav-links,.topbar-right) { flex-wrap:wrap; gap:10px; min-width:0; }
 html[data-visual-reference="2026-10"] :is(.rhu-nav-link,.nav-link) { font-size:13px; }
 html[data-visual-reference="2026-10"] :is(.rhu-hero,.ob-header,.report-header,.page-hero) { background-size:auto 200px; }
 html[data-visual-reference="2026-10"] .h-legal-links { flex-wrap:wrap; }
}
@media print {
 html[data-visual-reference="2026-10"] { --bg:#fff; --text-primary:#202630; --text-secondary:#4c5561; }
 html[data-visual-reference="2026-10"] body { background:#fff; color:#202630; }
}

html[data-visual-reference="2026-10"] #sidebar .sb-logo-text { font-size:22px !important; letter-spacing:3px !important; }

html[data-visual-reference="2026-10"][data-theme="atelier"] body > nav:not(#sidebar) { background:var(--bg-surface); border-color:var(--border); }
@media(max-width:768px) {
 html[data-page="savoir-faire"] body > nav { position:sticky; height:auto; min-height:60px; flex-wrap:wrap; gap:12px; padding:12px 16px; }
 html[data-page="savoir-faire"] .nav-right { flex-wrap:wrap; gap:10px; min-width:0; max-width:100%; }
 html[data-page="savoir-faire"] :is(.actions-bar,.filter-tabs) { max-width:100%; min-width:0; flex-wrap:wrap; }
 html[data-page="savoir-faire"] .search-box { min-width:0; max-width:100%; box-sizing:border-box; }
 html[data-page="savoir-faire"] .search-box input { min-width:0; width:100%; }
 html[data-page="savoir-faire"] :is(.fiches-grid,.levels-explanation) { grid-template-columns:minmax(0,1fr); }
}

html[data-page="savoir-faire"][data-theme="atelier"] body::before { background:none; }
html[data-page="savoir-faire"][data-theme="atelier"] .btn-sm.gold { color:var(--text-inverse); }
html[data-page="savoir-faire"][data-theme="atelier"] #modal-nda > div { background:var(--bg-surface) !important; }
html[data-page="savoir-faire"][data-theme="atelier"] #nda-sign-btn { color:var(--text-inverse) !important; }

/* Editorial section headings must not inherit compact cockpit metadata sizing. */
html[data-visual-reference="2026-10"] h2.section-title { font-size:clamp(28px,4vw,46px) !important; line-height:1.15; letter-spacing:0 !important; color:var(--text-primary); }

html[data-visual-reference="2026-10"] .bouton.clair { background:transparent; color:var(--text-primary); border:1px solid var(--border-md); }
html[data-visual-reference="2026-10"] :is(main > a,footer a,.pied a) { color:var(--accent); }

/* Keep standalone conversations, onboarding and invitation cards within the viewport. */
html[data-page="organisation-invitation"] .card { box-sizing:border-box; }
html[data-page="chat"] :is(nav,.chat-header,.cost-bar,.input-info) { flex-wrap:wrap; gap:12px; }
html[data-page="chat"] :is(.input-row textarea,.bubble) { min-width:0; overflow-wrap:anywhere; }
html[data-page="chat"] :is(.messages,.input-zone,.topics) { min-width:0; max-width:100%; }
html[data-page="onboarding-ai"] .container { width:100%; min-width:0; }
html[data-page="onboarding-ai"] .input-free input { min-width:0; }
html[data-page="onboarding-ai"] .cbubble { min-width:0; overflow-wrap:anywhere; }
@media(max-width:600px) {
 html[data-page="onboarding-ai"] .progress { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 html[data-page="onboarding-ai"] .step-line { display:none; }
 html[data-page="onboarding-ai"] .step { min-width:0; }
 html[data-page="onboarding-ai"] nav { flex-wrap:wrap; }
}

/* An SVG progress ring must remain a ring, never the browser's default black disc. */
html[data-visual-reference="2026-10"] .score-ring-svg circle { fill:none; }
html[data-visual-reference="2026-10"] .score-ring-svg .score-bg-circle { stroke:var(--border-md); }
html[data-visual-reference="2026-10"] .score-ring-svg .score-progress-circle { stroke:var(--accent); stroke-linecap:round; }
