:root {
  --canvas:#f6f4ef; --surface:#fcfbf7; --surface-raised:#edeae4; --muted-surface:#e8e5df;
  --text:#232123; --secondary:#64615d; --border:#d8d6d0; --action:#242124; --action-ink:#fffaf4;
  --display:Display,Funnel,system-ui,sans-serif; --rail:5.6rem; --mast-h:4rem;
}
:root[data-theme="dark"] {
  --canvas:#161518; --surface:#201f22; --surface-raised:#2c292b; --muted-surface:#302e31;
  --text:#f5f1eb; --secondary:#b8b2ac; --border:#3c393c; --action:#eee9e1; --action-ink:#221f22;
}
.mast {background:var(--canvas);border-bottom:1px solid var(--border)}
.mast .mast-inner {width:94%;max-width:106rem;min-height:var(--mast-h);padding:0;display:flex;gap:1.25rem}
.brand-sign {width:1.85rem;height:1.85rem;stroke:currentColor;fill:none;stroke-width:1.55;stroke-linecap:round;flex:none}
.mast .brand {gap:.65rem;white-space:nowrap}
.mast .brand>span {font:490 1.18rem/1 var(--display);letter-spacing:-.035em}
.mast #nav {display:flex;align-items:center;gap:1rem;border:0;border-radius:0;padding:0;margin-left:auto;background:transparent}
.mast #nav :is(a,button) {position:relative;background:transparent;box-shadow:none;border:0;border-radius:0;font-weight:440;color:var(--secondary);min-height:2.65rem;padding:.6rem .25rem}
.mast #nav :is(a,button):is([aria-current],:hover) {color:var(--text)}
body[data-view="landing"] #nav [aria-current]::after {position:absolute;content:"";bottom:.38rem;left:.25rem;right:.25rem;height:1px;background:var(--text)}
.mast #theme-toggle,.mast .top-exit {background:transparent;border:0;color:var(--secondary);box-shadow:none}
.mast #theme-toggle:hover,.mast .top-exit:hover {color:var(--text);background:var(--surface-raised)}
.mast .top-exit {align-items:center;justify-content:center;gap:.3rem;min-height:2.65rem}
body:not([data-view="landing"]) .mast .top-exit {display:flex}
#landing {width:100%;max-width:none}
#landing>:is(#parcours,#guides) {width:min(92%,92rem);margin-inline:auto}
.foyer {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:clamp(1.5rem,3vw,4.5rem);padding:clamp(1rem,2.4vw,3rem) 3vw clamp(1rem,2.4vw,3rem) 5vw;color:var(--text)}
.foyer-photo {grid-area:1/2;width:min(64vw,calc((100svh - var(--mast-h) - 5vw) * 1.5));aspect-ratio:3/2;background:center/contain no-repeat url('/media/rotonde.webp')}
[data-theme="dark"] .foyer-photo {background-image:url('/media/rotonde-nuit.webp')}
.foyer-seuil {grid-area:1/1;min-width:0}
.foyer-seuil p {max-width:34ch;font-size:clamp(.94rem,1.15vw,1.2rem);line-height:1.4;margin:0 0 1.1rem;color:var(--secondary)}
.foyer h1 {font:385 clamp(3.3rem,5.8vw,8rem)/.96 var(--display);letter-spacing:-.062em;margin:0}
.foyer-entree {display:grid;gap:.6rem;justify-items:start;margin-top:clamp(1.8rem,3.6vw,4.5rem)}
.foyer-entree button {display:flex;align-items:center;justify-content:space-between;gap:1.15rem;min-height:3rem;background:var(--action);color:var(--action-ink);border:1px solid transparent;padding:.75rem 1rem .75rem 1.25rem;border-radius:.35rem;font-weight:510;transition:transform .22s,box-shadow .22s}
.foyer-entree button:hover {transform:translateY(-2px);box-shadow:0 6px 18px #21171821}
.foyer-entree button .icon {transition:transform .22s}
.foyer-entree button:hover .icon {transform:translateX(.18rem)}
.foyer-entree small {font-size:.76rem}
@media(min-width:58rem) {
  body:not([data-view="landing"]) .mast {position:fixed;inset:0 auto 0 0;width:var(--rail);z-index:12;border-right:1px solid var(--border);border-bottom:0}
  body:not([data-view="landing"]) .mast-inner {width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:0;padding:1.5rem 0 .85rem}
  body:not([data-view="landing"]) .brand>span {display:none}
  body:not([data-view="landing"]) .mast #nav {width:100%;margin:3.5rem 0 auto;display:grid;gap:.55rem}
  body:not([data-view="landing"]) .mast #nav button {display:grid;gap:.4rem;justify-items:center;align-content:center;width:100%;min-height:3.7rem;padding:.45rem .15rem;font-size:.68rem}
  body:not([data-view="landing"]) .mast #nav .icon {width:1.35rem;height:1.35rem}
  body:not([data-view="landing"]) .mast #nav [aria-current]::before {content:"";position:absolute;left:0;top:17%;bottom:17%;width:2px;background:var(--accent)}
  body:not([data-view="landing"]) .top-tools {flex-direction:column;gap:1rem}
  .mast .top-exit {flex-direction:column;font-size:.7rem}
  body:not([data-view="landing"]) :is(#main,.site-footer) {margin-left:var(--rail)}
  body:not([data-view="landing"]) #campus {width:min(92%,96rem)}
  #immersion .field {height:100svh}
}
@media(max-width:57.999rem) {
  :root {--mast-h:3.55rem}
  body:not([data-view="landing"]) .mast-inner {justify-content:space-between;gap:.3rem}
  body:not([data-view="landing"]) .brand>span,.top-exit span {display:none}
  body:not([data-view="landing"]) .mast #nav {margin:0;width:auto;max-width:none;gap:.9rem}
  body:not([data-view="landing"]) .mast #nav button {display:grid;justify-items:center;gap:.15rem;padding:.25rem .12rem;font-size:.66rem}
  .mast .top-tools {gap:0}
  #immersion .field {height:calc(100svh - var(--mast-h) - 1px)}
  #immersion .field:fullscreen {height:100dvh}
}
@media(max-width:52rem) {
  .foyer {grid-template-columns:1fr;gap:1.2rem;padding:0 0 1.8rem}
  .foyer-photo {grid-area:auto;width:100%;max-height:calc(100svh - var(--mast-h));background-position:center}
  .foyer-seuil {grid-area:auto;width:92%;margin:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:1rem}
  .foyer-seuil p {max-width:none;margin-bottom:.45rem}
  .foyer h1 {font-size:clamp(3.1rem,8.5vw,5rem)}
  .foyer-entree {margin:0}
}
@media(max-width:36rem) {
  .foyer-seuil {display:block}
  .foyer-entree {margin-top:1.15rem}
}
@media(max-width:42rem) {
  .mast .mast-inner {gap:.65rem;width:94%}
  .mast #nav {gap:.55rem}
  .mast #nav a,.mast #nav button {font-size:.84rem}

}
@media(max-width:32rem) {
  body[data-view="landing"] .mast-inner {gap:.45rem}
  body[data-view="landing"] .brand {gap:.33rem}
  body[data-view="landing"] .brand-sign {width:1.3rem}
  body[data-view="landing"] .brand>span {font-size:.95rem}
  .mast #theme-toggle {width:2.05rem}
  .mast #nav {gap:.35rem}
}
@media(prefers-reduced-motion:reduce) {
  .foyer-entree button,.foyer-entree button .icon {transition:none}
  .foyer-entree button:hover,.foyer-entree button:hover .icon {transform:none}
}
