/* E-books: bookshop, library, author's space (ebooks.html) and the book sheet on produit.html. */
.eb-ico{display:inline-block;vertical-align:-3px;flex-shrink:0}
.eb-nav{display:flex;gap:6px;flex-wrap:wrap;margin:22px 0 4px;padding:5px;background:#fff;border:1px solid var(--line);border-radius:12px;width:fit-content;max-width:100%}
.eb-nav a{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:8px;font-family:var(--font-display);font-weight:600;font-size:.9rem;color:var(--muted);min-height:42px}
.eb-nav a:hover{background:#f1f5f1;color:var(--ink)}
.eb-nav a[aria-current]{background:var(--green);color:#fff}

/* Covers: a book, not a card photo. Slight spine shade and a soft shadow. */
.eb-cover{position:relative;display:block;aspect-ratio:2/3;border-radius:4px 7px 7px 4px;overflow:hidden;background:#e7ece8;box-shadow:0 1px 2px rgb(16 40 32/.12),0 10px 22px -10px rgb(16 40 32/.38)}
.eb-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgb(0 0 0/.16) 0,rgb(255 255 255/.12) 3%,rgb(0 0 0/0) 7%);pointer-events:none}
.eb-cover img{width:100%;height:100%;object-fit:cover;display:block}
.eb-cover.is-type{container-type:inline-size;display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(160deg,var(--c1),color-mix(in srgb,var(--c1) 70%,#000));color:var(--c2)}
.eb-cover.is-type b{margin:24cqw 11cqw 0;font-family:var(--font-display);font-weight:800;font-size:11.5cqw;line-height:1.08;letter-spacing:-.03em;overflow-wrap:break-word;hyphens:auto;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}
.eb-cover.is-type small{margin:0 11cqw 12cqw;font-size:6.5cqw;font-weight:600;opacity:.85;border-top:max(1px,1.2cqw) solid currentColor;padding-top:4cqw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eb-cover.is-small{width:64px;flex-shrink:0}
.eb-cover.is-big{width:min(240px,100%)}

/* Hero */
.eb-hero{display:grid;grid-template-columns:1.25fr 1fr;gap:48px;align-items:center;padding:34px 0 30px}
.eb-hero h1{font-size:clamp(2.4rem,4.6vw,4.2rem)}
.eb-search{display:flex;align-items:center;gap:8px;margin-top:26px;background:#fff;border:1px solid #bac7be;border-radius:12px;padding:6px 6px 6px 14px;max-width:560px;color:var(--muted)}
.eb-search:focus-within{border-color:var(--green);box-shadow:0 0 0 3px rgb(11 73 58/.12)}
.eb-search input{border:0;min-height:44px;padding:0 4px;background:transparent}
.eb-search input:focus-visible{outline:0}
.eb-search .button{min-height:44px;flex-shrink:0}
.eb-proofs{list-style:none;padding:0;margin:20px 0 0;display:flex;flex-wrap:wrap;gap:8px 20px;font-size:.88rem;color:var(--muted)}
.eb-proofs li{display:inline-flex;align-items:center;gap:7px}.eb-proofs .eb-ico{color:var(--green)}
.eb-fan{position:relative;height:330px;max-width:420px;width:100%;justify-self:center}
.eb-fan .eb-cover{position:absolute;width:44%;top:12%}
.eb-fan .f0{left:2%;transform:rotate(-9deg);z-index:1}
.eb-fan .f1{left:28%;top:2%;width:48%;z-index:3}
.eb-fan .f2{left:54%;transform:rotate(8deg);z-index:2}
.eb-fan::before{content:"";position:absolute;inset:18% 0 0;border-radius:50%;background:radial-gradient(closest-side,var(--lime),transparent);opacity:.75}

/* Filters */
.eb-chips{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:thin}
.eb-chips button{flex-shrink:0;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-family:var(--font-display);font-weight:600;font-size:.86rem;min-height:40px;white-space:nowrap}
.eb-chips button small{color:var(--muted);font-weight:500;margin-left:3px}
.eb-chips button:hover{border-color:#b9c8bd}
.eb-chips button[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:#fff}.eb-chips button[aria-pressed="true"] small{color:#cfe2d9}
.eb-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:10px 0 20px;flex-wrap:wrap}
.eb-toolbar p{font-weight:700;font-size:.92rem}
.eb-toolbar>div{display:flex;gap:10px;flex-wrap:wrap}
.eb-toolbar select{width:auto;min-height:42px;font-size:.86rem}
#eb-results[aria-busy="true"]{opacity:.55;transition:opacity .2s}

/* Shelves and grid */
.eb-shelf{margin-bottom:38px}
.eb-shelf-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin-bottom:14px}
.eb-shelf-head h2{font-size:1.45rem}
.eb-row{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(150px,176px);gap:22px;overflow-x:auto;padding:4px 2px 14px;scroll-snap-type:x proximity}
.eb-row>*{scroll-snap-align:start}
.eb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:30px 22px}
.eb-card{position:relative;display:flex;flex-direction:column;gap:12px;min-width:0}
.eb-card .eb-cover{transition:transform .18s ease,box-shadow .18s ease}
.eb-card:hover .eb-cover{transform:translateY(-4px);box-shadow:0 1px 2px rgb(16 40 32/.12),0 18px 30px -12px rgb(16 40 32/.45)}
.eb-card:focus-visible{outline:3px solid #ac5b13;outline-offset:6px;border-radius:6px}
.eb-badge{position:absolute;top:8px;left:8px;background:#fff;color:var(--green);border-radius:6px;padding:3px 8px;font-size:.72rem;font-weight:800;font-family:var(--font-display);box-shadow:0 2px 6px rgb(0 0 0/.15)}
.eb-badge.is-free{background:var(--lime)}.eb-badge.is-deal{background:#c2410c;color:#fff}
.eb-card-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.eb-card-body strong{font-family:var(--font-display);font-size:.98rem;line-height:1.25;letter-spacing:-.01em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.eb-by{color:var(--muted);font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eb-stars{font-size:.8rem;font-weight:700;color:#8a5a00}.eb-stars small{color:var(--muted);font-weight:500}
.eb-meta{font-size:.76rem;color:var(--muted)}
.eb-price{display:flex;gap:8px;align-items:baseline;margin-top:4px;font-family:var(--font-display);font-variant-numeric:tabular-nums}
.eb-price b{font-size:1.05rem}.eb-price s{color:var(--muted);font-size:.82rem}.eb-price .is-free{color:var(--green)}
.eb-cta{display:grid;grid-template-columns:1.6fr auto;gap:28px;align-items:center;background:var(--green);color:#fff;border-radius:16px;padding:34px 38px;margin:20px 0 60px}
.eb-cta .eyebrow{color:var(--lime)}.eb-cta p:not(.eyebrow){color:#d4e6de;margin-top:10px;max-width:640px}

/* Library and author's space */
.eb-head{padding:26px 0 24px}.eb-head h1{font-size:clamp(2.1rem,4vw,3.4rem)}
.eb-head.is-row{display:flex;justify-content:space-between;align-items:end;gap:24px;flex-wrap:wrap}
.eb-shelfwall{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px;margin-bottom:60px}
.eb-owned{display:flex;gap:18px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}
.eb-owned .eb-cover{width:96px;flex-shrink:0}
.eb-owned>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.eb-owned strong{font-family:var(--font-display);font-size:1.08rem;line-height:1.25}
.eb-owned .page-actions{margin-top:auto;padding-top:10px;gap:8px}
.eb-owned .button{min-height:40px;padding:8px 14px}
.eb-kyc{display:flex;gap:12px;align-items:start;margin-bottom:20px}.eb-kyc .eb-ico{color:#8a5a00;margin-top:3px}
.eb-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:0 0 26px}
.eb-kpis div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.eb-kpis dt{display:flex;align-items:center;gap:7px;font-size:.8rem;color:var(--muted)}.eb-kpis dt .eb-ico{color:var(--green)}
.eb-kpis dd{margin:6px 0 0;font-family:var(--font-display);font-size:1.55rem;font-weight:750;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.eb-kpis dd small{font-size:.9rem;color:var(--muted);font-weight:500}
.eb-author-grid{display:grid;grid-template-columns:1fr 330px;gap:24px;align-items:start;margin-bottom:60px}
.eb-mylist{display:flex;flex-direction:column;gap:12px}
.eb-mine{display:flex;gap:16px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.eb-mine-main{flex:1;min-width:0}
.eb-mine-top{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.eb-mine-top strong{font-family:var(--font-display);font-size:1.02rem}
.eb-status{font-size:.72rem;font-weight:700;padding:3px 9px;border-radius:999px;background:#eef1ee;color:var(--muted)}
.eb-status.is-live{background:#dff3e5;color:#11643f}.eb-status.is-pending{background:#fff3d6;color:#8a5a00}.eb-status.is-rejected{background:#fde4df;color:#a12d16}
.eb-mine-stats{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-wrap:wrap;gap:4px 16px;font-size:.8rem;color:var(--muted)}
.eb-mine-stats b{color:var(--ink);font-variant-numeric:tabular-nums}
.eb-warn{font-size:.8rem;color:#a12d16;font-weight:600;margin-top:4px}
.eb-mine-act{display:flex;flex-direction:column;align-items:end;gap:6px}
.eb-mine-act .button{min-height:40px;padding:8px 14px}
.eb-tips h2{font-size:1.2rem;margin-bottom:12px}.eb-tips ol{margin:0;padding-left:20px;display:grid;gap:10px;font-size:.88rem;color:var(--muted)}.eb-tips b{color:var(--ink)}
.eb-empty-author .eb-cover{width:120px;margin:0 auto 18px}

/* Publishing steps */
.eb-wizard{max-width:920px;margin:10px auto 60px}
.eb-wiz-head{display:flex;flex-direction:column;gap:4px;margin:14px 0 18px}.eb-wiz-head h1{font-size:clamp(1.8rem,3.4vw,2.6rem)}.eb-wiz-head .reset{align-self:start;min-height:auto;padding:4px 0}
.eb-steps{list-style:none;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;padding:0;margin:0 0 16px;counter-reset:s}
.eb-steps button{width:100%;display:flex;align-items:center;gap:8px;border:0;background:none;padding:8px 4px;font-family:var(--font-display);font-weight:600;font-size:.84rem;color:var(--muted);border-top:3px solid var(--line);text-align:left;min-height:44px}
.eb-steps button span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#eef1ee;font-size:.75rem;flex-shrink:0}
.eb-steps .is-done button{border-color:#7fb79a;color:var(--ink)}.eb-steps .is-done span{background:#dff3e5;color:#11643f}
.eb-steps [aria-current] button{border-color:var(--green);color:var(--green)}.eb-steps [aria-current] span{background:var(--green);color:#fff}
.eb-steps button:disabled{opacity:.6}
.eb-wiz-body{padding:26px}
.eb-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px 20px}
.eb-fields label{display:block;font-weight:700;font-size:.86rem;margin-bottom:6px}
.eb-fields textarea{width:100%;border:1px solid #bac7be;border-radius:6px;padding:10px 12px;font:inherit;font-size:.92rem;resize:vertical}
.eb-span{grid-column:1/-1}
.eb-suggest{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.eb-suggest button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 11px;font-size:.8rem;font-weight:600;min-height:34px}
.eb-suggest button:hover{border-color:var(--green);color:var(--green)}
.eb-aff{border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:0}.eb-aff legend{padding:0 4px}.eb-aff [id="w-aff-f"]{max-width:260px}
.eb-wiz-foot{display:flex;justify-content:space-between;gap:12px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}
.eb-coverstep,.eb-review{display:grid;grid-template-columns:auto 1fr;gap:34px;align-items:start}
.eb-coverstep h3,.eb-review h3{margin-bottom:10px}
.eb-mock{display:flex;flex-direction:column;align-items:center;gap:12px;padding:22px 30px;background:linear-gradient(180deg,#f1f5f1,#e6ede7);border-radius:14px}
.eb-file{position:relative;cursor:pointer}
.eb-drop{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;border:2px dashed #b9c8bd;border-radius:14px;padding:30px 20px;background:#fbfcfb}
.eb-drop>span{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#e5f1ea;color:var(--green)}
.eb-drop.is-off{opacity:.6}
.eb-drop progress{width:min(320px,100%)}
.eb-files{list-style:none;padding:0;margin:16px 0;display:grid;gap:8px}
.eb-files li{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.eb-files li>span:nth-child(2){flex:1;min-width:0;display:flex;flex-direction:column}.eb-files small{color:var(--muted);font-size:.78rem}
.eb-fkind{font-family:var(--font-display);font-weight:800;font-size:.72rem;background:var(--green);color:var(--lime);border-radius:5px;padding:4px 7px}
.eb-x{display:grid;place-items:center;width:40px;height:40px;border:0;background:transparent;border-radius:8px;color:var(--muted)}.eb-x:hover{background:#f1f5f1;color:var(--ink)}
.eb-checks{list-style:none;padding:0;margin:0 0 16px;display:grid;gap:8px;font-size:.92rem}
.eb-checks li{display:flex;align-items:center;gap:9px}
.eb-checks .is-ok .eb-ico{color:#11643f}.eb-checks .is-missing{color:#a12d16;font-weight:600}.eb-checks .is-opt{color:var(--muted)}
.eb-done{display:grid;grid-template-columns:auto 1fr;gap:34px;align-items:center;margin:30px 0 60px;padding:34px}

/* Book sheet on produit.html */
.eb-about{margin-top:24px}
.eb-about-head{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:16px}
.eb-about-head .eyebrow{display:flex;align-items:center;gap:6px;margin-bottom:6px}
.eb-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:0 0 16px}
.eb-facts div{background:#fff;padding:12px 14px}.eb-facts dt{font-size:.75rem;color:var(--muted)}.eb-facts dd{margin:2px 0 0;font-weight:700;font-size:.92rem}
.eb-toc{border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin-bottom:14px;background:#fff}
.eb-toc summary{font-family:var(--font-display);font-weight:700;cursor:pointer;min-height:32px;display:flex;align-items:center}
.eb-toc ol{margin:10px 0 4px;padding-left:22px;columns:2;column-gap:32px;font-size:.9rem}.eb-toc li{break-inside:avoid;margin-bottom:5px}

/* Excerpt reader */
.eb-reader{width:min(900px,calc(100% - 20px));max-width:none;height:min(92vh,1000px);padding:0;display:none;flex-direction:column;overflow:hidden}
.eb-reader[open]{display:flex}
.eb-reader-head{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line)}
.eb-reader-head h2{font-size:1.25rem;margin:0}.eb-reader-head .eyebrow{margin-bottom:4px;font-size:.8rem}
.eb-reader-body{flex:1;overflow:auto;padding:12px;background:#eef1ee}
.eb-reader-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 18px;border-top:1px solid var(--line);font-family:var(--font-display)}
.eb-reader-foot .button{width:auto}
.eb-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 18px;border-radius:10px;font-size:.9rem;z-index:50;box-shadow:0 10px 30px rgb(0 0 0/.25)}

@media(max-width:980px){.eb-kpis{grid-template-columns:repeat(3,1fr)}.eb-author-grid{grid-template-columns:1fr}}
@media(max-width:780px){
 .eb-hero{grid-template-columns:1fr;gap:10px;padding-top:20px}.eb-fan{height:220px;max-width:300px}
 .eb-cta{grid-template-columns:1fr;padding:26px}
 .eb-fields{grid-template-columns:1fr}
 .eb-steps{grid-template-columns:repeat(5,minmax(0,1fr))}.eb-steps button{font-size:0;gap:0;justify-content:center}.eb-steps button span{font-size:.75rem}
 .eb-coverstep,.eb-review,.eb-done{grid-template-columns:1fr}.eb-mock{align-self:stretch}
 .eb-mine{flex-wrap:wrap}.eb-mine-act{flex-direction:row;align-items:center;width:100%;justify-content:space-between}
 .eb-toc ol{columns:1}
}
@media(max-width:500px){
 .eb-kpis{grid-template-columns:1fr 1fr}.eb-kpis div:last-child{grid-column:1/-1}
 .eb-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}
 .eb-row{grid-auto-columns:42%}
 .eb-search{flex-wrap:wrap;padding:8px}.eb-search input{flex:1;min-width:0}.eb-search .button{width:100%}
 .eb-shelfwall{grid-template-columns:1fr}
 .eb-toolbar>div{width:100%}.eb-toolbar select{flex:1}
 .eb-wiz-body{padding:18px}
}
@media(prefers-reduced-motion:reduce){.eb-card .eb-cover{transition:none}.eb-card:hover .eb-cover{transform:none}}
