/* Feuilles empilées (Lezieu, refait le 08/11 d'après Obys Design Books) : la pile de feuilles sur le noir, la feuille de devant (en-tête, nom, dos, tirages numérotés),
   les miniatures à gauche, les initiales rayées, le menu, l'arrivée, la visionneuse en feuille posée sur la pile.
   Couleurs de la mise en page : --fond (la table noire), --texte (le haut), --accent (la feuille orange perforée). Typo : --sans (Hanken Grotesk, en gras) partout. */

.m-feuilles { --ti-encre: #262626;
  --ti-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23g)' opacity='.32'/></svg>");
  background: var(--fond); color: var(--texte); font-family: var(--sans); user-select: none; -webkit-user-select: none; }
.m-feuilles button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
.m-feuilles [hidden] { display: none !important; }
.m-feuilles :is(.p-blanc) { --pp: #E9E8E4; }
.m-feuilles :is(.p-gris) { --pp: #8E8D8A; }
.m-feuilles :is(.p-orange) { --pp: var(--accent); }
.m-feuilles :is(.p-beige) { --pp: #CFC8B8; }
.m-feuilles :is(.p-craie) { --pp: #F1EEE6; }

/* la pile (derrière) et la feuille de devant (qui défile) */
.ti-pile { position: absolute; inset: 0; overflow: hidden; }
.ti-pf { position: absolute; height: calc(var(--H) * 1.6); overflow: hidden; cursor: pointer; transition: translate .45s cubic-bezier(.16, 1, .3, 1); }
.ti-pf:hover { translate: 0 -8px; }
.ti-pf .ti-f { height: 100%; }
.ti-page { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; pointer-events: none; }
.ti-page::-webkit-scrollbar { display: none; }
.ti-devant { position: relative; pointer-events: auto; }

/* une feuille : le papier, l'en-tête, le haut, les tirages, le pied */
.ti-f { position: relative; box-sizing: border-box; color: var(--ti-encre); background-color: var(--pp); background-image: var(--ti-grain); box-shadow: 0 30px 70px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35); font: 700 13px/1.2 var(--sans); letter-spacing: -.022em; }
.ti-f-h { display: grid; grid-template-columns: auto auto 1fr auto; align-items: stretch; border-bottom: 1px solid currentColor; }
.ti-f-h > * { display: flex; align-items: center; padding: 9px 18px; border-right: 1px solid currentColor; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ti-f-h > :last-child { border-right: 0; }
.ti-pts { gap: 4px; }
.ti-pts i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ti-pts i + i { background: none; box-shadow: inset 0 0 0 1px currentColor; }
.ti-f-t { display: grid; grid-template-columns: 30% minmax(0, 1fr); border-bottom: 1px solid currentColor; }
.ti-f-g { display: flex; flex-direction: column; justify-content: space-between; gap: 50px; padding: 18px; border-right: 1px solid currentColor; }
.ti-f-g p { margin: 0; font-size: clamp(18px, 1.95cqw, 28px); line-height: .94; letter-spacing: -.03em; overflow-wrap: break-word; }
.ti-f-d { padding: 18px; min-width: 0; }
.ti-f-d h2 { margin: 0 0 0 -.04em; font: 700 clamp(34px, 4.9cqw, 70px)/.86 var(--sans); letter-spacing: -.035em; overflow-wrap: break-word; }
.ti-dos { display: flex; gap: 3px; height: clamp(70px, 8.5cqw, 122px); margin-top: clamp(20px, 2.4cqw, 36px); }
.ti-dos img { flex: 1; min-width: 0; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(.85) brightness(1.1); mix-blend-mode: multiply; opacity: .85; }
.ti-f-l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ti-t { position: relative; margin: 0; padding: 14px 18px 22px; border-bottom: 1px solid currentColor; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 12px; }
.ti-t:nth-child(odd) { border-right: 1px solid currentColor; }
.ti-n { font-size: clamp(20px, 1.95cqw, 28px); line-height: 1; letter-spacing: -.035em; }
.ti-b { align-self: start; padding: 4px 6px 3px; border-radius: 2px; background: #262626; color: #E5E5E5; font: 700 12px/1 var(--sans); letter-spacing: -.02em; white-space: nowrap; }
.m-feuilles .ti-ph { grid-column: 1 / -1; display: block; width: 100%; }
.ti-ph img { width: 100%; height: auto; display: block; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.m-feuilles .ti-ph:hover img { filter: brightness(1.04); }
.ti-t .ti-x { top: 52px; right: 26px; z-index: 2; }
.m-feuilles:not(.calme) .ti-devant .ti-t .ti-ph { opacity: 0; translate: 0 24px; transition: opacity .8s cubic-bezier(.16, 1, .3, 1), translate .9s cubic-bezier(.16, 1, .3, 1); }
.m-feuilles:not(.calme) .ti-devant .ti-t.vu .ti-ph { opacity: 1; translate: 0 0; }
.ti-f-p { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; padding: 30px 18px 24px; }
.ti-f-p p { margin: 0; font-size: clamp(20px, 1.95cqw, 28px); line-height: 1.02; letter-spacing: -.035em; }
.ti-f-p p span { font-size: 13px; letter-spacing: -.02em; }
.m-feuilles .ti-lien { text-decoration: underline; text-underline-offset: 3px; }
.p-orange::after { content: ''; position: absolute; top: 0; bottom: 0; right: 9px; width: 14px; background: radial-gradient(circle, var(--fond) 4.5px, transparent 5px) 0 8px / 14px 22px repeat-y; pointer-events: none; }
.p-orange :is(.ti-f-h, .ti-f-t, .ti-f-l, .ti-f-p) { margin-right: 32px; }
.ti-pince { position: absolute; left: -12px; top: 150px; width: 26px; height: 34px; background: linear-gradient(90deg, #111, #2a2a2a 60%, #111); border-radius: 3px 0 0 3px; box-shadow: 2px 3px 6px rgba(0, 0, 0, .4); }
.ti-pince::before { content: ''; position: absolute; left: -16px; top: 6px; width: 20px; height: 22px; border: 2px solid #9a9a9a; border-right: 0; border-radius: 10px 0 0 10px; }

/* le haut : les initiales rayées, les noms des feuilles, Menu ; les miniatures à gauche */
.ti-tete { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 20px; padding: 16px 20px; pointer-events: none; }
.ti-tete > * { pointer-events: auto; }
.m-feuilles .ti-logo { font: 700 46px/.8 var(--sans); letter-spacing: .01em; color: transparent; background: repeating-linear-gradient(180deg, var(--texte) 0 3px, transparent 3px 5.4px); -webkit-background-clip: text; background-clip: text; }
.ti-nav { display: flex; gap: 14px; margin-left: auto; padding-top: 4px; font: 700 13px/1 var(--sans); letter-spacing: -.022em; }
.ti-nav button { max-width: 12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-underline-offset: 3px; }
.ti-nav button:hover, .ti-nav button.on { text-decoration: underline; }
.m-feuilles .ti-menu-b { padding-top: 4px; margin-left: 40px; font: 700 13px/1 var(--sans); }
.ti-mini { position: absolute; z-index: 4; left: 20px; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 12px; max-height: 70%; overflow-y: auto; scrollbar-width: none; padding: 4px; }
.ti-mini::-webkit-scrollbar { display: none; }
.m-feuilles .ti-m { position: relative; flex: none; width: 42px; height: 56px; overflow: hidden; display: flex; flex-direction: column; gap: 3px; padding: 4px; box-sizing: border-box; background-color: var(--pp); background-image: var(--ti-grain); color: #262626; opacity: .5; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); transition: opacity .25s, translate .3s cubic-bezier(.16, 1, .3, 1); }
.ti-m b { font: 700 5px/1 var(--sans); letter-spacing: 0; white-space: nowrap; overflow: hidden; }
.ti-m img { width: 100%; height: 16px; object-fit: cover; filter: grayscale(1); mix-blend-mode: multiply; }
.ti-m i { height: 2px; background: currentColor; opacity: .5; }
.ti-m i:nth-of-type(2) { width: 70%; } .ti-m i:nth-of-type(3) { width: 45%; }
.m-feuilles .ti-m:hover, .m-feuilles .ti-m.on { opacity: 1; translate: 4px 0; }
.ti-menu { position: absolute; inset: 0; z-index: 7; background: color-mix(in srgb, var(--fond) 96%, transparent); display: flex; flex-direction: column; justify-content: center; padding: 70px 16px 40px; }
.m-feuilles .ti-menu-x { position: absolute; top: 18px; right: 20px; font: 700 13px/1 var(--sans); color: var(--texte); }
.ti-menu-l { display: flex; flex-direction: column; gap: 8px; max-height: 100%; overflow-y: auto; }
.m-feuilles .ti-menu-l button { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; background-color: var(--pp); background-image: var(--ti-grain); color: #262626; font: 700 26px/1 var(--sans); letter-spacing: -.035em; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.ti-menu-l small { font-size: 13px; }

/* l'arrivée : le petit signe en pixels */
.ti-debut { position: absolute; inset: 0; z-index: 10; background: var(--fond); cursor: pointer; }
.ti-signe { position: absolute; left: 22px; bottom: 22px; width: 18px; height: 18px; }
.ti-signe.pts { background: radial-gradient(circle, var(--texte) 2.4px, transparent 2.6px) 0 0 / 9px 9px; }
.ti-signe.croix { background: linear-gradient(45deg, transparent 43%, var(--texte) 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, var(--texte) 43% 57%, transparent 57%); }
.ti-signe.raies { background: repeating-linear-gradient(180deg, var(--texte) 0 3px, transparent 3px 5px); }
.m-feuilles.en-debut :is(.ti-tete, .ti-mini) { visibility: hidden; }

/* sur téléphone (et dans l'aperçu téléphone) */
@container (max-width: 620px) {
  .ti-mini, .ti-nav { display: none; }
  .m-feuilles .ti-menu-b { margin-left: auto; }
  .m-feuilles .ti-logo { font-size: 34px; }
  .ti-f-h { grid-template-columns: auto auto 1fr; }
  .ti-f-h > :last-child { display: none; }
  .ti-f-h > :nth-child(3) { border-right: 0; }
  .ti-f-t { grid-template-columns: 1fr; }
  .ti-f-g { border-right: 0; border-bottom: 1px solid currentColor; gap: 16px; }
  .ti-f-l { grid-template-columns: 1fr; }
  .ti-t:nth-child(odd) { border-right: 0; }
  .p-orange :is(.ti-f-h, .ti-f-t, .ti-f-l, .ti-f-p) { margin-right: 26px; }
  .ti-pince { display: none; }
}

/* la visionneuse : une feuille posée sur la pile */
.lb.peau-feuilles { --tif: min(980px, 92%); --til-p: #E2DCCD; --til-t: #262626; --til-f: #0E0E0E;
  background: var(--til-f); color: var(--til-t); font-family: var(--til-s); padding-top: 62px; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.ti-lb-papier { position: absolute; z-index: -1; top: 18px; bottom: 0; left: 50%; translate: -50% 0; width: var(--tif); background-color: var(--til-p); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23g)' opacity='.32'/></svg>"); }
.lb.peau-feuilles :is(.lb-top, .lb-view, .ti-lb-bas, .lb-bot) { margin-left: calc((100% - var(--tif)) / 2 + 18px); margin-right: calc((100% - var(--tif)) / 2 + 18px); }
.ti-lb-h { position: absolute; z-index: 3; top: 18px; left: calc((100% - var(--tif)) / 2); width: var(--tif); height: 44px; box-sizing: border-box; display: grid; grid-template-columns: auto auto 1fr auto; align-items: stretch; border-bottom: 1px solid var(--til-t); color: var(--til-t); font: 700 13px/1.2 var(--til-s); letter-spacing: -.022em; }
.ti-lb-h > * { display: flex; align-items: center; padding: 0 18px; border-right: 1px solid var(--til-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ti-lb-h > :last-child { border-right: 0; }
.ti-lb-x { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lb.peau-feuilles :is(.lb-top, .lb-bot) { color: var(--til-t); font: 700 13px/1.2 var(--til-s); letter-spacing: -.022em; }
.lb.peau-feuilles :is(.lb-top, .lb-bot) button { background: transparent; color: var(--til-t); border: 0; border-radius: 0; font: inherit; text-underline-offset: 3px; }
.lb.peau-feuilles :is(.lb-top, .lb-bot) button:hover { background: transparent; text-decoration: underline; }
.lb.peau-feuilles :is(.lb-top, .lb-bot) :is(button[aria-pressed=true], button.on) { background: #262626; color: #E5E5E5; border-radius: 2px; }
.lb.peau-feuilles .lb-zoom { background: transparent; }
.lb.peau-feuilles :is(.lb-name, .lb-pct, .lb-info .lb-name) { font: inherit; color: var(--til-t); }
.lb.peau-feuilles .lb-exif { color: color-mix(in srgb, var(--til-t) 60%, transparent); }
.lb.peau-feuilles .lb-k { color: var(--til-t); border-color: color-mix(in srgb, var(--til-t) 35%, transparent); opacity: .6; }
.lb.peau-feuilles .lb-x[data-x] { display: none; }
.lb.peau-feuilles .lb-x.lb-plein { border-radius: 2px !important; }
.lb.peau-feuilles .lb-fant { display: none; }
.lb.peau-feuilles .lb-nav { width: 34px; height: 34px; border: 0; border-radius: 2px; background: #262626; color: #E5E5E5; -webkit-backdrop-filter: none; backdrop-filter: none; opacity: .85; }
.lb.peau-feuilles .lb-nav:hover { background: #262626; opacity: 1; }
.lb.peau-feuilles .lb-bot { border-top: 0; }
.lb.peau-feuilles .lb-bot .lb-tiroir { background: transparent; color: var(--til-t); border: 0; }
.lb.peau-feuilles .lb-bot :is(.lba, .lbd) { background: transparent; border: 1px solid var(--til-t); color: var(--til-t); border-radius: 2px; }
.lb.peau-feuilles .lb-bot :is(.lba, .lbd).on { background: #262626; border-color: #262626; color: #E5E5E5; opacity: 1; }
.ti-lb-bas { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 14px 0 18px; border-top: 1px solid var(--til-t); color: var(--til-t); font: 700 13px/1.2 var(--til-s); letter-spacing: -.022em; }
.ti-lb-n { font-size: 28px; line-height: 1; letter-spacing: -.035em; }
.ti-lb-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ti-lb-t b { font-size: 28px; line-height: 1; letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-lb-b { background: #262626; color: #E5E5E5; padding: 4px 6px 3px; border-radius: 2px; font-size: 12px; }
.lb.lb-blanc.peau-feuilles { --til-p: #FFFFFF; --til-t: #262626; --til-f: #CFCCC4; }
.lb.lb-noir.peau-feuilles { --til-p: #171717; --til-t: #E5E5E5; --til-f: #000000; }
.lb-dans.peau-feuilles .lb-exif { display: none; }
@media (max-width: 1200px) { .lb.peau-feuilles .lb-exif { display: none; } }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .lb.peau-feuilles { --tif: 100%; padding-top: 48px; }
  .ti-lb-papier, .ti-lb-h { top: 0; }
  .ti-lb-h { grid-template-columns: auto 1fr auto; }
  .ti-lb-h > :nth-child(2) { display: none; }
  .ti-lb-n, .ti-lb-t b { font-size: 22px; }
}
/* l'aperçu téléphone de la Mise en page (.device.mobile) : les mêmes règles qu'un vrai téléphone (15/11) */
.device.mobile .lb.peau-feuilles { --tif: 100%; padding-top: 48px; }
.device.mobile .ti-lb-papier, .device.mobile .ti-lb-h { top: 0; }
.device.mobile .ti-lb-h { grid-template-columns: auto 1fr auto; }
.device.mobile .ti-lb-h > :nth-child(2) { display: none; }
.device.mobile .ti-lb-n, .device.mobile .ti-lb-t b { font-size: 22px; }

.device.mobile .lb.peau-feuilles { --tif: 100%; padding-top: 48px; }
.device.mobile :is(.ti-lb-papier, .ti-lb-h) { top: 0; }
.device.mobile .ti-lb-h { grid-template-columns: auto 1fr auto; }
.device.mobile .ti-lb-h > :nth-child(2) { display: none; }
.device.mobile :is(.ti-lb-n, .ti-lb-t b) { font-size: 22px; }
