/* Le Faux Codex — thème laboratoire d'expertise, parchemin et laiton */
:root {
    --tp-bg: radial-gradient(circle at 50% 0%, #3a2716 0%, #1c130c 70%);
    --tp-text: #f4ecd8;
    --tp-muted: #d8c8a8;
    --tp-accent: #e5a93c;
    --tp-accent-2: #f3c97a;
    --tp-card: rgba(43, 29, 20, 0.92);
    --tp-border: rgba(229, 169, 60, 0.35);
    --tp-header-bg: rgba(28, 19, 12, 0.9);
    --tp-font-head: 'Cinzel', Georgia, serif;
    --tp-font-body: 'Nunito', system-ui, sans-serif;
    --tp-play-bg: linear-gradient(135deg, #e5a93c, #b45309);
    --tp-play-ink: #1c130c;
    --tp-notebook-bg: rgba(244, 236, 216, 0.06);
    --tp-notebook-border: #e5a93c;
    --tp-notebook-title: #f3c97a;
}
.eg {
    --eg-card: rgba(43, 29, 20, 0.94);
    --eg-card-2: rgba(244, 236, 216, 0.05);
    --eg-text: #f4ecd8;
    --eg-muted: #d8c8a8;
    --eg-accent: #e5a93c;
    --eg-accent-ink: #1c130c;
    --eg-border: rgba(229, 169, 60, 0.3);
    --eg-ok: #86efac;
    --eg-err: #fca5a5;
    --eg-radius: 12px;
    --eg-font-head: 'Cinzel', Georgia, serif;
    --eg-font-body: 'Nunito', system-ui, sans-serif;
    --eg-font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.eg .eg-input { background: #fbf6ea; color: #2b1d14; }
.eg .eg-room-title { color: var(--eg-accent); font-size: clamp(1.3rem, 4.5vw, 1.9rem); }

/* Salle 1 : la page en miroir */
.sheet-wrap { position: relative; }
.mirror-sheet { position: relative; background: #efe2c2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); border-radius: 6px; padding: 1.4rem 1.2rem; box-shadow: inset 0 0 40px rgba(120, 80, 30, 0.35); overflow: hidden; touch-action: none; cursor: crosshair; }
.mirror-text { font-family: 'Nunito', cursive; font-style: italic; font-size: clamp(1rem, 3.4vw, 1.35rem); line-height: 1.9; color: #4a2c12; white-space: pre-line; user-select: none; }
.mirror-text.mirrored { transform: scaleX(-1); }
.mirror-text.lens { position: absolute; inset: 1.4rem 1.2rem; background: #f8f0dc; pointer-events: none; }
.lens-ring { position: absolute; left: 0; top: 0; border-radius: 50%; border: 3px solid #b8860b; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(0, 0, 0, 0.35); pointer-events: none; opacity: 0; }
.margin-doodle { position: absolute; right: 8px; bottom: 6px; }

/* Salle 2 : table lumineuse */
.light-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0.6rem 0; }
.measure-out { color: var(--tp-accent-2); }
.paper-wrap { background: #2a1d12; padding: 0.6rem; border-radius: 8px; }
.paper-svg { width: 100%; display: block; background: #e9dcbc; border-radius: 4px; cursor: crosshair; transition: background 0.3s; }
.paper-svg.lit { background: #fff7dd; box-shadow: 0 0 30px rgba(255, 230, 150, 0.6); }
.paper-svg .backlit { opacity: 0.05; transition: opacity 0.3s; }
.paper-svg.lit .backlit { opacity: 1; }
.paper-svg .chain { stroke: rgba(120, 90, 40, 0.55); stroke-width: 0.6; }
.paper-svg .laid { stroke: rgba(120, 90, 40, 0.08); stroke-width: 0.25; }
.paper-svg .wm path { fill: none; stroke: rgba(110, 80, 30, 0.55); stroke-width: 1.2; }
.paper-svg .ink path { fill: rgba(74, 44, 18, 0.12); stroke: #4a2c12; stroke-width: 0.7; }
.paper-svg .ink line { stroke: #4a2c12; stroke-width: 0.5; }
.paper-svg .meas circle { fill: #c2410c; }
.paper-svg .meas line { stroke: #c2410c; stroke-width: 0.6; stroke-dasharray: 2 1; }

/* Salle 3 : spectromètre */
.xrf-wrap { margin: 0.6rem 0; }
.xrf-canvas { width: 100%; display: block; border: 1px solid var(--eg-border); border-radius: 6px; cursor: crosshair; touch-action: none; }
.xrf-ctrl { justify-content: center; margin-bottom: 0.6rem; }
