/* Ebooks Upratic : lecteur flipbook (ebook.js) et mise en page des pages (ebooks_build.py). Pages dessinées à 794 × 1123. */
.eb-page { padding-top: 78px; background: radial-gradient(120% 90% at 50% 0%, #123b8f 0%, var(--navy-800) 50%, var(--navy-900) 100%); }
.eb { display: flex; flex-direction: column; height: calc(100vh - 78px); min-height: 560px; color: #dbe5f7; }
.eb:fullscreen { height: 100vh; background: var(--navy-900); }
.eb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px 8px; }
.eb-title p { margin: 0; font: 700 .7rem/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.eb-title h1 { margin: 2px 0 0; font: 800 1.15rem/1.2 var(--head); color: #fff; }
.eb-tools { display: flex; gap: 8px; }
.eb-btn { border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: #fff; font: 700 .8rem/1 var(--head); padding: 9px 14px; border-radius: 10px; cursor: pointer; }
.eb-btn:hover, .eb-btn[aria-pressed="true"] { background: rgba(255, 255, 255, .16); }
.eb-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.eb.is-zoom .eb-stage { overflow: auto; place-items: start center; }
.eb-book { position: relative; perspective: 2600px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.eb-scale { position: absolute; left: 0; top: 0; transform-origin: top left; display: flex; transform-style: preserve-3d; }
.eb-slot { position: relative; width: 794px; height: 1123px; background: #fff; overflow: hidden; }
.eb-slot.is-empty { background: transparent; }
.eb-left:not(.is-empty) { box-shadow: inset -24px 0 30px -24px rgba(0, 0, 0, .35); }
.eb-right:not(.is-empty) { box-shadow: inset 24px 0 30px -24px rgba(0, 0, 0, .35); }
.eb.is-single .eb-right { display: none; }
.eb.is-single .eb-left { box-shadow: none; }
.eb-leaf { position: absolute; top: 0; width: 794px; height: 1123px; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45, .05, .25, 1); z-index: 3; }
.eb-leaf.to-left { left: 794px; transform-origin: left center; }
.eb-leaf.to-right { left: 0; transform-origin: right center; }
.eb-leaf.to-left.is-turned { transform: rotateY(-180deg); }
.eb-leaf.to-right.is-turned { transform: rotateY(180deg); }
.eb-face { position: absolute; inset: 0; background: #fff; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.eb-face.is-back { transform: rotateY(180deg); }
.eb-face.is-empty { background: transparent; }
.eb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 48px; height: 72px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font: 400 2.4rem/1 serif; cursor: pointer; }
.eb-nav:hover { background: rgba(255, 255, 255, .2); }
.eb-prev { left: 14px; } .eb-next { right: 14px; }
.eb-foot { display: flex; align-items: center; gap: 14px; padding: 8px 24px 14px; }
.eb-foot input { flex: 1; accent-color: var(--orange); }
.eb-foot span { flex: none; font: 700 .82rem/1 var(--head); font-variant-numeric: tabular-nums; min-width: 120px; text-align: right; }
.eb-pages { display: none; }
.eb-tocbox { position: absolute; z-index: 20; right: 24px; top: 140px; width: min(380px, calc(100% - 32px)); max-height: calc(100vh - 220px); overflow: auto; padding: 18px 20px; border-radius: 16px; background: #fff; color: var(--navy); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.eb { position: relative; }
.eb-tochead { margin: 0 0 8px; font: 800 .8rem/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--orange-600); }
@media (max-width: 760px) {
  .eb-bar { padding: 10px 12px 6px; } .eb-title h1 { font-size: .95rem; } .eb-btn { padding: 8px 10px; font-size: .74rem; }
  .eb-tools [data-eb-full] { display: none; }
  .eb-nav { width: 34px; height: 54px; font-size: 1.8rem; } .eb-prev { left: 4px; } .eb-next { right: 4px; }
  .eb-foot { padding: 6px 12px 10px; } .eb-foot span { min-width: 90px; }
}
@media (prefers-reduced-motion: reduce) { .eb-leaf { transition: none; } }

/* ---------- pages du livre ---------- */
.pg { position: relative; width: 794px; height: 1123px; box-sizing: border-box; padding: 64px 64px 72px; background: #fff; color: #1c2740; font: 400 15px/1.55 var(--body, Inter, sans-serif); overflow: hidden; }
.pg h2 { margin: 0 0 14px; font: 800 26px/1.15 var(--head); color: var(--navy); }
.pg h3 { margin: 18px 0 6px; font: 800 13px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-600); }
.pg p { margin: 0 0 10px; }
.pg ul, .pg ol { margin: 0 0 6px; padding-left: 20px; }
.pg li { margin: 2px 0; }
.pg li::marker { color: var(--orange-600); font-weight: 700; }
.pg a { color: #0f5fb5; }
.kick { margin: 0 0 6px !important; font: 800 11px/1.2 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--orange-600); }
.pg-foot { position: absolute; left: 64px; right: 64px; bottom: 30px; display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid #e3e8f2; font: 600 11px/1 var(--head); color: #8a93a6; }
.pg-foot b { color: var(--navy); }
/* couverture */
.pg-cover { padding: 0; background: var(--navy-900); color: #fff; }
.cv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.cv-band { position: absolute; left: 0; right: 0; bottom: 170px; padding: 34px 56px; background: linear-gradient(90deg, rgba(6, 26, 71, .94), rgba(6, 26, 71, .78)); border-left: 10px solid var(--orange); }
.cv-coll { margin: 0 0 8px !important; font: 800 13px/1.2 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.pg-cover h1 { margin: 0; font: 800 54px/1.05 var(--head); color: #fff; }
.cv-sub { margin: 10px 0 0 !important; font: 600 20px/1.3 var(--head); color: #d6e0f3; }
.cv-brand { position: absolute; left: 56px; bottom: 56px; display: grid; gap: 4px; }
.cv-brand b { font: 800 30px/1 var(--head); letter-spacing: .14em; color: #fff; }
.cv-brand span { font: 600 13px/1 var(--head); color: var(--orange); }
/* verso, texte, sommaire */
.pg-legal { display: flex; align-items: flex-end; }
.lg-in { font-size: 12.5px; color: #5a6478; }
.pg-toc .toc { list-style: none; padding: 0; margin: 10px 0 0; }
.toc li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dotted #cdd5e3; }
.toc li a { color: var(--navy); text-decoration: none; }
.toc li.t-ch { margin-top: 10px; font-weight: 800; font-family: var(--head); }
.toc li.t-it { padding-left: 18px; font-size: 14px; }
.toc li span { color: #8a93a6; font-variant-numeric: tabular-nums; }
.eb-tocbox .toc { list-style: none; padding: 0; margin: 0 0 12px; }
.eb-tocbox .toc li { font-size: .9rem; }
.pg-answers .ans { font-size: 11.5px; line-height: 1.4; padding-left: 22px; column-count: 2; column-gap: 28px; }
.pg-answers .ans li { margin-bottom: 7px; break-inside: avoid; }
.pg-answers .ans span { color: #8a93a6; font-size: 12px; }
.pg-answers .ans em { color: #11633a; font-style: normal; font-weight: 600; }
.go li { margin: 8px 0; font-size: 16px; }
/* ouverture de chapitre */
.pg-zone { padding: 0; }
.zn-img { display: block; width: 100%; height: 520px; object-fit: cover; }
.zn-txt { padding: 40px 64px 0; }
.zn-txt h2 { font-size: 40px; }
.zn-txt p { font-size: 17px; line-height: 1.6; }
/* page d'équipement */
.pg-item { padding-top: 40px; }
.it-head h2 { margin-bottom: 10px; font-size: 21px; }
.it-fig { position: relative; margin: 0 -64px 12px; height: 318px; }
.it-fig img { display: block; width: 100%; height: 100%; object-fit: cover; }
.it-fig .it-det { position: absolute; right: 40px; bottom: -24px; width: 200px; height: 134px; border: 5px solid #fff; border-radius: 10px; box-shadow: 0 14px 30px -12px rgba(6, 26, 71, .55); }
.it-role { padding-right: 228px; font: 600 15.5px/1.5 var(--head); color: var(--navy); min-height: 46px; }
.it-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; font-size: 12.5px; line-height: 1.4; }
.it-cols h3 { margin-top: 8px; }
.it-parts { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; padding: 0 !important; }
.it-parts li { margin: 0; padding: 3px 9px; border-radius: 999px; background: #eef3fb; color: var(--navy); font-size: 12.5px; font-weight: 600; }
.it-err li::marker { color: #c0392b; }
.it-job { margin-top: 12px !important; font-size: 13px; }
.it-job b { display: block; font: 800 11px/1.3 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-600); }
.it-keep { position: absolute; left: 64px; right: 64px; bottom: 140px; padding: 12px 16px; border-left: 5px solid var(--orange); border-radius: 0 10px 10px 0; background: #fff6ec; }
.it-keep b { font: 800 12px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-600); }
.it-keep p { margin: 4px 0 0 !important; font: 600 14.5px/1.45 var(--head); color: var(--navy); }
.it-q { position: absolute; left: 64px; right: 64px; bottom: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-radius: 10px; background: #f3f6fb; font-size: 13px; }
.it-q p { margin: 0 !important; }
.it-q b { color: #0f5fb5; }
.it-q a { flex: none; font: 800 13px/1 var(--head); color: #fff; background: var(--orange-600); padding: 9px 12px; border-radius: 8px; text-decoration: none; }
/* dos */
.pg-back { display: grid; place-items: center; background: var(--navy-900); color: #fff; text-align: center; }
.bk-in b { font: 800 40px/1 var(--head); letter-spacing: .16em; }
.bk-in p { margin: 14px 0 0 !important; font: 700 20px/1.3 var(--head); color: var(--orange); }
.bk-in .bk-s { font: 600 15px/1.3 var(--head); color: #cfdaf2; }
.pg-blank { background: #fff; }
.pg-answers h2 { margin-bottom: 10px; }
/* description de l'équipement, juste sous l'image (à la place de l'ancien « À retenir » en bas de page) */
.it-desc { margin: 30px 0 4px; padding: 12px 16px; border-left: 5px solid var(--orange); border-radius: 0 10px 10px 0; background: #fff6ec; }
.it-desc b { font: 800 12px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-600); }
.it-desc p { margin: 4px 0 0 !important; font: 500 14px/1.45 var(--head); color: var(--navy); }
.it-rule { font-weight: 700; color: var(--navy); }
/* page d'équipement en colonne : la question reste en bas ; « Le saviez-vous ? » va dans la colonne la plus courte (ebook.js) */
.pg-item { display: flex; flex-direction: column; }
.pg-item .it-q { position: static; margin-top: auto; flex: none; }
.it-know { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #eef5ff; border: 1px dashed #9cc2f0; }
.it-know b { display: block; margin-bottom: 3px; font: 800 11px/1.3 var(--head); letter-spacing: .08em; text-transform: uppercase; color: #0f5fb5; }
.it-know p { margin: 0 !important; font-size: 12.5px; line-height: 1.42; color: #1c2740; }
.eb-probe { position: absolute; left: -10000px; top: 0; visibility: hidden; }
/* la place qui reste sur une page courte se répartit en trois : avant la description, avant les colonnes, avant la question */
.pg-item .it-desc, .pg-item .it-cols { margin-top: auto; }
.pg-item .it-desc { margin-bottom: 0; }
.pg-item .it-cols { padding-top: 8px; }
.pg-item .it-q { margin-top: auto; }
.pg-item .it-fig { margin-bottom: 30px; }
/* page « Pour aller plus loin » : la visite, puis ses TP en liste compacte sur deux colonnes (jusqu'à 30 TP et plus) */
.mo-visit { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 14px 0 6px; padding: 14px 18px; border-radius: 12px; background: var(--navy); color: #fff; text-decoration: none; }
.pg .mo-visit { color: #fff; }
.mo-visit span { font: 800 10.5px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.mo-visit b { font: 800 18px/1.2 var(--head); }
.mo-visit em { margin-left: auto; font: 700 12.5px/1.2 var(--head); font-style: normal; color: #cfdaf2; }
.mo-tps { margin: 4px 0 0; padding-left: 22px !important; column-count: 2; column-gap: 28px; font-size: 12px; line-height: 1.35; }
.mo-tps li { margin: 0 0 7px; break-inside: avoid; }
.mo-tps li::marker { color: var(--orange-600); font-weight: 800; }
.mo-tps a { text-decoration: none; }
.mo-tps b { display: block; font: 700 12.5px/1.3 var(--head); color: var(--navy); }
.mo-tps span { color: #5a6478; }
/* dos de couverture : une vue de la salle fondue sous le bleu */
.pg-back { position: relative; isolation: isolate; }
.bk-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .32; filter: saturate(.7); mix-blend-mode: luminosity;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, #000 45%, #000 70%, rgba(0, 0, 0, .2) 100%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, #000 45%, #000 70%, rgba(0, 0, 0, .2) 100%); }
.pg-back::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 50% at 50% 45%, rgba(6, 26, 71, .2), rgba(6, 26, 71, .85)); }
/* logo Upratic en haut à gauche de la couverture */
.cv-logo { position: absolute; left: 48px; top: 44px; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 14px; background: rgba(6, 26, 71, .82); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); }
.cv-logo img { display: block; width: 68px; height: auto; }
.cv-logo b { font: 800 30px/1 var(--head); color: #fff; letter-spacing: .01em; }
/* gros livres : sommaire sur plusieurs pages, en deux colonnes serrées (ebooks_build.py, classe toc-2) */
.toc-2 .toc { column-count: 2; column-gap: 26px; }
.toc-2 .toc li { break-inside: avoid; padding: 3px 0; font-size: 12.5px; line-height: 1.3; }
.toc-2 .toc li.t-ch { margin-top: 8px; font-size: 12.5px; break-after: avoid; }
.toc-2 .toc li.t-it { padding-left: 12px; font-size: 12px; }
