@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('polices/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('polices/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('polices/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('polices/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('polices/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('polices/ibm-plex-sans-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('polices/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('polices/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url('polices/kalam-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { color-scheme: light; --ink: #1f2a44; --muted: #4a546e; --bg: #fbf8f0; --grid: rgba(64, 120, 190, .1); --card: #fffefa; --line: #e2dacb; --accent: #0f6e7a; --accent-ink: #0a5560; --primary: #1f2a44; --on-primary: #fbf8f0; --hl: #ffe45c; --pen: #c2412d; --tape-a: rgba(255, 228, 92, .75); --tape-b: rgba(15, 110, 122, .25); --shadow: rgba(31, 42, 68, .1); --fig-grid: rgba(64, 120, 190, .22); --fig-curve: #0f6e7a; --fig-halo: rgba(194, 65, 45, .16); --logo-fiole: #1f2a44; --logo-courbe: #0f6e7a; --logo-point: #c2412d; }
:root[data-theme="dark"] { color-scheme: dark; --ink: #e9edf5; --muted: #a3aec6; --bg: #0f1522; --grid: rgba(120, 170, 255, .07); --card: #172033; --line: #2a3550; --accent: #4fd1d9; --accent-ink: #8fe3e9; --primary: #4fd1d9; --on-primary: #0f1522; --hl: rgba(255, 228, 92, .38); --pen: #ff8a70; --tape-a: rgba(255, 228, 92, .3); --tape-b: rgba(79, 209, 217, .28); --shadow: rgba(0, 0, 0, .3); --fig-grid: rgba(120, 170, 255, .14); --fig-curve: #4fd1d9; --fig-halo: rgba(255, 138, 112, .2); --logo-fiole: #e9edf5; --logo-courbe: #4fd1d9; --logo-point: #ff8a70; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark; --ink: #e9edf5; --muted: #a3aec6; --bg: #0f1522; --grid: rgba(120, 170, 255, .07); --card: #172033; --line: #2a3550; --accent: #4fd1d9; --accent-ink: #8fe3e9; --primary: #4fd1d9; --on-primary: #0f1522; --hl: rgba(255, 228, 92, .38); --pen: #ff8a70; --tape-a: rgba(255, 228, 92, .3); --tape-b: rgba(79, 209, 217, .28); --shadow: rgba(0, 0, 0, .3); --fig-grid: rgba(120, 170, 255, .14); --fig-curve: #4fd1d9; --fig-halo: rgba(255, 138, 112, .2); --logo-fiole: #e9edf5; --logo-courbe: #4fd1d9; --logo-point: #ff8a70; } }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 18px/1.5 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--ink);
  background-color: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px;
  min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 6px; }
mark { background: linear-gradient(transparent 56%, var(--hl) 56%); color: inherit; padding: 0 .12em; }
header.top, main, footer.bottom { width: 100%; max-width: 72rem; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-top: 1.2rem; padding-bottom: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 40px; height: 40px; flex: none; }
.wordmark { font-weight: 700; font-size: 1.45rem; letter-spacing: -.01em; }
.wordmark mark { padding: 0 .06em 0 0; }
.wordmark.small { font-size: 1.05rem; color: var(--ink); }
header.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .85rem; }
header.top nav a { color: var(--ink); text-decoration: none; padding: .6rem .8rem; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
header.top nav a:hover { color: var(--accent); }
header.top nav a.compte { gap: .4rem; }
.theme-toggle { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
/* Choix de la langue : interrupteur FR | TR, la langue de la page en couleur (comme dans les activités). */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 2px solid var(--accent); border-radius: 999px; background: var(--card); }
.lang-switch > span, header.top nav .lang-switch > a { display: inline-flex; align-items: center; gap: .35rem; min-height: 0; height: 34px; padding: 0 .65rem 0 .3rem; border-radius: 999px; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-switch > span.on { background: var(--accent); color: var(--card); }
.lang-switch > a .drapeau { filter: saturate(.35); opacity: .75; transition: filter .15s, opacity .15s; }
.lang-switch > a:hover .drapeau, .lang-switch > a:focus-visible .drapeau { filter: none; opacity: 1; }
header.top nav .lang-switch > a:hover { color: var(--ink); }
.drapeau { display: block; width: 22px; height: 22px; flex: none; clip-path: circle(50%); }
.theme-toggle .soleil { display: none; }
:root[data-theme="dark"] .theme-toggle .soleil { display: block; }
:root[data-theme="dark"] .theme-toggle .lune { display: none; }
main { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }
h1 { margin: 0 0 .6rem; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; }
h2 { margin: 2.6rem 0 1rem; font-size: 1.7rem; letter-spacing: -.01em; }
.lead { margin: 0 0 1.4rem; font-size: 1.12rem; color: var(--muted); max-width: 40rem; }
.kicker { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crumbs { margin: 0 0 .8rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .85rem; color: var(--muted); }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: .7rem 1.3rem; border-radius: 10px; font-weight: 600; text-decoration: none; border: 2px dashed var(--ink); color: var(--ink); }
.btn.primary { background: var(--primary); color: var(--on-primary); border: 2px solid var(--primary); }
.btn.primary:hover { color: var(--on-primary); filter: brightness(1.12); }
/* Accueil */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; padding-top: 1rem; }
.hero-text { flex: 1 1 24rem; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.6rem); line-height: 1.05; margin: 0; }
.hero .lead { margin: 0; }
.hero-fig { flex: 1 1 24rem; min-width: 0; margin: 0; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem; transform: rotate(1deg); box-shadow: 0 12px 28px var(--shadow); }
.hero-fig::before { content: ''; position: absolute; top: -13px; left: 42%; width: 110px; height: 26px; background: var(--tape-a); transform: rotate(-4deg); }
.hero-fig svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.fig-grid { fill: none; stroke: var(--fig-grid); stroke-width: 1; }
.fig-axes line, .fig-axes path { stroke: var(--ink); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig-axes text { fill: var(--muted); font: 600 13px 'IBM Plex Sans', sans-serif; text-anchor: middle; }
.fig-curve { fill: none; stroke: var(--fig-curve); stroke-width: 3.4; stroke-linecap: round; }
.fig-guide { stroke: var(--pen); stroke-width: 2; stroke-dasharray: 5 6; }
.fig-value { fill: var(--pen); font: 22px 'Kalam', cursive; }
.fig-point { cursor: grab; outline: none; }
.fig-point .dot { fill: var(--pen); }
.fig-point .halo { fill: var(--fig-halo); }
.fig-point:focus-visible .halo { stroke: var(--pen); stroke-width: 2; }
.features { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; }
.features li { display: flex; gap: .8rem; align-items: flex-start; color: var(--muted); }
.features svg { flex: none; width: 34px; height: 34px; color: var(--accent); }
.features strong { color: var(--ink); }
/* Cartes (fiches scotchées) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 1.6rem; margin-top: 1.2rem; }
.card { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: 1.8rem 1.6rem 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; box-shadow: 0 8px 18px var(--shadow); transform: rotate(-.7deg); transition: transform .15s ease, box-shadow .15s ease; }
.card:nth-child(2n) { transform: rotate(.6deg); }
.card::before { content: ''; position: absolute; top: -12px; left: 40%; width: 90px; height: 24px; background: var(--tape-b); transform: rotate(3deg); }
.card:nth-child(2n)::before { background: var(--tape-a); transform: rotate(-3deg); }
.card:hover, .card:focus-visible { transform: rotate(0) translateY(-3px); box-shadow: 0 14px 26px var(--shadow); color: var(--ink); }
.card .big { font-size: 2.6rem; line-height: 1; }
.card .title { font-size: 1.3rem; line-height: 1.25; }
.card .meta { font-weight: 600; }
.card .list, .card .desc { color: var(--muted); }
.card .go { margin-top: auto; padding-top: .3rem; font-family: 'Kalam', cursive; font-size: 1.25rem; color: var(--accent); }
/* Espace professeur, mentions */
ul.explain { padding-left: 1.2rem; display: grid; gap: .4rem; max-width: 46rem; }
ul.links { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; max-width: 52rem; }
ul.links li { display: flex; flex-direction: column; gap: .25rem; padding: .9rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
ul.links span { font-size: .95rem; }
.version { margin-top: 2rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .8rem; color: var(--muted); }
.badge { display: inline-block; vertical-align: middle; padding: .05rem .45rem; border-radius: 6px; background: var(--hl); color: var(--ink); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
.prose h3 { font-size: 1.08rem; margin: 1.4rem 0 .4rem; }
footer.bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding-top: 1.2rem; padding-bottom: 2rem; border-top: 2px solid var(--ink); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .85rem; color: var(--muted); }
footer.bottom .links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
footer.bottom .wordmark { font-family: 'IBM Plex Sans', sans-serif; }
@media (max-width: 600px) {
  body { font-size: 17px; }
  .hero-fig { transform: none; }
  .card, .card:nth-child(2n) { transform: none; }
  .lang-switch .code { display: none; }
  .lang-switch > span, header.top nav .lang-switch > a { padding: 0 .3rem; }
  /* lien du compte : l'icône seule (le nom reste pour les lecteurs d'écran) */
  header.top nav a.compte span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
