/* ECJ Éducation — a school group site. The group stays in navy; each school keeps its own colour (Maple Bear red, Ethos azure). */
:root {
  --paper: #FCFCFD;
  --surface: #FFFFFF;
  --wash: #F1F3F8;
  --ink: #131A2E;
  --muted: #59627A;
  --line: #DFE3EC;
  --navy: #1B2747;
  --on-navy: #F4F6FB;
  --mb: #C8102E;
  --mb-soft: #FBE9EC;
  --eth: #2F7BEF;
  --eth-soft: #E8F0FE;
  --gold: #E9B44C;
  --strong: #1B2747;
  --font-display: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.8rem, 1.35rem + 1.8vw, 2.5rem);
  --step-4: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B1020; --surface: #121A2E; --wash: #172138; --ink: #E9EDF6; --muted: #A0AABF; --line: #26314C;
    --navy: #070B17; --on-navy: #E9EDF6; --mb: #F0526A; --mb-soft: #3A1620; --eth: #6AA3FF; --eth-soft: #14274A; --gold: #F2C46A; --strong: #E9EDF6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B1020; --surface: #121A2E; --wash: #172138; --ink: #E9EDF6; --muted: #A0AABF; --line: #26314C;
  --navy: #070B17; --on-navy: #E9EDF6; --mb: #F0526A; --mb-soft: #3A1620; --eth: #6AA3FF; --eth-soft: #14274A; --gold: #F2C46A; --strong: #E9EDF6;
  color-scheme: dark;
}

/* Language: both languages live in the page; the root attribute picks one. */
html:not([data-lang="en"]) .en { display: none !important; }
html[data-lang="en"] .fr { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.label { font-family: var(--font-display); font-weight: 700; font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--surface) 93%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.mono { width: 42px; height: 42px; border-radius: 10px; background: var(--navy); color: var(--on-navy); display: grid; place-items: center; font: 800 0.95rem var(--font-display); letter-spacing: 0.04em; position: relative; overflow: hidden; flex: none; }
.mono::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--mb) 0 50%, var(--eth) 50% 100%); }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font: 800 1.15rem var(--font-display); letter-spacing: -0.01em; }
.brand-text span { font-size: 0.82rem; color: var(--muted); }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--wash); }
.nav a[aria-current="page"] { background: var(--wash); font-weight: 600; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper); flex: none; }
.lang button { font: 700 0.78rem var(--font-display); letter-spacing: 0.06em; border: 0; background: transparent; color: var(--muted); padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); }
.menu-btn { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 8px 12px; font: 700 0.88rem var(--font-display); cursor: pointer; }
.mobile-nav { border-top: 1px solid var(--line); padding-block: 6px 12px; }
.mobile-nav a { display: block; padding: 11px 2px; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .nav { display: none; } .menu-btn { display: inline-block; } }
@media (min-width: 901px) { .mobile-nav { display: none !important; } }
@media (max-width: 420px) { .brand-text span { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 700 0.98rem var(--font-display); border-radius: 12px; padding: 13px 20px; border: 1.5px solid transparent; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--navy); color: var(--on-navy); }
.btn-line { border-color: var(--line); background: var(--surface); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.more { font: 700 0.98rem var(--font-display); text-decoration: none; color: var(--eth); }
.more:hover { text-decoration: underline; }

/* Home hero */
.hero { padding-block: clamp(36px, 6vw, 76px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: var(--step-4); font-weight: 800; }
.hero .lead { font-size: var(--step-1); color: var(--muted); max-width: 32em; line-height: 1.55; }
.collage { position: relative; display: grid; grid-template-columns: 1fr 0.72fr; grid-template-rows: auto auto; gap: 12px; min-width: 0; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.collage .c1 { grid-row: span 2; aspect-ratio: 3 / 4; }
.collage .c2 { aspect-ratio: 1; }
.collage .c3 { aspect-ratio: 1; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Facts band */
.facts { background: var(--surface); border-block: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 24px 20px; display: grid; gap: 4px; align-content: start; border-left: 1px solid var(--line); min-width: 0; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact b { font: 800 1.55rem var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 0.98rem; line-height: 1.4; }
@media (max-width: 860px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: 0; }
  .fact:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
}

/* Sections */
section.block { padding-block: clamp(56px, 8vw, 100px); scroll-margin-top: 80px; }
section.tinted { background: var(--wash); }
.section-head { display: grid; gap: 12px; max-width: 46rem; margin-bottom: clamp(26px, 4vw, 44px); }
.section-head h2 { font-size: var(--step-3); font-weight: 800; }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.55; }

/* School cards */
.schools { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.school-card { border-radius: 22px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.school-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.school-card .body { padding: 24px 26px 26px; display: grid; gap: 12px; align-content: start; }
.school-name { display: flex; align-items: center; gap: 12px; }
.school-name h3 { font-size: 1.6rem; font-weight: 800; }
.school-card.mb h3 { color: var(--mb); }
.school-card.eth h3 { color: var(--eth); }
.badge { width: 38px; height: auto; background: #fff; border-radius: 8px; padding: 3px; }
.levels { font: 700 0.8rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.school-card p { color: var(--muted); }
.visit { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font: 700 0.95rem var(--font-display); color: #fff; border-radius: 10px; padding: 11px 16px; text-decoration: none; margin-top: 4px; }
.school-card.mb .visit { background: var(--mb); }
.school-card.eth .visit { background: var(--eth); }
@media (max-width: 860px) { .schools { grid-template-columns: 1fr; } }

/* Split text + image */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split > * { min-width: 0; }
.split.rev > :first-child { order: 2; }
.split .text { display: grid; gap: 16px; }
.split .text h2 { font-size: var(--step-3); font-weight: 800; }
.split .text p { color: var(--muted); font-size: 1.1rem; }
.split img.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }

/* Mosaic */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 150px; gap: 12px; }
.mosaic figure { position: relative; overflow: hidden; border-radius: 16px; background: var(--wash); min-width: 0; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic figcaption { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); width: fit-content; background: rgb(10 16 32 / 74%); color: #fff; font-size: 0.86rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; line-height: 1.3; }
.span-3x2 { grid-column: span 3; grid-row: span 2; }
.span-2x2 { grid-column: span 2; grid-row: span 2; }
.span-3x1 { grid-column: span 3; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .span-3x2 { grid-column: span 2; grid-row: span 2; }
  .span-2x2 { grid-column: span 1; grid-row: span 2; }
  .span-3x1 { grid-column: span 2; }
}

/* Founder */
.founder { background: var(--navy); color: var(--on-navy); }
.founder-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.founder-grid > * { min-width: 0; }
.founder .label { color: var(--gold); }
.founder h2 { font-size: var(--step-3); font-weight: 800; margin-top: 12px; }
.founder blockquote { margin: 0; display: grid; gap: 16px; font-size: 1.12rem; line-height: 1.65; color: color-mix(in srgb, var(--on-navy) 86%, transparent); }
.sign { display: grid; gap: 2px; margin-top: 18px; }
.sign b { font: 700 1.05rem var(--font-display); color: var(--on-navy); }
.sign span { color: color-mix(in srgb, var(--on-navy) 70%, transparent); font-size: 0.95rem; }
.founder .more { color: var(--gold); margin-top: 18px; display: inline-block; }
@media (max-width: 860px) { .founder-grid { grid-template-columns: 1fr; } }

/* Page header (inner pages) */
.page-head { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 40px); }
.page-head .inner { display: grid; gap: 16px; max-width: 48rem; }
.page-head h1 { font-size: var(--step-4); font-weight: 800; }
.page-head p { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }
.banner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.banner img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.banner img:first-child { aspect-ratio: auto; }
@media (max-width: 760px) { .banner { grid-template-columns: 1fr 1fr; } .banner img:first-child { grid-column: span 2; aspect-ratio: 16 / 10; } }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 34px 34px; display: grid; gap: 6px; max-width: 44rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--strong); }
.timeline li.now::before { background: var(--gold); border-color: var(--gold); }
.timeline .when { font: 800 1.05rem var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.35rem; font-weight: 800; }
.timeline p { color: var(--muted); }

/* Values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.value .letter { font: 800 2rem var(--font-display); color: var(--strong); line-height: 1; }
.value h3 { font-size: 1.15rem; font-weight: 800; }
.value p { color: var(--muted); }
@media (max-width: 900px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* Two projects */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.project { border-radius: 20px; padding: 26px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.project.mb { background: var(--mb-soft); }
.project.eth { background: var(--eth-soft); }
.project h3 { font-size: 1.45rem; font-weight: 800; }
.project.mb h3 { color: var(--mb); }
.project.eth h3 { color: var(--eth); }
.project p { color: var(--ink); opacity: 0.85; }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { border-top: 3px solid var(--strong); padding-top: 14px; display: grid; gap: 6px; min-width: 0; }
.feature h3 { font-size: 1.1rem; font-weight: 800; }
.feature p { color: var(--muted); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 26px; }
.chips span { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 500; font-size: 0.95rem; }
.chips .label { border: 0; background: none; padding: 0 8px 0 0; }

/* Footer */
.site-foot { background: var(--navy); color: var(--on-navy); scroll-margin-top: 80px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 28px; padding-block: 48px 36px; }
.foot-grid > * { min-width: 0; }
.foot-grid h4 { margin: 0 0 12px; font: 700 0.78rem var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.foot-grid p, .foot-grid li { color: color-mix(in srgb, var(--on-navy) 80%, transparent); font-size: 0.98rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-brand { display: grid; gap: 12px; }
.foot-brand .brand-text span { color: color-mix(in srgb, var(--on-navy) 70%, transparent); }
.foot-brand .mono { background: var(--on-navy); color: var(--navy); }
.num { font-variant-numeric: tabular-nums; }
.legal { border-top: 1px solid color-mix(in srgb, var(--on-navy) 16%, transparent); padding-block: 18px 26px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: color-mix(in srgb, var(--on-navy) 66%, transparent); font-size: 0.88rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
