/* SEG R323.6.96 — Charte JEUNE PREMIUM transversale — une règle commune, six familles.
   Baseline protected: R323.6.95, no change to layout logic, CSS only.
   WCAG interaction: retain role/action focus, disabled status and native semantics.
   Colormarks: navy #0B365A, ivory #FCFAF6, beige #F2ECE2, caramel #B07829.
 */
body.seg-r396-premium {
 --seg396-navy:#0b365a;--seg396-navy2:#123a5b;
 --seg396-ivory:#fcfaf6;--seg396-beige:#f2ece2;
 --seg396-gold:#b07829;--seg396-gold-dark:#855719;
 --seg396-border:#e8dcc8;--seg396-text:#253a4a;
 --seg396-sage:#f0f7ed;--seg396-lavender:#f5f1fb;
 --seg396-blue-pale:#f0f7fd;--seg396-sand:#fff6ea;
}
body.seg-r396-premium a:focus-visible,
body.seg-r396-premium button:focus-visible,
body.seg-r396-premium input:focus-visible,
body.seg-r396-premium select:focus-visible,
body.seg-r396-premium textarea:focus-visible,
body.seg-r396-premium [tabindex]:focus-visible {
 outline:3px solid #b07829!important;
 outline-offset:3px!important;
}
body.seg-r396-premium :is(input,textarea,select) {
 accent-color:#0b365a;
}
body.seg-r396-premium :is(input,textarea,select)::placeholder{
 color:#75838b;
}
/* Home is the master aesthetic reference: preserve approved hero and commerce. */
body.seg-r396-home {
 --seg396-ivory:#fcfaf6;--seg396-gold:#b07829;
}
/* Main learning pages not already scoped by R323.6.95. The existing workbook
   theme and ECUE dashboard remain dominant, untouched. */
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog) {
 color:var(--seg396-text)!important;
 background:linear-gradient(180deg,#f7f0e7 0%,#fcfaf6 340px,#f8faf9 100%)!important;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.r303-td-hero,.r304-exam-hero,.ecue-hero,.lesson-hero,.activity-hero,.r284-agenda-top,.public-hero,.public-page-head,.p12-top,.seg-header,.site-header,main>.hero,.container>.hero){
 background:linear-gradient(112deg,#0b365a,#174766)!important;
 border-color:#365e76!important;color:#fff!important;
 box-shadow:0 8px 23px #0b365a16!important;
}
/* In-page typography uses page titles not all buttons/icons. */
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.r303-td-hero,.r304-exam-hero,.ecue-hero,.lesson-hero,.activity-hero,.r284-agenda-top,.public-hero,main>.hero,.container>.hero) :is(h1,h2,.eyebrow) {
 color:#fff!important;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.r303-td-hero,.r304-exam-hero,.ecue-hero,.lesson-hero,.activity-hero,main>.hero,.container>.hero) p{
 color:#eaf0f3!important;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.public-main,.r284-agenda-main,.ecue-shell,.lesson-shell,.activity-shell,.p12-shell,.academic-main,.container) :is(.public-card,.lesson-card,.activity-card,.r284-agenda-card,.p12-card,.r253-window,.r303-card,.ecue-panel,.lesson-content,.card,.panel){
 background:#fffdf9!important;
 border-color:#e5d9c8!important;
 box-shadow:0 5px 18px #123a5b0b;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.public-main,.r284-agenda-main,.ecue-shell,.lesson-shell,.activity-shell,.p12-shell,.academic-main,.container) :is(h2,h3,.card-title,.section-heading){
 color:#0b365a;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.r303-td-hero,.r304-exam-hero,.ecue-hero,.lesson-hero,.activity-hero) :is(.eyebrow,.r304-kicker,.ecue-kicker,.lesson-kicker){
 color:#f2c78a!important;
}
/* Primary CTAs on student journeys; don't override native button states/disabled or exam correctness. */
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.cta-primary,.primary-link,.activity-primary,.r304-primary,.primary-btn):not(:disabled):not([aria-disabled="true"]) {
 background:#0b365a!important;border-color:#0b365a!important;color:#fff!important;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.cta-secondary,.secondary-link):not(:disabled):not([aria-disabled="true"]) {
 background:#fffaf2!important;border-color:#dfc9a8!important;color:#0b365a!important;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.r284-agenda-card,.r303-card,.ecue-panel,.lesson-card,.activity-card) h3 {
 color:#0b365a;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.public-main,.ecue-shell,.lesson-shell,.activity-shell) :is(table th,thead th){
 background:#0b365a;color:#fff;border-color:#456780;
}
body.seg-r396-learn:not(.seg-boost-dashboard):not(.r363-activity):not(.seg-r394-cahier-catalog)
 :is(.public-main,.ecue-shell,.lesson-shell,.activity-shell) :is(table td,tbody td){
 border-color:#e3dbce;
}
/* Public institutional/informational pages: keep original home hero specifically. */
body.seg-r396-public,
body.seg-r396-info{
 background:linear-gradient(180deg,#f5f0e8,#fcfaf6 320px,#fafbf9 100%)!important;
 color:var(--seg396-text);
}
body.seg-r396-public :is(.public-hero,.public-page-head,.r309-contact-hero,.r306-tarifs-hero,.community-hero,main>.hero),
body.seg-r396-info :is(.public-hero,.public-page-head,.community-hero,main>.hero){
 background:linear-gradient(112deg,#0b365a,#164969)!important;
 border-color:#315b74!important;color:#fff!important;
 box-shadow:0 9px 24px #0b365a19!important;
}
body.seg-r396-public :is(.public-hero,.public-page-head,.r309-contact-hero,.r306-tarifs-hero,.community-hero,main>.hero) :is(h1,h2),
body.seg-r396-info :is(.public-hero,.public-page-head,.community-hero,main>.hero) :is(h1,h2){
 color:#fff!important;
}
body.seg-r396-public :is(.public-hero,.public-page-head,.community-hero) p,
body.seg-r396-info :is(.public-hero,.public-page-head,.community-hero) p{
 color:#e8f0f3!important;
}
body.seg-r396-public :is(.public-card,.pricing-card,.r309-contact-card,.group-card,.help-step),
body.seg-r396-info :is(.public-card,.resource-card,.community-card,.card,.panel){
 background:#fffdf9!important;
 border-color:#e5d8c6!important;
 box-shadow:0 6px 19px #123a5b0b;
}
body.seg-r396-public :is(.public-main,.pricing-main,.help-main) :is(h2,h3),
body.seg-r396-info :is(.public-main,.community-layout,main) :is(h2,h3){
 color:#0b365a;
}
body.seg-r396-public :is(.cta-primary,.group-select-btn,.r309-card-action):not(:disabled):not([aria-disabled="true"]),
body.seg-r396-info :is(.cta-primary,.primary-link):not(:disabled):not([aria-disabled="true"]){
 background:#0b365a!important;border-color:#0b365a!important;color:#fff!important;
}
body.seg-r396-public :is(.cta-secondary,.secondary-link):not(:disabled),
body.seg-r396-info :is(.cta-secondary,.secondary-link):not(:disabled){
 background:#fffaf3!important;border-color:#e0cba8!important;color:#0b365a!important;
}
/* Login, sign-up and subscription: keep form structure, validation and server actions. */
body.seg-r396-auth{
 background:linear-gradient(180deg,#f5efe6,#fcfaf6 360px,#fbfcfb 100%)!important;
 color:var(--seg396-text);
}
body.seg-r396-auth :is(.public-hero,.public-page-head,.subscription-head,main>.hero){
 background:linear-gradient(110deg,#0b365a,#184d6b)!important;
 border-color:#315d78!important;color:#fff!important;
}
body.seg-r396-auth :is(.public-hero,.public-page-head,.subscription-head) :is(h1,h2){
 color:#fff!important;
}
body.seg-r396-auth :is(.public-card,.auth-demo,.subscription-form,.journey-container,.card,.panel){
 background:#fffdf9!important;border-color:#e6d9c6!important;
 box-shadow:0 6px 20px #0b365a0c;
}
body.seg-r396-auth :is(.auth-demo,.subscription-form,.public-card) :is(h2,h3,label) {
 color:#0b365a;
}
body.seg-r396-auth :is(.cta-primary,.auth-submit,.subscription-submit,.primary):not(:disabled):not([aria-disabled="true"]){
 background:#0b365a!important;color:#fff!important;border-color:#0b365a!important;
}
body.seg-r396-auth :is(.cta-secondary,.secondary):not(:disabled):not([aria-disabled="true"]){
 background:#fffaf2!important;color:#0b365a!important;border-color:#e4cba9!important;
}
body.seg-r396-auth :is(input,select,textarea){
 border-color:#d8cbb8;
}
body.seg-r396-auth :is(input,select,textarea):focus{
 border-color:#b07829;
}
/* Admin: conservatively adopt visual palette without altering table/form geometry,
   state colors, red danger buttons, sticky bars, charts or editor content. */
body.seg-r396-admin {
 --admin-accent:#0b365a;--admin-primary:#0b365a;
 --r316-brand:#0b365a;
 background:#f8f5ef!important;
 color:#253a4a;
}
body.seg-r396-admin :is(.top,.seg-header,.admin-hero,header.hero,.hero):not(.toolbar-sticky){
 background:linear-gradient(115deg,#0b365a,#154768)!important;
 color:#fff!important;border-color:#315b74!important;
}
body.seg-r396-admin :is(.top,.seg-header,.admin-hero,header.hero,.hero):not(.toolbar-sticky) :is(h1,h2,.eyebrow,.brand){
 color:#fff!important;
}
body.seg-r396-admin :is(.workspace,.editor,.panel,.card,.tile,.admin-content-ops,.copy-workflow,.viewer){
 border-color:#e4d9c8;
}
body.seg-r396-admin :is(.card,.panel,.tile):not(.danger):not(.error){
 background:#fffdf9;
}
body.seg-r396-admin main :is(h1,h2,h3,.panel-title) {
 color:#0b365a;
}
body.seg-r396-admin :is(button.primary,a.primary,.cta-primary):not(:disabled):not([aria-disabled="true"]){
 background:#0b365a!important;color:#fff!important;border-color:#0b365a!important;
}
body.seg-r396-admin :is(.eyebrow,.badge-neutral){
 color:#9b681f;
}
body.seg-r396-admin :is(input,textarea,select){
 accent-color:#0b365a;
}
@media(max-width:500px) {
 body.seg-r396-premium :is(main,.public-main,.admin-main){min-width:0}
 body.seg-r396-premium :is(input,select,textarea){max-width:100%}
}
@media(prefers-reduced-motion:reduce) {
 body.seg-r396-premium *{scroll-behavior:auto!important}
}