/* END Lab · System Architecture — styles propres à /lab/architecture/ (après style.css et page.css) */
.ar { --gold: #e0b23a; --gold-hi: #edc862; --pos: #9fd8a8; --neg: #f0a79a; }
.ar :focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.ar [hidden] { display: none !important; }
.ar .hero-actions .btn { height: auto; min-height: 3.25rem; padding: .9rem 1.5rem; text-align: center; line-height: 1.35; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ar-notice { margin-top: 2rem; max-width: 40rem; padding: 1rem 1.25rem; border: 1px solid var(--line-strong); border-left: 2px solid var(--gold); background: rgba(21, 21, 21, .72); color: #D6D6D2; font-size: .9375rem; line-height: 1.5; }
.ar-notice strong { color: var(--white); font-weight: 600; }
.ar-noscript { margin-top: 1.5rem; color: var(--mute); }
.ar-lab { font: 600 .75rem/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--white); }

/* Exemples */
.ar-presets, .ar-togwrap, .ar-mode { margin-top: 2rem; }
.ar-presets__b, .ar-mode__b { margin-top: .85rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.ar-chip, .ar-seg, .ar-scb, .ar-btn { min-height: 2.75rem; padding: .55rem 1rem; border: 1px solid var(--line-strong); background: transparent; color: var(--white); font: 500 .9375rem/1.25 var(--sans); cursor: pointer; border-radius: 0; text-align: left; }
.ar-chip:hover, .ar-seg:hover, .ar-scb:hover, .ar-btn:hover:not(:disabled) { border-color: var(--white); }
.ar-chip[aria-pressed="true"], .ar-seg[aria-pressed="true"], .ar-scb[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
.ar-presets__n { margin-top: .85rem; font-size: .875rem; color: var(--mute); max-width: 52rem; min-height: 1.4em; }

/* Boutons de composants */
.ar-tog { margin: .85rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
@media (min-width: 560px) { .ar-tog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 800px) { .ar-tog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ar-tog { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ar-t { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line-strong); background: rgba(21, 21, 21, .5); min-width: 0; }
.ar-t.is-sel { border-color: var(--silver); }
.ar-t__b { min-height: 3.25rem; padding: .5rem .8rem; border: 0; border-radius: 0; background: transparent; color: var(--mute); text-align: left; cursor: pointer; display: grid; gap: .15rem; align-content: center; font: 500 .9375rem/1.25 var(--sans); min-width: 0; }
.ar-t__b:hover { color: var(--white); }
.ar-t__b[aria-pressed="true"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--gold); }
.ar-t__n { overflow-wrap: anywhere; }
.ar-t__s { font: 600 .625rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.ar-t__b[aria-pressed="true"] .ar-t__s { color: var(--gold-hi); }
.ar-t__f { min-width: 3.25rem; padding: 0 .7rem; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--silver); font: 500 .8125rem/1 var(--sans); cursor: pointer; }
.ar-t__f:hover { color: var(--white); background: rgba(242, 242, 240, .05); }

/* Scène */
.ar-stage { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (min-width: 1200px) { .ar-stage { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 3rem; } .ar-panel { position: sticky; top: 5.5rem; } }
.ar-fig { margin: 0; display: none; min-width: 0; }
@media (min-width: 760px) { .ar-fig { display: block; } }
.ar-svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: rgba(21, 21, 21, .45); }
.ar-legend { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .8125rem; color: var(--silver); }
.ar-lg { display: inline-flex; align-items: center; gap: .5rem; }
.ar-lg i { display: inline-block; width: 1.8rem; height: 0; border-top: 2px solid var(--silver); }
.ar-lg--m i { border-top-width: 4px; }
.ar-lg--c i { border-top-style: dashed; }
.ar-lg--t i { border-top-style: dotted; }
.ar-lg--x i { border-top: 1px dashed var(--mute); }

/* Schéma */
.ar-arrow { fill: #cfcfcb; }
.ar-e__p { fill: none; stroke: #cfcfcb; stroke-width: 1.5; }
.ar-e--m .ar-e__p { stroke-width: 3.2; }
.ar-e--c .ar-e__p { stroke-dasharray: 8 5; }
.ar-e--t .ar-e__p { stroke-dasharray: 2 5; stroke: var(--mute); }
.ar-e--t .ar-e__p { marker-end: none; }
.ar-e.is-live .ar-e__p { stroke: var(--gold-hi); }
.ar-e__l { font: 500 13px var(--sans); fill: var(--white); stroke: #050505; stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.ar-n { cursor: pointer; }
.ar-n__r { fill: #111; stroke: rgba(242, 242, 240, .6); stroke-width: 1; }
.ar-n__t { font: 500 15px var(--sans); fill: var(--white); }
.ar-n.is-off .ar-n__r { fill: #050505; stroke: rgba(242, 242, 240, .26); stroke-dasharray: 4 4; }
.ar-n.is-off .ar-n__t { fill: var(--mute); }
.ar-n.is-sel .ar-n__r { stroke: var(--white); stroke-width: 2; }
.ar-n.is-step .ar-n__r { stroke: var(--gold-hi); stroke-width: 2.5; }
.ar-n.is-miss .ar-n__r { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 6 4; }
.ar-n__m { font: 600 12px var(--sans); fill: var(--gold-hi); letter-spacing: .08em; text-transform: uppercase; }
.ar-dot { fill: var(--gold-hi); stroke: #050505; stroke-width: 2; }

/* Panneau */
.ar-panel { min-width: 0; padding: clamp(1.1rem, 2.4vw, 1.75rem); border: 1px solid var(--line-strong); background: rgba(21, 21, 21, .72); display: grid; gap: 1.1rem; align-content: start; }
.ar-ph { font: var(--t-weight) 1.5rem/1.15 var(--display); font-stretch: var(--t-stretch); letter-spacing: var(--t-track); color: var(--white); }
.ar-sum { font: var(--t-strong) 1.0625rem/1.4 var(--display); font-stretch: var(--t-stretch); color: var(--white); text-wrap: balance; }
.ar-sub { margin: .6rem 0 .8rem; }
#view-compose, #view-scenario { min-width: 0; }
.ar-flows, .ar-hand { display: grid; gap: .9rem; }
.ar-flow { padding-left: .9rem; border-left: 2px solid var(--line-strong); display: grid; gap: .3rem; }
.ar-flow--m { border-left-color: var(--silver); }
.ar-flow__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; color: var(--white); font-weight: 500; font-size: .9375rem; }
.ar-flow__a { color: var(--mute); }
.ar-flow__s { font-size: .875rem; line-height: 1.5; color: #D0D0CC; }
.ar-flow__l { display: grid; gap: .3rem; font-size: .875rem; color: #D0D0CC; }
.ar-flow__l li { padding-left: 1rem; position: relative; }
.ar-flow__l li::before { content: ""; position: absolute; left: 0; top: .72em; width: .45rem; height: 1px; background: var(--line-strong); }
.ar-hand__i { display: grid; gap: .35rem; justify-items: start; padding-left: .9rem; border-left: 2px dashed var(--line-strong); }
.ar-hand__t { font-size: .9375rem; line-height: 1.5; color: #D6D6D2; }
.ar-none { font-size: .875rem; color: var(--mute); }
.ar-tag { display: inline-block; padding: .15rem .5rem; border: 1px solid currentColor; font: 600 .625rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.ar-tag--on { color: var(--pos); }
.ar-tag--x { color: #f0cd7c; }
.ar-tag--m { color: var(--white); }

/* Parcours */
.ar-sc { display: grid; gap: .5rem; }
.ar-scb { width: 100%; }
.ar-run { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; }
.ar-run__t { font: var(--t-weight) 1.35rem/1.2 var(--display); font-stretch: var(--t-stretch); color: var(--white); outline: none; }
.ar-run__c { display: flex; flex-wrap: wrap; gap: .5rem; }
.ar-btn { font-size: .875rem; }
.ar-btn:disabled { opacity: .4; cursor: default; }
.ar-btn--go { background: linear-gradient(180deg, #edc862, #e0b23a); color: #1d1505; border-color: transparent; font-weight: 600; }
.ar-btn--go:hover:not(:disabled) { background: linear-gradient(180deg, #e3bd4f, #d9ac31); border-color: transparent; }
.ar-btn[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
.ar-log { counter-reset: none; display: grid; gap: .8rem; }
.ar-log__i { padding: .8rem 0 .8rem .9rem; border-left: 2px solid var(--line-strong); display: grid; gap: .35rem; }
.ar-log__i.is-hand { border-left-style: dashed; }
.ar-log__i[aria-current="step"] { border-left-color: var(--gold); background: rgba(242, 242, 240, .04); }
.ar-log__h { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.ar-log__n { font: 600 .6875rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.ar-log__t { font-size: .9375rem; line-height: 1.5; color: var(--white); }
.ar-log__m { font-size: .8125rem; color: #f0cd7c; }
.ar-run__end { font-size: .9375rem; color: var(--white); }
.ar-run__end:empty { display: none; }

/* Fiche */
.ar-fiche { margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2.25rem); border: 1px solid var(--line-strong); background: rgba(21, 21, 21, .72); display: grid; gap: 1.25rem; }
.ar-fiche__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; }
.ar-fiche__t { font: var(--t-weight) clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--display); font-stretch: var(--t-stretch); letter-spacing: var(--t-track); color: var(--white); }
.ar-fiche__grid { display: grid; gap: 1.4rem 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .ar-fiche__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ar-fiche__grid p { margin-top: .5rem; color: #D0D0CC; font-size: .9375rem; line-height: 1.6; }
.ar-fiche__dyn { padding: .9rem 1.1rem; border: 1px solid var(--line-strong); border-left: 2px solid var(--gold); color: #D6D6D2; font-size: .9375rem; background: rgba(5, 5, 5, .5); }
.ar-fiche__os { font-size: .9375rem; color: var(--white); }

/* Lecture */
.ar-read { margin-top: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 3rem; max-width: 60rem; }
@media (min-width: 900px) { .ar-read { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ar-read .ticks { margin-top: 0; font-size: .9375rem; }
.ar-read b { color: var(--white); font-weight: 500; }
.ar .closing .btn { height: auto; }

@media (max-width: 520px) { .ar-panel { padding: 1rem; } }
@media (prefers-reduced-motion: reduce) { .ar *, .ar *::before, .ar *::after { transition: none !important; animation: none !important; } }
@media (forced-colors: active) { .ar-n.is-off .ar-n__r, .ar-e__p { stroke: CanvasText; } .ar-arrow { fill: CanvasText; } }
