:root { --ink:#153451; --blue:#176aa5; --blue-dark:#0f3d66; --sky:#eaf5fb; --muted:#6c8499; --line:#d6e1e9; --paper:#f7fafc; --white:#fff; --green:#4d8b45; --yellow:#f6c62e; --shadow:0 16px 38px rgba(21,52,81,.08); }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:Arial,"Helvetica Neue",sans-serif; line-height:1.5; }
a { color:var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; }
button, input, select, textarea { font:inherit; }
button, select { cursor:pointer; }
.container { width:min(100% - 48px,1100px); margin-inline:auto; }
.site-header { border-bottom:1px solid rgba(214,225,233,.65); background:rgba(247,250,252,.94); }
.topbar { min-height:84px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand { display:inline-flex; align-items:center; gap:11px; color:var(--ink); font-weight:800; letter-spacing:.03em; font-size:17px; }
.brand:hover { text-decoration:none; }
.brand-mark { width: 62px; height: 54px; object-fit: cover; object-position: center; }
.topnav { display:flex; align-items:center; justify-content:flex-end; gap:23px; font-size:14px; font-weight:700; }
.support-link { color:var(--blue); font-weight:800; }
.link-button { border:0; padding:0; background:transparent; color:var(--blue); font-weight:700; }
.page-main { padding:54px 0 40px; }
.hero { display:flex; align-items:end; justify-content:space-between; gap:44px; max-width:980px; margin:0 auto 58px; }
.hero-copy-block { max-width:760px; }
.eyebrow { margin:0 0 10px; color:var(--blue); font-size:12px; line-height:1.2; letter-spacing:.18em; font-weight:800; }
h1,h2,p { margin-top:0; }
h1,h2 { letter-spacing:-.04em; line-height:1.06; }
.hero h1 { margin:0 0 22px; font-size:clamp(45px,7vw,80px); }
.hero h1 span { color:var(--blue); }
.hero-copy { max-width:670px; margin-bottom:24px; color:var(--muted); font-size:17px; }
.hero-note { display:flex; align-items:center; gap:12px; min-width:190px; padding:15px; border-left:3px solid var(--yellow); color:var(--muted); font-size:13px; }
.note-mark { color:var(--blue); font-size:34px; line-height:1; font-weight:800; }
.card { background:var(--white); border:1px solid var(--line); border-radius:17px; box-shadow:var(--shadow); }
.workspace-card { padding:32px; }
.section-heading,.app-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.section-heading h2,.app-intro h1 { margin-bottom:0; font-size:28px; }
.compact-heading { align-items:center; margin-bottom:20px; }
.status-pill { display:inline-flex; align-items:center; flex:0 0 auto; gap:7px; padding:7px 12px; color:var(--green); border:1px solid #b9d8b8; border-radius:999px; background:#f4fbf2; font-size:13px; font-weight:800; white-space:nowrap; }
.status-dot { width:7px; height:7px; background:var(--green); border-radius:50%; }
.form-grid { display:grid; gap:19px; }
.three-columns { grid-template-columns:repeat(3,1fr); }
label { display:block; color:var(--muted); font-size:14px; font-weight:700; }
select,input,textarea { width:100%; margin-top:7px; color:var(--ink); border:1px solid var(--line); border-radius:8px; background:var(--white); outline:none; }
select,input { min-height:42px; padding:8px 10px; }
textarea { min-height:124px; padding:14px; resize:vertical; }
select:focus,input:focus,textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(23,106,165,.12); }
select option:disabled { color:#aab5c0; }
.discipline-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.discipline-chip { padding:4px 8px; border:1px solid #e0e6eb; border-radius:999px; color:#a9b5bf; background:#f5f7f8; font-size:11px; font-weight:700; }
.discipline-chip.active { border-color:#b9d8ec; color:var(--blue); background:#f1f8fd; }
.full-discipline-list .discipline-chip.active { border-color:#c8dfc5; color:var(--green); background:#f4fbf2; }
.question-label { position:relative; margin-top:22px; }
.character-count { display:block; color:#8aa0b5; font-size:12px; font-weight:500; text-align:right; }
.form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-top:18px; }
.form-note { color:var(--muted); font-size:12px; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:10px 17px; border:0; border-radius:8px; font-weight:800; transition:transform .15s ease,opacity .15s ease; }
.button:hover { text-decoration:none; transform:translateY(-1px); }
.button:disabled { cursor:not-allowed; opacity:.55; transform:none; }
.button-primary { color:var(--white); background:var(--blue); }
.button-light { color:var(--ink); background:var(--white); }
.button-wide { width:100%; margin-top:22px; }
.answer-section { margin:53px auto; }
.answer-heading h2 { margin-bottom:18px; font-size:28px; }
.answer-box { min-height:170px; padding:25px 22px; white-space:pre-wrap; border:1px solid var(--line); border-radius:15px; background:var(--white); color:var(--muted); box-shadow:0 10px 28px rgba(21,52,81,.04); }
.answer-box:not(:empty) { color:var(--ink); }
.answer-box.error { color:#a64335; }
.answer-box.loading { color:var(--muted); }
.answer-box p:last-child { margin-bottom:0; }
.response-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; border-bottom:1px solid var(--line); }
.response-tab { padding:10px 13px; border:0; border-bottom:3px solid transparent; color:var(--muted); background:transparent; font-size:14px; font-weight:800; }
.response-tab:hover,.response-tab:focus-visible { color:var(--blue); }
.response-tab.is-active { border-bottom-color:var(--blue); color:var(--blue-dark); }
.response-panel[hidden] { display:none; }
.answer-text { white-space:normal; }
.answer-text br { content:""; display:block; margin-bottom:8px; }
.math-inline { display:inline-block; margin:0 .15em; }
.math-block { margin:15px 0; overflow-x:auto; padding:6px 0; }
.math-fallback { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.diagram-box { display:grid; min-height:250px; place-items:center; overflow:hidden; border:1px solid var(--line); border-radius:15px; background:var(--white); color:var(--muted); }
.diagram-placeholder,.diagram-error { margin:0; padding:30px; text-align:center; }
.diagram-error { color:#a64335; }
.geogebra-mount { width:100%; min-height:250px; }
.geogebra-mount iframe { display:block; width:100%; min-height:250px; border:0; }
.support-card { display:flex; align-items:center; justify-content:space-between; gap:28px; margin-bottom:45px; padding:27px; border-radius:16px; color:var(--white); background:var(--blue-dark); }
.support-card .eyebrow { color:#9ed2ee; }
.support-card h2 { max-width:620px; margin-bottom:8px; font-size:27px; }
.support-card p:last-child { max-width:610px; margin-bottom:0; color:#c8d9e6; }
.tiers { margin-bottom:46px; }
.tier-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.tier-card { overflow:hidden; border:1px solid var(--line); border-radius:11px; color:var(--ink); background:var(--white); box-shadow:0 6px 18px rgba(21,52,81,.05); }
.tier-card:hover { text-decoration:none; }
.tier-card img { display:block; width:100%; aspect-ratio:16/8; object-fit:cover; }
.tier-card span { display:block; padding:9px 11px; font-size:13px; font-weight:800; }
.footer { display:flex; justify-content:space-between; gap:20px; padding:0 0 27px; color:#8aa0b5; font-size:13px; }
.auth-main { display:grid; place-items:center; min-height:calc(100vh - 150px); padding:38px 0 65px; }
.auth-card { width:min(100%,470px); padding:34px; }
.auth-visual { display:flex; justify-content:center; margin-bottom:24px; }
.auth-visual img { width:88px; height:50px; object-fit:cover; object-position:center; border-radius:8px; }
.auth-card h1 { margin-bottom:12px; font-size:38px; }
.muted { color:var(--muted); }
.login-form { margin-top:27px; }
.login-form label { margin-top:16px; color:var(--ink); }
.form-message { min-height:22px; margin:12px 0 0; font-size:14px; }
.form-message.error { color:#a64335; }
.form-message.success { color:var(--green); }
.demo-hint { margin:22px 0 0; padding:12px; border-radius:8px; background:var(--sky); color:var(--muted); font-size:13px; }
.app-main { padding:48px 0 36px; }
.app-intro { margin-bottom:30px; }
.app-intro h1 { margin-bottom:12px; font-size:clamp(34px,5vw,52px); }
.app-intro .muted { margin-bottom:0; }
.auth-protected:not(.auth-ready) > * { visibility:hidden; }
@media (max-width:760px) {
  .container { width:min(100% - 32px,1100px); }
  .topbar { align-items:flex-start; padding:18px 0; }
  .topnav { flex-wrap:wrap; gap:8px 15px; text-align:right; }
  .page-main,.app-main { padding-top:32px; }
  .hero { align-items:flex-start; flex-direction:column; gap:25px; margin-bottom:36px; }
  .hero h1 { font-size:clamp(42px,12vw,66px); }
  .section-heading,.app-intro { flex-direction:column; }
  .three-columns { grid-template-columns:1fr; gap:14px; }
  .workspace-card { padding:22px; }
  .support-card { align-items:flex-start; flex-direction:column; margin-bottom:40px; }
  .tier-grid { grid-template-columns:repeat(2,1fr); }
  .response-tab { flex:1 1 180px; }
  .geogebra-mount iframe { min-height:220px; }
  .footer { flex-direction:column; }
  .auth-card { padding:26px 22px; }
}

/* Correctif logos page de connexion */
body[data-page="login"] .site-header .brand-mark {
  width: 132px !important;
  height: 132px !important;
  max-width: none !important;
  object-fit: contain !important;
}
body[data-page="login"] .auth-visual {
  min-height: 190px !important;
  height: 190px !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body[data-page="login"] .auth-visual img {
  width: 320px !important;
  height: 320px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
}
@media (max-width: 600px) {
  body[data-page="login"] .site-header .brand-mark {
    width: 96px !important;
    height: 96px !important;
  }
  body[data-page="login"] .auth-visual img {
    width: 260px !important;
    height: 260px !important;
    max-width: 100% !important;
  }
}
