/* Equinoxe Service : page des conditions générales de vente (/cgv/) et sa liseuse PDF */
.cgv-tete { padding-block: clamp(44px, 7vw, 88px) clamp(28px, 4vw, 44px); }
.cgv-tete h1 { margin-top: 14px; font-size: clamp(34px, 5vw, 52px); }
.cgv-date { margin-top: 12px; color: var(--encre-douce); }
.cgv-tete .boutons { margin-top: 26px; }
.cgv-poids { margin-left: 2px; font-weight: 400; opacity: .7; }
.cgv-tete .chapeau + .boutons { margin-top: 30px; }

/* la liseuse */
.liseuse { background: var(--fond-doux); border-top: 1px solid var(--filet); padding-bottom: clamp(40px, 6vw, 72px); }
.lp-barre {
  position: sticky; top: var(--entete); top: calc(var(--entete) + env(safe-area-inset-top, 0px)); z-index: 20;
  background: var(--fond); border-bottom: 1px solid var(--filet);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .lp-barre { background: color-mix(in srgb, var(--fond) 86%, transparent); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); }
}
.lp-barre .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.lp-compteur { font-size: 15px; color: var(--encre-douce); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lp-compteur b { color: var(--encre); }
.lp-outils { display: flex; align-items: center; gap: 4px; }
.lp-btn, .lp-taux {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; border: 0; border-radius: 999px;
  background: transparent; color: var(--encre); cursor: pointer; text-decoration: none; transition: background-color .15s ease;
}
.lp-btn { width: 40px; padding: 0; }
.lp-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-taux { min-width: 70px; padding: 0 10px; font: 700 14px/1 var(--police); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .lp-btn:hover, .lp-taux:hover { background: var(--survol); } }
.lp-btn:active, .lp-taux:active { background: var(--survol); }
.lp-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.lp-sep { width: 1px; height: 22px; margin: 0 6px; background: var(--filet); }

.lp-defile { overflow-x: auto; overscroll-behavior-x: contain; padding: 28px var(--marge) 0; }
.lp-pages { display: flex; flex-direction: column; align-items: center; gap: 20px; width: max-content; min-width: 100%; }
.lp-page {
  --user-unit: 1; --total-scale-factor: calc(var(--scale-factor) * var(--user-unit)); --scale-round-x: 1px; --scale-round-y: 1px;
  position: relative; flex: none; overflow: hidden; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .10);
}
.lp-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lp-lien { position: absolute; z-index: 3; border-radius: 3px; }
@media (hover: hover) { .lp-lien:hover { background: rgba(0, 0, 0, .06); } }
.lp-lien:focus-visible { outline: 2px solid #000; outline-offset: 1px; }
@media (prefers-color-scheme: dark) {
  .lp-page { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .55); }
}

/* chargement, et ce qui s'affiche si le document ne peut pas être dessiné */
.lp-etat { padding: 40px 0 24px; text-align: center; color: var(--encre-douce); }
.lp-chargement { position: relative; width: 132px; height: 2px; margin: 0 auto 18px; background: var(--filet); border-radius: 2px; overflow: hidden; }
.lp-chargement::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--encre); border-radius: 2px; animation: lp-balaye 2.2s ease-in-out infinite; }
.lp-secours { max-width: 34em; margin: 14px auto 0; opacity: 0; animation: lp-montre .4s ease 12s forwards; }
.liseuse.prete .lp-etat, html:not(.js) .lp-etat { display: none; }
.liseuse.erreur .lp-chargement, .liseuse.erreur .lp-attente { display: none; }
.liseuse.erreur .lp-secours { margin-top: 0; opacity: 1; animation: none; color: var(--encre); }
.lp-noscript { padding: 32px 0; text-align: center; }
@keyframes lp-balaye { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes lp-montre { to { opacity: 1; } }

@media (max-width: 560px) {
  .lp-defile { padding: 16px 10px 0; }
  .lp-pages { gap: 12px; }
  .lp-barre .conteneur { padding-inline: 12px 6px; }
  .lp-sep { margin: 0 2px; }
  .lp-taux { min-width: 60px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-chargement::after { animation: none; width: 100%; opacity: .35; }
}
@media print {
  .entete, .pied, .lp-barre, .cgv-tete .boutons, .lp-etat, .evitement { display: none !important; }
  .liseuse { background: none; border: 0; padding: 0; }
  .lp-defile { overflow: visible; padding: 0; }
  .lp-page { box-shadow: none; break-after: page; }
}

/* couche de texte invisible posée sur chaque page : sélection, copie, recherche, lecteurs d'écran (d'après pdf.js) */
.textLayer {
  position: absolute; inset: 0; overflow: clip; opacity: 1; line-height: 1; text-align: initial;
  -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 0;
  color-scheme: only light;
  --min-font-size: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size));
}
.textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer > :not(.markedContent), .textLayer .markedContent span:not(.markedContent) {
  z-index: 1; --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height));
  --scale-x: 1; --rotate: 0deg; transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}
.textLayer .markedContent { display: contents; }
.textLayer span[role="img"] { -webkit-user-select: none; user-select: none; cursor: default; }
.textLayer ::selection { background: rgba(0, 0, 255, .25); background: color-mix(in srgb, AccentColor, transparent 75%); }
.textLayer br::selection { background: transparent; }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; -webkit-user-select: none; user-select: none; }
