/* Infuse, maison de thé : mise en page de livre (base commune aux 4 pages) */
:root {
  --papier: #F4F0E6;
  --papier-2: #ECE6D8;
  --encre: #1F1D1A;
  --encre-2: #4A4640;
  --encre-3: #7A746A;
  --filet: rgba(31, 29, 26, .16);
  --matcha: #7E9A52;
  --matcha-fonce: #5E7838;
  --oolong: #8A5A2B;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --sans: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --col: 600px;
  --gout: 48px;
  --marge: 220px;
  --feuille: calc(var(--col) + var(--gout) + var(--marge));
  --x0: max(300px, calc(50vw - 300px));
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .22s ease both sortie; }
::view-transition-new(root) { animation: .32s var(--ease) both entree; }
@keyframes sortie { to { opacity: 0; } }
@keyframes entree { from { opacity: 0; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 400 17px/1.7 var(--sans); font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--oolong); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--encre); color: var(--papier); padding: 8px 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* grain de papier très léger, fixe, sans animation */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .42 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"); }

/* ---------- Sommaire (menu) en marge gauche ---------- */
.sommaire { position: fixed; z-index: 20; left: 56px; top: 44px; bottom: 40px; width: 196px; display: flex; flex-direction: column; }
.marque { text-decoration: none; display: block; margin-bottom: 44px; }
.marque b { display: block; font: 600 30px/1 var(--serif); letter-spacing: .02em; }
.marque span { display: block; margin-top: 10px; font: 500 11px/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--encre-3); }
.sommaire__titre { font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--encre-3); margin: 0 0 14px; }
.sommaire ol { list-style: none; margin: 0; padding: 0; }
.chap > a { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 4px; padding: 7px 0; text-decoration: none; color: var(--encre-3); transition: color .3s; }
.chap > a i { font: 500 13px/1 var(--serif); font-style: normal; color: var(--encre-3); }
.chap > a span { font: 500 17px/1.2 var(--serif); position: relative; }
.chap > a span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.chap > a:hover { color: var(--encre); }
.chap > a:hover span::after { transform: scaleX(1); }
.chap > a em { font: 400 12px/1 var(--serif); font-style: normal; color: var(--encre-3); }
.chap > a[aria-current="page"] { color: var(--encre); }
.chap > a[aria-current="page"] i { color: var(--matcha-fonce); }
.sous { list-style: none; margin: 4px 0 10px 26px !important; padding: 0 0 0 14px !important; position: relative; border-left: 1px solid var(--filet); }
.sous a { display: block; padding: 4px 0; font: 400 13.5px/1.35 var(--sans); color: var(--encre-3); text-decoration: none; transition: color .3s; }
.sous a:hover, .sous a.est-ici { color: var(--encre); }
.sous__repere { position: absolute; left: -1.5px; top: 0; width: 2px; height: 26px; background: var(--matcha); border-radius: 2px; will-change: transform; }
.sommaire__pied { margin-top: auto; font: 400 13px/1.55 var(--sans); color: var(--encre-2); }
.etat { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 500; }
.etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--encre-3); }
.etat.ouvert::before { background: var(--matcha); box-shadow: 0 0 0 4px rgba(126, 154, 82, .18); }
.sommaire__pied a { color: var(--encre-2); text-decoration: none; }
.sommaire__pied a:hover { color: var(--encre); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Titre courant et folio ---------- */
.courant { position: fixed; z-index: 15; top: 0; left: var(--x0); width: var(--feuille); height: 58px; display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 12px; background: var(--papier); font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--encre-3); pointer-events: none; }
.courant::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--filet); }
.courant__chap { display: inline-block; transition: opacity .35s, transform .45s var(--ease); }
.courant__chap.change { opacity: 0; transform: translateY(5px); }
.folio { position: fixed; z-index: 15; bottom: 26px; left: calc(var(--x0) + var(--feuille) + 28px); width: 60px; text-align: left; font: 500 13px/1 var(--serif); color: var(--encre-3); pointer-events: none; }

/* ---------- La feuille : colonne de texte + marge de notes ---------- */
.feuille { position: relative; width: var(--feuille); margin-left: var(--x0); padding: 120px 0 0; }
.bloc { display: grid; grid-template-columns: var(--col) var(--marge); column-gap: var(--gout); align-items: start; }
.bloc > * { grid-column: 1; }
.bloc > .note, .bloc > .notes { grid-column: 2; grid-row: span 3; }
.section { padding-top: 96px; scroll-margin-top: 40px; }
.section:first-child { padding-top: 0; }

.surtitre { font: 500 12px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--oolong); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; margin: 0; color: var(--encre); }
h1 { font-size: 54px; line-height: 1.12; margin-bottom: 34px; }
h2 { font-size: 34px; line-height: 1.2; margin-bottom: 22px; }
h3 { font-size: 22px; line-height: 1.3; }
.num { position: absolute; transform: translateX(-64px); font: 500 15px/2.4 var(--serif); color: var(--matcha-fonce); }
.titre-section { position: relative; }
p { margin: 0 0 1.05em; }
.texte { color: var(--encre-2); hyphens: auto; -webkit-hyphens: auto; text-align: justify; text-justify: inter-word; }
.chapeau { font: 400 21px/1.6 var(--serif); color: var(--encre); text-align: left; }
.lettrine::first-letter { float: left; font: 600 78px/.82 var(--serif); color: var(--oolong); margin: 8px 12px 0 -2px; }

/* notes en marge */
.note { font: 400 13.5px/1.55 var(--sans); color: var(--encre-2); padding-top: 6px; }
.note + .note { margin-top: 18px; }
.note b { display: block; font: 600 22px/1.15 var(--serif); color: var(--encre); margin-bottom: 2px; font-variant-numeric: lining-nums; }
.note small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-3); margin-bottom: 6px; }
.note::before { content: ""; display: block; width: 22px; height: 1px; background: var(--oolong); margin-bottom: 12px; }
.notes .note:not(:first-child)::before { display: none; }

/* planches photo */
.planche { margin: 0; grid-column: 1 / -1; }
.planche--col { grid-column: 1; }
.planche__cadre { overflow: hidden; background: var(--papier-2); }
.planche img { width: 100%; }
.planche figcaption { margin-top: 12px; font: italic 400 14px/1.5 var(--serif); color: var(--encre-3); display: flex; gap: 14px; }
.planche figcaption span { font: 500 11px/1.9 var(--sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--oolong); white-space: nowrap; }
.js .developpe img { opacity: 0; transform: scale(1.025); transition: opacity 1.1s var(--ease), transform 1.6s var(--ease); }
.js .developpe.vu img { opacity: 1; transform: none; }

/* liens de texte */
.lien { color: var(--encre); text-decoration: none; background: linear-gradient(var(--oolong), var(--oolong)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: color .3s, background-size .45s var(--ease); }
.lien:hover { color: var(--oolong); }
.lien--fleche::after { content: " \2192"; display: inline-block; transition: transform .3s var(--ease); }
.lien--fleche:hover::after { transform: translateX(4px); }

.bouton { display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px 13px 18px; border: 1px solid var(--encre); border-radius: 40px; background: transparent; color: var(--encre); font: 500 14px/1 var(--sans); letter-spacing: .04em; cursor: pointer; text-decoration: none; transition: background .3s, color .3s, transform .3s var(--ease); }
.bouton:hover { background: var(--encre); color: var(--papier); }
.bouton:active { transform: scale(.97); }
.bouton--plein { background: var(--encre); color: var(--papier); }
.bouton--plein:hover { background: var(--oolong); border-color: var(--oolong); }

/* fleuron */
.fleuron { display: block; width: 40px; height: 14px; margin: 0 auto; color: var(--oolong); }

/* colophon (pied de page) */
.colophon { margin-top: 140px; padding: 64px 0 90px; border-top: 1px solid var(--filet); text-align: center; font: 400 14px/1.75 var(--serif); color: var(--encre-2); }
.colophon .fleuron { margin-bottom: 26px; }
.colophon p { margin: 0 0 6px; }
.colophon a { color: var(--encre-2); text-decoration: none; }
.colophon a:hover { color: var(--oolong); text-decoration: underline; text-underline-offset: 3px; }
.colophon__fin { margin-top: 26px !important; font: 500 11px/1.6 var(--sans) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--encre-3); }

/* formulaires */
.champ { display: grid; gap: 6px; margin-bottom: 18px; }
.champ label { font: 500 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--encre-3); }
.champ input, .champ select, .champ textarea { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid rgba(31, 29, 26, .35); background: transparent; font: 400 17px/1.4 var(--serif); border-radius: 0; transition: border-color .3s; }
.champ textarea { min-height: 90px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-bottom-color: var(--oolong); box-shadow: 0 1px 0 var(--oolong); }
.champs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.confirmation { margin-top: 16px; font: italic 400 16px/1.5 var(--serif); color: var(--matcha-fonce); min-height: 1.5em; }

/* listes à points de conduite (sommaire, cartes) */
.conduite { list-style: none; margin: 0; padding: 0; }
.conduite li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.conduite li::after { content: ""; order: 2; flex: 1; border-bottom: 1px dotted rgba(31, 29, 26, .35); transform: translateY(-4px); }
.conduite .g { order: 1; font: 500 18px/1.35 var(--serif); }
.conduite .g small { display: block; font: 400 13px/1.4 var(--sans); color: var(--encre-3); }
.conduite .d { order: 3; font: 500 16px/1.3 var(--serif); white-space: nowrap; font-variant-numeric: lining-nums; }

/* ---------- Écrans plus étroits : la mise en page ne casse pas ---------- */
@media (max-width: 1180px) {
  :root { --x0: 280px; --col: 540px; --marge: 190px; --gout: 36px; }
  .sommaire { left: 32px; width: 200px; }
}
@media (max-width: 1060px) {
  :root { --x0: 24px; }
  .sommaire { position: static; width: auto; margin: 0; padding: 18px 24px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 26px; border-bottom: 1px solid var(--filet); }
  .marque { margin: 0 18px 0 0; }
  .sommaire__titre, .sous, .sommaire__pied { display: none; }
  .sommaire ol { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .chap > a { grid-template-columns: auto auto; }
  .chap > a em { display: none; }
  .courant, .folio { display: none; }
  .feuille { width: auto; margin: 0 24px; padding-top: 48px; }
  .bloc { grid-template-columns: minmax(0, 1fr); }
  .bloc > .note, .bloc > .notes { grid-column: 1; margin: 6px 0 26px; }
  .num { position: static; transform: none; display: block; line-height: 1.4; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .texte { text-align: left; }
  .champs-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .developpe img { opacity: 1; transform: none; }
}
