/* Atelier Mortaise — site de démonstration (entreprise fictive), Studio Nonante.
   Identité propre au concept : Archivo (étendue pour les titres), graphite, copeau, chêne, vert vernis. */

@font-face {
  font-family: 'Archivo';
  src: url(../../_shared/fonts/archivo-latin-standard-normal.woff2) format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --graphite: #26231F;
  --graphite-deep: #1B1916;
  --copeau: #F1E8D9;
  --copeau-deep: #E9DDC8;
  --chene: #A8784A;
  --chene-ink: #7A532F;      /* chêne assombri : texte sur copeau (5,6:1) */
  --chene-light: #C9A27A;    /* chêne éclairci : texte sur graphite (6,6:1) */
  --vernis: #3E5A45;
  --vernis-deep: #31483A;
  --muted: #5E554C;          /* 6,0:1 sur copeau */
  --muted-dark: #BFB3A3;     /* 7,6:1 sur graphite */
  --rule: rgba(38, 35, 31, .2);
  --gridline: rgba(38, 35, 31, .075);
  --focus: var(--graphite);

  --margin: clamp(20px, 3.75vw, 64px);
  --gutter: clamp(16px, 1.875vw, 28px);
  --max: 1520px;
  --pad-x: max(var(--margin), calc((100% - var(--max)) / 2));
  --banner-h: 40px;
  --head-h: 76px;
  --section-y: clamp(80px, 9.5vw, 160px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

html[data-embed] { --banner-h: 0px; scrollbar-width: none; }
html[data-embed]::-webkit-scrollbar { display: none; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--banner-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--copeau);
  color: var(--graphite);
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
.nowrap { white-space: nowrap; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--vernis); color: var(--copeau); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }

.skip {
  position: absolute; left: 12px; top: 12px; z-index: 300;
  padding: 12px 18px;
  background: var(--graphite); color: var(--copeau);
  font-weight: 600; text-decoration: none;
  transform: translateY(-300%);
}
.skip:focus { transform: none; outline-color: var(--chene); }

/* ---------- Bandeau Studio Nonante : identique sur les trois démos ----------
   Geist (Studio Nonante), réduite aux caractères latins ; une seule ligne, 40 px, à toutes les tailles. */
@font-face {
  font-family: 'Geist';
  src: url(geist-banner.woff2) format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
.demo-banner {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 40px;
  padding: 0 clamp(16px, 2.5vw, 32px);
  background: #171714; color: #fff;
  font: 500 13px/1 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: 0; white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}
.demo-banner p { margin: 0; white-space: nowrap; } /* text-wrap des démos réactiverait le retour à la ligne */
.demo-banner__label::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px;
  border-radius: 50%; background: #8b8b8a; vertical-align: .1em;
}
.demo-banner__links { display: flex; gap: 24px; }
.demo-banner a {
  display: inline-block; line-height: 40px; padding: 0 4px; margin: 0 -4px;
  color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em;
}
.demo-banner a:hover { color: #f2db38; text-decoration-thickness: 2px; }
.demo-banner a:focus-visible { outline: 2px solid #fff; outline-offset: -6px; border-radius: 6px; }
.demo-banner__arrow { display: inline-block; margin-right: 6px; text-decoration: none; }
.demo-banner__short { display: none; }
@media (max-width: 767px) {
  .demo-banner { font-size: 12px; }
  .demo-banner__wide { display: none; }
  .demo-banner__short { display: inline; }
  .demo-banner__links { gap: 16px; }
}
@media (max-width: 379px) {
  .demo-banner { gap: 12px; padding: 0 12px; }
  .demo-banner__label::before { display: none; }
  .demo-banner__links { gap: 12px; }
}
@media (max-width: 339px) {
  .demo-banner { font-size: 11px; padding: 0 10px; }
  .demo-banner__arrow { display: none; }
}
html[data-embed] .demo-banner { display: none; }

/* ---------- En-tête ---------- */

.site-head {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--head-h);
  padding-inline: var(--pad-x);
  border-bottom: 1px solid var(--rule);
  background: var(--copeau);
}

.brand {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 44px;
  text-decoration: none;
}
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__block { fill: var(--graphite); }
.brand__slot { fill: var(--copeau); transition: transform .45s var(--ease); transform-origin: 50% 100%; }
.brand:hover .brand__slot { transform: scaleY(.62); }
.brand__name {
  font-size: 14.5px;
  font-weight: 760;
  font-stretch: 125%;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav ul { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 44px); }
.site-nav a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 560;
  font-stretch: 110%;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 9px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .32s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav li:last-child a {
  padding: 0 18px;
  border: 1.5px solid var(--graphite);
  border-radius: 2px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.site-nav li:last-child a::after { display: none; }
.site-nav li:last-child a:hover { background: var(--graphite); color: var(--copeau); }

/* ---------- Éléments communs ---------- */

.label {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
  font-weight: 650;
  font-stretch: 125%;
  letter-spacing: .13em;
  line-height: 1.35;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--chene-ink);
}
.label::before { content: ''; flex: none; width: 28px; height: 1.5px; background: currentColor; }

h2 {
  margin-top: 20px;
  font-size: clamp(2.125rem, 1.15rem + 3.3vw, 4.5rem);
  font-weight: 700;
  font-stretch: 125%;
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn__icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square;
  transition: transform .32s var(--ease);
}
.btn--primary { background: var(--vernis); border-color: var(--vernis); color: var(--copeau); }
.btn--primary:hover { background: var(--vernis-deep); border-color: var(--vernis-deep); }
.btn--primary:hover .btn__icon { transform: translateX(3px); }
.btn--line { border-color: var(--graphite); color: var(--graphite); background: transparent; }
.btn--line:hover { background: var(--graphite); color: var(--copeau); }
.btn--line:hover .btn__icon { transform: translateY(3px); }
.btn--light { background: var(--copeau); border-color: var(--copeau); color: var(--graphite); }
.btn--light:hover { background: #FBF6EC; border-color: #FBF6EC; }
.btn--light:hover .btn__icon { transform: translateX(3px); }

/* ---------- Ouverture ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: var(--gutter);
  row-gap: clamp(28px, 4.6vh, 52px);
  min-height: clamp(600px, calc(100svh - var(--banner-h) - var(--head-h)), 1020px);
  padding: clamp(32px, 6vh, 72px) var(--pad-x) clamp(36px, 6vh, 72px);
}
/* La grille de l'atelier, laissée visible comme sur une feuille de dessin. */
.hero::before {
  content: '';
  position: absolute; z-index: -1;
  top: 0; bottom: 0; left: var(--pad-x); right: var(--pad-x);
  border-right: 1px solid var(--gridline);
  background: linear-gradient(to right, var(--gridline) 1px, transparent 1px) 0 0 / calc((100% + var(--gutter)) / 12) 100% repeat-x;
  pointer-events: none;
}

/* Le titre est calé au millimètre : il occupe exactement la largeur de la grille. */
.hero__title {
  grid-column: 1 / -1;
  container-type: inline-size;
  font-weight: 720;
  font-stretch: 125%;
  line-height: .9;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.hero__fit {
  display: block;
  margin-left: -.09em;
  font-size: calc(100cqi / 12.51);
}

.hero__content {
  grid-column: 1 / span 5;
  grid-row: 2;
  display: flex; flex-direction: column; gap: 40px;
  padding-top: 26px;
}
.hero__lead {
  margin-top: 22px;
  max-width: 23ch;
  font-size: clamp(1.0625rem, .62rem + 1.2vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media {
  grid-column: 6 / -1;
  grid-row: 2;
  display: flex; flex-direction: column;
  min-height: 0;
}
.hero__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  overflow: hidden;
  background: var(--copeau-deep);
}
.hero__frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 54% 40%;
}

/* Règle graduée : un trait par millimètre, un repère tous les cinq, un chiffre tous les dix. */
.ruler {
  flex: none;
  display: block;
  height: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  border-right: 1px solid rgba(38, 35, 31, .62);
}
.ruler svg { display: block; fill: rgba(38, 35, 31, .62); }
.ruler__nums {
  fill: rgba(38, 35, 31, .7);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
}

.dock { display: none; }

/* ---------- L'atelier ---------- */

.atelier {
  --focus: var(--copeau);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(48px, 5.5vw, 88px);
  padding: var(--section-y) var(--pad-x);
  background: var(--graphite);
  color: var(--copeau);
}
.atelier .label { color: var(--chene-light); }
.atelier__head { grid-column: 1 / span 10; }
/* « par » ne finit pas une ligne ; sur téléphone, « une conversation. » ne tient pas sur une ligne. */
@media (min-width: 768px) { .atelier__keep { white-space: nowrap; } }
.atelier__media { grid-column: 1 / span 7; }
/* Échantillons dessinés : la photo de l'ouverture montre déjà le geste. */
.samples { aspect-ratio: 3 / 2; background: var(--graphite-deep); }
.samples svg { display: block; width: 100%; height: 100%; }
.samples__board rect { stroke: rgba(241, 232, 217, .14); stroke-width: 1; }
.samples__labels {
  fill: var(--muted-dark);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 650;
  font-stretch: 125%;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.atelier__text { grid-column: 8 / -1; align-self: end; padding-left: clamp(0px, 2.6vw, 48px); }
.atelier__questions > span {
  display: block;
  padding: 16px 0 18px;
  border-top: 1px solid rgba(241, 232, 217, .2);
  font-size: clamp(1.25rem, .95rem + 1vw, 1.875rem);
  font-weight: 600;
  font-stretch: 115%;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.atelier__answer {
  padding-top: 22px;
  border-top: 1px solid var(--chene-light);
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted-dark);
  text-wrap: pretty;
}

/* ---------- Les pièces ---------- */

.pieces,
.services {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: var(--section-y) var(--pad-x);
}
.section-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: var(--gutter);
  margin-bottom: clamp(44px, 5vw, 80px);
}
.section-head .label { grid-column: 1 / -1; }
/* Mention de démonstration : une simple légende, jamais un encadré de maquette. */
.tag {
  justify-self: end;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.pieces__list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 4vw, 56px) var(--gutter);
  counter-reset: piece;
}
.piece { counter-increment: piece; display: flex; flex-direction: column; }
.plan {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  background-color: var(--copeau-deep);
  background-image:
    linear-gradient(rgba(38, 35, 31, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 35, 31, .065) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
}
.plan::before {
  content: counter(piece, decimal-leading-zero);
  content: counter(piece, decimal-leading-zero) / '';
  position: absolute; top: 14px; left: 16px;
  font-size: 12px;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: .1em;
  color: var(--chene-ink);
}
.plan svg { display: block; width: 100%; height: 100%; overflow: visible; }
.plan svg * { vector-effect: non-scaling-stroke; }
.d-line { fill: none; stroke: var(--graphite); stroke-width: 1.3; }
.d-wood, .d-line.d-wood { fill: rgba(168, 120, 74, .26); }
.d-thin { fill: none; stroke: var(--graphite); stroke-width: .9; }
.d-hidden { fill: none; stroke: var(--graphite); stroke-width: .9; stroke-dasharray: 4 3; opacity: .7; }
.d-grain { fill: none; stroke: var(--chene-ink); stroke-width: .7; opacity: .5; }
.d-flute { fill: none; stroke: var(--graphite); stroke-width: .8; opacity: .75; }
.d-brass { fill: rgba(168, 120, 74, .75); }
.d-wall { fill: none; stroke: var(--graphite); stroke-width: 2.2; }
.d-hatch { fill: none; stroke: var(--graphite); stroke-width: .7; opacity: .7; }
.d-ground { fill: none; stroke: var(--graphite); stroke-width: .9; stroke-dasharray: 16 3 2 3; }
.d-cote { fill: none; stroke: var(--chene-ink); stroke-width: .9; }
.d-num {
  fill: var(--chene-ink);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 650;
  font-stretch: 110%;
  letter-spacing: .04em;
}
.d-label {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 650;
  font-stretch: 125%;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.piece__text {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1.5px solid var(--graphite);
  color: var(--muted);
  line-height: 1.45;
  text-wrap: pretty;
}
.piece__text strong { color: var(--graphite); font-weight: 650; font-stretch: 110%; }

/* ---------- Les services ---------- */

.services { background: var(--copeau-deep); }
.services h2 { text-wrap: pretty; } /* « Ce que fait / l’atelier. » plutôt que « Ce que / fait l’atelier. » */
.services__list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  border-bottom: 1.5px solid var(--graphite);
}
.service {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: start;
  padding: clamp(28px, 3.2vw, 48px) 0;
  border-top: 1.5px solid var(--graphite);
}
.service__icon {
  grid-column: 1;
  width: 48px; height: 48px;
  fill: none; stroke: var(--graphite); stroke-width: 1.4; stroke-linejoin: round;
}
.service__icon .i-cote { stroke: var(--chene-ink); }
.service__icon .i-wood { fill: rgba(168, 120, 74, .3); }
.service h3 {
  grid-column: 2 / span 5;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.75rem);
  font-weight: 700;
  font-stretch: 125%;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.service p {
  grid-column: 8 / -1;
  max-width: 40ch;
  padding-top: .2em;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + .25vw, 1.25rem);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- Votre projet ---------- */

.projet {
  --focus: var(--copeau);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 48px;
  padding: var(--section-y) var(--pad-x);
  background: var(--vernis);
  color: var(--copeau);
}
.projet .label { color: var(--copeau-deep); }
.projet__head { grid-column: 1 / span 6; display: flex; flex-direction: column; align-items: flex-start; }
/* Le tenon et la mortaise, en vue éclatée : l'assemblage qui donne son nom à l'atelier. */
.joint { width: clamp(220px, 21vw, 300px); height: auto; margin-top: auto; padding-top: 48px; overflow: visible; }
.joint path { stroke: rgba(241, 232, 217, .62); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.joint__top { fill: #576E5A; }
.joint__right { fill: #4C6551; }
.joint__left { fill: #435E49; }
.joint__hole { fill: #3A4A3D; }
.joint .joint__inner { fill: none; stroke-width: 1; }
.joint .joint__guide { fill: none; stroke-dasharray: 3 3; stroke-width: 1; }
.joint .joint__lead { fill: none; stroke: rgba(233, 221, 200, .8); stroke-width: .8; }
.joint__dot { fill: var(--copeau-deep); }
.joint__text {
  fill: var(--copeau-deep);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 650;
  font-stretch: 125%;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.projet__body { grid-column: 7 / -1; padding-top: 8px; }
.projet__list {
  counter-reset: item;
  font-size: clamp(1.25rem, .95rem + 1vw, 1.875rem);
  font-weight: 560;
  font-stretch: 112%;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.projet__item,
.projet__end {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  align-items: baseline;
  padding: 16px 0 17px;
  border-top: 1px solid rgba(241, 232, 217, .3);
}
.projet__item { counter-increment: item; }
.projet__item::before {
  content: counter(item, decimal-leading-zero);
  content: counter(item, decimal-leading-zero) / '';
  font-size: 12px;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: .1em;
  color: var(--copeau-deep);
}
.projet__end {
  border-top: 1.5px solid var(--copeau);
  padding-top: 22px;
  font-size: clamp(1.0625rem, 1rem + .25vw, 1.25rem);
  font-weight: 400;
  font-stretch: 100%;
  color: var(--copeau-deep);
}
.projet__end::before { content: ''; }
.projet__body .btn { margin-top: 36px; margin-left: 3.4rem; }

/* ---------- Pied de page ---------- */

.site-foot {
  --focus: var(--copeau);
  container-type: inline-size;
  overflow: hidden;
  padding: clamp(48px, 6vw, 88px) var(--pad-x) clamp(28px, 3vw, 44px);
  background: var(--graphite);
  color: var(--copeau);
}
.site-foot__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(241, 232, 217, .2);
  font-size: 15px;
  line-height: 1.45;
}
.site-foot__name { font-weight: 650; font-stretch: 110%; text-wrap: balance; }
.site-foot__note { color: var(--muted-dark); }
.site-foot__mark {
  margin-top: clamp(28px, 3vw, 48px);
  font-size: calc(100cqi / 12.04);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .8;
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--chene);
}

/* ---------- Boîte de démonstration ---------- */

.dialog {
  width: min(540px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-top: 6px solid var(--chene);
  border-radius: 2px;
  background: var(--copeau);
  color: var(--graphite);
}
.dialog::backdrop { background: rgba(27, 25, 22, .64); }
.dialog__body { display: grid; justify-items: start; gap: 26px; padding: clamp(28px, 4vw, 44px); }
.dialog__mark { width: 28px; height: 28px; }
.dialog__text { font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem); line-height: 1.5; text-wrap: pretty; }
.dialog__text strong { font-weight: 700; font-stretch: 112%; }

/* ---------- Apparitions (facultatives, jamais en mode capture) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.reveal-ready:not([data-embed]) .reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
  html.reveal-ready:not([data-embed]) .reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .dialog[open] { animation: dialog-in .32s var(--ease); }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(14px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Tablette (en hauteur ; à l'horizontale, la composition d'ordinateur tient mieux) ---------- */

@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .site-nav a { font-size: 14px; font-stretch: 100%; }
  .site-nav li:last-child a { padding: 0 14px; }
  .brand__name { letter-spacing: .1em; }
  .hero { min-height: 0; }
  .hero__title { white-space: normal; }
  .hero__fit { font-size: calc(100cqi / 7.77); }
  .hero__fit span { display: block; white-space: nowrap; }
  .hero__content { grid-column: 1 / span 5; }
  .hero__media { grid-column: 6 / -1; }
  .hero__frame { flex: none; aspect-ratio: 4 / 5; min-height: 0; }
  .atelier__media { grid-column: 1 / span 7; }
  .atelier__text { grid-column: 8 / -1; }
  .service h3 { grid-column: 2 / span 5; }
  .service p { grid-column: 7 / -1; }
  .projet__head { grid-column: 1 / -1; }
  .joint { display: none; }
  .projet__body { grid-column: 1 / span 10; }
}

/* ---------- Téléphone : une composition à part ---------- */

@media (max-width: 767px) {
  :root {
    --head-h: 101px;
    --dock-h: 82px;
    --section-y: 72px;
  }

  /* En-tête : le nom, puis les quatre rubriques toujours visibles. */
  .site-head { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 0; }
  .brand { height: 56px; padding-inline: var(--pad-x); }
  .brand__name { font-size: 13.5px; }
  .site-nav ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
  .site-nav li + li { border-left: 1px solid var(--rule); }
  .site-nav a,
  .site-nav li:last-child a {
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    font-stretch: 88%;
  }
  .site-nav li:last-child a { background: var(--copeau-deep); }
  .site-nav a:focus-visible { outline-offset: -5px; }
  .site-nav a::after { display: none; }

  /* Ouverture : la photo garde sa place, en pleine largeur. */
  .hero {
    isolation: auto;
    display: flex; flex-direction: column;
    gap: 0;
    min-height: calc(100svh - var(--banner-h) - var(--head-h));
    padding: 0 0 calc(var(--dock-h) + 24px);
  }
  .hero::before { display: none; }
  /* Sur les écrans courts, la photo cède un peu de hauteur pour que rien ne passe à moitié sous le bouton du bas. */
  .hero__media { order: -1; flex: 1 1 auto; min-height: clamp(190px, calc(100svh - var(--banner-h) - 500px), 250px); }
  .hero__frame { min-height: 0; }
  .hero__frame img { object-position: 60% 50%; }
  .ruler { order: 2; margin: 0 var(--pad-x); }
  .hero__title { margin: 22px 0 0; padding-inline: var(--pad-x); line-height: .94; white-space: normal; }
  .hero__fit { font-size: min(calc(100cqi / 7.55), 4.5rem); }
  .hero__fit span { display: block; white-space: nowrap; }
  .hero__content { gap: 22px; padding: 16px var(--pad-x) 0; }
  .hero .label { gap: 0; font-size: 11px; letter-spacing: .08em; }
  .hero .label::before { display: none; }
  .hero__lead { margin-top: 10px; font-size: 1.0625rem; line-height: 1.45; max-width: 34ch; }
  .hero__actions .btn--line { min-height: 48px; }

  /* Le bouton de projet reste sous le pouce, en bas de l'écran. */
  .dock {
    display: block;
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    height: calc(var(--dock-h) + env(safe-area-inset-bottom));
    background: var(--copeau);
    border-top: 1px solid var(--rule);
  }
  .hero__action {
    position: fixed; z-index: 61;
    left: var(--pad-x); right: var(--pad-x);
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .dock, .hero__action { transition: transform .32s var(--ease), visibility 0s; }
  html.dock-off .dock,
  html.dock-off .hero__action {
    transform: translateY(calc(100% + 32px));
    visibility: hidden;
    transition: transform .32s var(--ease), visibility 0s .32s;
  }

  h2 { margin-top: 16px; font-size: clamp(2rem, 9.4vw, 2.625rem); line-height: 1; letter-spacing: -.03em; }

  .atelier { display: block; }
  .atelier__media { margin: 40px calc(var(--pad-x) * -1) 0; }
  .atelier__text { margin-top: 36px; }
  .atelier__questions > span { padding: 14px 0 15px; font-size: 1.3125rem; }

  .pieces, .services { display: block; }
  .section-head { display: block; margin-bottom: 40px; }
  .tag { justify-self: start; margin-top: 16px; font-size: 13.5px; }
  .pieces__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .piece__text { margin-top: 18px; padding-top: 14px; }

  .services__list { display: block; }
  .service {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px 16px;
    padding: 28px 0 30px;
  }
  .service__icon { width: 44px; height: 44px; }
  .service h3 { grid-column: 2; align-self: center; font-size: 1.625rem; }
  .service p { grid-column: 2; padding-top: 0; }

  .projet { display: block; }
  .joint { display: none; }
  .projet__body { margin-top: 36px; padding-top: 0; }
  .projet__item, .projet__end { grid-template-columns: 2.75rem minmax(0, 1fr); padding: 14px 0 15px; }
  .projet__body .btn { width: 100%; margin: 32px 0 0; }

  .site-foot { padding-bottom: 28px; }
  .site-foot__row { flex-direction: column; font-size: 14.5px; }
  .site-foot__mark { font-size: calc(100cqi / 6.75); line-height: .86; white-space: normal; }
}
