/* Références : Apprendre et Cours. Surfaces sobres, rythme commun. */
body.hub-identity{--hub-card-surface:#233247;--hub-card-outline:#71819a;--hub-card-radius:10px;--hub-card-padding:20px;--hub-card-gap:16px;--hub-navigation-card-height:170px;--hub-navigation-title:1.06rem;--hub-navigation-description:.85rem;--hub-category-height:88px}
body.hub-identity :is(.quick-card,.subject-card,.glossary-home-card,.diag-mode-card){padding:var(--hub-card-padding);border:1px solid var(--hub-card-outline);border-radius:var(--hub-card-radius)!important;background:var(--hub-card-surface)!important;background-image:none!important;box-shadow:none!important;min-width:0}
body.hub-identity :is(.quick-card,.subject-card,.glossary-home-card,.diag-mode-card):is(a,button){min-height:var(--hub-navigation-card-height)}
body.hub-identity :is(.quick-card,.subject-card,.glossary-home-card,.diag-mode-card) :is(h3,h4){font-size:var(--hub-navigation-title);line-height:1.45;color:var(--hub-text)}
body.hub-identity :is(.quick-card,.subject-card,.glossary-home-card,.diag-mode-card) p{font-size:var(--hub-navigation-description);line-height:1.7;color:#d0daea}
body.hub-identity :is(a,button):is(.quick-card,.subject-card,.glossary-home-card,.diag-mode-card):focus-visible{outline:3px solid var(--hub-accent);outline-offset:3px}
@media(max-width:650px){body.hub-identity{--hub-card-padding:18px}body.hub-identity :is(.quick-card,.subject-card,.glossary-home-card,.diag-mode-card):is(a,button){min-height:0}}
body.hub-identity #app .app-head{background:var(--hub-surface)!important;border:1px solid var(--hub-control-border)!important;border-radius:10px!important;padding:28px!important;margin-bottom:24px;gap:20px}
body.hub-identity #app #appDesc{max-width:78ch;color:#d0daea;line-height:1.75}
body.hub-identity :is(.bank-hero,.library-hero,.glossary-hero,.cheat-cheatsheet-intro){padding:28px;gap:24px}
body.hub-identity :is(.bank-hero,.library-hero,.glossary-hero) p{line-height:1.75;color:#d0daea}
body.hub-identity #appBody .gr-shell .panel{padding:24px;background:#233247!important;border:1px solid #71819a!important;border-radius:10px!important;box-shadow:none!important;background-image:none!important}
body.hub-identity #appBody .gr-hero{background:#18212f!important}
body.hub-identity #appBody .gr-hero p{font-size:1rem;color:#d0daea;line-height:1.75}
body.hub-identity #appBody .gr-launch>p,body.hub-identity #appBody .gr-difficulties>p,.gr-section-heading p{font-size:1rem;line-height:1.75}
body.hub-identity #appBody .gr-home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.hub-identity #appBody .gr-course-tile{grid-template-columns:minmax(0,1fr);background:#233247;border:1px solid #71819a;border-radius:10px;padding:20px;gap:12px}
body.hub-identity .gr-course-icon{display:none}
body.hub-identity #appBody .gr-reference{padding:0}
body.hub-identity #appBody .gr-duration button[aria-pressed=true]{background:#353854;border-color:#bbb5e9;box-shadow:none}
body.hub-identity.image-circles .gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
body.hub-identity.image-circles .gallery-grid .card{background:#233247;border:1px solid #71819a;border-radius:10px;overflow:hidden}
body.hub-identity.image-circles .preview-wrap{padding:16px;background:#18212f;overflow:hidden}
body.hub-identity.image-circles .preview-button{width:100%;height:200px;aspect-ratio:auto;padding:8px;border:1px solid #71819a;border-radius:8px;outline:none;background:#131c29;box-shadow:none;transform:none}
body.hub-identity.image-circles .preview-button:focus-visible{outline:3px solid #bbb5e9;outline-offset:3px}
body.hub-identity.image-circles .gallery-grid .card-body{padding:20px;align-items:stretch;text-align:left}
body.hub-identity.image-circles .card.reviewed{border-color:#9acbb0}
body.hub-identity.image-circles .zoom-hint{right:24px;bottom:22px;transform:none}
@media(max-width:1100px){body.hub-identity.image-circles .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){body.hub-identity #appBody .gr-home-grid{grid-template-columns:1fr}}
@media(max-width:650px){body.hub-identity #app .app-head{padding:20px!important;gap:16px}body.hub-identity :is(.bank-hero,.library-hero,.glossary-hero,.cheat-cheatsheet-intro){padding:20px}body.hub-identity #appBody .gr-shell .panel{padding:18px}body.hub-identity #appBody .gr-reference{padding:0}body.hub-identity.image-circles .gallery-grid{grid-template-columns:1fr}}
/* Hiérarchie éditoriale commune : couleur liée à un rôle, jamais à un mot détecté. */
body.hub-identity :is(main,#appBody) :is(h2,.section-title){color:var(--hub-accent)}
body.hub-identity :is(.lesson,.course-panel,.chapter,.learning-content,.story-section,.qe-question,.glossary-entry-body) h3{color:var(--hub-info)}
body.hub-identity :is(main,#appBody) :is(p,li,dd) > :is(strong,b){color:var(--hub-accent);font-weight:700}
body.hub-identity :is(main,#appBody) :is(p,li,dd,td) > code{color:#c1d8fa;background:#131c29;border:1px solid #455269;border-radius:4px;padding:.1em .3em;font-family:HubCode,monospace;overflow-wrap:anywhere}
body.hub-identity :is(main,#appBody) pre{border-color:var(--hub-control-border);background:#131c29;color:#edf0f5;line-height:1.65}
body.hub-identity :is(main,#appBody) :is(p,li,dd,td,figcaption) a:not([class*="btn"]):not([class*="button"]):not([class*="primary"]):not([class*="action"]):not([role="button"]){color:#c7c2f2;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.2em}
body.hub-identity :is(main,#appBody) a:focus-visible{outline:3px solid var(--hub-accent);outline-offset:3px}
body.hub-identity :is(main,#appBody) :is(th,thead td){color:#d0cbf5;background:#18212f;font-weight:700}
body.hub-identity :is(main,#appBody) :is(.note,.course-note,.story-technical,[data-tone="info"]){border-inline-start:3px solid var(--hub-info)}
body.hub-identity :is(main,#appBody) :is(.warning,.learning-warning,.story-warning,[data-tone="warning"]){border-inline-start:3px solid var(--hub-warning)}
body.hub-identity :is(main,#appBody) :is(.warning,.learning-warning,.story-warning,[data-tone="warning"]) :is(strong,b,h3,h4){color:var(--hub-warning)}
body.hub-identity :is(main,#appBody) :is(.learning-example,.story-example){border-inline-start:3px solid var(--hub-info)}
body.hub-identity :is(main,#appBody) :is(.learning-recap,.story-recall,[data-tone="success"]){border-inline-start:3px solid var(--hub-success)}
body.hub-identity :is(main,#appBody) :is(.learning-recap,.story-recall,[data-tone="success"]) :is(strong,b,h3,h4){color:var(--hub-success)}
body.hub-identity :is(main,#appBody) :is(.danger,[data-tone="danger"]){border-inline-start:3px solid var(--hub-error)}
body.hub-identity :is(main,#appBody) :is(.danger,[data-tone="danger"]) :is(strong,b,h3,h4){color:var(--hub-error)}
body.hub-identity .extra-collection-summary{display:flex;align-items:center;justify-content:space-between;gap:16px}
body.hub-identity .extra-collection-summary-copy{min-width:0;flex:1}
body.hub-identity .extra-collection-summary-copy small{white-space:normal;display:block;overflow:visible;-webkit-line-clamp:unset;line-height:1.65}
body.hub-identity .extra-collection-summary-copy strong{display:block;margin:8px 0;font-size:1.06rem;line-height:1.45;color:var(--hub-accent)}
body.hub-identity .extra-collection-body :is(.extra-tags,.extra-resource-grid){margin-left:0}
body.hub-identity .extra-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body.hub-identity .extra-resource-grid.extra-resource-three{grid-template-columns:repeat(3,minmax(0,1fr))}
body.hub-identity .extra-resource{min-width:0}
body.hub-identity .extra-resource :is(a,button){white-space:normal;max-width:100%;overflow-wrap:anywhere}
body.hub-identity .subject-session-links{display:flex;flex-wrap:wrap;gap:12px;padding:16px 0;margin:0 0 16px;border-bottom:1px solid var(--hub-border)}
body.hub-identity .subject-session-links a{color:var(--hub-accent);text-decoration:underline;text-underline-offset:.2em}
body.hub-identity .subject-year-heading{font-size:1.25rem;margin:24px 0 12px}
@media(max-width:1100px){body.hub-identity .extra-resource-grid.extra-resource-three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){body.hub-identity :is(.extra-resource-grid,.extra-resource-grid.extra-resource-three){grid-template-columns:minmax(0,1fr)}body.hub-identity .extra-collection-summary{align-items:flex-start}.hub-identity .extra-collection-meta{flex-shrink:0}}
body.hub-identity :is(.extra-collection,.extra-resource){background-image:none!important;box-shadow:none!important}
body.hub-identity .extra-collection-summary-copy .subject-modes{margin-top:8px;color:var(--hub-info);font-weight:700}
/* Les commandes longues défilent dans leur bloc, sans élargir la comparaison. */
body.hub-identity main .grid2,body.hub-identity main .grid2>*{min-width:0}
body.hub-identity main .grid2 .code{min-width:0;max-width:100%;overflow-x:auto}
