/* Atelier Arête — pré-maquette. Monde : le dossier de permis, planches sur calque. */
@font-face { font-family: "Tight"; font-weight: 500; font-display: swap; src: url(fonts/inter-tight-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Tight"; font-weight: 500; font-display: swap; src: url(fonts/inter-tight-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-024F; }
@font-face { font-family: "Tight"; font-weight: 600; font-display: swap; src: url(fonts/inter-tight-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Tight"; font-weight: 600; font-display: swap; src: url(fonts/inter-tight-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-024F; }
@font-face { font-family: "Mono"; font-weight: 400; font-display: swap; src: url(fonts/geist-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "Mono"; font-weight: 400; font-display: swap; src: url(fonts/geist-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-024F; }

:root {
  --papier: #f1efe8; --encre: #1b1b19; --texte: rgba(27,27,25,.74); --gris: #8a877f;
  --clair: #cbc7bd; --trait: rgba(27,27,25,.13); --rouge: #cf4328; --rouge-fonce: #a93219;
  --mono: "Mono", ui-monospace, monospace; --sans: "Tight", "Helvetica Neue", Arial, sans-serif;
  --cadre: min(100% - 24px, 1680px); --entete: 58px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 500 15px/1.5 var(--sans); color: var(--texte); background-color: var(--papier);
  /* matière : grain de calque + trame millimétrée très légère */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .09 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(rgba(27,27,25,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,27,25,.035) 1px, transparent 1px);
  background-size: 220px 220px, 24px 24px, 24px 24px;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3, .titre { font-family: var(--sans); font-weight: 600; color: var(--encre); text-transform: uppercase; letter-spacing: -.035em; line-height: .93; }
h1 { font-size: clamp(2.3rem, 5.1vw, 5.6rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 3.7rem); }
h3 { font-size: clamp(1.05rem, 1.35vw, 1.35rem); letter-spacing: -.02em; line-height: 1.02; }
.mono { font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.rouge { color: var(--rouge); }
.lead { font-size: clamp(15px, 1.15vw, 17px); max-width: 46ch; }

/* ---------- cadre et planches ---------- */
.cadre { width: var(--cadre); margin-inline: auto; border-inline: 1px solid var(--trait); }
.planche { position: relative; border-bottom: 1px solid var(--trait); }
.planche::before, .planche::after { content: "+"; position: absolute; top: 4px; font: 400 13px/1 var(--mono); color: var(--gris); pointer-events: none; z-index: 2; }
.planche::before { left: 7px; } .planche::after { right: 7px; }
.cellules { display: grid; }
.cellules > * { border-right: 1px solid var(--trait); }
.cellules > *:last-child { border-right: 0; }
.pad { padding: clamp(18px, 2.2vw, 32px); }

/* ---------- cartouche (en-tête) ---------- */
.cartouche { position: sticky; top: 0; z-index: 50; height: var(--entete); background: rgba(241,239,232,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); }
.cartouche .cadre { height: 100%; display: flex; }
.logo { display: flex; align-items: center; gap: 10px; padding-inline: 16px; margin-right: auto; font-weight: 600; color: var(--encre); letter-spacing: -.02em; text-transform: uppercase; font-size: 15px; }
.logo svg { width: 26px; height: 26px; }
.nav { display: flex; }
.nav a { position: relative; width: clamp(110px, 10vw, 160px); border-left: 1px solid var(--trait); padding: 9px 12px; font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--encre); transition: background .3s; }
.nav a small { position: absolute; right: 10px; bottom: 9px; color: var(--gris); font-size: 10px; }
.nav a:hover, .nav a[aria-current] { background: rgba(27,27,25,.05); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 12px; bottom: 10px; width: 6px; height: 6px; background: var(--rouge); }
.nav a.contact { color: var(--rouge); }
.menu-btn { display: none; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: stretch; border: 1px solid var(--encre); font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--encre); background: transparent; cursor: pointer; transition: background .3s, color .3s; }
.btn span { padding: 13px 16px; }
.btn i { display: grid; place-items: center; width: 40px; border-left: 1px solid currentColor; font-style: normal; transition: transform .35s; }
.btn:hover { background: var(--encre); color: var(--papier); }
.btn:hover i { transform: translateX(3px); }
.btn.plein { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn.plein:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); }

/* ---------- encre : image qui se dépose comme un lavis ---------- */
.encre { position: relative; overflow: hidden; background: rgba(27,27,25,.03); }
.encre > img { width: 100%; height: 100%; object-fit: cover; }
.encre .esquisse { position: absolute; inset: 0; filter: grayscale(1) contrast(1.35) brightness(1.2); opacity: .2; mix-blend-mode: multiply; }
.encre > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.js .encre > img:not(.esquisse) { visibility: hidden; }

/* ---------- mots qui s'encrent ---------- */
.mots .m { color: var(--clair); }

/* ---------- ruban défilant ---------- */
.ruban { overflow: hidden; border-bottom: 1px solid var(--trait); }
.ruban div { display: flex; width: max-content; animation: ruban 38s linear infinite; }
.ruban span { padding: 11px 18px; font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; color: var(--gris); border-right: 1px solid var(--trait); }
.ruban span::before { content: "◇"; margin-right: 12px; color: var(--rouge); }
@keyframes ruban { to { transform: translateX(-50%); } }

/* ---------- appel final : prise de rendez-vous ---------- */
.appel-grille { grid-template-columns: 1.15fr 1fr; }
.appel-texte { padding: clamp(40px, 5vw, 80px) clamp(16px, 2vw, 28px); display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.appel-texte h2 { font-size: clamp(2.2rem, 4.4vw, 4.6rem); max-width: 12ch; }
.appel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.appel-note { color: var(--encre); }
.appel-note::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--rouge); vertical-align: 1px; }
.appel-etapes { list-style: none; display: grid; }
.appel-etapes li { display: grid; gap: 8px; align-content: center; padding: clamp(18px, 2vw, 28px); border-bottom: 1px solid var(--trait); transition: background .3s; }
.appel-etapes li:last-child { border-bottom: 0; }
.appel-etapes li:hover { background: rgba(207,67,40,.05); }
.appel-etapes .mono { color: var(--rouge); }
.appel-etapes p { color: var(--encre); font-size: clamp(15px, 1.2vw, 18px); max-width: 38ch; }
@media (max-width: 900px) { .appel-grille { grid-template-columns: 1fr; } .appel-grille > * { border-right: 0; } .appel-texte { border-bottom: 1px solid var(--trait); } }

/* ---------- pied de page (cartouche de plan) ---------- */
.pied .cellules { grid-template-columns: 1.3fr repeat(3, 1fr) .9fr; }
.pied .pad { min-height: 170px; }
.pied h3 { margin-bottom: 14px; }
.pied ul { list-style: none; display: grid; gap: 6px; font-size: 14px; }
.pied a:hover { color: var(--rouge); }
.pied .bas { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--trait); padding: 12px 16px; }
.tampon { display: inline-block; border: 2px solid var(--rouge); color: var(--rouge); padding: 7px 10px 6px; font: 400 11px/1.25 var(--mono); text-transform: uppercase; letter-spacing: .06em; transform: rotate(-5deg); mix-blend-mode: multiply; opacity: .9; }

/* ---------- curseur ---------- */
.curseur { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: 0; transition: opacity .3s; }
.curseur span { display: block; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--rouge); transition: transform .3s cubic-bezier(.2,.7,.2,1), background .3s; }
.curseur.sur span { transform: scale(5); background: rgba(207,67,40,.18); }
.a-souris .curseur { opacity: 1; }

/* ---------- rideau entre les pages ---------- */
.rideau { position: fixed; inset: 0; z-index: 150; background: var(--encre); color: var(--papier); display: grid; place-items: center; transform: scaleY(0); transform-origin: bottom; pointer-events: none; }
.rideau p { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; opacity: 0; }
.rideau.ferme { transform: scaleY(1); transition: transform .55s cubic-bezier(.7,0,.2,1); }
.rideau.ferme p { opacity: 1; transition: opacity .2s .3s; }
.rideau.ouvre { transform: scaleY(0); transform-origin: top; transition: transform .7s cubic-bezier(.7,0,.2,1) .05s; }
.rideau.tout-de-suite { transform: scaleY(1); transition: none; }

/* ---------- chargement (accueil, 1re visite) ---------- */
.chargement { position: fixed; inset: 0; z-index: 180; background: var(--papier); display: grid; place-items: center; }
.chargement ol { list-style: none; font: 400 12px/2 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.chargement li { opacity: 0; } .chargement li.ok { opacity: 1; } .chargement li.ok::after { content: " ✓"; color: var(--rouge); }
.chargement b { position: absolute; left: 16px; bottom: 12px; font: 600 clamp(3rem, 9vw, 8rem)/1 var(--sans); color: var(--encre); letter-spacing: -.04em; }
.chargement.fini { opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }

/* ---------- FAQ / accordéons ---------- */
.acc details { border-bottom: 1px solid var(--trait); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 18px clamp(16px, 2vw, 28px); font-weight: 600; color: var(--encre); text-transform: uppercase; letter-spacing: -.01em; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font: 400 16px/1 var(--mono); color: var(--gris); transition: transform .3s; }
.acc details[open] summary::after { transform: rotate(45deg); color: var(--rouge); }
.acc details p { padding: 0 clamp(16px, 2vw, 28px) 20px; max-width: 64ch; }

@media (max-width: 900px) {
  .nav { position: fixed; inset: var(--entete) 0 auto; flex-direction: column; background: var(--papier); border-bottom: 1px solid var(--trait); display: none; }
  .nav.ouvert { display: flex; }
  .nav a { width: auto; padding: 18px 16px; border-left: 0; border-top: 1px solid var(--trait); font-size: 13px; }
  .menu-btn { display: block; border: 0; border-left: 1px solid var(--trait); background: none; padding: 0 18px; font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
  .pied .cellules { grid-template-columns: 1fr 1fr; }
  .pied .cellules > * { border-bottom: 1px solid var(--trait); }
  .pied .pad { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ruban div { animation: none; }
  .rideau, .chargement { display: none; }
}
