/* Chalet Demi Lune : feuille de marque commune.
   Papier blanc, encre sépia, IM Fell French Canon pour ce qui se déclame, Spectral pour ce qui se lit. */
@font-face { font-family: 'IM Fell French Canon'; src: url('./fell-canon.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'IM Fell French Canon'; src: url('./fell-canon-italique.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: Spectral; src: url('./spectral-400.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Spectral; src: url('./spectral-500.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: Spectral; src: url('./spectral-italique.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --papier: #fff;
  --encre: #2a211a;
  --bois: #6a4f3a;
  --mine: #6f655c;
  --ligne: #e2dbd3;
  --fell: 'IM Fell French Canon', Georgia, serif;
  --texte: Spectral, Georgia, serif;
  /* Échelle 1,333 : aucune taille hors de ces jetons. */
  --t-1: 13px; --t-2: 15px; --t-3: 17px; --t-4: 21px; --t-5: 28px; --t-6: 37px; --t-7: 50px; --t-8: 66px;
  --marge: clamp(20px, 4vw, 56px);
  font-family: var(--texte);
  color: var(--encre);
  background: var(--papier);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--papier); overflow-x: clip; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: #eadfd3; color: var(--encre); }
[hidden] { display: none !important; }

/* Un dessin se trace une fois, puis l'encre le remplace. Sans JS, en mouvement réduit ou si carnet.js ne démarre pas
   dans les 6 s (minuteur du <head>, classe trace retirée), il est là d'emblée. */
.dessin { position: relative; margin: 0; }
.dessin img { width: 100%; }
.trace .dessin:not(.fini):not(.en-cours) img { opacity: 0; }
/* Le dessin du haut de page apparaît tout de suite en esquisse pâle : rien de vide à l'arrivée, et un LCP réel. */
.trace .dessin--ouverture:not(.fini):not(.en-cours) img { opacity: .14; }
.dessin.en-cours img { animation: encre var(--duree) ease-in both; }
.dessin--ouverture.en-cours img { animation-name: encre-ouverture; }
.traits { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--bois); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; animation: traits-part var(--duree) linear both; pointer-events: none; }
.traits path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace var(--t) cubic-bezier(.4, .1, .3, 1) var(--r) forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes encre { 0%, 40% { opacity: 0; } 100% { opacity: 1; } }
@keyframes traits-part { 0%, 62% { opacity: 1; } 100% { opacity: 0; } }
@keyframes encre-ouverture { 0%, 35% { opacity: .14; } 100% { opacity: 1; } }

/* ---------- En-tête de la page d'accueil ---------- */
.tete { display: flex; justify-content: center; padding: 24px var(--marge) 0; }
.tete__marque { margin: 0; }
.tete__marque img { width: 158px; height: auto; }

/* ---------- Premier écran ---------- */
.accueil { display: flex; flex-direction: column; align-items: center; padding-inline: var(--marge); text-align: center; }
.dessin--hero { width: min(1020px, 92vw, calc((100svh - 300px) * 1.5)); min-width: min(560px, 92vw); margin: 4px auto 12px; }
.accueil__phrase { position: relative; margin: 0; font: 400 clamp(var(--t-6), 3.6vw, var(--t-7))/1.1 var(--fell); letter-spacing: -.01em; text-wrap: balance; }
.insecable { white-space: nowrap; }
/* Le trait d'union de Fell touche le fût du l : on lui rend de l'air. */
.union { margin-inline: .02em .09em; }
.accueil__note { position: relative; margin: 10px 0 0; color: var(--mine); font-size: var(--t-3); line-height: 1.5; text-wrap: balance; }

/* ---------- Qui rénove ---------- */
.equipe { display: flex; flex-direction: column; align-items: center; margin-top: clamp(72px, 9vw, 120px); padding-inline: var(--marge); text-align: center; }
/* La demi-lune sépare le haut de page du récit. */
.equipe::before { content: ''; width: 64px; height: 33px; margin-bottom: clamp(48px, 6vw, 72px); background: url('/atelier/embleme.svg') center / contain no-repeat; }
.equipe__titre { margin: 0; font: 400 clamp(var(--t-6), 3.6vw, var(--t-7))/1.1 var(--fell); text-wrap: balance; }
.equipe__texte { max-width: 56ch; margin: 16px 0 0; color: var(--mine); font-size: var(--t-3); line-height: 1.55; text-wrap: balance; }

/* ---------- Ce qui reste : un dessin, une phrase ---------- */
.folios { max-width: 1240px; margin: clamp(32px, 4vw, 56px) auto 0; padding-inline: var(--marge); }
.folio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: center; padding-block: clamp(32px, 5vw, 64px); }
.folio .dessin { grid-column: 1 / span 8; }
.folio__texte { grid-column: 9 / span 4; padding-left: 16px; }
.folio__texte h3 { margin: 0; font: 400 var(--t-6)/1.12 var(--fell); text-wrap: balance; }
.folio__texte p { margin: 12px 0 0; color: var(--mine); font-size: var(--t-3); line-height: 1.5; text-wrap: pretty; }
.folio:nth-child(even) .dessin { grid-column: 5 / span 8; grid-row: 1; }
.folio:nth-child(even) .folio__texte { grid-column: 1 / span 4; grid-row: 1; padding: 0 16px 0 0; }

/* ---------- Fin de page ---------- */
.fin { display: flex; flex-direction: column; align-items: center; padding: clamp(64px, 8vw, 96px) var(--marge) clamp(48px, 6vw, 72px); text-align: center; }
.fin__sceau { width: 128px; height: 128px; }
.fin__titre { margin: 24px 0 0; font: 400 clamp(var(--t-5), 3vw, var(--t-6))/1.15 var(--fell); text-wrap: balance; }
.fin__note { margin: 8px 0 0; color: var(--mine); font-size: var(--t-3); line-height: 1.5; text-wrap: balance; }
.fin .newsletter { width: min(100%, 500px); margin-top: 32px; }
.fin__journal { display: inline-flex; align-items: center; min-height: 44px; margin-top: 32px; color: var(--mine); font-size: var(--t-2); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.fin__journal:hover { color: var(--bois); }
.fin:has([data-state="success"]) .fin__sceau { animation: tampon .45s cubic-bezier(.3, 1.3, .5, 1) both; }
@media (prefers-reduced-motion: reduce) { .fin:has([data-state="success"]) .fin__sceau { animation: none; } }
:focus-visible { outline: 2px solid var(--bois); outline-offset: 3px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 860px) {
  .folio { display: block; padding-block: 28px; }
  .folio__texte, .folio:nth-child(even) .folio__texte { margin-top: 8px; padding: 0; text-align: left; }
  .folio__texte h3 { font-size: var(--t-5); }
}
@media (max-width: 700px) {
  .tete { padding-top: 16px; }
  .tete__marque img { width: 132px; }
  /* Le dessin garde toute sa largeur : sa moitié gauche fondue, c'est le demi-chalet. */
  .dessin--hero { width: 100vw; min-width: 0; max-width: none; margin: 8px calc(var(--marge) * -1) 8px; }
  .accueil__phrase { font-size: var(--t-6); }
}
