/* ==========================================================================
   Site de Pierre Droulon — feuille de style unique
   Les couleurs et polices sont dans :root, juste en dessous.
   ========================================================================== */
:root {
  --paper: #eef3ee;
  --sheet: #f8faf6;
  --ink: #10241d;
  --muted: #4f6259;
  --ghost: #c9d6ce;
  --green: #0f5a45;
  --leaf: #2f8c66;
  --tint: #d9eadf;
  --line: #cbd9d0;
  --gold: #c99a33;
  --accent: #0f5a45;           /* recalculée au défilement */
  /* SF Pro sur les appareils Apple, Inter (la plus proche) ailleurs */
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --bar: 3.75rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; letter-spacing: -.035em; }
p { margin: 0 0 1em; max-width: 36em; }
.wrap { width: min(100% - 2.5rem, 76rem); margin-inline: auto; }

/* Barre du haut, translucide */
.bar { position: fixed; inset: 0 0 auto; z-index: 30; height: var(--bar); background: rgba(238, 243, 238, .72); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(203, 217, 208, .7); }
.bar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { font: 800 1.2rem var(--display); text-decoration: none; letter-spacing: -.02em; display: flex; align-items: baseline; gap: .6rem; white-space: nowrap; }
.brand em { font: 500 .9375rem var(--body); font-style: normal; color: var(--accent); transition: color .3s; }
@media (max-width: 640px) { .brand em { display: none; } }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--muted); font-size: .9375rem; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
@media (max-width: 760px) { .nav a { display: none; } }
.btn { border: 0; border-radius: 999px; padding: .55rem 1.1rem; background: var(--green); color: #fff; font-weight: 600; font-size: .9375rem; transition: background .2s, transform .2s; }
.btn:hover { background: var(--ink); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--read, 0)); }

/* Ouverture : les trois mots s'allument au défilement */
/* Hauteur = bloc + marge + 40vh de défilement pour allumer les mots */
.intro { position: relative; display: flow-root; height: calc(min(100vh, 50rem) + max(0px, calc((100vh - 50rem) / 2)) + 40vh); }
/* Sur les écrans hauts, le bloc fait au plus 50rem et reste centré : moins de vide autour */
.pin { --gap: max(0px, calc((100vh - 50rem) / 2)); position: sticky; top: var(--gap); margin-top: var(--gap); height: min(100vh, 50rem); overflow: hidden; display: grid; align-content: center; padding: var(--bar) 0 2vh; }
.pin .wrap { position: relative; }
.words { font-size: clamp(2.6rem, 6.4vw, 5.75rem); font-weight: 800; line-height: 1.08; }
.word { display: block; margin-left: calc(var(--n) * 1.6em); color: color-mix(in srgb, var(--accent) calc(var(--lit, 0) * 100%), var(--ghost)); transform: translateY(calc((1 - var(--lit, 0)) * .18em)); filter: blur(calc((1 - var(--lit, 0)) * 1.5px)); will-change: transform, filter; }
@media (max-width: 640px) { .word { margin-left: calc(var(--n) * .7em); } }
.signature { margin-top: 3rem; opacity: var(--sig, 0); transform: translateY(calc((1 - var(--sig, 0)) * 16px)); pointer-events: auto; }
.signature strong { display: block; font: 800 clamp(1.5rem, 2.6vw, 2.1rem)/1 var(--display); letter-spacing: -.02em; margin-bottom: .35rem; }
.signature span { color: var(--muted); }
.cue { position: absolute; left: 50%; bottom: 2rem; translate: -50% 0; color: var(--muted); font-size: .875rem; opacity: calc(1 - var(--p, 0) * 5); display: grid; justify-items: center; gap: .4rem; }
.cue::after { content: ""; width: 1px; height: 2.5rem; background: linear-gradient(var(--muted), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Chapitres : le titre reste à l'écran pendant tout son contenu */
.chapter { padding-block: clamp(2.5rem, 5vw, 4rem); }
.chapter .wrap { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2rem clamp(2.5rem, 6vw, 6rem); align-items: start; }
@media (max-width: 900px) { .chapter .wrap { grid-template-columns: 1fr; } }
.chapter-title { position: sticky; top: calc(var(--bar) + 2rem); container-type: inline-size; }
@media (max-width: 900px) { .chapter-title { position: static; } .chapter-title h2 { font-size: clamp(2.75rem, 12vw, 4rem); } }
.chapter-title h2 { font-size: min(15cqi, 5rem); overflow-wrap: anywhere; font-weight: 800; color: var(--accent); transition: color .3s; }
.chapter-title p { color: var(--muted); margin-top: 1rem; }

/* Projets : fiches qui s'empilent */
.stack { display: grid; gap: 1.5rem; }
.card { position: sticky; top: calc(var(--bar) + 1.5rem + var(--i) * 1.25rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 20rem; border-radius: 22px; overflow: hidden; background: var(--sheet); border: 1px solid var(--line); box-shadow: 0 -12px 34px rgba(16,36,29,.07); }
@media (max-width: 760px) { .card { grid-template-columns: 1fr; } }
/* Panneau schéma : fond en dégradé, trame de points, halo qui suit le pointeur */
.card-art {
  position: relative; display: grid; place-items: center; padding: 1.5rem; overflow: hidden;
  background:
    radial-gradient(420px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 255, 255, .14), transparent 60%),
    radial-gradient(circle, rgba(255, 255, 255, .09) 1px, transparent 1.6px) 0 0 / 18px 18px,
    linear-gradient(140deg, var(--hue-a, #0d5543), var(--hue-b, #1b8a6b));
}
.card-art svg { position: relative; width: 100%; max-width: 26rem; height: auto; }
.card-art .w { fill: none; stroke: rgba(220, 245, 233, .55); stroke-width: 2.5; stroke-linejoin: round; }
.card-art .w.plan { stroke-dasharray: 6 6; stroke: rgba(220, 245, 233, .45); }
.card-art .pulse { fill: none; stroke: #fff4c8; stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 4px #ffd877); stroke-dasharray: 16 var(--len); stroke-dashoffset: calc(var(--len) + 16); animation: travel var(--speed, 3.2s) linear infinite; animation-delay: var(--delay, 0s); }
.card:hover .pulse { --speed: 1.4s; }
@keyframes travel { to { stroke-dashoffset: 0; } }
.card-art rect { fill: rgba(0, 0, 0, .22); stroke: rgba(220, 245, 233, .7); stroke-width: 1.5; transition: fill .25s, stroke .25s; }
.card-art .main rect { fill: rgba(0, 0, 0, .35); stroke: var(--gold); stroke-width: 2; }
.card-art .plan rect { fill: none; stroke: rgba(220, 245, 233, .5); stroke-dasharray: 5 5; }
.card:hover .card-art g:not(.plan) rect { fill: rgba(0, 0, 0, .32); }
.card:hover .card-art .main rect { fill: rgba(216, 165, 58, .22); }
.card-art text { font: 500 14px var(--body); fill: #f2faf6; }
.card-art .big { font: 700 20px var(--display); }

/* La fiche s'incline légèrement vers le pointeur */
.card { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.card:hover { box-shadow: 0 24px 50px -18px rgba(16, 36, 29, .35); }
.card:hover .go { background: var(--green); color: #fff; }
@media (prefers-reduced-motion: reduce) { .card-art .pulse { display: none; } .card { transform: none; } }

.card-body { padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; }
.card-body h3 { font-size: clamp(2.25rem, 4vw, 3.25rem); font-weight: 800; margin: .4rem 0 1rem; }
.card-body p { color: var(--muted); }
.state { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--green); }
.state::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--leaf); }
.state.plan { color: var(--muted); }
.state.plan::before { background: transparent; border: 2px solid var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.badges li { font-size: .8125rem; padding: .2rem .65rem; border-radius: 999px; background: var(--tint); color: var(--green); font-weight: 500; }
.go { margin-top: auto; align-self: start; font-weight: 600; text-decoration: none; padding: .65rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--green); color: var(--green); transition: background .2s, color .2s; }
.go:hover { background: var(--green); color: #fff; }

/* Expériences : lignes dépliables */
.xp-list { border-top: 1px solid var(--line); }
.xp-list details { border-bottom: 1px solid var(--line); }
.xp-list summary { list-style: none; display: grid; grid-template-columns: 8rem minmax(0, 1fr) 2rem; gap: .4rem 1.5rem; align-items: baseline; padding: 1.35rem 0; cursor: pointer; }
.xp-list summary::-webkit-details-marker { display: none; }
@media (max-width: 640px) { .xp-list summary { grid-template-columns: 1fr 2rem; } .xp-list .when { grid-column: 1 / -1; } }
.xp-list .when { color: var(--accent); font-weight: 600; transition: color .3s; }
.xp-list .what { font: 700 clamp(1.35rem, 2.6vw, 1.85rem)/1.1 var(--display); letter-spacing: -.01em; }
.xp-list .what small { display: block; margin-top: .35rem; font: 400 1rem var(--body); color: var(--muted); letter-spacing: 0; }
.plus { justify-self: end; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--line); position: relative; transition: background .2s; }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: .8rem; height: 1.5px; background: var(--ink); translate: -50% -50%; }
.plus::after { rotate: 90deg; transition: rotate .3s; }
details[open] .plus { background: var(--tint); }
details[open] .plus::after { rotate: 0deg; }
.xp-body { padding: 0 0 1.75rem 9.5rem; }
@media (max-width: 640px) { .xp-body { padding-left: 0; } }
.xp-body ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); }
.xp-body a { font-weight: 600; color: var(--green); text-underline-offset: .25em; }
details[open] .xp-body { animation: open .35s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

/* Compétences */
.skills { display: grid; gap: 1rem; }
.skill { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: .75rem 2rem; align-items: baseline; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.skill:first-child { border-top: 1px solid var(--line); }
@media (max-width: 640px) { .skill { grid-template-columns: 1fr; } }
.skill h3 { font-size: 1.5rem; font-weight: 700; }
.skill ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.skill li { padding: .35rem .85rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--line); font-size: .9375rem; }

/* Contact */
.finale { padding-block: clamp(3rem, 7vw, 5.5rem); text-align: center; }
.finale h2 { font-size: clamp(3.25rem, 10vw, 8rem); font-weight: 800; color: var(--accent); transition: color .3s; }
.finale p { margin: 1.5rem auto 2.25rem; color: var(--muted); font-size: 1.2rem; }
.finale .btn { font-size: 1.125rem; padding: 1rem 1.75rem; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
footer .wrap { padding-block: 1.25rem; }

/* Fenêtre de contact : panneau latéral */
dialog.contact { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(100%, 30rem); border: 0; padding: 0; background: var(--sheet); color: var(--ink); box-shadow: -20px 0 60px rgba(16,36,29,.25); }
dialog.contact::backdrop { background: rgba(16, 36, 29, .4); backdrop-filter: blur(4px); }
dialog.contact[open] { animation: slide .45s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { transform: translateX(100%); } }
.c-inner { min-height: 100%; display: flex; flex-direction: column; padding: 1.75rem; }
.c-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.75rem; }
.c-head h2 { font-size: 2.5rem; font-weight: 800; }
.c-head p { margin: .5rem 0 0; color: var(--muted); }
.x { border: 1.5px solid var(--line); background: transparent; width: 2.5rem; height: 2.5rem; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--ink); flex-shrink: 0; }
.x:hover { border-color: var(--green); color: var(--green); }
.field { position: relative; margin-bottom: 1.1rem; }
.field input, .field textarea { width: 100%; font: inherit; padding: 1.45rem .9rem .55rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); transition: border-color .2s; }
.field textarea { min-height: 10rem; resize: vertical; }
.field label { position: absolute; left: .95rem; top: 1rem; color: var(--muted); pointer-events: none; transform-origin: left; transition: transform .2s, color .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-.7rem) scale(.8); color: var(--green); }
.count { display: block; text-align: right; font-size: .8125rem; color: var(--muted); margin-top: .25rem; }
.trap { position: absolute; left: -9999px; }
.c-actions { display: grid; gap: .75rem; margin-top: .5rem; }
.c-actions small { color: var(--muted); }
.send { border: 0; border-radius: 999px; padding: 1rem; background: var(--green); color: #fff; font-weight: 600; font-size: 1.05rem; }
.send:hover { background: var(--ink); }
.send:disabled { opacity: .7; cursor: progress; }
[data-status] { margin: .9rem 0 0; font-size: .9375rem; color: var(--muted); }
.contact[data-state="error"] [data-status] { color: #a3361f; }
.done { display: none; margin: auto 0; text-align: center; }
.seal { width: 5rem; height: 5rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--tint); display: grid; place-items: center; color: var(--green); font: 800 2.25rem var(--display); }
.contact[data-state="sent"] .seal { animation: popin .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }
.contact[data-state="sent"] .done { display: block; }
.contact[data-state="sent"] form, .contact[data-state="sent"] .c-head p { display: none; }
.done h3 { font-size: 2.25rem; font-weight: 800; margin-bottom: .5rem; }
.done p { margin: 0 auto 1.5rem; color: var(--muted); }

/* Sans animation : l'ouverture s'affiche directement, tout allumée */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .intro { height: auto; }
  .pin { position: relative; height: auto; min-height: 100vh; padding-block: 7rem 4rem; }
  .word { --lit: 1; }
  .signature { --sig: 1; }
  .cue { display: none; }
}

/* ==========================================================================
   Pages projet et pages expérience
   ========================================================================== */
.page-projet { --accent: #2f8c66; }
.page-xp { --accent: #13786a; }

.board { padding: calc(var(--bar) + clamp(2rem, 5vw, 4rem)) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.back { color: var(--muted); font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.board h1 { font-size: clamp(2.75rem, 7vw, 6rem); font-weight: 800; color: var(--accent); margin: 1.25rem 0 1.25rem; max-width: 16ch; }
.board .lead { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; max-width: 32em; }
.role-facts { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; list-style: none; margin: 1.5rem 0 0; padding: 0; color: var(--muted); }
.role-facts strong { color: var(--ink); font-weight: 600; }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section > .wrap > h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; margin-bottom: 1rem; }

.project-body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .project-body { grid-template-columns: 1fr; } }
.project-text h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; margin: 2.75rem 0 .9rem; }
.project-text h2:first-child { margin-top: 0; }
.project-text ul { padding-left: 1.2rem; max-width: 38em; }
.project-text li { margin-bottom: .4rem; }
.project-text a { color: var(--green); font-weight: 600; text-underline-offset: .25em; }
.sheet { margin: 0; position: sticky; top: calc(var(--bar) + 1.5rem); padding: 1.5rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 22px; }
@media (max-width: 900px) { .sheet { position: static; } }
.sheet dt { font-weight: 600; margin-top: 1rem; }
.sheet dt:first-child { margin-top: 0; }
.sheet dd { margin: .15rem 0 0; color: var(--muted); }

/* Emplacement photo : remplace le <div class="photo"> par une balise <img> */
.photo { display: grid; place-items: center; aspect-ratio: 16 / 10; margin-block: 1.5rem; padding: 1rem; border: 2px dashed var(--line); border-radius: 22px; background: var(--sheet); color: var(--muted); text-align: center; font-size: .9375rem; }
.project-text img, .activity-media img { width: 100%; border-radius: 22px; }

/* Texte à compléter : cherche "todo" dans les fichiers pour tous les retrouver */
.todo { padding: .8rem 1rem; background: #f6ecd0; border-radius: 12px; font-size: .9375rem; }

.others { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.others a { color: var(--green); font-weight: 600; text-underline-offset: .25em; }

.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }
.section-head h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; color: var(--accent); }
.section-head p { margin: 0; color: var(--muted); }

.showcase { list-style: none; margin: 0; padding: 0; }
.activity { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 4rem); align-items: center; }
.activity + .activity { margin-top: clamp(2rem, 5vw, 3.5rem); }
.activity:nth-child(even) .activity-media { order: 2; }
@media (max-width: 820px) { .activity { grid-template-columns: 1fr; } .activity:nth-child(even) .activity-media { order: 0; } }
.activity-media { margin: 0; }
.activity-media .photo { margin: 0; }
.activity-media figcaption { margin-top: .6rem; color: var(--muted); font-size: .9375rem; }
.activity h3 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: .75rem; }
.activity p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.tags li { font-size: .8125rem; padding: .2rem .65rem; border-radius: 999px; background: var(--tint); color: var(--green); font-weight: 500; }

.next-prev { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.next-prev a { color: var(--green); font-weight: 600; text-underline-offset: .25em; }

/* Fond de points commun à toutes les pages (js/field.js) */
.dot-field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, footer { position: relative; z-index: 1; }

/* Pied de page et pages légales */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.foot span:last-child { display: flex; gap: 1.5rem; }
footer a { color: inherit; text-underline-offset: .25em; }
footer a:hover { color: var(--ink); }
.c-actions small a { color: inherit; text-underline-offset: .2em; }
.page-legal { --accent: #0f5a45; }
.legal-text > * { max-width: 44rem; }
.legal-text h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; margin: 2.25rem 0 .7rem; }
.legal-text h2:first-child { margin-top: 0; }
.legal-text ul { padding-left: 1.2rem; }
.legal-text li { margin-bottom: .5rem; }
.legal-text a { color: var(--green); font-weight: 600; text-underline-offset: .25em; }
.legal-text .updated { margin-top: 2.5rem; color: var(--muted); font-size: .9375rem; }

/* Erreurs du formulaire, sous chaque champ */
.field .err { display: block; min-height: 0; margin-top: .3rem; color: #a3361f; font-size: .875rem; }
.field .err:empty { display: none; }
.field input[aria-invalid], .field textarea[aria-invalid] { border-color: #c0532f; }
.contact[data-state="error"] [data-status] { color: #a3361f; }

/* Schémas (câblage, architecture) */
.schematic { margin: 1.5rem 0 1.25rem; padding: clamp(1rem, 2.5vw, 1.75rem); background: var(--sheet); border: 1px solid var(--line); border-radius: 22px; }
.schematic svg { display: block; width: 100%; height: auto; }
.schematic text { font: 500 15px var(--body); fill: var(--ink); }
.schematic .title { font: 700 17px var(--display); }
.schematic .sub { font-size: 13px; fill: var(--muted); }
.schematic .board { fill: #e3efe7; stroke: var(--green); stroke-width: 2; }
.schematic .chip { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
.schematic .chip.strong { fill: #fff; stroke: var(--gold); stroke-width: 2; }
.schematic .pin { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.schematic .pin.free { stroke-dasharray: 2 2; }
.schematic .wire { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.schematic .wire.dashed { stroke-dasharray: 7 6; }
.schematic .bus { fill: none; stroke: var(--green); stroke-width: 5; stroke-linecap: round; opacity: .35; }
.schematic figcaption { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin-top: 1rem; color: var(--muted); font-size: .9375rem; }
.schematic .key { display: inline-flex; align-items: center; gap: .45rem; }
.schematic .key i { width: 1.25rem; height: 4px; border-radius: 2px; }

/* Visionneuse 3D */
.viewer { margin: 1.5rem 0 1rem; }
.viewer-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 15%, #ffffff 0%, #e6f0ea 55%, #d3e3d9 100%); }
.viewer-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.viewer-stage canvas:active { cursor: grabbing; }
.viewer-note { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; max-width: none; padding: 1rem; text-align: center; color: var(--muted); }
.viewer-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.viewer-bar button { border: 1.5px solid var(--line); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: .4rem .9rem; font-size: .9375rem; }
.viewer-bar button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.viewer-bar .viewer-reset { margin-left: auto; color: var(--muted); }
.viewer figcaption { margin-top: .6rem; color: var(--muted); font-size: .9375rem; }
.download { display: inline-block; padding: .65rem 1.15rem; border-radius: 999px; background: var(--green); color: #fff !important; font-weight: 600; text-decoration: none !important; }
.download:hover { background: var(--ink); }
.size { margin-left: .5rem; color: var(--muted); font-size: .9375rem; }
