.cours-hub {--purple:#211743;--gold:#ddba65;--paper:#fff8e9;--waves:repeating-radial-gradient(ellipse at 50% 100%,transparent 0 10px,#9274d853 11px 13px,transparent 14px 18px);color:var(--purple);background:linear-gradient(140deg,#f8f4ff,#eeeaff);font:15px/1.5 Inter,system-ui,sans-serif}
.cours-hub>main {width:100%;max-width:none;margin:0;padding:0 clamp(.65rem,1.4vw,1.3rem) 1.4rem}
.cours-hub .academy-side {background:var(--waves) 0 100%/76px 42px repeat-x,linear-gradient(150deg,#211743,#392166);padding-bottom:3rem}
.cours-hub .academy-brand {display:grid;justify-items:center;text-align:center;gap:.2rem;padding:.5rem .4rem 1rem;border-bottom:1px solid #bda3d0;font:700 1.28rem/1.12 "Playfair Display",Georgia,serif}
.library-logo {font-size:2.8rem;color:var(--gold);line-height:1}
.cours-hub .academy-nav [aria-current] {background:linear-gradient(115deg,#067f90,#124060);border:1px solid #38d6d1;box-shadow:inset 0 0 9px #57e4f466}
.cours-hub main>.room-banner {min-height:clamp(140px,15vw,227px);margin:0 calc(-1 * clamp(.65rem,1.4vw,1.3rem));border-radius:0;padding:.75rem clamp(.8rem,5vw,6rem);background-image:linear-gradient(90deg,#241044c9,#2b185c15 72%),var(--room-art);background-position:center 58%;box-shadow:none}
.cours-hub .room-banner>div {background:none;padding:0}
.cours-hub .room-banner h1,.cours-hub h2,.cours-hub h3 {font-family:"Playfair Display",Georgia,serif}
.cours-hub .room-banner h1 {font-weight:800;font-size:clamp(2.9rem,7vw,6rem);text-shadow:0 4px 9px #24113d}
.library-banner-icon {font-size:.68em;vertical-align:middle;margin-right:.21em}
.cours-hub .room-banner p {display:inline-block;margin:.25rem 0 0;padding:.22rem .75rem;border:2px solid var(--gold);border-radius:2rem;background:#371670;color:#fff8e9;font:600 clamp(.76rem,1.8vw,1.55rem)/1.4 Lora,Georgia,serif}
.cours-hub .room-lio {width:clamp(74px,16vw,240px);aspect-ratio:1.25;object-fit:cover;border:2px solid var(--gold);border-radius:38% 38% 18% 18%;box-shadow:0 8px 16px #1d102e66}
.library-bar {display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;padding:.55rem;background:#e9e1fa;border:1px solid #fff;border-radius:0 0 1rem 1rem;margin:0 0 .9rem}
.trail {display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;font:600 .9rem Lora,Georgia,serif;margin-right:auto}
.trail a,.library-aside a {color:#4b287e}
#library-search {display:flex;min-width:min(100%,240px);flex:1 1 235px;max-width:470px}
#library-search input {width:100%;min-width:0;border:1px solid #baaeda;border-radius:.6rem 0 0 .6rem;padding:.55rem .65rem;font:inherit}
.cours-hub .library-bar button,.cours-hub .quick-buttons button,.cours-hub .chapter-tile button,.cours-hub dialog button,.cours-hub #library-results button,.cours-hub .last-reading button {background:linear-gradient(#fffcfc,#eee3fa);border:1px solid #c9b6e5;padding:.37rem .65rem;color:var(--purple);border-radius:.7rem;font-weight:600}
#library-search button {border-radius:0 .6rem .6rem 0}
.library-access,.library-lower,.library-aside {display:grid;gap:clamp(.65rem,1.2vw,1rem)}
.library-access {grid-template-columns:1fr 1fr;margin-bottom:1rem}
.library-lower {grid-template-columns:minmax(0,2.1fr) minmax(0,1fr);align-items:start}
.library-aside {min-width:0}
.library-box {min-width:0;border:1px solid #fff;border-radius:1rem;background:#fffcff;padding:clamp(.75rem,1.35vw,1.2rem);box-shadow:0 4px 10px #43257628}
.cours-hub h2 {font-weight:800;line-height:1.13;margin:0 0 .45rem;font-size:clamp(1.2rem,2.2vw,2rem)}
.access-card {display:grid;grid-template-columns:minmax(0,.65fr) minmax(0,1.4fr);gap:clamp(.45rem,1vw,.85rem);align-items:center;overflow:hidden;background:var(--waves) 0 100%/75px 32px repeat-x,linear-gradient(130deg,#fff8e9,#fff9ff)}
.access-card h2 {font-size:clamp(1.45rem,2.7vw,2.8rem)}
.access-card p {font:600 clamp(.9rem,1.3vw,1.1rem)/1.4 Lora,Georgia,serif;margin:.35rem 0 .65rem}
.library-book-art {display:grid;align-content:start;justify-items:center;text-align:center;align-self:center;aspect-ratio:.78;max-height:208px;width:100%;max-width:175px;margin:auto;padding:.72rem .3rem;background:linear-gradient(#382076f5 19%,#29174daa 48%,transparent),url('/accueil-jardin.webp') center/cover;border:3px double #eed17c;border-left:7px solid #aa751d;border-radius:9px;box-shadow:6px 5px 0 #351660,9px 8px 12px #21174355;color:#fff8e9;transform:rotate(-5deg);font:700 clamp(.75rem,1.7vw,1.3rem)/1.14 "Playfair Display",Georgia,serif}
.library-book-art strong {color:#ffdc78;margin-top:.35rem}
.library-scroll-art {position:relative;display:grid;place-items:center;aspect-ratio:.85;max-width:133px;width:85%;margin:auto;background:linear-gradient(125deg,#fff4d8,#ffddaa);color:#a85e26;border:2px solid #bf834f;border-block-width:7px;border-radius:14px;transform:rotate(-8deg);box-shadow:0 6px 13px #7c4c343b;font:700 clamp(1.1rem,2.6vw,2.2rem)/1.2 Georgia}
.library-scroll-art i {position:absolute;right:-13%;bottom:10%;width:35%;aspect-ratio:1;border:4px solid #d29d59;border-radius:50%;background:#bdd2f5b0}
.library-scroll-art i::after {content:"";position:absolute;width:75%;height:6px;border-radius:5px;background:#895029;transform:rotate(55deg);left:71%;top:99%}
.cours-hub .library-primary {display:inline-flex;align-items:center;gap:.6rem;justify-content:center;padding:.46rem 1rem;border-radius:2rem;border:1px solid #bda6e3;background:linear-gradient(#7546b6,#30125e);color:#fff8e9;text-decoration:none;box-shadow:0 3px 7px #38206740;font-weight:700}
.quick-buttons {display:flex;flex-wrap:wrap;gap:.28rem;margin:0 0 .55rem}
.cours-hub .quick-buttons button {font-size:.78rem;padding:.3rem .55rem}
.chapters-top {display:flex;align-items:center;gap:.6rem;justify-content:space-between;margin-bottom:.7rem;flex-wrap:wrap}
.overall {min-width:min(100%,180px);font-size:.75rem;font-weight:700}
.overall>div {display:flex;align-items:center;gap:.5rem}
.cours-hub progress {height:.65rem;accent-color:#139b95;display:block}
#library-chapters {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.58rem}
.chapter-tile {display:grid;min-width:0;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.33rem .42rem;padding:.55rem;border:1px solid #e3d8ed;border-radius:.8rem;background:linear-gradient(100deg,#fffaf6 32%,#fff6fae8 65%,#fff9f998),var(--chapter-art) center/cover;box-shadow:0 2px 4px #21174318}
.chapter-icon {display:inline-grid;place-items:center;min-width:2.35rem;height:2.35rem;padding:0 .22rem;border:2px solid #dfbb67;border-radius:.65rem;background:linear-gradient(#7947a1,#331364);color:white;font:italic 700 1rem Georgia,serif}
.chapter-tile h3 {margin:0;font-size:clamp(.95rem,1.45vw,1.17rem);line-height:1.15;overflow-wrap:anywhere}
.chapter-tile progress,.chapter-tile small,.chapter-tile button {grid-column:2}
.chapter-tile small {color:#504164;font-size:.7rem}
.chapter-tile button {justify-self:start;max-width:100%;font-size:.75rem}
.library-aside h2 {font-size:clamp(1.1rem,1.65vw,1.6rem)}
.lio-recommend {background:var(--waves) 0 100%/75px 28px repeat-x,#fff8ed}
.lio-recommend>div {display:flex;align-items:center;gap:.45rem}
.lio-recommend p {background:#fffcfc;border:1px solid #dfcdec;border-radius:.8rem;padding:.6rem;margin:.3rem 0;font-size:.88rem}
.lio-recommend img {width:clamp(50px,8vw,118px);height:auto;border-radius:.8rem}
#library-recent {display:grid;gap:.45rem}
#library-recent a,#library-recent button {justify-self:start}
.cours-hub dialog {color:var(--purple);background:#fffaf0;border:1px solid var(--gold);border-radius:1rem;width:min(92vw,620px);max-height:85dvh;padding:1rem}
.cours-hub dialog::backdrop {background:#201337b9}
.library-dialog-head {display:flex;justify-content:space-between;align-items:start;gap:.5rem}
#library-dialog-content select,#library-dialog-content button,#library-matches button {margin:.25rem .35rem .25rem 0;max-width:100%;font:inherit}
#library-dialog-content select {padding:.42rem;border:1px solid #c9b6e5;border-radius:.55rem;background:#fff}
#library-results {margin-bottom:.65rem}
@media(max-width:1080px) {#library-chapters{grid-template-columns:repeat(2,minmax(0,1fr))}.library-lower{grid-template-columns:minmax(0,1.75fr) minmax(0,1fr)}}
@media(max-width:850px) {.cours-hub .academy-side{padding-bottom:.6rem}.cours-hub .academy-brand{display:flex;border-bottom:0;padding:0}.library-logo{font-size:1.6rem}.library-lower{grid-template-columns:minmax(0,1.8fr) minmax(0,1fr)}}
@media(max-width:640px) {.library-access,.library-lower{grid-template-columns:1fr}.cours-hub .room-banner{padding:.65rem .8rem}.cours-hub .room-banner h1{font-size:clamp(2.1rem,10vw,3.7rem)}.library-bar .trail{width:100%}#library-search{max-width:none;flex-basis:100%}.access-card{grid-template-columns:minmax(0,.58fr) minmax(0,1.42fr)}.lio-recommend img{width:90px}}
@media(max-width:355px) {#library-chapters{grid-template-columns:1fr}}


.library-book-art {min-width:0;font-size:clamp(.55rem,1.36vw,1.25rem);padding-inline:.2rem}
.library-book-art span {max-width:100%;overflow-wrap:anywhere}
.cours-hub progress {appearance:none;border:0;border-radius:1rem;background:#ede2ef;color:#148d85}
.cours-hub progress::-webkit-progress-bar {background:#ede2ef;border:1px solid #d6c6de;border-radius:1rem}
.cours-hub progress::-webkit-progress-value {background:linear-gradient(#37c6b7,#0b877e);border-radius:1rem}
.cours-hub progress::-moz-progress-bar {background:linear-gradient(#37c6b7,#0b877e);border-radius:1rem}
.overall output {white-space:nowrap}
.overall small {font-weight:400;color:#514264}

.chapter-tile .chapter-open {grid-column:2;justify-self:start;padding:.3rem .55rem;border:1px solid #c9b6e5;border-radius:.7rem;background:linear-gradient(#fffcfc,#eee3fa);color:#281842;text-decoration:none;font-weight:600;font-size:.75rem}
#library-matches .chapter-open {display:inline-block;margin-right:.5rem}
