/* Menu and arch transitions, shared by the journey (le-passage.html) and the secondary pages.
   Uses the colour tokens each page defines on :root (--bg, --fg, --fg2, --fg3, --filet, --bleu…). */

/* header button */
.menubtn{all:unset;cursor:pointer;display:flex;align-items:center;gap:9px;font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--fg);padding:6px 2px}
.menubtn .mb-ico{position:relative;width:16px;height:10px;flex:none}
.menubtn .mb-ico i{position:absolute;left:0;right:0;height:1.6px;border-radius:1px;background:currentColor;transition:transform .45s cubic-bezier(.2,.7,.2,1),top .45s cubic-bezier(.2,.7,.2,1)}
.menubtn .mb-ico i:first-child{top:1px}
.menubtn .mb-ico i:last-child{top:7.4px;right:4px;transition:transform .45s cubic-bezier(.2,.7,.2,1),top .45s cubic-bezier(.2,.7,.2,1),right .45s}
.menubtn:hover .mb-ico i:last-child{right:0}
html.menu-open .menubtn .mb-ico i:first-child{top:4.2px;transform:rotate(45deg)}
html.menu-open .menubtn .mb-ico i:last-child{top:4.2px;right:0;transform:rotate(-45deg)}

/* contact: the envelope alone, to keep the header light (the label stays for screen readers and as a tooltip) */
header.top .headcta{width:32px;height:32px;padding:0;gap:0;justify-content:center;box-sizing:border-box}
header.top .headcta span{display:none}
header.top .headcta svg{width:15px;height:15px}

/* bridge between the two experiences, in the header: "Version site" in the journey, "Le voyage 3D" on the site */
.bridge{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--fg2);text-decoration:none;padding:6px 4px;transition:color .2s}
.bridge svg{width:15px;height:15px;flex:none}
.bridge:hover,.bridge:focus-visible{color:var(--fg)}
.am-other{color:var(--fg2);text-decoration:none}
.am-other:hover,.am-other:focus-visible{color:var(--fg)}

/* the overlay: opened through an arch that grows from the button */
.amenu{position:fixed;inset:0;z-index:36;background:var(--bg);color:var(--fg);display:flex;flex-direction:column;overflow:auto;overscroll-behavior:contain;
  padding:calc(env(safe-area-inset-top,0px) + 96px) var(--gutter) calc(env(safe-area-inset-bottom,0px) + 28px)}
.amenu[hidden]{display:none}
.am-deco{position:fixed;right:-6vw;bottom:-4vh;width:min(62vw,720px);height:auto;pointer-events:none;color:var(--filet);opacity:.9}
.am-deco path{fill:none;stroke:currentColor;stroke-width:.35}
.am-in{position:relative;flex:1;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:clamp(32px,6vw,96px);align-content:center;max-width:1240px;width:100%;margin:0 auto}
.am-eye{display:flex;align-items:center;gap:10px;margin:0 0 22px;font-size:11px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--fg3)}
.am-eye::before{content:"";width:24px;height:1px;background:var(--filet2)}
.am-pages ul,.am-journey ol{list-style:none;margin:0;padding:0}
.am-pages li + li{border-top:1px solid var(--filet)}
.am-pages a{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:baseline;column-gap:14px;padding:clamp(9px,1.6vh,18px) 0;color:var(--fg);text-decoration:none}
.am-pages .am-k{grid-column:2;font-size:clamp(24px,min(3.6vw,4.6vh),46px);font-weight:600;letter-spacing:-.025em;line-height:1.08;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.am-pages .am-d{grid-column:2;margin-top:6px;font-size:13px;color:var(--fg3)}
.am-pages a::before{content:"";grid-row:1;align-self:center;width:9px;height:9px;border-radius:50%;box-shadow:inset 0 0 0 1px var(--filet2);transition:background .3s,box-shadow .3s}
.am-pages a:hover .am-k,.am-pages a:focus-visible .am-k{transform:translateX(8px)}
.am-pages a:hover::before{box-shadow:inset 0 0 0 1px var(--fg)}
.am-pages a[aria-current="page"]::before{background:var(--bleu);box-shadow:0 0 0 5px rgba(62,99,242,.22)}
.am-journey ol{display:grid;gap:2px;counter-reset:none}
.am-journey ol a{display:flex;align-items:center;gap:14px;padding:9px 0;color:var(--fg2);text-decoration:none;font-size:15px;transition:color .2s}
.am-journey ol a .n{min-width:22px;font-size:11px;font-weight:600;letter-spacing:.08em;color:var(--fg3);font-variant-numeric:tabular-nums}
.am-journey ol a .ln{flex:1;height:1px;background:var(--filet);transform-origin:left;transform:scaleX(.25);transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.am-journey ol a:hover,.am-journey ol a:focus-visible{color:var(--fg)}
.am-journey ol a:hover .ln{transform:scaleX(1)}
.am-journey ol a[aria-current="step"] .n{color:var(--bleu)}
.am-start{display:inline-flex;align-items:center;gap:10px;margin-top:22px;padding:11px 16px 11px 13px;border-radius:999px;box-shadow:inset 0 0 0 1px var(--filet2);color:var(--fg);text-decoration:none;font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.am-start:hover,.am-start:focus-visible{box-shadow:inset 0 0 0 1px var(--bleu)}
.am-start svg{width:16px;height:16px}
.am-foot{position:relative;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 24px;max-width:1240px;width:100%;margin:28px auto 0;padding-top:18px;border-top:1px solid var(--filet);font-size:12px;color:var(--fg3)}
.am-item{opacity:0;transform:translateY(18px)}
html.menu-shown .am-item{opacity:1;transform:none;transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i,0) * 45ms)}
html.menu-open header.top .tools{background:transparent}
html.menu-open .journey,html.menu-open .copy{visibility:hidden}

/* page-change veil: covers the page through a growing arch, then the next page opens through one */
.aveil{position:fixed;inset:0;z-index:90;background:var(--bg);pointer-events:none}
.aveil[hidden]{display:none}
/* if the script never runs, the veil still goes away */
.aveil.boot{animation:aveilOut .4s 2.2s forwards}
@keyframes aveilOut{to{opacity:0;visibility:hidden}}

@media (max-width:760px){
  .am-in{grid-template-columns:1fr;align-content:start;gap:36px}
  .am-deco{width:120vw;right:-40vw}
  .menubtn .mb-t,.modebtn > span,.sound > span:not(.bars),.bridge span{display:none}
  .menubtn{padding:6px 4px}
}
@media (prefers-reduced-motion:reduce){
  .aveil.boot{display:none}
  .am-item{opacity:1;transform:none}
  .am-pages .am-k,.am-journey ol a .ln,.menubtn .mb-ico i{transition:none}
}
