/* ACADAI V2 — Parcours académiques, avis et rôles */
.v2-domain-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(154px,1fr));gap:10px;margin:10px 0}
.v2-domain{display:flex;align-items:center;gap:9px;border:1px solid var(--line,#d7e1ec);padding:12px 14px;border-radius:12px;cursor:pointer;background:var(--surface,#fff);font-size:14px;transition:border-color .15s,background .15s}
.v2-domain:hover{border-color:#4c8ab6}
.v2-domain:has(input:checked){border-color:#2a80bd;background:rgba(53,147,207,.08)}
.v2-domain input{width:18px;height:18px;accent-color:#2678ba}
.v2-role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin:22px 0}
.v2-role-card{display:block;padding:24px;border:1px solid var(--line,#d7e1ec);border-radius:18px;background:var(--panel,#fff);color:inherit!important;text-decoration:none!important;box-shadow:0 2px 12px rgba(20,50,80,.03);transition:transform .16s,border-color .16s,box-shadow .16s}
.v2-role-card:hover,.v2-role-card:focus-visible{transform:translateY(-2px);border-color:#4388bf;box-shadow:0 8px 22px rgba(20,50,80,.09)}
.v2-role-icon{display:inline-flex;padding:11px;border-radius:13px;background:rgba(55,150,210,.10);color:#237eb0}
.v2-role-icon svg{width:24px;height:24px}
.v2-role-card h2{font-size:18px;margin:16px 0 8px}
.v2-role-card p{font-size:14px;opacity:.82;margin-bottom:18px;line-height:1.55;min-height:43px}
.v2-role-card .more{font-weight:600;font-size:13px}
.v2-review-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end;max-width:260px}
.v2-rating-summary{display:flex;align-items:center;flex-wrap:wrap;gap:15px;padding:14px 16px;border:1px solid var(--line,#d7e1ec);border-radius:12px;margin:14px 0}
.v2-rating-summary b{font-size:19px}
@media(max-width:740px){.v2-role-grid{grid-template-columns:1fr}.v2-role-card{padding:18px}.v2-review-actions{justify-content:flex-start;max-width:none}}

.v2-staff-banner{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:17px 0 26px;padding:17px 21px;border:1px solid var(--line,#d7e1ec);border-radius:16px;background:var(--surface,#fff)}
.v2-staff-banner b{display:flex;align-items:center;gap:8px;font-weight:700}
.v2-staff-banner b svg{height:19px;width:19px}
.v2-staff-banner p{font-size:13.5px;color:var(--muted,#637b93);margin:5px 0 0}
.v2-role-icon{background:var(--brand-soft,#e7f2fc);color:var(--brand,#004aad)}
.v2-domain:has(input:checked){background:var(--brand-soft,#e7f2fc);border-color:var(--brand,#2678ba)}
@media(max-width:600px){.v2-staff-banner{flex-direction:column;align-items:flex-start}.v2-review-actions{width:100%}}

/* Navigation and action surfaces */
.app .topbar .wrap {min-height:72px;height:auto;padding-block:3px}
#brand-logo {height:66px;width:74px;display:grid;place-content:center;overflow:hidden;flex:none;border-radius:12px}
.app #brand-logo .brand-mark {height:88px;width:88px;max-width:none;object-fit:contain}
.app .brand {gap:7px}
.sh-logo img {width:82px;height:82px}
.app .inbox-bell {display:inline-flex;position:relative;align-items:center;gap:7px;width:auto;padding:0 12px}
.inbox-bell svg {flex:none}
.inbox-bell .nav-n {margin:0}
.bell-label {font-size:.88rem;font-weight:650}
.app [hidden] {display:none!important}
.demo-bar {font-size:.875rem}
.demo-bar span {font-weight:700}
.demo-bar button {margin-inline-start:14px}
.app .tabs,.context-nav {flex-wrap:wrap;overflow:visible;max-width:100%;height:auto}
.context-nav {display:flex;gap:6px;align-items:center;margin:0 0 1.35rem;padding:0 0 10px;border-bottom:1px solid var(--line)}
.context-nav a {padding:8px 14px;border-radius:8px;color:var(--muted);text-decoration:none;font-weight:650}
.context-nav a[aria-current=page],.context-nav a:hover {background:var(--brand-soft);color:var(--brand)}
.workspace-heading {margin:2px 0 22px}
.workspace-heading>a {display:inline-block;margin-bottom:10px;font-size:.9rem}
.workspace-heading h1,.narrow-page .page-head h1 {font-size:clamp(1.8rem,4vw,2.65rem);line-height:1.13}
.app .page-head {margin-bottom:22px}
.app .page-head h1 {font-size:clamp(1.8rem,4vw,2.65rem)}
.app .v2-role-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))}
.app .v2-role-card {border-radius:16px;box-shadow:none}
.app .v2-role-card p {margin:5px 0 0;min-height:0;font-size:1rem}
.role-choices {border:0;padding:0;margin:8px 0 0;min-width:0}
.role-choices legend {font-weight:650;font-size:.9rem;margin-bottom:4px}
.team-member .roles {flex-wrap:wrap}
.admin-actions {display:flex;justify-content:end;margin:0 0 16px}
.app .empty {padding:clamp(16px,3vw,32px);border-radius:14px}
.app .section {margin-top:28px}
.inbox-list {display:grid;gap:8px}
.inbox-filters {display:flex;gap:6px;margin-bottom:15px}
.inbox-row,.inbox-empty {display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line);border-radius:13px;padding:14px 18px;background:var(--surface)}
.inbox-row.unread {border-inline-start:4px solid var(--brand)}
.inbox-row>a {display:grid;gap:3px;min-width:0;flex:1;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}
.inbox-row a:hover strong {text-decoration:underline}
.inbox-row .s,.inbox-row time {color:var(--muted)}
.inbox-status,.inbox-row time {font-size:.825rem}
.unread .inbox-status {color:var(--brand);font-weight:700}
.narrow-page {max-width:850px}
.acadai-confirm {box-sizing:border-box;width:min(90vw,430px);padding:24px;border:1px solid var(--line,#ccdce6);border-radius:16px;color:var(--ink,#102842);background:var(--surface,#fff);box-shadow:0 20px 80px #1227443d}
.acadai-confirm::backdrop {background:#071a34a6}
.acadai-confirm h2 {font-size:1.35rem;line-height:1.3;margin:0 0 12px;overflow-wrap:anywhere}
.acadai-confirm p {color:var(--muted,#4b6176);overflow-wrap:anywhere}
.confirm-choices {display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.confirm-choices button {padding:9px 20px;border-radius:8px;border:1px solid var(--line,#b7c9d9);font:inherit;font-weight:650;cursor:pointer;background:var(--surface,#fff);color:var(--ink,#132c46)}
.confirm-choices [value=yes] {color:#fff;background:#0752a9;border-color:transparent}
.confirm-choices .destructive {background:#ad3225}
.attach-images {margin:8px 0;color:var(--muted)}
.attach-images summary,.discover-pole summary {width:fit-content;cursor:pointer;font-weight:650;color:var(--brand)}
.attach-images label {display:block;font-size:.875rem;margin:6px 0}
.attach-images input {height:auto;padding:8px}
.forum-images {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:10px;margin:10px 0}
.forum-images img {display:block;max-width:100%;max-height:380px;object-fit:contain;border:1px solid var(--line);border-radius:9px}
.home-intro {display:grid;grid-template-columns:1.05fr 1fr;align-items:center;gap:clamp(20px,5vw,76px);background:#102f52;border-radius:20px;color:#fff;padding:clamp(22px,4vw,42px)}
.home-welcome h1 {color:white;font-size:clamp(1.9rem,4vw,2.9rem);line-height:1.1;margin:0}
.home-welcome p {color:#e4edf4;margin:7px 0 0}
.home-welcome .btn {margin-top:14px}
.daily-quote {border-inline-start:2px solid #60c3c3;padding-inline-start:22px}
.daily-quote span,.daily-quote time {font-size:.85rem;color:#bfdfeb}
.daily-quote p {font-size:clamp(1rem,2vw,1.32rem);line-height:1.4;font-weight:550;color:#fff;margin:4px 0}
.home-services {display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0 28px}
.home-services a {display:flex;align-items:center;gap:14px;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:13px;color:var(--ink);text-decoration:none}
.home-services a:hover {border-color:var(--brand)}
.home-services small {display:block;margin-top:3px;color:var(--muted);line-height:1.35;font-size:.9rem}
.service-icon {color:var(--brand);flex:none}
.service-icon svg {width:24px;height:24px}
.discover-pole {margin:28px 0 0;border-top:1px solid var(--line);padding-top:18px}
.discover-pole video {width:min(100%,610px);border-radius:12px}
@media(max-width:1080px){.bell-label{display:none}.app .inbox-bell{padding-inline:9px}}
@media(max-width:760px){.app .topbar .wrap{min-height:60px}.app #brand-logo{width:54px;height:52px}.app #brand-logo .brand-mark{width:70px;height:70px}.app .brand-txt b{font-size:1.05rem}.home-intro{grid-template-columns:1fr;gap:16px}.home-services{grid-template-columns:1fr;gap:7px}.home-services a{padding:12px 16px}.app .tabs{gap:3px}.app .tabs button{white-space:normal;padding:7px 9px}.team-member,.inbox-row{align-items:flex-start;flex-wrap:wrap}.demo-bar{padding-inline:8px}.context-nav a{padding:7px 9px}}
.demo-personas h3 {font-size:1rem;margin:10px 0}
.persona-grid {display:grid;grid-template-columns:1fr 1fr;gap:8px}
.persona-grid button {min-width:0;text-align:left;border:1px solid var(--line,#cad7e5);background:var(--surface,#fff);color:var(--ink,#152d4c);border-radius:10px;padding:10px 12px;font:inherit;cursor:pointer}
.persona-grid button:hover,.persona-grid button:focus-visible {border-color:var(--brand,#004aad)}
.persona-grid strong,.persona-grid span {display:block}
.persona-grid span {font-size:.85rem;color:var(--muted,#52657d)}
.demo-manual {margin-top:16px}
.demo-manual>summary {font-size:.9rem;color:var(--brand,#004aad);cursor:pointer;margin-bottom:12px}

/* ACADAI Forum — isolated level selector, avoids legacy .lvl-opt styles. */
.forum-level-select{border:0;margin:6px 0 2px;padding:0;min-width:0}
.forum-level-title{font-size:14px;font-weight:700;color:var(--ink);margin:0 0 10px;padding:0}
.forum-level-title small{font-size:12px;font-weight:500;color:var(--muted);margin-left:7px}
.forum-level-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.forum-level-option{display:block;position:relative;cursor:pointer;min-width:0}
.forum-level-option input{position:absolute;opacity:0;width:100%;height:100%;inset:0;cursor:pointer;margin:0;z-index:1}
.forum-level-face{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-height:68px;border:1.5px solid var(--line);border-radius:13px;padding:11px 15px;background:var(--surface);color:var(--ink);transition:border-color .15s,background-color .15s,box-shadow .15s}
.forum-level-face strong{font-size:15px;line-height:1.35}
.forum-level-face small{font-size:12px;font-weight:500;color:var(--muted)}
.forum-level-option:hover .forum-level-face{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 3%,var(--surface))}
.forum-level-option input:focus-visible+.forum-level-face{outline:3px solid color-mix(in srgb,var(--brand) 30%,transparent);outline-offset:2px}
.forum-level-option input:checked+.forum-level-face{border-color:var(--brand);background:var(--brand-soft);box-shadow:0 0 0 1px var(--brand)}
.forum-level-option input:checked+.forum-level-face strong{color:var(--brand)}
.forum-level-help{font-size:12px;color:var(--muted);margin:8px 0 0;line-height:1.45}
/* Contextual math keypad and live preview, shared with KaTeX post rendering */
.forum-math{margin-top:3px}
.forum-math-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.forum-math-action{appearance:none;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:10px;padding:8px 12px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.forum-math-action:hover,.forum-math-action[aria-expanded="true"]{background:var(--brand-soft);color:var(--brand);border-color:var(--brand)}
.forum-math-action:focus-visible,.forum-math-key:focus-visible,.forum-math-tabs button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.forum-math-panel,.forum-math-preview{margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.forum-math-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:13px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.forum-math-tabs button{appearance:none;border:0;border-radius:9px;padding:8px 12px;font:inherit;font-size:13px;font-weight:650;cursor:pointer;color:var(--muted);background:transparent}
.forum-math-tabs button[aria-selected="true"]{background:var(--surface);color:var(--brand);box-shadow:var(--shadow)}
.forum-math-keys{display:grid;grid-template-columns:repeat(auto-fit,minmax(94px,1fr));gap:8px}
.forum-math-key{appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:69px;border:1px solid var(--line);border-radius:11px;padding:9px 7px;background:var(--surface);font:inherit;cursor:pointer;color:var(--ink)}
.forum-math-key:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}
.forum-math-key>span{font-family:Georgia,"Times New Roman",serif;font-size:23px;line-height:1.1;white-space:nowrap}
.forum-math-key small{font-size:11px;font-weight:600;color:var(--muted);text-align:center;line-height:1.2}
.forum-math-hint{font-size:12px;line-height:1.5;color:var(--muted);margin:12px 0 0}
.forum-math-preview>strong{font-size:13px;color:var(--ink);display:block;margin-bottom:9px}
.forum-math-render{min-height:45px;line-height:1.75;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:13px 15px;white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:auto;font-size:14px;color:var(--ink)}
.forum-math-render .katex-display{overflow-x:auto;overflow-y:hidden;max-width:100%}
@media(max-width:620px){
 .forum-level-options{grid-template-columns:1fr;gap:8px}
 .forum-level-face{min-height:54px;flex-direction:row;align-items:center;justify-content:space-between}
 .forum-math-keys{grid-template-columns:repeat(3,minmax(0,1fr))}
 .forum-math-panel,.forum-math-preview{padding:11px}
}

/* Forum roleplay is deliberately labelled as an educational scenario */
.forum-profile-fixed{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;padding:13px 15px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px}
.forum-profile-fixed span{font-size:13px;color:var(--muted)}
.forum-profile-fixed strong{font-size:14px;color:var(--ink)}
.forum-profile-fixed small{flex-basis:100%;font-size:12px;color:var(--muted)}
.forum-persona-field{display:flex;flex-direction:column;gap:7px;padding:14px 15px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.forum-persona-field label{font-size:14px;font-weight:700}
.forum-persona-field select{max-width:440px}
.forum-persona-help{font-size:12px;color:var(--muted);margin:0;line-height:1.5}
.forum-persona-warning{padding:10px 12px;border-left:3px solid var(--brand);border-radius:6px;color:var(--ink);background:var(--brand-soft);font-size:12px;line-height:1.5;margin:3px 0 0}
.forum-answer-persona{margin:8px 0}
.forum-scenario-badge{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;border:1px solid var(--line);background:var(--brand-soft);color:var(--brand);font-weight:700;font-size:11px}
.forum-scenario-disclosure{margin:14px 0;background:var(--surface-2);border-left:3px solid var(--brand);border-radius:8px;padding:10px 13px;color:var(--muted);font-size:13px;line-height:1.5}

/* Opt-in phone notifications, restricted to the private inbox */
.phone-push-card{margin:0 0 20px;padding:20px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}
.phone-push-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.phone-push-head h2{margin:0 0 5px;font-size:17px;color:var(--ink)}
.phone-push-head p{font-size:13px;color:var(--muted);line-height:1.5;margin:0}
.phone-push-state{white-space:nowrap;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);padding:5px 10px;font-size:11px;font-weight:700;color:var(--muted)}
.phone-push-state[data-active="true"]{background:#e7f6ef;color:#176a46;border-color:#9fe0be}
.phone-push-status{font-size:13px;color:var(--muted);line-height:1.5;margin:12px 0}
.phone-push-controls{display:flex;flex-wrap:wrap;gap:9px}
.phone-push-controls button[hidden]{display:none}
.phone-push-hint{margin:12px 0 0;font-size:12px;color:var(--muted);line-height:1.45}
@media(max-width:600px){.phone-push-card{padding:15px}.phone-push-head{flex-direction:column}}

/* First-run notification opt-in for the installed, real ACADAI application. */
.phone-push-onboarding{position:fixed;inset:0;z-index:12000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(8,25,47,.66);backdrop-filter:blur(4px)}
.phone-push-dialog{width:min(100%,430px);max-height:calc(100dvh - 32px);overflow-y:auto;border-radius:21px;background:var(--surface,#fff);border:1px solid var(--line,#d7e1ec);color:var(--ink,#122b47);padding:28px 24px;box-shadow:0 20px 80px rgba(0,0,0,.35);text-align:center}
.phone-push-icon{width:66px;height:66px;margin:0 auto 14px;display:grid;place-items:center;border-radius:18px;background:var(--brand-soft,#e7f2fc);font-size:32px}
.phone-push-dialog h2{font-size:23px;line-height:1.25;margin:0 0 11px;color:var(--ink)}
.phone-push-dialog p{font-size:14px;line-height:1.6;margin:0 0 19px;color:var(--muted)}
.phone-push-dialog-actions{display:grid;gap:9px}
.phone-push-dialog-actions .btn{min-height:46px;justify-content:center}
.phone-push-dialog .phone-push-dialog-status{font-size:12px;line-height:1.5;color:var(--danger,#af3737);margin:12px 0 0}
.phone-push-dialog small{display:block;font-size:12px;color:var(--muted);line-height:1.4;margin-top:14px}
.phone-push-dialog button:focus-visible{outline:3px solid var(--brand,#004aad);outline-offset:3px}
@media(max-width:380px){.phone-push-dialog{padding:24px 18px}.phone-push-dialog h2{font-size:20px}}

/* ACADAI home: spacious blue hero, clean service actions, optional media */
.home-intro{position:relative;overflow:hidden;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);background:linear-gradient(128deg,#075dd1 0%,#0647a3 45%,#052955 100%);box-shadow:0 14px 40px rgba(0,57,140,.14);border-radius:23px;padding:clamp(27px,5vw,55px);isolation:isolate}
.home-intro:before{content:"";position:absolute;right:-12%;bottom:-66%;width:58%;aspect-ratio:1;border:1px solid rgba(164,219,255,.32);border-radius:50%;pointer-events:none}
.home-intro:after{content:"";position:absolute;right:7%;top:-30%;width:30%;aspect-ratio:1;border:1px solid rgba(164,219,255,.18);border-radius:50%;pointer-events:none}
.home-welcome,.daily-quote{position:relative;z-index:1}
.home-eyebrow{font-size:11px;font-weight:800;letter-spacing:.15em;color:#c6e0ff;text-transform:uppercase}
.home-welcome h1{margin-top:14px;font-size:clamp(2.1rem,4.7vw,3.35rem);max-width:14ch;line-height:1.1}
.home-welcome p{margin-top:17px;color:#e0efff;line-height:1.65;font-size:clamp(1rem,1.8vw,1.13rem);max-width:480px}
.home-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}
.home-actions .btn{min-height:43px;max-width:100%;white-space:normal}
.home-actions .btn.white{background:#fff;color:#063f92;border-color:#fff;font-weight:750}
.home-actions .btn.home-outline{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.56)}
.home-actions .btn:hover{transform:translateY(-1px)}
.home-pole-link{display:inline-block;color:#d7eaff;font-size:13px;text-decoration:underline;margin-top:20px}
.daily-quote{border-color:#75caec;padding:13px 0 13px 23px}
.daily-quote p{font-size:clamp(1.05rem,2vw,1.35rem);line-height:1.6}
.home-services{gap:14px;margin:19px 0 34px}
.home-services a{padding:21px 19px;border-radius:16px;min-height:94px;box-shadow:var(--shadow);transition:transform .15s,border-color .15s}
.home-services a:hover{transform:translateY(-2px)}
.home-about{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;margin:37px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:23px 27px}
.home-about .about-label{color:var(--brand)}
.home-about h2{font-size:clamp(1.12rem,2.5vw,1.48rem);margin:5px 0 8px}
.home-about p{color:var(--muted);max-width:620px;font-size:14px;line-height:1.65;margin:0}
.home-watch{font:inherit;font-size:14px;font-weight:750;background:var(--brand-soft);border:1px solid var(--line);color:var(--brand);border-radius:12px;padding:12px 17px;cursor:pointer}
.home-watch span{display:inline-block;margin-left:9px}
.home-watch:hover{border-color:var(--brand)}
#home-video{grid-column:1 / -1}
#home-video video{width:min(100%,750px);border-radius:13px;background:#07111d;max-height:460px}
.resources-pager{display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px 10px}
.resources-pager .tip{font-size:12px;color:var(--muted);text-align:center}
.resource-legal-note{margin:0;font-size:12.5px;color:var(--muted);line-height:1.6}
.resource-legal-note a{font-weight:700;color:var(--brand)}
@media(max-width:760px){.home-intro{grid-template-columns:1fr;gap:22px}.home-welcome h1{max-width:none}.daily-quote{padding:4px 0 5px 15px}.home-about{grid-template-columns:1fr;padding:19px}.home-services a{min-height:72px;padding:14px 17px}}
