/* Pages intérieures du site « Atelier » : expertise, pages légales, 404. (Le socle est dans atelier.css.) */

/* les pages sans 3D gardent la grille millimétrée de la planche */
body.flat {
  background-color: var(--black);
  background-image:
    radial-gradient(1200px 700px at 72% 30%, rgba(214, 193, 157, 0.05), transparent 60%),
    repeating-linear-gradient(90deg, rgba(214, 193, 157, 0.03) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg, rgba(214, 193, 157, 0.03) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(214, 193, 157, 0.012) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(214, 193, 157, 0.012) 0 1px, transparent 1px 12px);
  background-attachment: fixed;
}

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 34px; padding: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--gold-deep); }
.crumbs a { color: var(--paper-2); transition: color 0.3s; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--paper); }

/* ---------- expertise ---------- */
.xp { position: relative; z-index: 2; }
.xp > section, .xp > nav { width: min(780px, 54vw); margin-left: var(--pad); }
.xp-hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 140px 0 80px; }
.xp-hero h1 { font-size: clamp(44px, 5.2vw, 100px); margin-top: 22px; }
.xp-tagline { margin: 26px 0 0; max-width: 36ch; font-style: italic; font-weight: 300; font-size: clamp(19px, 1.6vw, 25px); line-height: 1.35; color: var(--paper); }
.xp-lead { margin: 16px 0 0; max-width: 50ch; color: var(--paper-2); font-size: 16.5px; line-height: 1.66; font-weight: 350; }
.xp-hero .tags { margin-top: 24px; }
.xp-hero .ctas { flex-wrap: wrap; margin-top: 36px; }
.xp-dims { margin: 44px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); }
.xp-sec { padding: 14vh 0 2vh; }
.xp-h { display: flex; align-items: baseline; gap: 18px; padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid var(--hair); }
.xp-h i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--gold-deep); }
.xp-h h2 { margin: 0; font-weight: 300; font-variation-settings: "wdth" 96; font-size: clamp(30px, 2.9vw, 52px); letter-spacing: -0.022em; line-height: 1.05; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.caps li { display: grid; align-content: start; gap: 7px; padding: 26px 0; border-bottom: 1px solid var(--hair); }
.caps i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--gold-deep); }
.caps h3 { margin: 0; font-weight: 400; font-size: 19px; color: var(--paper); }
.caps p { margin: 0; color: var(--paper-2); font-size: 14.5px; line-height: 1.6; }
.approach { list-style: none; margin: 0; padding: 0; }
.approach li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 0 20px; padding: 30px 0; border-bottom: 1px solid var(--hair); }
.ap-n { font-weight: 200; font-variation-settings: "wdth" 125; font-size: 36px; line-height: 1; color: var(--gold); }
.approach h3 { margin: 0; font-weight: 300; font-variation-settings: "wdth" 96; font-size: clamp(22px, 2vw, 31px); letter-spacing: -0.016em; line-height: 1.1; }
.approach p { margin: 9px 0 0; max-width: 54ch; color: var(--paper-2); font-size: 15px; line-height: 1.62; }
.xp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; }
.deliv { list-style: none; margin: 0; padding: 0; }
.deliv li { display: grid; grid-template-columns: 3em minmax(0, 1fr); padding: 15px 0; border-bottom: 1px solid var(--hair); font-size: 15px; line-height: 1.5; color: var(--paper); }
.deliv i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--gold-deep); padding-top: 3px; }
.stack { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { padding: 9px 13px; border: 1px solid rgba(214, 193, 157, 0.3); font-family: var(--mono); font-size: 11.5px; color: var(--paper-2); }
.xp-cta { position: relative; margin-top: 14vh; padding: 56px 52px 60px; border: 1px solid var(--hair); background: rgba(10, 9, 10, 0.72); }
.xp-cta::before, .xp-cta::after { content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid var(--gold); }
.xp-cta::before { left: -6px; top: -6px; border-right: 0; border-bottom: 0; }
.xp-cta::after { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }
.xp-cta h2 { font-size: clamp(38px, 4.2vw, 76px); }
.xp-cta p { margin: 18px 0 0; max-width: 46ch; color: var(--paper-2); font-size: 16.5px; line-height: 1.6; }
.xp-cta .btn { margin-top: 32px; }
.xp-pn { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12vh; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.pn { display: grid; align-content: start; gap: 8px; padding: 30px 26px; transition: background 0.4s var(--ease); }
.pn + .pn { border-left: 1px solid var(--hair); text-align: right; justify-items: end; }
.pn:hover { background: rgba(214, 193, 157, 0.05); }
.pn-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.pn-n { font-weight: 200; font-variation-settings: "wdth" 125; font-size: 42px; line-height: 1; color: var(--gold); }
.pn-t { font-size: 18px; color: var(--paper); }
.xp > .xp-others { width: auto; margin-right: var(--pad); padding: 14vh 0 12vh; }
.others { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; perspective: 800px; }
.mini-link { display: grid; gap: 12px; color: var(--paper-2); }
.mini-link .mini { cursor: pointer; }
.mini-link:hover .mini { --lift: -6px; }
.mini-link:hover .ml-t { color: var(--gold); }
.ml-t { font-size: 13px; line-height: 1.35; transition: color 0.3s; }
.mini-link:focus-visible { outline: none; }
.mini-link:focus-visible .mini { outline: 1px solid var(--gold-hi); outline-offset: 4px; }
.mini-link .mini .t { font-size: 8.4px; }

/* ---------- pages légales ---------- */
.lg { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 780px); gap: clamp(40px, 6vw, 90px); padding: 150px var(--pad) 12vh; }
.lg-aside { position: sticky; top: 130px; align-self: start; }
ol.lg-toc { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.lg-toc a { display: grid; grid-template-columns: 2.4em 1fr; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; line-height: 1.4; color: var(--paper-2); transition: color 0.3s; }
.lg-toc a i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--gold-deep); padding-top: 2px; }
.lg-toc a:hover, .lg-toc a.cur { color: var(--gold); }
.lg-switch { margin-top: 26px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lg-switch a { color: var(--paper); border-bottom: 1px solid var(--gold); }
.lg-head h1 { font-size: clamp(44px, 5vw, 92px); margin-top: 22px; }
.lg-meta { margin: 22px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
.lg-notice { display: flex; gap: 14px; margin-top: 28px; padding: 14px 18px; border: 1px dashed rgba(230, 164, 140, 0.55); background: rgba(230, 164, 140, 0.05); font-size: 14px; line-height: 1.55; color: var(--paper); }
.lg-notice i { flex: none; width: 9px; height: 9px; margin-top: 6px; border: 1px solid var(--err); transform: rotate(45deg); }
.lg-sec { padding-top: 54px; scroll-margin-top: 110px; }
.lg-sec h2 { display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); font-weight: 300; font-variation-settings: "wdth" 96; font-size: clamp(24px, 2.1vw, 34px); letter-spacing: -0.015em; }
.lg-sec h2 i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--gold-deep); }
.lg-sec p { margin: 0 0 14px; color: var(--paper-2); font-size: 15.5px; line-height: 1.72; }
.lg-sec ul { list-style: none; margin: 0 0 18px; padding: 0; }
.lg-sec li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid rgba(214, 193, 157, 0.08); color: var(--paper-2); font-size: 15px; line-height: 1.6; }
.lg-sec li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; border: 1px solid var(--gold); transform: rotate(45deg); }
.lg-sec a { color: var(--paper); border-bottom: 1px solid var(--gold); }

/* ---------- 404 : l'emplacement vide de la carte 54 ---------- */
.nf { position: relative; z-index: 2; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(40px, 7vw, 120px); padding: 140px var(--pad) 100px; }
.nf h1 { font-size: clamp(46px, 5.6vw, 106px); margin-top: 24px; max-width: 12ch; }
.nf .txt { margin: 26px 0 0; max-width: 46ch; color: var(--paper-2); font-size: 17px; line-height: 1.62; }
.nf .btn { margin-top: 38px; }
.nf-slot { position: relative; width: clamp(210px, 23vw, 330px); aspect-ratio: 63 / 88; margin-right: 6vw; }
.nf-slot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nf-slot .edge { fill: none; stroke: rgba(214, 193, 157, 0.55); stroke-width: 1; stroke-dasharray: 6 6; animation: march 16s linear infinite; }
.nf-slot .cross { stroke: rgba(214, 193, 157, 0.4); stroke-width: 1; fill: none; }
@keyframes march { to { stroke-dashoffset: -240; } }
.nf-slot .num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 200; font-variation-settings: "wdth" 125; font-size: clamp(64px, 7vw, 108px); color: var(--gold); letter-spacing: -0.02em; }
.nf-slot .lab { position: absolute; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold); background: var(--black); padding: 1px 5px; }
.nf-slot .lab.w { left: 50%; bottom: -34px; transform: translateX(-50%); }
.nf-slot .lab.h { left: -58px; top: 50%; transform: translateY(-50%); }
.nf-slot .lab.k { left: 0; top: -30px; color: var(--muted); }

@media (max-width: 900px), (max-width: 1100px) and (max-aspect-ratio: 899/1000) {
  .xp > section, .xp > nav { width: auto; margin-left: 22px; margin-right: 22px; }
  .xp > .xp-others { margin-right: 22px; }
  .xp-hero { min-height: auto; justify-content: flex-start; padding: 48vh 0 40px; }
  .caps, .xp-two { grid-template-columns: 1fr; }
  .xp-two { gap: 20px; }
  .xp-cta { padding: 40px 26px 44px; }
  .xp-pn { grid-template-columns: 1fr; }
  .pn + .pn { border-left: 0; border-top: 1px solid var(--hair); }
  .others { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
  .mini-link .mini .t { font-size: 9.5px; }
  .lg { grid-template-columns: 1fr; gap: 24px; padding: 120px 22px 10vh; }
  .lg-aside { position: static; order: 2; }
  .lg-main { order: 1; }
  .nf { grid-template-columns: 1fr; padding: 120px 22px 80px; }
  .nf-slot { margin: 30px auto 40px 60px; width: 200px; }
}
@media (prefers-reduced-motion: reduce) { .nf-slot .edge { animation: none; } }

/* ---------- écrans bas (portable à 125 % ≈ 1536×730, 1366×650, 1280×600) : ces règles doivent venir après celles du dessus ---------- */
@media (min-width: 761px) and (max-height: 860px) and (min-aspect-ratio: 9/10), (min-width: 1101px) and (max-height: 860px) {
  .xp-hero { min-height: 100dvh; justify-content: flex-start; padding: clamp(92px, 15vh, 130px) 0 84px; }
  .xp-hero h1 { font-size: clamp(36px, min(4.8vw, 8.4vh), 92px); margin-top: 14px; }
  .crumbs ol { margin-bottom: 16px; }
  .xp-tagline { margin-top: 14px; max-width: 42ch; font-size: clamp(16px, 2.3vh, 21px); line-height: 1.32; }
  .xp-lead { margin-top: 10px; max-width: 56ch; font-size: 14.5px; line-height: 1.55; }
  .xp-hero .tags { margin-top: 14px; }
  .xp-hero .tags li { padding: 4px 8px; font-size: 10px; }
  .xp-hero .ctas { margin-top: 20px; }
  .xp-hero .btn { height: 46px; }
  .xp-dims { display: none; }
  .lg { padding-top: 116px; }
  .lg-aside { top: 104px; }
  .nf { min-height: 100dvh; padding-top: 104px; padding-bottom: 76px; }
  .nf h1 { font-size: clamp(40px, min(5.2vw, 9.6vh), 100px); }
  .nf-slot { width: clamp(170px, 32vh, 300px); }
}
@media (min-width: 761px) and (max-height: 640px) and (min-aspect-ratio: 9/10), (min-width: 1101px) and (max-height: 640px) {
  .xp-hero .tags { display: none; }
  .xp-tagline { margin-top: 10px; }
}

/* contrôle qualité : le bas des expertises occupe toute la largeur, la carte reste jusqu’à la navigation */
.xp > .xp-pn { width: auto; margin-right: var(--pad); }
@media (max-width: 900px), (max-width: 1100px) and (max-aspect-ratio: 899/1000) { .xp > .xp-pn { margin-right: 22px; } }

/* vignette d'attente de la carte (remplacée par la 3D dès ses premières images) */
.xp-wait { position: fixed; z-index: 1; left: 76.5vw; top: 51vh; height: 72vh; width: auto; transform: translate(-50%, -50%); pointer-events: none; transition: opacity 0.8s var(--ease); }
.xp-wait.gone { opacity: 0; }

/* ---------- passe mobile ---------- */
/* téléphone couché (761 à 900 px de large, 500 px de haut au plus) : comme sur ordinateur, le texte à gauche
   et la carte 3D à droite (sinon la carte, centrée en haut, passait sous l'en-tête et sur le titre) */
@media (min-width: 761px) and (max-width: 900px) and (max-height: 500px) and (pointer: coarse) {
  .xp > section, .xp > nav { width: min(780px, 56vw); margin-left: var(--pad); margin-right: 0; }
  .xp > .xp-others, .xp > .xp-pn { width: auto; margin-right: var(--pad); }
  .xp-hero { min-height: 100svh; justify-content: flex-start; padding: 78px 0 40px; }
  .xp-pn { grid-template-columns: 1fr 1fr; }
  .pn + .pn { border-left: 1px solid var(--hair); border-top: 0; }
  .others { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
  .xp-wait { position: fixed; left: 76.5vw; top: 51vh; height: 72vh; }
  .lg, .nf { padding-left: var(--pad); padding-right: var(--pad); } /* --pad inclut l'encoche du téléphone couché */
}
/* écrans tactiles : sommaire et liens des pages légales d'au moins 44 px de haut */
@media (pointer: coarse) {
  .lg-toc a { min-height: 44px; align-content: center; }
  .lg-switch a { position: relative; }
  .lg-switch a::after { content: ""; position: absolute; inset: -14px -4px; }
}
@media (max-width: 900px), (max-width: 1100px) and (max-aspect-ratio: 899/1000) { .xp-wait { position: absolute; left: 50%; top: 27vh; height: 42vh; } }
