/* Secondary public pages share the home page's typography, surfaces and shell.
   Keep these rules scoped: the application, administration and four home pages
   have their own presentation. Pedagogical number/status colours stay local. */
.web-page {
  --color-bg:var(--web-paper);
  --color-bg-alt:#eef1f7;
  --color-card:#fff;
  --color-text:var(--web-ink);
  --color-text-muted:var(--web-muted);
  --color-border:var(--web-line);
  --color-accent:var(--web-accent);
  --color-accent-dark:#4f2caf;
  --color-accent-light:#ede8fc;
  margin:0;
  background:var(--web-paper);
  color:var(--web-ink);
  font:16px/1.75 var(--web-font);
}
.web-page *, .web-page *::before, .web-page *::after { box-sizing:border-box; }
.web-page :is(h1,h2,h3,h4) { font-family:var(--web-font); letter-spacing:-.025em; }
.web-page h1 { font-weight:900; }
.web-page :is(button,input,select,textarea) { font-family:var(--web-font); }
.web-page button { cursor:pointer; touch-action:manipulation; }
.web-page button:disabled { cursor:default; }
.web-page a { text-underline-offset:4px; }
.web-page main { min-width:0; }
.web-page main :is(p,li,h1,h2,h3,h4,a) { overflow-wrap:break-word; }
.web-page main a { color:var(--web-accent); }
.web-page :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid #126f91;
  outline-offset:4px;
}
.web-page [hidden] { display:none!important; }

/* The shell is the same markup and sizing as the home pages. */
.web-page .web-header :is(p,h1,h2,h3), .web-page .web-footer :is(p,h1,h2,h3) { margin:0; }
.web-page .web-footer-grid h2 { margin-bottom:15px; letter-spacing:0; }
.web-page .web-footer-grid p { margin-top:18px; }
.web-page .web-footer-bottom p { margin:0; }
.web-page .web-footer .web-brand { color:var(--web-ink); }
.web-page .web-header .web-menu-toggle { font:inherit; }
.web-page .web-button-primary { color:#fff; }
.web-page .web-button-secondary { color:var(--web-ink); }
.web-page .web-button-light { color:#37225c; }
.web-page .btn-secondary { min-height:48px; border:1px solid #bac7d9; border-radius:10px; background:#fff; color:var(--web-ink); font-size:.9rem; }

/* Article openings and section rhythm. Inline max-widths keep long articles
   at their intended reading width within the shared outer gutters. */
.web-page .container { width:min(1060px,calc(100% - 80px)); margin-inline:auto; padding-inline:0; }
.web-page .section { padding-block:56px; }
.web-page main > .section:first-of-type { padding-block:58px 48px; }
.web-page .section + .section { border-top:1px solid var(--web-line); }
.web-page .section-alt { background:#fff; }
.web-page .section-title {
  margin-bottom:14px;
  background:none;
  color:var(--web-ink)!important;
  -webkit-text-fill-color:currentColor;
  font-size:clamp(1.65rem,3.1vw,2.5rem);
  font-weight:900;
  line-height:1.25;
  letter-spacing:-.04em;
}
.web-page h1.section-title { max-width:900px; margin-inline:auto; font-size:clamp(2rem,4.5vw,3.5rem); }
.web-page .section-subtitle { max-width:700px; margin:0 auto 30px; color:var(--web-muted); font-size:1.05rem; line-height:1.8; }
.web-page main > .section:first-of-type .section-subtitle { margin-bottom:0; }
.web-page .section :is(h2,h3,h4) { color:var(--web-ink); font-weight:900; line-height:1.4; }
.web-page .section :is(h2,h3,h4)[style*="color:#7c3aed"],
.web-page .section :is(h2,h3,h4)[style*="color:#4c1d95"] { color:var(--web-ink)!important; }
.web-page .section-title[style*="color:#22c55e"],
.web-page .section-title[style*="color: #22c55e"] { color:#1f7552!important; }
.web-page .trust-bar { padding:12px 24px; background:#eef1f7; border-bottom:1px solid var(--web-line); }
.web-page .trust-bar-track { gap:8px 24px; }
.web-page .trust-bar-item { color:var(--web-muted); white-space:normal; text-align:left; font-size:.75rem; }
.web-page .trust-bar-item::before { background:#9ca9bc; }

/* Quiet, readable cards replace gradients and floating decoration. */
.web-page :is(.tf-card,.flow-step,.tuto-card,.value-card,.beta-step,.section-enseignant,.table-card) {
  min-width:0;
  padding:24px;
  border:1px solid var(--web-line);
  border-radius:16px;
  background:#fff;
  box-shadow:none;
  text-align:left;
}
.web-page :is(.tf-card,.flow-step,.tuto-card,.value-card):hover { transform:none; box-shadow:none; border-color:#b4bfd2; }
.web-page :is(.tf-card,.flow-step,.value-card) :is(h2,h3,h4) { margin-bottom:10px; font-size:1.1rem; }
.web-page :is(.tf-card,.flow-step) p { color:var(--web-muted); font-size:.93rem; line-height:1.8; }
.web-page .teacher-features { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.web-page .teacher-features:has(> article.tf-card) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.web-page .teacher-features > article.tf-card { padding:27px; }
.web-page .teacher-features > article.tf-card h2 { margin-bottom:12px; font-size:1.2rem; }
.web-page .teacher-flow { align-items:stretch; gap:22px 14px; margin-top:24px; }
.web-page .flow-step { flex:1 1 180px; min-width:0; }
.web-page .flow-num { background:var(--web-accent); }
.web-page .flow-arrow { color:#8978aa; }
.web-page :is(.tf-icon,.flow-icon,.value-card-icon) { margin-bottom:14px; font-size:2rem; }
.web-page .value-grid { grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:20px; }
.web-page .value-card-title { color:var(--web-ink); font:900 1.15rem/1.4 var(--web-font); }
.web-page .value-card-desc { color:var(--web-muted); line-height:1.8; }
.web-page .tuto-cards { grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr)); gap:20px; }
.web-page .tuto-card { color:var(--web-ink); text-decoration:none; }
.web-page .tuto-card h3 { margin-bottom:10px; font-size:1.4rem; }
.web-page .tuto-card-icon { margin-bottom:16px; font-size:2.7rem; }
.web-page .tuto-card-desc, .web-page .tuto-card ul { color:var(--web-muted); line-height:1.8; }
.web-page .tuto-card-cta { align-self:flex-start; background:var(--web-accent); color:#fff; border-radius:10px; padding:11px 18px; }
.web-page .tuto-shot { display:block; max-width:100%; height:auto; margin-block:24px; border:1px solid var(--web-line); border-radius:14px; box-shadow:none; }
.web-page :is(.astuce,.niveau-card,.format-card,.semaine-card,.astuce-card,.conseil-card,.methode-card,.quote-block,.quiz-box,.info-panel) {
  min-width:0;
  padding:22px 24px;
  border:1px solid var(--web-line);
  border-radius:14px;
  background:#f0f2f8;
  box-shadow:none;
}
.web-page :is(.astuce,.niveau-card,.format-card,.semaine-card,.astuce-card,.conseil-card,.methode-card,.info-panel) { border-left:3px solid #a395c4; }
.web-page :is(.astuce,.niveau-card,.format-card,.semaine-card,.astuce-card,.conseil-card,.methode-card,.section-enseignant) > h3 { margin-bottom:10px; font-size:1.13rem; }
.web-page :is(.exemple,.exercices,.objectif) { border-color:var(--web-line); }
.web-page .semaine-card .conseil { background:#e8edf5; }
.web-page .format-card .duree { background:#ede8fc; color:#514087; }
.web-page .quote-block cite { color:var(--web-accent); }
.web-page .info-panel { margin-block:24px; }
.web-page .panel-kicker { color:var(--web-ink); font-weight:900; margin-bottom:8px; }
.web-page .panel-desc { color:var(--web-muted); font-size:.95rem; line-height:1.8; }
.web-page .new-badge { background:#f5e9cb; color:#71551e; }
.web-page .table-grid { grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr)); }
.web-page .table-card li { padding-block:5px; font-variant-numeric:tabular-nums; }

/* Forms keep their original IDs, validation and exercise state colours. */
.web-page :is(.gen-form,.beta-form) { padding:28px; background:#fff; border:1px solid var(--web-line); border-radius:16px; }
.web-page :is(.gen-form,.beta-form) label { color:var(--web-ink); }
.web-page :is(.gen-form,.beta-form,.quiz-q) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  min-width:0;
  min-height:48px;
  border:1px solid #9daabe;
  border-radius:10px;
  background:#fff;
  color:var(--web-ink);
  font-size:1rem;
  line-height:1.5;
}
.web-page :is(.gen-form,.beta-form,.quiz-q) :is(input,select,textarea):focus-visible { outline:3px solid #126f91; outline-offset:3px; }
.web-page input:is([type=checkbox],[type=radio]) { accent-color:var(--web-accent); }
.web-page .gen-ops label { min-height:44px; padding:9px 12px; background:#eef1f7; color:var(--web-ink); }
.web-page .gen-ops input[type=checkbox] { flex:0 0 18px; min-height:18px; }
.web-page :is(.gen-btn,.quiz-btn,.beta-form button,.sheet-actions button) {
  min-height:48px;
  padding:12px 20px;
  border:1px solid transparent;
  border-radius:10px;
  background:var(--web-accent);
  color:#fff;
  font-size:1rem;
  font-weight:900;
  line-height:1.5;
}
.web-page :is(.gen-btn,.quiz-btn,.beta-form button,.sheet-actions button):hover { background:#4f2caf; }
.web-page .sheet-actions button.secondary { background:#526078; }
.web-page .quiz-box { margin-block:28px; background:#efebf9; border-color:#cfc4e9; }
.web-page .quiz-q { min-width:0; padding:16px; border:1px solid var(--web-line); }
.web-page .quiz-q > label { flex:1 1 160px; min-width:0; }
.web-page .quiz-q input { flex:0 0 80px; max-width:100%; }
.web-page :is(.quiz-score,.finger-label,.beta-count) { color:var(--web-accent); }
.web-page .finger-controls { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.web-page .finger-controls button { min-width:44px; min-height:44px; margin:0; border:1px solid #a395c4; color:#514087; }
.web-page .finger-controls button:hover { background:var(--web-accent); color:#fff; }
.web-page .fingers { gap:clamp(3px,1vw,6px); }
.web-page .sheet { min-width:0; padding:28px; border:1px solid var(--web-line); border-radius:16px; }
.web-page .sheet h2 { color:var(--web-ink); }
.web-page .sheet .exercice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.web-page .sheet-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.web-page .sheet-actions button { margin:0; }
.web-page .beta-hero { padding:36px; border:1px solid var(--web-line); border-radius:16px; background:#eeebf7; color:var(--web-ink); }
.web-page .beta-hero p { color:var(--web-muted); opacity:1; }
.web-page .beta-hero .web-actions { justify-content:center; gap:12px; margin-top:24px; }
.web-page .beta-hero .web-button { max-width:100%; text-align:center; }
.web-page #betaForm { scroll-margin-top:100px; }
.web-page .beta-steps { grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); }
.web-page .beta-step .step-num { background:var(--web-accent); }
.web-page .beta-faq h3 { color:var(--web-ink); }

/* Only decorative inline links/buttons from the old templates are adapted.
   Inline mathematical examples, correct answers and status messages retain
   the colour information that their lesson or JavaScript assigns. */
.web-page .section a[style*="color:#7c3aed"],
.web-page .section a[style*="color: #7c3aed"],
.web-page .section a[style*="color:#5b21b6"] { color:var(--web-accent)!important; border-color:#b6a9d4!important; }
.web-page .section :is(a,button)[style*="background:#7c3aed"],
.web-page .section :is(a,button)[style*="background: #7c3aed"] {
  min-height:48px;
  background:var(--web-accent)!important;
  color:#fff!important;
  border-radius:10px!important;
  line-height:1.5;
}
.web-page .section a[style*="display:inline-block"] { max-width:100%; }

/* Documents and recovery use the same surfaces as the rest of the site. */
.web-page .legal-shell { width:min(1060px,calc(100% - 80px)); margin-block:54px 64px; }
.web-page .legal-shell h1 { font-size:clamp(2rem,4.5vw,3.5rem); }
.web-page .legal-content { line-height:1.85; }
.web-page .legal-content table { display:table; }
.web-page .legal-content :is(th,td) { overflow-wrap:normal; }
.web-page .legal-content h2 { color:var(--web-ink); }
.web-page .legal-summary { background:#edf4f0; }
.web-page .functional-languages a { display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:44px; color:var(--web-accent); font-size:.85rem; font-weight:800; text-decoration:none; }
.web-page .functional-languages a[aria-current] { text-decoration:underline; }
.web-page .recover-hero { min-height:0; padding:56px 24px 64px; }
.web-page .recover-card { border-color:var(--web-line); border-radius:18px; box-shadow:none; }
.web-page .recover-title { font-size:clamp(2rem,4.5vw,2.8rem); }
.web-page main .store-btn { background:var(--web-accent); color:#fff; }
.web-page .recover-code-display { letter-spacing:.08em; }
.web-page.tr-page { --tr-line:var(--web-line); }
.web-page .tr-intro h1 { margin-top:12px; }
.web-page .tr-section > h2 { margin:0; }
.web-page .tr-grid :is(h3,p), .web-page .tr-workshop p { margin-top:0; }
.web-page .tr-grid h3 { margin-bottom:12px; }
.web-page .tr-examples p { margin-top:14px; }

@media (max-width:1100px) {
  .web-page .container, .web-page .legal-shell { width:calc(100% - 48px); }
  .web-page.web-js .web-nav { display:none; }
  .web-page.web-js .web-nav.is-open { display:flex; padding-block:10px; }
}
@media (max-width:820px) {
  .web-page .section { padding-block:42px; }
  .web-page main > .section:first-of-type { padding-block:42px 36px; }
  .web-page .teacher-features { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .web-page .flow-arrow { display:none; }
  .web-page .teacher-flow { gap:24px 16px; }
}
@media (max-width:600px) {
  .web-page .container, .web-page .legal-shell { width:calc(100% - 36px); }
  .web-page .teacher-features, .web-page .teacher-features:has(> article.tf-card) { grid-template-columns:minmax(0,1fr); }
  .web-page :is(.tf-card,.flow-step,.value-card,.tuto-card,.beta-step,.table-card) { padding:22px; }
  .web-page :is(.astuce,.niveau-card,.format-card,.semaine-card,.astuce-card,.conseil-card,.methode-card,.quote-block,.quiz-box,.info-panel) { padding:20px 18px; }
  .web-page .section-subtitle { font-size:1rem; }
  .web-page .trust-bar { padding:12px 18px; }
  .web-page .trust-bar-track { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:10px 14px; }
  .web-page .trust-bar-item { font-size:.72rem; line-height:1.6; }
  .web-page .trust-bar-item::before { display:none; }
  .web-page :is(.gen-form,.beta-form,.sheet) { padding:20px 16px; }
  .web-page .sheet .exercice-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
  .web-page .beta-hero { padding:28px 20px; }
  .web-page .beta-hero h2 { font-size:1.65rem; }
  .web-page .legal-shell { margin-block:36px 44px; }
  .web-page .legal-content { padding:22px 18px; }
  .web-page .legal-content h2 { font-size:1.3rem; }
  .web-page .recover-hero { padding:36px 18px 44px; }
  .web-page .recover-card { padding:26px 20px; }
}
@media (max-width:360px) {
  .web-page .web-header .web-languages { order:5; width:100%; justify-content:flex-end; }
  .web-page .web-header-inner { justify-content:space-between; }
  .web-page .web-nav { max-height:calc(100dvh - 175px); }
  .web-page .gen-ops label { flex:1 1 100%; }
  .web-page .recover-card { padding-inline:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .web-page *, .web-page *::before, .web-page *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
@media print {
  .web-page { background:#fff; color:#000; font-size:11pt; }
  .web-page :is(.web-header,.web-footer,.web-skip-link,.skip-link,.trust-bar,.back-to-top,.release-banner,.site-music-widget,.page-title-mascots,.functional-languages,.no-print,.legal-print,.gen-form,.sheet-actions,.quiz-btn,.finger-controls) { display:none!important; }
  .web-page :is(.container,.web-container,.legal-shell) { width:100%; max-width:none; margin-inline:0; }
  .web-page .section, .web-page main > .section:first-of-type { padding-block:12px!important; background:#fff; border:0; }
  .web-page :is(.section-title,.legal-shell h1,.recover-title) { color:#000!important; font-size:24pt; }
  .web-page .section-subtitle { margin-bottom:16px; }
  .web-page :is(.tf-card,.flow-step,.value-card,.tuto-card,.beta-step,.table-card,.semaine-card) { break-inside:avoid; box-shadow:none; }
  .web-page .sheet { padding:0; border:0; }
  .web-page .sheet .exercice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 24px; }
  .web-page .sheet .exercice-item .reponse { visibility:hidden; }
  .web-page .table-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px; }
  .web-page main:has(.table-grid) > .section:first-of-type { padding-block:0 8px!important; }
  .web-page main:has(.table-grid) > .section:first-of-type h1 { margin-bottom:6px; font-size:18pt; }
  .web-page main:has(.table-grid) > .section:first-of-type .section-subtitle { margin-bottom:0; font-size:10pt; }
  .web-page .table-grid { margin-block:8px; }
  .web-page .table-card { padding:6px 10px; border:1px solid #94a3b8; }
  .web-page .table-card h3 { margin-bottom:4px; font-size:11pt; line-height:1.2; }
  .web-page .table-card li { padding-block:0; font-size:9.5pt; line-height:1.1; }
  .web-page .legal-content { padding:0; border:0; }
  .web-page .legal-table-wrap { overflow:visible; }
  .web-page .legal-content table { min-width:0; font-size:9pt; }
  .web-page .legal-content :is(th,td) { padding:7px; overflow-wrap:anywhere; }
  .web-page .recover-hero { padding:0; }
}

/* Clear scope for the unpublished privacy changes and account-linking guides. */
.privacy-version-note,.privacy-guide-links { max-width:100%; padding:18px 20px; margin:20px 0; border:1px solid #cabce8; border-inline-start:4px solid #7052b8; border-radius:14px; background:#f6f3fc; color:#29364c; }
.privacy-version-note p,.privacy-guide-links p { margin:10px 0 0; font-size:.92rem; line-height:1.75; overflow-wrap:anywhere; }
.privacy-guide-links h2 { margin:0; font-size:1.15rem; }
@media(max-width:480px) { .privacy-version-note,.privacy-guide-links { padding:14px; } }
