/* Site par Orz · Dylan · NoemaWorks · https://noemaworks.net
   layout.css : grille, navigation, pied de page, boutons, utilitaires. */

/* ----------------------------------------------------------------- grille */

.wrap {
  width: min(var(--container), 100% - 2 * var(--edge));
  margin-inline: auto;
  /* distance entre le bord du conteneur et le bord de l'ecran : sert aux
     photos qui debordent jusqu'au bord (`margin-left: calc(-1 * var(--bleed))`).
     Le trop-plein eventuel de la largeur de l'ascenseur est borne par
     `overflow-x: clip` sur body, donc jamais de defilement horizontal.
     ATTENTION : pas de pourcentage ici. Une variable CSS qui en contient est
     substituee telle quelle puis resolue sur l'element QUI L'UTILISE, jamais
     sur celui qui la declare. Avec `(100vw - 100%) / 2`, une photo de 540 px se
     donnait un debord de 450 px et sortait de sa colonne. On calcule donc la
     marge depuis les tokens, comme le fait `width` juste au-dessus. */
  --bleed: max(var(--edge), calc((100vw - var(--container)) / 2));
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-pad);
}

.bg-ink { background: var(--ink); color: var(--text-on-ink); }
.bg-charcoal { background: var(--charcoal); color: var(--text-on-ink); }
.bg-rice { background: var(--rice); color: var(--text-on-rice); }
.bg-rice-2 { background: var(--rice-2); color: var(--text-on-rice); }

.on-rice { color: var(--text-on-rice); }
.on-rice .muted { color: var(--text-muted-on-rice); }
.on-rice .kicker { color: var(--lantern-deep); }
.on-ink .muted,
.bg-ink .muted,
.bg-charcoal .muted { color: var(--text-muted-on-ink); }
.bg-ink .kicker,
.bg-charcoal .kicker { color: var(--lantern); }

.rule-ink { border-top: 1px solid var(--line-on-ink); }
.rule-rice { border-top: 1px solid var(--line-on-rice); }

/* couche du dragon : le lot DRAGON y monte son canvas et son SVG de repli */
#dragon-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-dragon);
  pointer-events: none;
}

/* -------------------------------------------------------------- boutons */

/* Le transform de .btn est reserve a GSAP (spring hover back.out).
   La pression est portee par .btn__inner pour eviter deux proprietaires. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-radius: var(--radius);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  overflow: hidden;
  transition: background-color 180ms var(--ease-out);
}

.btn__inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: transform 120ms var(--ease-out);
}

.btn:active .btn__inner { transform: scale(.97); }

.btn__rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lantern);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--cta-hover-bg); }
  .btn:hover .btn__rule {
    clip-path: inset(0 0 0 0);
    transition-duration: 320ms;
  }
}

.btn:focus-visible .btn__rule {
  clip-path: inset(0 0 0 0);
  transition-duration: 320ms;
}

/* lien texte souligne, le trait part de la gauche */
.link-under {
  position: relative;
  text-decoration: none;
  padding-bottom: 3px;
}

.link-under::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 180ms var(--ease-out);
}

.link-under[data-state="rest"]::after,
.link-under::after { transform: scaleX(0); }

@media (hover: hover) and (pointer: fine) {
  .link-under:hover::after { transform: scaleX(1); }
}

.link-under:focus-visible::after { transform: scaleX(1); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .9375rem;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--lacquer-deep);
}

.bg-ink .link-arrow,
.bg-charcoal .link-arrow { color: var(--lantern); }

.link-arrow .arrow {
  display: inline-block;
  transition: transform 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover .arrow { transform: translateX(4px); }
}

/* lien telephone : l'icone vibre une seule fois au survol */
.tel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tel-link svg {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

@keyframes od-ring {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  45% { transform: rotate(10deg); }
  70% { transform: rotate(-5deg); }
}

@media (hover: hover) and (pointer: fine) {
  .tel-link:hover svg { animation: od-ring 420ms var(--ease-out) 1; }
}

/* ------------------------------------------------------------ navigation */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 260ms var(--ease-out),
              border-color 260ms var(--ease-out);
}

.nav.is-scrolled {
  background: rgb(23 17 18 / .94);
  border-bottom-color: var(--lantern);
}

/* Au repos la barre est transparente et se pose sur la photo du hero, dont le
   voile tombe deja a zero en haut a droite : le numero or et les liens creme y
   passaient sous 4,5:1. Voile de bande, lineaire du haut vers le bas, jamais
   radial et jamais de vignette. Il s'efface des que `.is-scrolled` pose son
   fond charcoal, la transition de background-color n'est pas touchee. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgb(14 10 10 / .88) 0%,
    rgb(14 10 10 / .78) 66%,
    rgb(14 10 10 / 0) 100%);
  transition: opacity 260ms var(--ease-out);
}

.nav.is-scrolled::before { opacity: 0; }

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-on-ink);
  flex: none;
}

/* 40 px au repos, 28 px au scroll : pilote par transform (jamais par height,
   qui declencherait un reflow a chaque frame). 28 / 40 = 0.7. */
.nav__logo {
  width: auto;
  height: 40px;
  transform-origin: left center;
  transition: transform 260ms var(--ease-out);
}

.nav.is-scrolled .nav__logo { transform: scale(.7); }

.nav__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  line-height: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav__links a {
  position: relative;
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-on-ink);
  padding: 6px 0;
  white-space: nowrap;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--lantern);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover::after { transform: scaleX(1); }
}

.nav__links a:focus-visible::after { transform: scaleX(1); }

.nav__links a[aria-current="page"],
.nav__links a.is-active { color: var(--lantern); }

.nav__links a[aria-current="page"]::after,
.nav__links a.is-active::after { transform: scaleX(1); }

.nav__tel {
  flex: none;
  font-size: .9375rem;
  color: var(--lantern);
  letter-spacing: .02em;
}

.nav__burger {
  display: none;
  width: 48px;
  height: 48px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  flex: none;
}

.nav__burger span {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--text-on-ink);
  transition: transform 260ms var(--ease-out), background-color 120ms linear;
}

.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--text-on-ink);
  transition: transform 260ms var(--ease-out);
}

.nav__burger span::before { top: -7px; }
.nav__burger span::after { top: 7px; }

.nav__burger[aria-expanded="true"] span { background: transparent; }
.nav__burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* panneau plein ecran */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--ink);
  padding: calc(var(--nav-h) + 40px) var(--edge) 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu[hidden] { display: none; }

.menu__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu__links a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--text-on-ink);
  border-bottom: 1px solid var(--line-on-ink);
}

.menu__links a[aria-current="page"] { color: var(--lantern); }

.menu__foot {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 32px;
}

.menu__foot .tel-link {
  font-size: 1.5rem;
  color: var(--lantern);
}

.menu__foot .menu__hours {
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--text-muted-on-ink);
}

/* le panneau est sur fond encre : le rouge laque foncé n'y tient pas le
   contraste (2,99), on repasse a l'or lanterne (10,6). */
.menu .link-arrow { color: var(--lantern); }

/* -------------------------------------------------------- barre du bas */

.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-nav);
  height: 56px;
  background: var(--charcoal);
  border-top: 1px solid var(--lantern);
}

.mobile-bar a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  font-family: var(--font-mono);
  font-size: .9375rem;
  text-decoration: none;
  color: var(--text-on-ink);
}

.mobile-bar a + a { border-left: 1px solid var(--line-on-ink); }

/* quand le panneau plein ecran est ouvert, la barre basse s'efface */
body:has(.menu:not([hidden])) .mobile-bar { display: none; }
.mobile-bar a svg { width: 1.05em; height: 1.05em; fill: var(--lantern); flex: none; }

/* -------------------------------------------------------------- prechargeur */

#preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  display: grid;
  place-items: center;
  background: var(--ink);
}

#preloader[hidden] { display: none; }

#preloader-dragon {
  width: min(46vw, 340px);
  height: auto;
  overflow: visible;
}

/* Un seul trace : DrawSVG anime le stroke, puis `fill-opacity` passe a 1.
   Deux proprietes distinctes, donc aucun conflit de proprietaire. */
#preloader-dragon .pl-mark {
  fill: var(--lacquer);
  fill-opacity: 0;
  stroke: var(--lacquer);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* --------------------------------------------------------- pied de page */

.site-footer {
  position: relative;
  padding-block: 112px 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 56px var(--gutter);
  align-items: start;
}

.footer__logo {
  display: block;
  width: 320px;
  max-width: 100%;
}

.footer__logo img {
  width: 100%;
  height: auto;
}

.footer__slogan {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 650;
  font-stretch: 92%;
  font-size: clamp(1.25rem, 1.9vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  max-width: 26ch;
  color: var(--text-on-ink);
}

.footer__col h2 {
  font-size: .8125rem;
  font-family: var(--font-mono);
  font-weight: 400;
  font-stretch: normal;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lantern);
  margin-bottom: 20px;
}

.footer__col ul { display: grid; gap: 12px; }

.footer__col a {
  text-decoration: none;
  color: var(--text-muted-on-ink);
}

@media (hover: hover) and (pointer: fine) {
  .footer__col a:hover { color: var(--text-on-ink); }
}

.footer__address {
  font-style: normal;
  color: var(--text-muted-on-ink);
  display: grid;
  gap: 12px;
}

.footer__address .tel-link {
  font-size: 1.375rem;
  color: var(--lantern);
}

/* plus specifique que `.footer__col ul` (grille), sinon les icones s'empilent */
.footer__col .footer__social,
.footer__social {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 24px;
}

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-on-ink);
  border-radius: var(--radius);
  color: var(--text-muted-on-ink);
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.footer__social svg { width: 20px; height: 20px; fill: currentColor; }

@media (hover: hover) and (pointer: fine) {
  .footer__social a:hover {
    color: var(--lantern);
    border-color: var(--lantern);
  }
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-ink);
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: .8125rem;
  color: var(--text-muted-on-ink);
}

.footer__bottom nav {
  display: flex;
  gap: 24px;
}

.footer__bottom a { text-decoration: none; }

@media (hover: hover) and (pointer: fine) {
  .footer__bottom a:hover { color: var(--text-on-ink); }
}

/* La signature reste discrete, elle reste lisible. A 0,5 le pixel de texte le
   plus clair tombait a 3,39:1 sur l'encre du pied de page : sous le seuil AA.
   A 0,65 il mesure 4,94:1, et la signature est toujours plus terne que les
   liens voisins du pied de page. */
.signature {
  margin-left: auto;
  opacity: .65;
  transition: opacity 180ms var(--ease-out);
}

.signature a { text-decoration: none; }

@media (hover: hover) and (pointer: fine) {
  .signature:hover { opacity: 1; }
}

/* ------------------------------------------------------- pages secondaires */

.page-head {
  padding-block: calc(var(--nav-h) + 88px) 64px;
}

.page-head h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.5rem);
  max-width: 16ch;
}

.page-head .lead {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--text-muted-on-ink);
}
