/* mesformations.ma
   Rouge : la marque et le stylo du correcteur. Bleu : le stylo de l'élève.
   Le biais des blocs reprend l'inclinaison du logo. Positions logiques partout (arabe = droite à gauche). */

@font-face { font-family: "Readex Pro"; src: url(fonts/readex-pro-arabic-wght-normal.woff2) format("woff2"); font-weight: 160 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; src: url(fonts/readex-pro-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 160 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "Readex Pro"; src: url(fonts/readex-pro-latin-wght-normal.woff2) format("woff2"); font-weight: 160 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2010-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --red: #da1723; --red-dark: #b30f1a; --red-soft: #fdecee;
  --pen: #2b3fcb; --pen-dark: #1e2e9e; --pen-soft: #eef0fd;
  --ink: #1a2150; --ink-2: #555c85; --line: #dcdff0; --wash: #f5f6fc; --paper: #fff;
  --green: #0a7450; --green-soft: #e3f5ed; --amber: #855500; --amber-soft: #fdf2da;
  /* Cahier Seyès, champs, survols : surchargés en mode sombre */
  --grid-1: #cfd3f4; --grid-2: #dfe2f8; --grid-3: #eef0fb; --margin: #ee8d95;
  --field: #b9bfdd; --focus: #c3cafa; --hover: #e9ebf8; --drop: #9aa5e8; --drop-over: #e3e7fc;
  --ok-text: #064d35; --bad-text: #8c0b15; --danger-line: #f0b9be; --veil: rgb(255 255 255 / .97); --backdrop: rgb(26 33 80 / .55);
  --shadow-pen: var(--pen); --deep: #1a2150; --on-accent: #fff; --pen-fill: #2b3fcb; --pen-fill-hover: #1e2e9e;
  --r-s: 8px; --r-m: 14px;
  --brand-shape: 16px 4px 16px 4px;
  --slant: 18px;
  --w: 1160px;
  --cell: 40px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; font: 400 1rem/1.65 "Readex Pro", system-ui, "Segoe UI", Tahoma, sans-serif; color: var(--ink); background: var(--paper); overflow-wrap: break-word; }
[lang=ar] body, body:lang(ar) { line-height: 1.8; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; text-wrap: balance; letter-spacing: -.015em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.7rem); }
h3 { font-size: 1.08rem; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--pen); text-underline-offset: 3px; }
a:hover { color: var(--pen-dark); }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, figure, fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset-block-start: -60px; inset-inline-start: 12px; z-index: 100; padding: 10px 16px; background: var(--deep); color: #fff; border-radius: 0 0 8px 8px; }
.skip:focus { inset-block-start: 0; color: #fff; }
.wrap { width: min(100% - 40px, var(--w)); margin-inline: auto; }
.wrap.narrow { --w: 560px; }
.wrap.mid { --w: 860px; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.nums { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
[dir=rtl] .icon.flip { transform: scaleX(-1); }
.stack > * + * { margin-block-start: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 10px 22px; border: 1.5px solid transparent; border-radius: var(--r-s); font-weight: 500; line-height: 1.3; text-decoration: none; text-align: center; transition: background-color .15s, border-color .15s, color .15s; }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--red); color: #fff; border-radius: var(--brand-shape); }
.btn-main:hover { background: var(--red-dark); color: #fff; }
.btn-pen { background: var(--pen-fill); color: #fff; }
.btn-pen:hover { background: var(--pen-fill-hover); color: #fff; }
.btn-line { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { border-color: var(--danger-line); background: var(--paper); color: var(--red-dark); }
.btn-danger:hover { background: var(--red-soft); color: var(--red-dark); }
.btn-wa { background: #0b6b4a; color: #fff; }
.btn-wa:hover { background: #07543a; color: #fff; }
.btn-s { min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled=true] { background: var(--wash); border-color: var(--line); color: var(--ink-2); cursor: not-allowed; }
.btn.busy { pointer-events: none; opacity: .65; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--pen); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.danger { color: var(--red-dark); }

/* En-tête */
.site-head { position: sticky; inset-block-start: 0; z-index: 30; background: var(--paper); border-block-end: 1px solid var(--line); view-transition-name: head; }
.site-head .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 66px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 26px; flex: 1; }
.site-nav > a:not(.btn) { color: var(--ink); text-decoration: none; padding-block: 8px; border-block-end: 2px solid transparent; }
.site-nav > a:not(.btn):hover, .site-nav > a[aria-current]:not(.btn) { border-color: var(--red); }
.site-nav .push { margin-inline-start: auto; }
.site-nav > a { white-space: nowrap; }
.langs { display: flex; gap: 2px; }
.langs a { min-width: 40px; min-height: 40px; display: grid; place-items: center; border-radius: var(--r-s); color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.langs a:hover { background: var(--wash); color: var(--ink); }
.langs a[aria-current] { color: var(--pen); font-weight: 600; }
.menu-btn { display: none; margin-inline-start: auto; width: 48px; height: 48px; border: 0; background: none; border-radius: var(--r-s); place-items: center; }

/* Accueil : page de cahier Seyès */
.hero { position: relative; overflow: hidden; border-block-end: 1px solid var(--line);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-1) 1.2px, transparent 1.2px),
    linear-gradient(90deg, var(--grid-2) 1px, transparent 1px),
    linear-gradient(var(--grid-3) 1px, transparent 1px);
  background-size: var(--cell) var(--cell), var(--cell) var(--cell), var(--cell) calc(var(--cell) / 4); }
.hero > .wrap:first-child { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 64px; padding-block: 80px; align-items: start; }
.hero-text { position: relative; padding-inline-start: 34px; padding-block-start: 16px; }
/* La marge rouge du cahier */
.hero-text::before { content: ""; position: absolute; inset-block: -600px; inset-inline-start: 0; width: 2px; background: var(--margin); }
.hero h1 { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem); line-height: 1.11; font-weight: 700; letter-spacing: -.035em; }
:lang(ar) .hero h1 { line-height: 1.35; font-size: clamp(2.3rem, 1.4rem + 3.6vw, 3.9rem); }
.hero p.lead { margin-block: 26px 32px; max-width: 31em; font-size: 1.15rem; }

/* La copie d'examen */
.sheet { position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: 26px 6px 26px 6px; padding: 26px 28px 28px; box-shadow: 10px 10px 0 var(--shadow-pen); }
[dir=rtl] .sheet { box-shadow: -10px 10px 0 var(--shadow-pen); }
.sheet h2 { font-size: 1.2rem; }
.sheet .hint { margin-block: 2px 16px; font-size: .92rem; color: var(--ink-2); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button, .seg a { min-height: 42px; padding: 6px 14px; display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--paper); font-size: .92rem; color: var(--ink); text-decoration: none; }
.seg button:hover, .seg a:hover { border-color: var(--pen); }
.seg [aria-pressed=true], .seg [aria-current] { background: var(--pen-soft); border-color: var(--pen); color: var(--pen-dark); font-weight: 500; }
.sheet-q { margin-block: 22px 12px; font-weight: 500; font-size: 1.08rem; min-height: 3.3em; }
.sheet-o button { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 5px 2px; border: 0; border-block-end: 1px solid var(--line); background: none; text-align: start; }
.sheet-o li:last-child button { border: 0; }
.bubble { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1.8px solid var(--ink); border-radius: 50%; font-size: .88rem; font-weight: 500; transition: background-color .15s, color .15s, border-color .15s; }
.sheet-o button:not([disabled]):hover .bubble { border-color: var(--pen); color: var(--pen); }
.sheet-o button[disabled] { color: inherit; cursor: default; }
.sheet-o .picked .bubble { background: var(--pen); border-color: var(--pen); color: var(--on-accent); }
.sheet-o .missed > span:last-of-type { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.ring { position: absolute; inset-inline-start: -9px; inset-block-start: 50%; width: 54px; height: 50px; margin-block-start: -25px; overflow: visible; pointer-events: none; }
.ring path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw .6s .15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sheet-a { margin-block-start: 14px; padding-inline-start: 14px; border-inline-start: 3px solid var(--red); }
.sheet-a strong { color: var(--red-dark); font-weight: 600; }
.sheet-a a { display: inline-block; margin-block-start: 6px; font-weight: 500; }

/* Sections */
.section { padding-block: 84px; }
.section.tint { background: var(--wash); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-block-end: 30px; }

/* Ligne de formation : bloc de date incliné comme le logo */
.flist { border-block-start: 2px solid var(--ink); }
.fitem { position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding-block: 24px; border-block-end: 1px solid var(--line); }
.fdate { display: grid; align-content: center; justify-items: center; min-height: 104px; padding-inline: 10px 24px; color: var(--on, #fff); background: var(--c, var(--pen)); line-height: 1.2; text-align: center; font-size: .9rem; clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%); border-start-start-radius: 14px; border-end-start-radius: 4px; transition: clip-path .2s; }
[dir=rtl] .fdate { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--slant) 100%); }
.fdate b { font-size: 2.2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fitem:hover .fdate { clip-path: polygon(0 0, calc(100% - var(--slant)) 0, 100% 100%, 0 100%); }
[dir=rtl] .fitem:hover .fdate { clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%); }
.fitem h3 { font-size: 1.22rem; }
.fitem h3 a { color: var(--ink); text-decoration: none; }
.fitem h3 a::after { content: ""; position: absolute; inset: 0; }
.fitem:hover h3 a { color: var(--pen); }
.fitem .sum { margin-block-start: 4px; color: var(--ink-2); max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-block-start: 10px; font-size: .9rem; }
.facts li { display: flex; align-items: center; gap: 7px; }
.facts .icon { color: var(--ink-2); }
.facts .hot { color: var(--red-dark); font-weight: 500; }
.fprice { text-align: end; white-space: nowrap; }
.fprice b { display: block; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.filters { display: grid; gap: 16px; margin-block: 26px 34px; }
.filters > div { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filters .lab { min-width: 76px; font-weight: 500; }

/* Étapes d'inscription */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: block; margin-block-end: 10px; color: var(--red); font-size: 3.6rem; font-weight: 700; line-height: 1; transform: skewX(-9deg); transform-origin: start; width: max-content; }
.steps p { margin-block-start: 6px; color: var(--ink-2); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px; }
.person { display: flex; gap: 16px; align-items: center; }
.avatar { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px 5px 22px 5px; object-fit: cover; background: var(--pen-soft); color: var(--pen-dark); font-weight: 600; }
.avatar.s { width: 44px; height: 44px; border-radius: 13px 3px 13px 3px; font-size: .85rem; }
.person p { font-size: .92rem; color: var(--ink-2); line-height: 1.5; }

.faq details { border-block-end: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--red); transition: transform .2s; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-block-end: 20px; max-width: 68ch; color: var(--ink-2); }

.help { background: var(--deep); color: #fff; }
.help .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 44px; }
.site-foot { padding-block: 34px; font-size: .92rem; color: var(--ink-2); }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.site-foot a { color: inherit; }

/* Page d'une formation */
.fhero { position: relative; overflow: hidden; background: var(--c, var(--pen)); color: var(--on, #fff); }
/* Les triangles du logo, en grand */
.fhero::before, .fhero::after { content: ""; position: absolute; inset-block: 0; background: currentColor; opacity: .09; }
.fhero::before { inset-inline-end: 12%; width: 300px; clip-path: polygon(0 0, 100% 0, 58% 100%); }
.fhero::after { inset-inline-end: -40px; width: 260px; clip-path: polygon(40% 0, 100% 100%, 0 100%); }
[dir=rtl] .fhero::before, [dir=rtl] .fhero::after { transform: scaleX(-1); }
.fhero .wrap { position: relative; z-index: 1; padding-block: 56px 60px; }
.fhero .cat { display: block; margin-block-end: 10px; }
.fhero h1 { font-size: clamp(1.9rem, 1.3rem + 2.5vw, 3.1rem); max-width: 20em; }
.fhero p { margin-block-start: 14px; max-width: 54ch; font-size: 1.1rem; }
.fbody { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 64px; padding-block: 52px 84px; align-items: start; }
.fbody section + section { margin-block-start: 46px; }
.fbody section > h2 { margin-block-end: 16px; }
.fcover { margin-block-end: 36px; border-radius: 26px 6px 26px 6px; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.buy { position: sticky; inset-block-start: 96px; padding: 26px; border: 2px solid var(--ink); border-radius: 26px 6px 26px 6px; background: var(--paper); }
.buy .price { font-size: 2.1rem; font-weight: 700; line-height: 1.2; }
.buy dl { margin-block: 16px 22px; }
.buy dl > div { display: flex; justify-content: space-between; gap: 18px; padding-block: 9px; border-block-end: 1px solid var(--line); font-size: .95rem; }
.buy dt { color: var(--ink-2); white-space: nowrap; }
.buy dd { text-align: end; font-weight: 500; }
.buy .small { margin-block-start: 14px; }
.outline li { display: flex; gap: 12px; align-items: center; padding-block: 11px; border-block-end: 1px solid var(--line); }
.outline li.chapter { padding-block-start: 26px; border-block-end: 2px solid var(--ink); font-weight: 600; }
.outline li.chapter:first-child { padding-block-start: 0; }
.outline .icon { color: var(--pen); }
.prose > * + * { margin-block-start: 14px; }
.prose ul { list-style: disc; padding-inline-start: 22px; }
.prose ol { list-style: decimal; padding-inline-start: 24px; }
.prose li + li { margin-block-start: 6px; }
.prose h1, .prose h2, .prose h3 { font-size: 1.15rem; margin-block-start: 26px; }
.prose { max-width: 72ch; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; }
.prose blockquote { margin: 14px 0; padding-inline-start: 16px; border-inline-start: 3px solid var(--red); }
.prose pre { overflow-x: auto; padding: 14px; background: var(--wash); border-radius: var(--r-s); direction: ltr; text-align: left; }

/* Formulaires */
.page { padding-block: 52px 84px; min-height: 62vh; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label, legend { font-weight: 500; padding: 0; }
.field .tip { font-size: .86rem; color: var(--ink-2); }
input:not([type=checkbox], [type=radio], [type=file], [type=color], [type=hidden]), select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: var(--r-s); background: var(--paper); transition: border-color .15s; }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--pen); border-radius: var(--r-s); }
[aria-invalid=true] { border-color: var(--red) !important; }
.err { color: var(--red-dark); font-size: .9rem; font-weight: 500; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--pen); flex: none; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.pw { position: relative; }
.pw input { padding-inline-end: 100px !important; }
.pw button { position: absolute; inset-block: 4px; inset-inline-end: 4px; padding-inline: 12px; border: 0; border-radius: 6px; background: none; color: var(--pen); font-size: .88rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }

.flash { display: flex; gap: 12px; align-items: flex-start; margin-block-end: 24px; padding: 14px 18px; border-radius: var(--r-s); background: var(--green-soft); color: var(--ok-text); }
.flash.bad { background: var(--red-soft); color: var(--bad-text); }
.flash .icon { margin-block-start: .2em; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: .85rem; font-weight: 500; background: var(--wash); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.wait { background: var(--amber-soft); color: var(--amber); }
.tag.bad { background: var(--red-soft); color: var(--red-dark); }
.tag.info { background: var(--pen-soft); color: var(--pen-dark); }
.empty { padding: 44px 24px; border: 2px dashed var(--line); border-radius: var(--r-m); text-align: center; color: var(--ink-2); }
.empty .btn { margin-block-start: 18px; }

/* Récapitulatif en haut de l'inscription */
.recap { display: flex; align-items: center; gap: 18px; margin-block: 8px 30px; padding-block: 16px; border-block: 1px solid var(--line); }
.recap .swatch { width: 14px; align-self: stretch; min-height: 48px; background: var(--c); transform: skewX(-9deg); border-radius: 4px 1px 4px 1px; }
.recap div:nth-child(2) { flex: 1; }
.recap b { font-weight: 600; }

/* Suivi du paiement */
.track { display: grid; grid-template-columns: repeat(3, 1fr); margin-block: 26px 38px; }
.track li { position: relative; padding-block-start: 40px; text-align: center; font-size: .9rem; color: var(--ink-2); }
.track li::before { content: ""; position: absolute; inset-block-start: 13px; inset-inline: -50% 50%; height: 3px; background: var(--line); }
.track li:first-child::before { display: none; }
.track li span { z-index: 1; position: absolute; inset-block-start: 0; inset-inline-start: calc(50% - 15px); display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid var(--line); border-radius: 50%; background: var(--paper); color: #fff; font-size: .85rem; }
.track .on { color: var(--ink); font-weight: 500; }
.track .on span { background: var(--green); border-color: var(--green); }
.track .on::before { background: var(--green); }
.track .now { color: var(--ink); font-weight: 500; }
.track .now span { border-color: var(--pen); }

.payflow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px; align-items: start; }
.payflow h2 { display: flex; gap: 12px; align-items: baseline; margin-block-end: 18px; }
.payflow h2 i { font-style: normal; color: var(--red); font-weight: 700; }
.bank > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding-block: 12px; border-block-end: 1px solid var(--line); }
.bank dt { grid-column: 1 / -1; font-size: .88rem; color: var(--ink-2); }
.bank dd { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bank .big dd { font-size: 1.7rem; line-height: 1.3; }
.bank .key { padding-inline: 14px; margin-block-start: 12px; border: 0; border-radius: var(--r-s); background: var(--pen-soft); }
.copy { min-height: 40px; padding: 4px 14px; border: 1.5px solid var(--pen); border-radius: var(--r-s); background: var(--paper); color: var(--pen-dark); font-size: .88rem; font-weight: 500; }
.copy.done { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.drop { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; min-height: 190px; padding: 20px; border: 2px dashed var(--drop); border-radius: var(--r-m); background: var(--pen-soft); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.over { border-color: var(--pen); background: var(--drop-over); }
.drop:focus-within { outline: 3px solid var(--pen); outline-offset: 2px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop .icon { width: 34px; height: 34px; color: var(--pen); }
.drop b { font-weight: 600; }
.drop img { max-height: 210px; border-radius: var(--r-s); }
.state { display: grid; justify-items: start; gap: 12px; padding: 32px; border-radius: 26px 6px 26px 6px; background: var(--wash); }
.state.good { background: var(--green-soft); }
.state.bad { background: var(--red-soft); margin-block-end: 34px; }
.plist li { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-block: 12px; border-block-end: 1px solid var(--line); }
.plist li > :first-child { flex: 1 1 180px; }
.block { margin-block-start: 52px; }
.block > h2 { margin-block-end: 14px; }

/* Espace élève */
.mine li.card { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding-block: 22px; border-block-end: 1px solid var(--line); }
.mine .swatch { height: 100%; min-height: 70px; background: var(--c); transform: skewX(-9deg); border-radius: 4px 1px 4px 1px; }
.mine .row { margin-block-start: 8px; }
.bar { width: min(220px, 100%); height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 60px; align-items: start; margin-block-start: 34px; }
.lives li { padding-block: 16px; border-block-end: 1px solid var(--line); }
.lives .when { font-weight: 600; }
.lives .btn { margin-block-start: 10px; }
.livetag { display: inline-flex; align-items: center; gap: 7px; color: var(--red-dark); font-weight: 600; }
.livetag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* Cours */
.learn { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100vh - 73px); }
.learn-nav { border-inline-end: 1px solid var(--line); background: var(--wash); padding: 26px 18px 40px; }
.learn-nav h2 { font-size: 1.05rem; padding-inline: 10px; }
.learn-nav .prog { display: grid; gap: 7px; padding: 12px 10px 16px; font-size: .88rem; color: var(--ink-2); }
.learn-nav .prog .bar { width: 100%; }
.learn-nav li a { display: flex; gap: 11px; padding: 9px 10px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.45; }
.learn-nav li a:hover { background: var(--hover); }
.learn-nav li a[aria-current] { background: var(--pen); color: var(--on-accent); }
.learn-nav li a[aria-current] .icon { color: var(--on-accent); }
.learn-nav .icon { margin-block-start: .1em; color: var(--ink-2); }
.learn-nav .isdone .icon { color: var(--green); }
.learn-nav li.chapter { padding: 20px 10px 6px; font-weight: 600; font-size: .92rem; }
.learn-nav summary { display: none; }
.learn-main { padding: 40px clamp(20px, 4vw, 60px) 70px; }
.learn-in { max-width: 860px; margin-inline: auto; }
.learn-in > h1 { margin-block-end: 24px; }
.player { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--r-m); overflow: hidden; background: var(--deep); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
.filebox { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-block-end: 18px; }
.filebox span { flex: 1 1 200px; }
.learn-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-block-start: 44px; padding-block-start: 24px; border-block-start: 1px solid var(--line); }
.count { display: flex; align-items: center; gap: 14px; margin-block-end: 34px; padding: 18px 22px; border-radius: 20px 5px 20px 5px; background: var(--deep); color: #fff; font-size: 1.1rem; font-weight: 500; }
.count .icon { color: #ff8a92; }

/* Quiz */
.q { padding-block: 26px; border-block-end: 1px solid var(--line); }
.q legend { display: flex; gap: 12px; font-size: 1.06rem; font-weight: 500; margin-block-end: 12px; white-space: pre-line; float: inline-start; width: 100%; }
.q legend + * { clear: both; }
.q legend b { color: var(--pen); font-variant-numeric: tabular-nums; }
.opt { display: flex; align-items: center; gap: 13px; min-height: 50px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.opt + .opt { margin-block-start: 8px; }
.opt:hover { border-color: var(--pen); }
.opt:has(input:checked) { border-color: var(--pen); background: var(--pen-soft); }
.opt:has(input:focus-visible) { outline: 3px solid var(--pen); outline-offset: 2px; }
.opt > span { flex: 1; }
.opt.is-right { border-color: var(--green); background: var(--green-soft); cursor: default; }
.opt.is-wrong { border-color: var(--red); background: var(--red-soft); cursor: default; }
.opt.plain { cursor: default; }
.opt.plain:hover { border-color: var(--line); }
.opt small { font-weight: 500; }
.why { margin-block-start: 12px; padding-inline-start: 14px; border-inline-start: 3px solid var(--red); }
.result { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 28px 30px; border-radius: 26px 6px 26px 6px; background: var(--wash); }
/* La note, entourée au stylo rouge */
.mark { position: relative; display: grid; place-items: center; width: 128px; height: 104px; color: var(--red-dark); font-size: 2rem; font-weight: 700; direction: ltr; }
.mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mark path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw .9s .2s ease-out forwards; }

/* Fenêtre de confirmation */
dialog { width: min(440px, calc(100% - 40px)); padding: 28px; border: 0; border-radius: var(--r-m); color: var(--ink); }
dialog::backdrop { background: var(--backdrop); }
dialog p { margin-block-end: 22px; font-size: 1.05rem; }
dialog .row { justify-content: flex-end; }

.pages { display: flex; justify-content: space-between; gap: 12px; margin-block-start: 30px; }
.errpage { display: grid; place-items: center; align-content: center; gap: 22px; min-height: 100vh; padding: 24px; text-align: center; }
.errpage img { width: 130px; }
.errpage p { max-width: 32em; font-size: 1.15rem; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }

@media (max-width: 980px) {
  .menu-btn { display: grid; }
  .site-head .wrap { flex-wrap: wrap; gap: 0 16px; }
  .site-nav { display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 4px; padding-block: 8px 20px; }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.btn) { padding-block: 12px; border-block-end: 1px solid var(--line); }
  .site-nav .push { margin-inline-start: 0; margin-block-start: 8px; }
  .hero > .wrap:first-child { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 52px 64px; }
  .fbody, .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .buy { position: static; grid-row: 1; }
  .payflow { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .learn { grid-template-columns: minmax(0, 1fr); }
  .learn-nav { border: 0; border-block-end: 1px solid var(--line); padding: 8px 12px; }
  .learn-nav summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-inline: 10px; font-weight: 500; cursor: pointer; }
}
@media (max-width: 700px) {
  .section { padding-block: 60px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .steps li { display: grid; grid-template-columns: 62px 1fr; }
  .steps li::before { grid-row: span 2; font-size: 3rem; }
  .fitem { grid-template-columns: 92px minmax(0, 1fr); gap: 18px; align-items: start; }
  .fdate { min-height: 92px; padding-inline: 6px 18px; font-size: .8rem; --slant: 14px; }
  .fdate b { font-size: 1.7rem; }
  .fprice { grid-column: 2; display: flex; align-items: baseline; gap: 12px; text-align: start; }
  .fitem h3 { font-size: 1.1rem; }
  .sheet { padding: 22px 18px; box-shadow: 6px 6px 0 var(--pen); }
  [dir=rtl] .sheet { box-shadow: -6px 6px 0 var(--pen); }
  .hero-text { padding-inline-start: 20px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .mine li.card { grid-template-columns: 12px minmax(0, 1fr); gap: 16px; }
  .mine li.card > .btn { grid-column: 2; justify-self: start; }
  .page { padding-block: 34px 60px; }
  .learn-foot .btn { flex: 1 1 auto; }
  .fhero .wrap { padding-block: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* Fil d'Ariane et bloc « En bref » (SEO) */
.crumbs { font-size: .85rem; margin-block-end: 14px; position: relative; z-index: 1; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin-inline: 8px; opacity: .55; }
.crumbs a { color: inherit; opacity: .85; }
.crumbs a:hover { color: inherit; opacity: 1; }
.crumbs [aria-current] { opacity: .85; display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.brief { border-inline-start: 4px solid var(--red); background: var(--wash); border-radius: var(--r-s); padding: 16px 20px; margin-block-end: 28px; }
.brief h2 { font-size: 1rem; color: var(--red); margin-block-end: 6px; }
.brief p + p { margin-block-start: 8px; }

/* Concours, calendrier, alertes, recherche */
.citem .fdate b { font-size: 2rem; }
.ctable { border-collapse: collapse; width: 100%; }
.ctable th, .ctable td { padding: 10px 12px; border-block-end: 1px solid var(--line); text-align: start; }
.ctable th { font-weight: 500; color: var(--ink-2); font-size: .9rem; border-block-end: 2px solid var(--ink); }
.faq details { border-block-end: 1px solid var(--line); padding-block: 14px; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq details .prose { margin-block-start: 10px; }
.prep { margin-block-start: 22px; padding-block-start: 18px; border-block-start: 1px dashed var(--line); }
.prep h2 { font-size: 1.05rem; margin-block-end: 6px; }
.alertbox { padding: 24px; border-radius: 26px 6px 26px 6px; background: var(--pen-soft); max-width: 640px; }
.alertbox h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin-block-end: 6px; }
.alertbox > p { margin-block-end: 14px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.calnav { margin-block-end: 26px; gap: 12px; flex-wrap: wrap; }
.calmonth + .calmonth { margin-block-start: 40px; }
.calmonth h2 { text-transform: capitalize; padding-block-end: 8px; border-block-end: 2px solid var(--ink); }
.calmonth h2 a { color: inherit; text-decoration: none; }
.calist li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--line); }
.calist time { display: grid; justify-items: center; align-content: start; line-height: 1.1; }
.calist time b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.calist time span { font-size: .8rem; color: var(--ink-2); }
.calist div { display: grid; gap: 2px; }
.calist .kind { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.calist .k-closes .kind { color: var(--red-dark); }
.calist .k-exam .kind { color: var(--pen-dark); }
.sform { display: flex; gap: 10px; flex-wrap: wrap; margin-block: 20px 10px; max-width: 640px; }
.sform input { flex: 1 1 240px; }
.cfacts dt { white-space: normal; flex: 1 1 45%; }
.cfacts dd { flex: 1 1 55%; }

/* QCM publics */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.topics a { display: grid; gap: 4px; padding: 20px 22px; border: 1.5px solid var(--line); border-radius: 26px 6px 26px 6px; color: var(--ink); text-decoration: none; }
.topics a:hover { border-color: var(--pen); }
.topics b { font-size: 1.15rem; }
.topics span { color: var(--ink-2); font-size: .92rem; }
.topics li > p { margin: 8px 6px 0; }
.qcm { margin-block-start: 26px; max-width: 760px; }
.qlist { display: grid; gap: 22px; margin-block-start: 14px; }
.qitem fieldset { border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 18px 20px; margin: 0; }
.qitem legend { font-weight: 500; padding: 0; float: inline-start; width: 100%; margin-block-end: 12px; }
.qn { color: var(--red); font-weight: 600; }
.qopts { display: grid; gap: 8px; clear: both; }
.qopt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.qopt:hover { border-color: var(--pen); }
.qopt input { margin-block-start: 4px; accent-color: var(--pen); }
.qopt.right { border-color: var(--green); background: var(--green-soft); }
.qopt.wrong { border-color: var(--red); background: var(--red-soft); }
.qans { margin-block-start: 12px; }
.qans summary { cursor: pointer; color: var(--pen); font-size: .92rem; }
.qans > * + * { margin-block-start: 8px; }
.qscore { position: sticky; inset-block-end: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-block-start: 22px; }
.qscore .flash { margin: 0; }

/* Contenus éditoriaux (fiches, lexique, métiers, annales, actualités) */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; margin-block-start: 22px; }
.cat-line { display: flex; gap: 8px; flex-wrap: wrap; margin-block-end: 10px; }
.glossary { display: grid; gap: 0; border-block-start: 2px solid var(--ink); }
.glossary > div { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr); gap: 18px; padding-block: 14px; border-block-end: 1px solid var(--line); }
.glossary dt { font-weight: 600; }
.letters a { min-width: 42px; justify-content: center; }
@media (max-width: 900px) { .article-grid { grid-template-columns: minmax(0, 1fr); } .glossary > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

.avg input { width: 100%; min-width: 70px; }
.avg-result { font-size: 1.4rem; }
.avg-result b { color: var(--pen); }

/* Mode examen : réponses masquées jusqu'à la fin */
.qtools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.qcm.exam-on .qans { display: none; }
.qcm.exam-on .qopt:has(input:checked) { border-color: var(--pen); background: var(--pen-soft); }
.qscore .tag { font-size: 1rem; padding: 8px 14px; }
.qcm.exam-on .qtools p, .qcm[data-exam-auto] .qtools p { display: none; }

/* Certificat (vérification et impression) */
.certificate { max-width: 820px; margin: 0 auto; padding: 48px 40px; border: 2px solid var(--ink); border-radius: 26px 6px 26px 6px; text-align: center; display: grid; gap: 18px; background: var(--paper); }
.certificate.revoked { opacity: .7; }
.cert-brand img { margin: 0 auto; width: auto; }
.cert-text { font-size: 1.25rem; max-width: 52ch; margin: 0 auto; }
.cert-meta { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }
.cert-meta dt { font-size: .85rem; color: var(--ink-2); }
.cert-meta dd { font-weight: 600; margin: 0; }
.stars { color: #c99700; letter-spacing: 2px; }
.reviews li { padding-block: 14px; border-block-end: 1px solid var(--line); }
@media print { .site-head, .site-foot, .no-print, .skip { display: none !important; } .page { padding: 0; } .certificate { border-width: 3px; } }

/* ===== Activités interactives du programme ===== */
.activity { margin-block: 20px; }
.act-text { font-size: 1.08rem; line-height: 2.4; }
.gap { min-width: 5ch; padding: 2px 8px; border: 0; border-block-end: 2px solid var(--pen); background: var(--pen-soft); border-radius: 4px 4px 0 0; font: inherit; }
.gap-r { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.3; padding: 2px 8px; border-radius: 6px; vertical-align: middle; }
.gap-r small { font-size: .78rem; color: var(--green); }
.is-right.gap-r, .act-list .is-right { background: var(--green-soft); }
.is-wrong.gap-r, .act-list .is-wrong { background: var(--red-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px 18px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--r-s); min-height: 54px; }
.chip { padding: 7px 14px; border: 1px solid var(--pen); border-radius: 20px; background: var(--paper); color: var(--pen); font: inherit; cursor: grab; touch-action: manipulation; }
.chip.is-picked { background: var(--pen); color: var(--on-accent); box-shadow: 0 0 0 3px var(--pen-soft); }
.slot { min-width: 9ch; min-height: 38px; padding: 4px 12px; border: 2px dashed var(--line); border-radius: var(--r-s); background: var(--wash); color: var(--ink-2); font: inherit; font-size: .92rem; vertical-align: middle; }
.slot.is-over { border-color: var(--pen); background: var(--pen-soft); }
.slot.is-filled { border-style: solid; border-color: var(--pen); background: var(--paper); color: var(--ink); }
.act-list { display: grid; gap: 8px; margin-block: 12px; padding: 0; list-style: none; counter-reset: step; }
.act-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.act-list li > b { flex: 1 1 200px; }
.act-list small { flex-basis: 100%; color: var(--ink-2); }
.act-list .why { flex-basis: 100%; margin: 0; }
ol.act-list > li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pen-soft); color: var(--pen); font-weight: 600; font-size: .9rem; flex: none; }
.sortable li { cursor: grab; }
.sortable li.is-dragged { opacity: .45; }
.sortable .grip { color: var(--ink-2); letter-spacing: -3px; }
.sortable .grow { flex: 1; }
.q.tf .row { gap: 10px; }
.q.tf .opt { flex: 1 1 120px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-block: 14px; padding: 0; list-style: none; }
.card { position: relative; width: 100%; min-height: 150px; padding: 0; border: 0; background: none; perspective: 900px; font: inherit; color: inherit; }
.card .face { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; border: 2px solid var(--ink); border-radius: 14px; text-align: center; backface-visibility: hidden; transition: transform .45s; }
.card .front { background: var(--paper); font-weight: 600; font-size: 1.05rem; }
.card .back { background: var(--pen-soft); transform: rotateY(180deg); }
.card[aria-pressed="true"] .front { transform: rotateY(180deg); }
.card[aria-pressed="true"] .back { transform: rotateY(360deg); }
@media (prefers-reduced-motion: reduce) { .card .face { transition: none; } }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; border-block-end: 2px solid var(--line); }
.tablist [role=tab] { padding: 10px 16px; border: 0; border-block-end: 3px solid transparent; margin-block-end: -2px; background: none; font: inherit; color: var(--ink-2); }
.tablist [aria-selected="true"] { border-color: var(--pen); color: var(--ink); font-weight: 600; }
.tabsbox [role=tabpanel] { padding-block: 18px; }
.ivideo { position: relative; }
.ivideo video { width: 100%; height: 100%; background: #000; }
.ivideo .vq { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; gap: 8px; margin: 0; padding: 22px; border: 0; background: var(--veil); overflow-y: auto; }
.ivideo .vq legend { float: left; width: 100%; font-weight: 600; font-size: 1.05rem; margin-block-end: 8px; }
.ivideo .vq legend small { display: block; font-weight: 400; color: var(--ink-2); font-size: .82rem; }
.h5pbox iframe { width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .92rem; }

/* ===== Mode sombre : « cahier de nuit » =====
   Choix de la personne (bouton de l'en-tête, gardé dans le navigateur), sinon réglage du téléphone ou de l'ordinateur. */
:root[data-theme=dark] {
  color-scheme: dark;
  --paper: #121733; --wash: #181e40; --ink: #e9ebf8; --ink-2: #a8aed4; --line: #2b3263;
  --pen: #8f9cff; --pen-dark: #b5beff; --pen-soft: #232b5c;
  --red: #e5323d; --red-dark: #ff8a92; --red-soft: #3a1a2a;
  --green: #4fd1a1; --green-soft: #14352f; --amber: #f2c057; --amber-soft: #3a3020;
  --grid-1: #262e5e; --grid-2: #1f2651; --grid-3: #1a2048; --margin: #a8424c;
  --field: #3a4378; --focus: #3c4aa8; --hover: #222a58; --drop: #4a56a3; --drop-over: #222a58;
  --ok-text: #9ff0cf; --bad-text: #ffb3b9; --danger-line: #6b2a35; --veil: rgb(18 23 51 / .97); --backdrop: rgb(4 6 20 / .7);
  --shadow-pen: #3c4aa8; --deep: #0a0e24; --on-accent: #0e1330; --pen-fill: #3c4aa8; --pen-fill-hover: #4b5ac0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  color-scheme: dark;
    --paper: #121733; --wash: #181e40; --ink: #e9ebf8; --ink-2: #a8aed4; --line: #2b3263;
    --pen: #8f9cff; --pen-dark: #b5beff; --pen-soft: #232b5c;
    --red: #e5323d; --red-dark: #ff8a92; --red-soft: #3a1a2a;
    --green: #4fd1a1; --green-soft: #14352f; --amber: #f2c057; --amber-soft: #3a3020;
    --grid-1: #262e5e; --grid-2: #1f2651; --grid-3: #1a2048; --margin: #a8424c;
    --field: #3a4378; --focus: #3c4aa8; --hover: #222a58; --drop: #4a56a3; --drop-over: #222a58;
    --ok-text: #9ff0cf; --bad-text: #ffb3b9; --danger-line: #6b2a35; --veil: rgb(18 23 51 / .97); --backdrop: rgb(4 6 20 / .7);
    --shadow-pen: #3c4aa8; --deep: #0a0e24; --on-accent: #0e1330; --pen-fill: #3c4aa8; --pen-fill-hover: #4b5ac0; --deep: #0a0e24; --on-accent: #0e1330; --pen-fill: #3c4aa8; --pen-fill-hover: #4b5ac0;
  }
}
/* Boutons pleins : texte blanc sur rouge et bleu, assez contrastés dans les deux modes */
:root[data-theme=dark] iframe.pdf, :root[data-theme=dark] .h5pbox iframe { background: #fff; }

.theme-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: none; color: var(--ink-2); }
.theme-btn:hover { background: var(--wash); color: var(--ink); }
.theme-btn .icon { width: 20px; height: 20px; }
.theme-btn .sun { display: none; }
:root[data-theme=dark] .theme-btn .sun { display: block; }
:root[data-theme=dark] .theme-btn .moon { display: none; }

/* ===== Accueil ===== */
/* Recherche du héros : la question qu'on se pose en arrivant */
.finder { margin-block: 30px 0; max-width: 34em; }
.finder label { display: block; margin-block-end: 8px; font-weight: 600; }
.finder-row { display: flex; gap: 8px; padding: 6px; border: 2px solid var(--ink); border-radius: 18px 6px 18px 6px; background: var(--paper); }
.finder-row input { flex: 1; min-width: 0; border: 0 !important; min-height: 46px; background: transparent !important; font-size: 1.05rem; }
.finder-row input:focus { outline: none; }
.finder-row:focus-within { box-shadow: 0 0 0 4px var(--focus); }
.finder-row .btn { flex: none; min-height: 46px; }
.hiring { margin-block-start: 14px; font-size: .92rem; color: var(--ink-2); }
.hiring { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hiring a { padding: 3px 12px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--paper); font-size: .88rem; font-weight: 500; text-decoration: none; }
.hiring a:hover { border-color: var(--pen); }

/* Dates limites : annotées au stylo rouge dans la marge du cahier */
.hero .margin-notes { position: relative; padding-block: 0 56px; }
.notes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-inline-start: 34px; margin-block-end: 16px; }
.notes-head h2 { font-size: 1.25rem; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; padding: 0; list-style: none; border-block: 2px solid var(--ink); background: var(--paper); }
.notes li + li { border-inline-start: 1px solid var(--line); }
.notes a { display: grid; gap: 2px; height: 100%; padding: 16px 18px 18px; color: inherit; text-decoration: none; }
.notes a:hover { background: var(--wash); }
.notes a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.notes .due { justify-self: start; color: var(--red); font-weight: 700; font-size: 1.45rem; line-height: 1.1; transform: rotate(-3deg); transform-origin: left bottom; }
[dir=rtl] .notes .due { transform: rotate(3deg); transform-origin: right bottom; }
.notes .due[data-soon] { padding-inline: 6px; border: 2px solid var(--red); border-radius: 50% 46% 52% 44%; }
.notes time { font-size: .85rem; color: var(--ink-2); margin-block-end: 6px; }
.notes b { font-weight: 600; font-size: .98rem; line-height: 1.35; }
.notes .who { font-size: .85rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .notes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .notes li { flex: 0 0 72%; scroll-snap-align: start; }
  .notes-head { padding-inline-start: 0; }
}

/* Réviser gratuitement : les intercalaires d'un classeur */
.revise { padding-block-end: 72px; }
.tabs-binder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.tabs-binder a { position: relative; display: grid; gap: 6px; height: 100%; padding: 30px 22px 22px; border: 1.5px solid var(--line); border-block-start: 0; border-radius: 0 0 var(--r-m) var(--r-m); background: var(--paper); color: inherit; text-decoration: none; }
/* L'onglet coloré qui dépasse, coupé en biais comme le logo */
.tabs-binder a::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 8px; background: var(--t); }
.tabs-binder .n { position: absolute; inset-block-start: -14px; inset-inline-start: 18px; padding: 3px 16px 4px 12px; background: var(--t); color: var(--on-accent); font-size: .82rem; font-weight: 600; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
[dir=rtl] .tabs-binder .n { padding: 3px 12px 4px 16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%); }
.tabs-binder b { font-size: 1.12rem; font-weight: 600; }
.tabs-binder a > span:last-child { color: var(--ink-2); font-size: .94rem; }
.tabs-binder a:hover { border-color: var(--t); }
.tabs-binder a:hover b { color: var(--t); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .sun { display: block; }
  :root:not([data-theme]) .theme-btn .moon { display: none; }
}
@media (max-width: 480px) {
  .finder-row .btn { padding-inline: 14px; }
  .finder-row .btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
