  :root {
    --bg: #F3F1FA;
    --surface: #FFFFFF;
    --text: #1E2235;
    --muted: #646A80;
    --line: #E3E1EE;
    --night: #1D2452;
    --night-2: #2B3576;
    --sun: #FFC845;
    --RS: #7B5CD6;
    --NO: #2F6FE0;
    --FA: #1FA37A;
    --ES: #F07A2B;
    --GM: #E0475B;
    --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
    --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
    --mono: "Share Tech Mono", "Consolas", "Courier New", monospace;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #12142A; --surface: #1C1F3B; --text: #ECEDF5; --muted: #A6AAC4; --line: #2D3158;
      --night: #0C0E22; --night-2: #1A1E44;
    }
  }
  :root[data-theme="dark"] {
    --bg: #12142A; --surface: #1C1F3B; --text: #ECEDF5; --muted: #A6AAC4; --line: #2D3158;
    --night: #0C0E22; --night-2: #1A1E44;
  }
  *, *::before, *::after { box-sizing: inherit; }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); }
  body { margin: 0; font-family: var(--body); font-size: 1rem; line-height: 1.5; color: var(--text); background: var(--bg); }
  button { font: inherit; color: inherit; }
  :focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
  svg.i { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  [hidden] { display: none !important; }

  /* ---------- En-tête ---------- */
  .hero { position: relative; overflow: hidden; background: var(--night); color: #fff; }
  .hero-shapes { position: absolute; inset: 0; pointer-events: none; }
  .hero-inner { position: relative; max-width: 82rem; margin: 0 auto; padding: 1.75rem 1.25rem 0; }
  .hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
  .hero p { margin: .4rem 0 1.5rem; color: #C9CDEB; }
  .tabs-top { display: flex; gap: .5rem; align-items: flex-end; }
  .tabs-top .spacer { flex: 1; }
  .top-tab {
    border: 0; cursor: pointer; font-family: var(--display); font-weight: 800;
    font-size: 1.9rem; line-height: 1; padding: .7rem 1.4rem .8rem; border-radius: 14px 14px 0 0;
    background: var(--night-2); color: #AEB4E0; transition: background .15s, color .15s;
    display: inline-flex; align-items: center; gap: .5rem;
  }
  .top-tab sup { font-size: .5em; }
  .top-tab:hover { color: #fff; }
  .top-tab[aria-selected="true"] { background: var(--bg); color: var(--text); padding-top: 1rem; }
  .top-tab.calc-tab { font-size: 1.15rem; padding-top: .95rem; padding-bottom: .95rem; }
  .top-tab.calc-tab[aria-selected="true"] { padding-top: 1.2rem; }
  .top-tab.calc-tab svg.i { width: 1.4em; height: 1.4em; }

  /* ---------- Niveaux ---------- */
  .levels-bar { max-width: 82rem; margin: 0 auto; padding: 1.25rem 1.25rem .5rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .levels { display: inline-flex; gap: .35rem; background: var(--surface); padding: .3rem; border-radius: 999px; border: 1px solid var(--line); }
  .level { border: 0; background: none; padding: .45rem 1.1rem; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--muted); }
  .level:hover { color: var(--text); }
  .level[aria-pressed="true"] { background: var(--night); color: #fff; }

  /* ---------- Mise en page ---------- */
  .layout { max-width: 82rem; margin: 0 auto; padding: .75rem 1.25rem 3rem; display: grid; grid-template-columns: 17.5rem 1fr; gap: 1.5rem; align-items: start; }
  nav.chapters { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 1rem); display: grid; gap: .75rem; }
  .axis { background: var(--surface); border-radius: 14px; padding: .6rem; border: 1px solid var(--line); }
  .axis-title { display: flex; align-items: center; gap: .55rem; padding: .2rem .35rem .45rem; font-weight: 700; font-size: .9rem; }
  .axis-code { display: grid; place-items: center; width: 2.3rem; height: 1.7rem; border-radius: 8px; background: var(--c); color: #fff; font-family: var(--display); font-weight: 800; font-size: .85rem; }
  .chapter-btn { display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: .4rem .7rem; border-radius: 8px; color: var(--muted); }
  .chapter-btn:hover { background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--text); }
  .chapter-btn[aria-current="true"] { background: var(--c); color: #fff; font-weight: 700; }
  .chapter-select { display: none; }

  main { min-width: 0; }
  .chapter-head { position: relative; overflow: hidden; border-radius: 20px; padding: 1.5rem 1.6rem 1.6rem; background: var(--c); color: #fff; margin-bottom: 1rem; }
  .chapter-head .code { position: absolute; right: -.1em; bottom: -.28em; font-family: var(--display); font-weight: 800; font-size: clamp(6rem, 14vw, 10rem); line-height: 1; color: rgba(255,255,255,.16); pointer-events: none; }
  .chapter-head .crumb { margin: 0; opacity: .9; font-size: .95rem; }
  .chapter-head h2 { position: relative; font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.1; margin: .2rem 0 0; max-width: 40ch; }

  .types { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem .1rem .6rem; scrollbar-width: thin; }
  .type-tab { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); padding: .5rem .9rem; border-radius: 12px; font-weight: 700; }
  .type-tab:hover { border-color: var(--c); }
  .type-tab .n { display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--bg); font-size: .8rem; color: var(--muted); }
  .type-tab[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
  .type-tab[aria-selected="true"] .n { background: var(--sun); color: #1E2235; }

  .list { display: grid; gap: 1rem; margin-top: .5rem; }
  .res { background: var(--surface); border-radius: 16px; border: 1px solid var(--line); padding: 1.2rem 1.3rem 1.3rem; }
  .res-top { display: flex; gap: .9rem; align-items: flex-start; }
  .res-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; flex: none; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
  .res-icon svg.i { width: 1.4rem; height: 1.4rem; }
  .res h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
  .res .desc { margin: .15rem 0 0; color: var(--muted); }
  .tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
  .tag { font-size: .78rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
  .sheets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
  .sheet { background: var(--bg); border-radius: 12px; padding: .75rem .8rem .85rem; }
  .sheet-name { display: flex; align-items: center; gap: .4rem; font-weight: 700; margin: 0 0 .55rem; font-size: .95rem; }
  .files { display: flex; flex-wrap: wrap; gap: .35rem; }
  .file { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; font-weight: 700; font-size: .85rem; padding: .32rem .65rem; border-radius: 8px; background: var(--surface); color: var(--text); border: 1.5px solid var(--line); }
  .file:hover { border-color: var(--c); color: var(--c); }
  .file.view { background: var(--c); border-color: var(--c); color: #fff; }
  .file.view:hover { filter: brightness(1.08); color: #fff; }
  .file.missing { background: transparent; border-style: dashed; color: var(--muted); opacity: .6; pointer-events: none; }
  .empty { display: flex; gap: 1rem; align-items: center; background: var(--surface); border: 2px dashed var(--line); border-radius: 16px; padding: 1.4rem 1.5rem; color: var(--muted); }
  .empty .res-icon { width: 3rem; height: 3rem; }

  /* ---------- Page calculatrice ---------- */
  .calc-page { max-width: 82rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; display: grid; grid-template-columns: minmax(0, 23rem) 1fr; gap: 2rem; align-items: start; --c: var(--RS); }
  .calc-page h2 { font-family: var(--display); font-weight: 800; font-size: 1.6rem; margin: 0 0 .25rem; }
  .calc-page .lead { margin: 0 0 1.25rem; color: var(--muted); max-width: 60ch; }

  .calc {
    background: linear-gradient(165deg, #2F3A86, #1B2150 70%);
    border-radius: 28px 28px 40px 40px; padding: 1.1rem 1rem 1.3rem;
    box-shadow: 0 18px 40px -18px rgba(20, 24, 70, .6), inset 0 1px 0 rgba(255,255,255,.12);
    user-select: none; -webkit-user-select: none; touch-action: manipulation;
  }
  .calc-brand { display: flex; justify-content: space-between; align-items: baseline; color: #C9CDEB; font-size: .78rem; padding: 0 .35rem .55rem; }
  .calc-brand strong { font-family: var(--display); color: #fff; font-size: 1rem; }
  .lcd { background: #CFDCC0; border-radius: 10px; padding: .45rem .7rem .55rem; color: #1F2A1A; box-shadow: inset 0 2px 6px rgba(0,0,0,.25); border: 3px solid #141838; }
  .lcd-ind { display: flex; gap: .55rem; font-size: .68rem; font-weight: 700; letter-spacing: .02em; min-height: 1.05rem; }
  .lcd-ind span { opacity: .12; }
  .lcd-ind span.on { opacity: 1; }
  .lcd-main { display: flex; justify-content: flex-end; align-items: flex-start; gap: .25rem; font-family: var(--mono); font-size: 2.35rem; line-height: 1.1; min-height: 2.6rem; white-space: nowrap; overflow: hidden; }
  .lcd-exp { font-size: 1.05rem; line-height: 1; padding-top: .1rem; min-width: 1.6rem; text-align: right; }

  .keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: .15rem .45rem; margin-top: .9rem; }
  .kcell { display: flex; flex-direction: column; align-items: stretch; }
  .klabel2 { font-size: .66rem; font-weight: 700; color: var(--sun); text-align: center; min-height: .95rem; line-height: 1; padding-bottom: .12rem; opacity: .75; white-space: nowrap; }
  .calc.is-second .klabel2 { opacity: 1; text-shadow: 0 0 8px rgba(255, 200, 69, .7); }
  .k {
    border: 0; cursor: pointer; border-radius: 10px; height: 2.45rem; font-weight: 700; font-size: .92rem;
    background: #3C4796; color: #fff; box-shadow: 0 3px 0 #141838; transition: transform .05s, box-shadow .05s;
  }
  .k:active, .k.pressed { transform: translateY(2px); box-shadow: 0 1px 0 #141838; }
  .k.num { background: #F4F3FB; color: #1E2235; font-size: 1.15rem; }
  .k.op { background: #F07A2B; font-size: 1.25rem; }
  .k.eq { background: #1FA37A; font-size: 1.25rem; }
  .k.clear { background: #E0475B; }
  .k.second { background: var(--sun); color: #1E2235; }
  .calc.is-second .k.second { box-shadow: 0 0 0 3px #fff, 0 3px 0 #141838; }
  .k.hyp-on { box-shadow: 0 0 0 3px var(--sun), 0 3px 0 #141838; }

  .calc-help { font-size: .88rem; color: var(--muted); margin-top: .75rem; }
  .calc-side { display: grid; gap: 1.25rem; min-width: 0; }
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.25rem 1.25rem; }
  .panel h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0 0 .6rem; }
  .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .panel-head button { border: 1.5px solid var(--line); background: none; border-radius: 8px; padding: .25rem .7rem; cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--muted); }
  .tape { font-family: var(--mono); font-size: 1.05rem; background: var(--bg); border-radius: 10px; padding: .7rem .9rem; min-height: 6rem; max-height: 14rem; overflow: auto; }
  .tape div { padding: .1rem 0; overflow-wrap: anywhere; }
  .tape .current { color: var(--muted); }
  .examples { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
  .examples li { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: .75rem; align-items: baseline; }
  .examples .what { color: var(--muted); font-size: .95rem; }
  kbd { display: inline-block; font-family: var(--body); font-weight: 700; font-size: .82rem; padding: .05rem .4rem; margin: .1rem .08rem; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; }
  kbd.s2 { background: var(--sun); color: #1E2235; border-color: #D9A628; }


  /* ---------- Démonstrations (point rouge) ---------- */
  #vue-calc, #vue-calc * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='13' cy='13' r='9' fill='%23E8132B' stroke='white' stroke-width='2.5'/%3E%3C/svg%3E") 13 13, pointer; }
  .calc { position: relative; }
  .pointer {
    position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
    background: #E8132B; border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(232, 19, 43, .3), 0 3px 10px rgba(0, 0, 0, .45);
    pointer-events: none; z-index: 5; opacity: 0;
    transition: left var(--move, .45s) cubic-bezier(.4, 0, .2, 1), top var(--move, .45s) cubic-bezier(.4, 0, .2, 1), opacity .3s;
  }
  .pointer.on { opacity: 1; }
  .pointer.tap { animation: tap .32s ease-out; }
  @keyframes tap { 50% { transform: scale(.72); box-shadow: 0 0 0 14px rgba(232, 19, 43, .22), 0 2px 6px rgba(0, 0, 0, .4); } }
  .k.hit { transform: translateY(2px); filter: brightness(1.18); box-shadow: 0 0 0 3px #E8132B, 0 0 18px 2px rgba(232, 19, 43, .75), 0 1px 0 #141838; }
  .k.demo-hit { transform: translateY(2px); box-shadow: 0 0 0 3px #E8132B, 0 1px 0 #141838; }
  .speed { display: inline-flex; gap: .25rem; background: var(--bg); padding: .2rem; border-radius: 999px; }
  .speed button { border: 0; background: none; border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; font-weight: 700; color: var(--muted); }
  .speed button[aria-pressed="true"] { background: var(--night); color: #fff; }
  .demo-hint { color: var(--muted); font-size: .92rem; margin: 0 0 .8rem; }
  .demo-now { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--night); color: #fff; border-radius: 14px; padding: .8rem 1rem; margin-bottom: .9rem; }
  .demo-now .step { font-size: .95rem; color: #C9CDEB; }
  .demo-now .keynow { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; min-width: 3.5rem; text-align: center; background: #E8132B; border-radius: 10px; padding: .35rem .7rem; }
  .demo-now .keynow.second { background: var(--sun); color: #1E2235; }
  .demo-ctrl { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
  .demo-ctrl button { display: inline-flex; align-items: center; gap: .35rem; border: 0; border-radius: 10px; padding: .45rem .75rem; font-weight: 700; font-size: .9rem; background: rgba(255,255,255,.12); color: #fff; }
  .demo-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
  .demo-item { width: 100%; display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: .75rem; align-items: center; text-align: left; border: 1.5px solid transparent; background: none; border-radius: 10px; padding: .45rem .6rem; }
  .demo-item:hover { background: var(--bg); }
  .demo-item.active { border-color: #E8132B; background: color-mix(in srgb, #E8132B 7%, transparent); }
  .demo-item .what { color: var(--muted); font-size: .95rem; }
  .demo-item.active .what { color: var(--text); font-weight: 700; }
  kbd.now { background: #E8132B; color: #fff; border-color: #B00E20; transform: scale(1.12); }
  kbd.done { opacity: .5; }
  @media (max-width: 880px) { .demo-item { grid-template-columns: 1fr; gap: .2rem; } }
  @media (prefers-reduced-motion: reduce) { .pointer { transition: opacity .2s; } .pointer.tap { animation: none; } }

  /* ---------- Découpage annuel ---------- */
  .dec-page { max-width: 82rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
  .dec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
  .dec-head h2 { font-family: var(--display); font-weight: 800; font-size: 1.8rem; margin: 0 0 .25rem; }
  .dec-head .lead { margin: 0; color: var(--muted); max-width: 60ch; }
  .dec-print { width: auto; padding: .55rem 1rem; }
  .dec-tabs { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.25rem 0 1.5rem; }

  .dec-summary { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.25rem 1rem; margin-bottom: 1.5rem; }
  .dec-summary-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
  .dec-summary-top h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0; }
  .dec-total { color: var(--muted); font-size: .9rem; }
  .dec-total.warn { color: var(--GM); font-weight: 700; }
  .dec-barwrap { position: relative; padding-top: 1.4rem; }
  .dec-sem { position: absolute; top: 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
  .dec-divider { position: absolute; top: 1.1rem; bottom: -.3rem; border-left: 2px dashed var(--text); opacity: .5; }
  .dec-bar { display: flex; gap: 3px; height: 3rem; }
  .dec-seg { border: 0; border-radius: 8px; background: var(--c); color: #fff; font-weight: 700; font-size: .78rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 .3rem; cursor: pointer; }
  .dec-seg:hover { filter: brightness(1.1); }
  .dec-seg.rev { background: repeating-linear-gradient(45deg, var(--muted), var(--muted) 6px, color-mix(in srgb, var(--muted) 70%, transparent) 6px, color-mix(in srgb, var(--muted) 70%, transparent) 12px); cursor: default; }
  .dec-scale { position: relative; height: 1.2rem; margin-top: .3rem; font-size: .75rem; color: var(--muted); }
  .dec-scale span { position: absolute; transform: translateX(-50%); }
  .dec-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .6rem; font-size: .85rem; color: var(--muted); }
  .dec-legend span { display: inline-flex; align-items: center; gap: .35rem; }
  .dec-legend i { width: .8rem; height: .8rem; border-radius: 3px; background: var(--c); display: inline-block; }

  .dec-semestre { font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin: 1.5rem 0 .75rem; display: flex; align-items: center; gap: .75rem; }
  .dec-semestre::after { content: ""; flex: 1; border-top: 2px solid var(--line); }
  .dec-list { display: grid; gap: .7rem; }
  .dec-card { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 14px; padding: .85rem 1rem; }
  .dec-weeks { text-align: center; line-height: 1.15; }
  .dec-weeks span { display: block; font-size: .75rem; color: var(--muted); }
  .dec-weeks b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--c); }
  .dec-weeks small { color: var(--muted); font-size: .78rem; }
  .dec-body { min-width: 0; }
  .dec-body .dec-title { display: flex; align-items: center; gap: .55rem; }
  .dec-body h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
  .dec-body p { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; }
  .dec-go { display: inline-flex; align-items: center; gap: .35rem; border: 1.5px solid var(--c); color: var(--text); background: none; border-radius: 10px; padding: .45rem .8rem; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
  .dec-go:hover { background: var(--c); color: #fff; }
  .dec-card.rev { border-left-color: var(--muted); border-left-style: dashed; }
  @media (max-width: 700px) {
    .dec-card { grid-template-columns: 4.8rem 1fr; }
    .dec-go { grid-column: 2; justify-self: start; }
    .dec-seg { font-size: 0; }
  }
  @media print {
    #print-area .dec-t { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
    #print-area .dec-t th, #print-area .dec-t td { border: 1px solid #999; padding: 4pt 6pt; text-align: left; vertical-align: top; }
    #print-area .dec-t th { background: #EAF1FD; }
    #print-area .dec-t .sem td { background: #F3F1FA; font-weight: 700; }
  }

  /* ---------- Histoire et anecdotes ---------- */
  .hist-random { width: auto; margin: 0; padding: .7rem 1.2rem; background: var(--night); }
  .hist-tools { display: grid; gap: .75rem; margin: 1.25rem 0 1.25rem; }
  .hist-search { width: 100%; max-width: 30rem; font: inherit; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
  #hist-axes .qcat[aria-pressed="true"] { background: var(--c, var(--night)); border-color: var(--c, var(--night)); }
  .hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
  .hist-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--c); border-radius: 16px; padding: 1.1rem 1.2rem 1rem; }
  .hist-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .45rem; }
  .hist-epoque { font-size: .85rem; color: var(--muted); font-weight: 700; }
  .hist-legende { font-size: .72rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: var(--sun); color: #1E2235; }
  .hist-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; margin: 0 0 .5rem; }
  .hist-card p { margin: 0 0 .75rem; line-height: 1.55; }
  .hist-classe { background: var(--bg); border-radius: 10px; padding: .6rem .75rem; font-size: .95rem; margin-bottom: .85rem; }
  .hist-classe b { color: var(--c); }
  .hist-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .4rem; }
  .hist-actions button { display: inline-flex; align-items: center; gap: .3rem; border: 1.5px solid var(--line); background: none; border-radius: 9px; padding: .35rem .7rem; font-weight: 700; font-size: .85rem; cursor: pointer; color: var(--text); }
  .hist-actions button:hover { border-color: var(--c); color: var(--c); }
  .hist-actions .proj { background: var(--c); border-color: var(--c); color: #fff; }
  .hist-actions .proj:hover { color: #fff; filter: brightness(1.08); }
  .hist-vide { color: var(--muted); padding: 1.5rem; border: 2px dashed var(--line); border-radius: 16px; }

  .hist-show-body { flex: 1; overflow: auto; display: flex; flex-direction: column; justify-content: center; max-width: 60rem; width: 100%; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
  .hist-show-body .tag-legende { align-self: flex-start; font-weight: 700; padding: .15rem .7rem; border-radius: 999px; background: var(--sun); color: #1E2235; margin-bottom: 1rem; font-size: calc(1rem * var(--qs, 1)); }
  .hist-show-body h2 { font-family: var(--display); font-weight: 800; font-size: calc(clamp(2rem, 5vw, 3.8rem) * var(--qs, 1)); line-height: 1.1; margin: 0 0 1.25rem; }
  .hist-show-body p { font-size: calc(clamp(1.25rem, 2.6vw, 2rem) * var(--qs, 1)); line-height: 1.5; margin: 0 0 1.5rem; color: #E6E8F5; }
  .hist-show-body .q { border-left: 6px solid var(--c); padding: .6rem 1rem; background: rgba(255,255,255,.07); border-radius: 0 12px 12px 0; font-size: calc(clamp(1.2rem, 2.4vw, 1.8rem) * var(--qs, 1)); }
  .hist-show-body .q b { color: var(--sun); }

  /* ---------- Prérequis et objectifs ---------- */
  .obj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; margin-top: .5rem; }
  .obj-panel h3, .obj-voc h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .2rem; }
  .obj-panel h3 svg.i, .obj-voc h3 svg.i { color: var(--c); }
  .obj-sub { margin: 0 0 .8rem; color: var(--muted); font-size: .92rem; }
  .obj-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
  .obj-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; background: var(--bg); border-radius: 10px; padding: .6rem .75rem; line-height: 1.4; }
  .obj-list.pre li { border-left: 4px solid var(--line); }
  .obj-list.obj { counter-reset: o; }
  .obj-list.obj li { counter-increment: o; border-left: 4px solid var(--c); }
  .obj-list.obj li > span:first-child::before { content: counter(o) ". "; font-weight: 700; color: var(--c); }
  .obj-list li.off { opacity: .45; border-left-color: var(--line); }
  .obj-niv { flex: none; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
  .obj-link { flex: none; display: inline-flex; align-items: center; gap: .2rem; border: 0; background: none; color: var(--c); font-weight: 700; font-size: .85rem; cursor: pointer; white-space: nowrap; padding: 0; }
  .obj-voc { margin-top: 1rem; }
  .obj-voc .chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
  .voc { background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--text); border-radius: 999px; padding: .3rem .8rem; font-weight: 700; font-size: .92rem; }
  .obj-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; color: var(--muted); font-size: .9rem; }
  .obj-foot p { margin: 0; }
  .obj-print { width: auto; }
  @media print {
    #print-area .obj-h { font-size: 13pt; margin: 14pt 0 6pt; }
    #print-area .obj-t .c { width: 16%; text-align: center; }
  }

  a.top-tab { text-decoration: none; }
  .ext-tab svg.i:last-child { width: .85em; height: .85em; opacity: .7; margin-left: -.15rem; }

  /* ---------- Fiches rituelles ---------- */
  button.file { font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
  .rit-info { display: flex; gap: .8rem; align-items: flex-start; background: color-mix(in srgb, var(--sun) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sun) 60%, transparent); border-radius: 14px; padding: .9rem 1rem; margin-bottom: .5rem; font-size: .95rem; line-height: 1.5; }
  .rit-info svg.i { width: 1.6rem; height: 1.6rem; flex: none; margin-top: .1rem; }
  .rit-info code { font-size: .88em; background: var(--surface); padding: .05rem .35rem; border-radius: 5px; }
  .rit-dossiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .9rem; }
  .rit-doss { --c: var(--night-2); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem 1.1rem; }
  .rit-doss-top { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; }
  .rit-doss h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
  .rit-doss p { margin: 0; color: var(--muted); font-size: .88rem; }
  .rit-count { font-family: var(--body); font-weight: 700; font-size: .85rem; color: var(--muted); }
  .rit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .8rem; }
  .rit-tile { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 14px; padding: .75rem .8rem .8rem; display: grid; gap: .45rem; }
  .rit-tile.off { opacity: .6; }
  .rit-num { display: flex; align-items: baseline; gap: .4rem; }
  .rit-num span { font-size: .8rem; color: var(--muted); font-weight: 700; }
  .rit-num b { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--c); }
  .rit-theme { margin: 0; font-size: .85rem; color: var(--muted); min-height: 2.4em; line-height: 1.2; }
  .rit-row { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
  .rit-row > span:first-child { font-size: .8rem; font-weight: 700; width: 3.8rem; }
  .rit-row .file { padding: .22rem .45rem; font-size: .78rem; }
  .rit-row .file svg.i { width: .95em; height: .95em; }
  .rit-show-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .rit-show-bar .levels { background: rgba(255,255,255,.1); border-color: transparent; }
  .rit-show-bar .level { color: #C9CDEB; }
  .rit-show-bar .level[aria-pressed="true"] { background: #fff; color: #1E2235; }
  .rit-show-sous { color: #AEB4E0; font-size: .92rem; }
  a.sbtn { text-decoration: none; display: inline-flex; gap: .35rem; font-size: .9rem; }
  .sbtn:disabled { opacity: .35; cursor: default; }
  .rit-frame { flex: 1; width: 100%; border: 0; background: #fff; }
  .top-tab.calc-tab { font-size: 1rem; padding-left: .85rem; padding-right: .85rem; white-space: nowrap; }
  @media (max-width: 1340px) { .calc-tab .lbl { display: none; } .top-tab.calc-tab { padding-left: .75rem; padding-right: .75rem; } }

  /* ---------- Générateur de figures ---------- */
  .fig-ask { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.25rem 0 .75rem; }
  .fig-ask input { flex: 1 1 22rem; font: inherit; font-size: 1.05rem; padding: .75rem .95rem; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
  .fig-ask input:focus { border-color: var(--ES); outline: none; }
  .fig-ask .btn-main { width: auto; margin: 0; padding: .7rem 1.3rem; --c: var(--ES); }
  .fig-chips { display: grid; gap: .4rem; margin-bottom: 1rem; }
  .fig-chip-group { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
  .fig-chip-group > span { font-size: .8rem; font-weight: 700; color: var(--muted); width: 9.5rem; }
  .fig-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; cursor: pointer; }
  .fig-chip:hover { border-color: var(--ES); color: var(--ES); }
  .fig-opts { display: flex; flex-wrap: wrap; gap: .9rem 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1.1rem; margin-bottom: .75rem; }
  .fig-opt { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; }
  .fig-opt .levels { padding: .2rem; }
  .fig-opt .level { padding: .3rem .8rem; font-size: .9rem; }
  .fig-sw { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-weight: 700; font-size: .92rem; }
  .fig-sw input { width: 1.1rem; height: 1.1rem; accent-color: var(--ES); }
  .fig-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
  .fig-msg { margin: 0; color: var(--muted); font-size: .95rem; }
  .fig-msg.warn { color: var(--GM); font-weight: 700; }
  .fig-bar .btns { display: flex; gap: .5rem; }
  .fig-bar .btn-sec { width: auto; padding: .5rem .9rem; }
  .fig-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1rem; }
  .fig-card { background: #fff; color: #1E2235; border: 1px solid var(--line); border-radius: 16px; padding: .8rem .9rem 1rem; display: flex; flex-direction: column; }
  .fig-card-top { display: flex; align-items: center; gap: .4rem; font-size: .95rem; margin-bottom: .4rem; }
  .fig-card-btn { margin-left: auto; display: flex; gap: .25rem; }
  .fig-card-btn button { border: 1px solid #E3E1EE; background: #F7F6FB; color: #1E2235; border-radius: 8px; padding: .2rem .45rem; font-size: .75rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
  .fig-svg { flex: 1; display: grid; place-items: center; min-height: 14rem; }
  .fig-svg svg { max-width: 100%; height: auto; }
  .fig-note { margin: .4rem 0 0; font-size: .82rem; color: #646A80; font-style: italic; text-align: center; }
  .fig-sol { margin: .5rem 0 0; font-size: .88rem; background: #EEF3FC; border-radius: 8px; padding: .4rem .6rem; }
  @media (max-width: 1000px) { .fig-grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
  @media (max-width: 640px) { .fig-grid { grid-template-columns: 1fr; } .fig-chip-group > span { width: 100%; } }
  @media print {
    #print-area .pfs { display: flex; flex-wrap: wrap; gap: 10mm; }
    #print-area .pf { break-inside: avoid; }
    #print-area .pf p { margin: 0 0 3mm; font-size: 11pt; }
    #print-area .pf .ps { margin-top: 2mm; font-size: 10pt; }
  }

  /* ---------- Quiz ---------- */
  .fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .85em; line-height: 1.15; margin: 0 .12em; }
  .fr > span:first-child { border-bottom: .08em solid currentColor; padding: 0 .2em .05em; }
  .fr > span:last-child { padding: .05em .2em 0; }
  .rad { border-top: .07em solid currentColor; padding: 0 .1em 0 .05em; }

  .quiz-cats { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
  .qcat { display: inline-flex; align-items: center; gap: .5rem; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: .55rem 1.1rem; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
  .qcat .n { font-size: .8rem; background: var(--bg); color: var(--muted); border-radius: 999px; padding: 0 .45rem; }
  .qcat[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
  .qcat[aria-pressed="true"] .n { background: rgba(255,255,255,.25); color: #fff; }

  .quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.25rem; align-items: start; }
  .acts { display: grid; gap: .7rem; }
  .act { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: .8rem 1rem .9rem; }
  .act.on { border-color: var(--c); }
  .act-toggle { display: flex; gap: .65rem; align-items: center; background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 0; text-align: left; }
  .box { width: 1.4rem; height: 1.4rem; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: #fff; flex: none; }
  .box svg.i { width: .95rem; height: .95rem; stroke-width: 3; }
  .act.on .box { background: var(--c); border-color: var(--c); }
  .act-row { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: .65rem; padding-left: 2.05rem; }
  .lv { display: inline-flex; gap: .25rem; }
  .lvb { border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: .15rem .55rem; cursor: pointer; color: var(--muted); font-size: .8rem; letter-spacing: -.05em; }
  .lvb[aria-pressed="true"] { background: var(--sun); border-color: #D9A628; color: #1E2235; }
  .ex { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; background: var(--bg); padding: .3rem .4rem .3rem .7rem; border-radius: 8px; min-height: 2.2rem; }
  .ex-r { color: var(--text); font-weight: 700; }
  .ex-fig { display: block; width: 100%; }
  .ex-fig svg { max-height: 110px; width: auto; max-width: 100%; background: #fff; border-radius: 6px; }
  .show-fig { margin-top: 1rem; }
  .show-fig svg { width: calc(min(46vw, 34rem) * var(--qs, 1)); height: auto; max-height: 52vh; background: #fff; border-radius: 14px; padding: 6px; }
  .show-etape { font-size: .55em; color: #C9CDEB; font-weight: 400; margin-top: .4rem; }
  .corr-fig { display: block; margin-top: .3rem; }
  .corr-fig svg { max-height: 110px; width: auto; background: #fff; border-radius: 8px; }
  .corr .r small { display: block; font-size: .65em; font-weight: 400; color: #C9CDEB; }
  .ex-r::before { content: "→ "; color: var(--muted); font-weight: 400; }
  .ex-new { border: 0; background: none; cursor: pointer; color: var(--c); display: grid; place-items: center; padding: .2rem; border-radius: 6px; }

  .quiz-set { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 1rem); }
  .set { margin-bottom: 1.1rem; }
  .set > label, .set .lbl { display: flex; justify-content: space-between; font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
  .set output { color: var(--c); font-family: var(--display); font-weight: 800; }
  .stepper { display: flex; align-items: center; gap: .4rem; }
  .stepper button { width: 2.3rem; height: 2.3rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
  .stepper input { width: 4.5rem; text-align: center; font: inherit; font-weight: 700; font-size: 1.1rem; padding: .35rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
  .set input[type="range"] { width: 100%; accent-color: var(--c); }
  .check { display: flex; gap: .55rem; align-items: flex-start; font-size: .95rem; margin-bottom: 1rem; cursor: pointer; }
  .check input { margin-top: .25rem; accent-color: var(--c); width: 1.05rem; height: 1.05rem; }
  .quiz-sum { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
  .btn-main, .btn-sec { width: 100%; display: flex; justify-content: center; align-items: center; gap: .5rem; border-radius: 12px; padding: .8rem; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
  .btn-main { background: var(--c); color: #fff; border: 0; margin-bottom: .5rem; }
  .btn-sec { background: none; color: var(--text); border: 1.5px solid var(--line); font-size: .95rem; padding: .6rem; }
  .btn-main:disabled, .btn-sec:disabled { opacity: .45; cursor: not-allowed; }

  /* ---------- Diaporama ---------- */
  .show { position: fixed; inset: 0; z-index: 100; background: var(--night); color: #fff; display: flex; flex-direction: column; border-top: 8px solid var(--c); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .show-top { display: flex; align-items: center; gap: 1rem; padding: calc(env(safe-area-inset-top, 0px) + .8rem) 1.25rem .8rem; flex-wrap: wrap; }
  .show-count { font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
  .show-chap { color: #AEB4E0; font-size: .95rem; }
  .show-ctrl { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
  .sbtn { background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 10px; min-width: 2.7rem; height: 2.7rem; cursor: pointer; display: grid; place-items: center; font-weight: 700; padding: 0 .6rem; }
  .sbtn:hover { background: rgba(255,255,255,.2); }
  .show-bar { height: 12px; background: rgba(255,255,255,.1); }
  .show-fill { height: 100%; width: 100%; background: var(--sun); }
  .show-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.5rem; gap: 1.75rem; overflow: auto; }
  .show-num { font-family: var(--display); font-weight: 800; font-size: 1.2rem; background: var(--c); color: #fff; border-radius: 999px; padding: .2rem 1rem; }
  .show-q { font-family: var(--display); font-weight: 600; font-size: calc(clamp(2rem, 5.5vw, 5.2rem) * var(--qs, 1)); line-height: 1.3; max-width: 26ch; }
  .show-r { font-size: calc(clamp(1.7rem, 4.5vw, 4rem) * var(--qs, 1)); color: var(--sun); font-weight: 700; }
  .show.is-intro .show-q { font-size: clamp(6rem, 22vw, 14rem); font-weight: 800; color: var(--sun); }
  .show-pause { color: #AEB4E0; font-weight: 700; letter-spacing: .02em; }
  .show-end { flex: 1; overflow: auto; padding: 2rem 1.5rem 3rem; }
  .show-end-inner { max-width: 56rem; margin: 0 auto; }
  .show-end h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 .5rem; }
  .show-end-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 2rem; }
  .show-end-actions button { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 12px; padding: .75rem 1.2rem; font-weight: 700; font-size: 1.05rem; cursor: pointer; background: rgba(255,255,255,.12); color: #fff; }
  .show-end-actions button.main { background: var(--sun); color: #1E2235; }
  .corr { list-style: none; margin: 0; padding: 0; counter-reset: q; }
  .corr li { counter-increment: q; display: grid; grid-template-columns: 3rem 1fr auto; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: clamp(1.1rem, 2.2vw, 1.6rem); }
  .corr li::before { content: counter(q); font-family: var(--display); font-weight: 800; color: #AEB4E0; }
  .corr .r { color: var(--sun); font-weight: 700; text-align: right; }

  #print-area { display: none; }
  @media print {
    body > *:not(#print-area) { display: none !important; }
    #print-area { display: block; color: #000; font-family: var(--body); font-size: 12pt; }
    #print-area h1 { font-family: var(--display); font-size: 18pt; margin: 0 0 .3rem; }
    #print-area .meta { margin: 0 0 1rem; }
    #print-area ol { padding-left: 1.6rem; }
    #print-area .pq li { margin: 0 0 .9rem; display: list-item; }
    #print-area .pq .line { display: inline-block; border-bottom: 1px solid #999; min-width: 8rem; margin-left: 1rem; }
    #print-area .pfig svg { max-width: 6.5cm; height: auto; margin-top: 2mm; }
    #print-area .pet { color: #555; font-size: 10pt; }
    #print-area .pr li { margin: 0 0 .4rem; }
    #print-area .pbreak { break-before: page; }
  }
  @media (max-width: 1080px) { .quiz-grid { grid-template-columns: 1fr; } .quiz-set { position: static; } }
  @media (max-width: 600px) { .act-row { padding-left: 0; } .corr li { grid-template-columns: 2rem 1fr; } .corr .r { grid-column: 2; text-align: left; } }

  @media (max-width: 880px) {
    .layout { grid-template-columns: 1fr; }
    nav.chapters { display: none; }
    .chapter-select { display: block; width: 100%; font: inherit; font-weight: 700; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); margin-bottom: 1rem; }
    .sheets { grid-template-columns: 1fr; }
    .top-tab { font-size: 1.45rem; padding: .6rem .95rem .7rem; }
    .top-tab.calc-tab .lbl { display: none; }
    .calc-page { grid-template-columns: 1fr; }
    .calc { max-width: 23rem; margin: 0 auto; width: 100%; }
    .examples li { grid-template-columns: 1fr; gap: .1rem; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===== Histoire vivante : onglets, portraits, frise, carte, animations ===== */
.hist-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 1.2rem; border-bottom: 2px solid var(--line); padding-bottom: .6rem; }
.hist-tab { display: inline-flex; align-items: center; gap: .45rem; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: .55rem .95rem; font: inherit; font-weight: 700; cursor: pointer; }
.hist-tab svg { width: 18px; height: 18px; }
.hist-tab[aria-selected="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.hv-axes { margin-bottom: 1rem; }
.hv-axes .qcat[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.hv-persos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .8rem; }
.hv-perso { display: flex; align-items: center; gap: .85rem; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 16px; padding: .7rem .9rem; cursor: pointer; font: inherit; color: var(--text); transition: transform .15s, box-shadow .15s; }
.hv-perso:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(29,36,82,.12); }
.hv-perso-txt { display: flex; flex-direction: column; gap: .1rem; line-height: 1.25; }
.hv-perso-txt b { font-family: var(--display); font-size: 1.05rem; }
.hv-perso-txt span { font-size: .85rem; color: var(--muted); }
.hv-portrait { flex: none; border-radius: 24px; }
.hv-fiche { color: #E6E8F5; font-size: calc(1.05rem * var(--qs, 1)); max-width: 56rem; }
.hv-fiche-tete { display: flex; gap: 1.4rem; align-items: center; margin-bottom: 1rem; }
.hv-fiche h2 { font-family: var(--display); font-size: calc(clamp(1.8rem, 4vw, 3rem) * var(--qs, 1)); margin: 0 0 .3rem; color: #fff; }
.hv-fiche h3 { color: var(--sun); margin: 1.1rem 0 .4rem; font-size: 1.15em; }
.hv-fiche p, .hv-fiche li { line-height: 1.55; } .hv-fiche ul { padding-left: 1.2rem; margin: 0; }
.hv-sous { color: var(--muted); margin: 0 0 .4rem; }
.hv-fiche .hv-sous { color: #B9BFD9; }
.hv-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .3rem 0; }
.hv-chip { border: 1.5px solid var(--line); background: none; border-radius: 9px; padding: .3rem .65rem; font-weight: 700; font-size: .85rem; cursor: pointer; color: inherit; }
.hv-fiche .hv-chip { border-color: rgba(255,255,255,.35); }
.hv-chip:hover { border-color: var(--c, var(--night)); }
.hv-classe { border-left: 6px solid var(--c); padding: .6rem 1rem; background: rgba(255,255,255,.07); border-radius: 0 12px 12px 0; margin-top: 1.1rem; }
.hv-classe b { color: var(--sun); }
.hv-liens { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.hv-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: .45rem .85rem; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; }
.hv-btn svg { width: 16px; height: 16px; }
.hv-fiche .hv-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.hv-frise-outils { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; font-weight: 700; }
.hv-aide { font-weight: 400; font-size: .85rem; color: var(--muted); }
.hv-frise { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: grab; user-select: none; }
.hv-frise.tire { cursor: grabbing; }
.hv-frise-in { position: relative; }
.hv-ere { position: absolute; top: 0; bottom: 0; border-right: 1px dashed rgba(29,36,82,.15); }
.hv-ere span { position: sticky; left: .6rem; display: inline-block; margin: .5rem .6rem; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #6B7186; }
.hv-axe { position: absolute; left: 30px; height: 4px; margin-top: -2px; background: var(--night); border-radius: 2px; }
.hv-grad { position: absolute; width: 1px; height: 12px; margin-top: -6px; background: var(--night); }
.hv-grad span { position: absolute; top: 14px; left: -30px; width: 60px; text-align: center; font-size: .72rem; color: #6B7186; font-weight: 700; }
.hv-point { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c); }
.hv-tige { position: absolute; width: 2px; background: var(--c); opacity: .5; }
.hv-ev { position: absolute; width: 170px; height: 70px; text-align: left; background: #fff; border: 1px solid #D9DEEE; border-top: 4px solid var(--c); border-radius: 10px; padding: .35rem .5rem; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .05rem; overflow: hidden; color: #1E2235; }
.hv-ev:hover { box-shadow: 0 6px 16px rgba(29,36,82,.18); z-index: 2; }
.hv-ev small { font-size: .7rem; color: var(--c); font-weight: 800; }
.hv-ev b { font-size: .8rem; line-height: 1.15; }
.hv-ev span { font-size: .68rem; color: #6B7186; }
.hv-bande { position: absolute; left: .8rem; font-weight: 800; font-size: .75rem; text-transform: uppercase; color: #6B7186; }
.hv-vie { position: absolute; height: 24px; border-radius: 12px; border: none; background: var(--c); color: #fff; font: inherit; font-size: .72rem; font-weight: 700; padding: 0 .5rem; cursor: pointer; text-align: left; white-space: nowrap; overflow: visible; opacity: .9; }
.hv-vie span { position: relative; }
.hv-vie.vu { outline: 3px solid var(--sun); }
.hv-detail { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; min-height: 4rem; }
.hv-detail h3 { font-family: var(--display); margin: .4rem 0 .2rem; font-size: 1.3rem; }
.hv-detail p { margin: .3rem 0; line-height: 1.5; }
.hv-carte-outils { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; margin-bottom: .8rem; }
.hv-carte-outils .qcat[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.hv-temps { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 700; }
.hv-temps input { width: min(22rem, 70vw); }
.hv-carte { height: min(70vh, 560px); border-radius: 16px; border: 1px solid var(--line); overflow: hidden; background: #DCEBFB; }
.hv-anims { display: grid; grid-template-columns: minmax(14rem, 18rem) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 820px) { .hv-anims { grid-template-columns: 1fr; } }
.hv-anim-menu { display: grid; gap: .5rem; }
.hv-anim-menu button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; font: inherit; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: .15rem; }
.hv-anim-menu button span { font-size: .82rem; color: var(--muted); }
.hv-anim-menu button[aria-pressed="true"] { border-color: var(--night); box-shadow: inset 4px 0 0 var(--sun); }
.hv-anim-scene { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; }
.hv-anim-scene h3 { font-family: var(--display); font-size: 1.4rem; margin: 0 0 .2rem; }
.hv-svg { width: 100%; max-width: 640px; height: auto; display: block; margin: .6rem auto; background: #FBFCFF; border-radius: 12px; font-family: Arial, sans-serif; }
.hv-svg.hv-carre { max-width: 360px; }
.hv-svg text { fill: #1E2235; }
.hv-ctrl { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin: .5rem 0; }
.hv-cur { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .92rem; }
.hv-cur b { min-width: 3.5rem; color: var(--RS); }
.hv-calc { background: var(--bg); border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0; line-height: 1.6; }
.hv-calc span { color: var(--muted); }
.hv-texte { line-height: 1.6; margin: .6rem 0 0; }
.hv-msg { font-weight: 700; color: var(--RS); }
.hv-crible { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; max-width: 520px; margin: .6rem auto; }
.hv-crible span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; background: var(--bg); font-weight: 700; transition: all .4s; position: relative; }
.hv-crible span.barre { color: #A6ABBE; background: transparent; }
.hv-crible span.barre::after { content: ""; position: absolute; left: 18%; right: 18%; top: 50%; height: 2px; background: var(--c, #A6ABBE); transform: rotate(-35deg); }
.hv-crible span.premier { background: var(--c); color: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }
#hist-random { background: var(--night); color: #fff; border: none; }
.hist-show-body.fiche { justify-content: flex-start; }
.hist-show-body.fiche p { font-size: calc(1.15rem * var(--qs, 1)); margin: 0 0 .6rem; }
.hist-show-body.fiche li { font-size: calc(1.08rem * var(--qs, 1)); margin-bottom: .3rem; }
.hist-show-body.fiche .hv-sous { font-size: calc(1rem * var(--qs, 1)); }
#hist-random { width: auto; padding: .7rem 1.2rem; margin: 0; }

/* ===== Tableau de conversion ===== */
#vue-conversions:fullscreen { background: var(--bg); overflow: auto; padding: 1rem; }
.cv-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cv-actions .btn-sec { width: auto; padding: .6rem 1rem; }
.cv-onglets { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 .7rem; }
.cv-onglets .qcat[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.cv-modes { display: inline-flex; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .25rem; margin-bottom: 1rem; }
.cv-saisie { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; }
.cv-saisie label { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .9rem; }
.cv-saisie input, .cv-saisie select, .cv-question input { font: inherit; font-size: 1.4rem; font-weight: 700; padding: .45rem .7rem; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); min-width: 7rem; }
.cv-saisie input { width: 11rem; }
.cv-echange { font-size: 1.4rem; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: .35rem .8rem; cursor: pointer; color: var(--text); }
.cv-egalite { display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem; font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin: 1.2rem 0 .8rem; }
.cv-egalite .res { color: #C0283C; }
.cv-scroll { overflow-x: auto; padding: 0 .8rem 1.2rem 0; }
.cv-table { border-collapse: collapse; margin: .4rem 0 1rem; background: var(--surface); }
.cv-table th { background: var(--g); color: #fff; font-size: 1.05rem; padding: .45rem .3rem; border: 2px solid var(--surface); min-width: 3.3rem; }
.cv-table th small { display: block; font-size: .72rem; font-weight: 600; opacity: .85; }
.cv-table th.vide { background: color-mix(in srgb, var(--g) 55%, white); }
.cv-table th[data-cible] { box-shadow: inset 0 -5px 0 var(--sun); }
.cv-table .cv-cap th { background: color-mix(in srgb, var(--g) 25%, white); color: #1E2235; font-size: .85rem; padding: .2rem; }
.cv-table td { position: relative; height: 3.8rem; min-width: 3.3rem; text-align: center; border: 1px solid var(--line); border-right-style: dashed; font-size: 2rem; font-weight: 800; font-family: var(--display); }
.cv-table td.fin-groupe { border-right: 3px solid var(--g); }
.cv-table td.cible { background: color-mix(in srgb, var(--sun) 22%, transparent); }
.cv-table td.source { background: color-mix(in srgb, var(--g) 10%, transparent); }
.cv-ch.zero { color: #F07A2B; }
.cv-virg { position: absolute; right: -.5rem; bottom: -.15rem; width: 1rem; height: 1.6rem; display: flex; align-items: flex-end; justify-content: center; font-size: 3.2rem; line-height: .6; font-weight: 900; z-index: 2; font-family: Georgia, serif; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.cv-virg.src { color: #9AA1B2; }
.cv-virg.dst { color: #C0283C; animation: cvpop .6s ease; }
@keyframes cvpop { from { transform: translateY(-14px) scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
.cv-etapes { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem .8rem 2.2rem; line-height: 1.6; }
.zero-ex { color: #F07A2B; font-weight: 800; }
.cv-msg { color: var(--muted); font-weight: 700; margin: 1rem 0; }
.cv-question { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; font-family: var(--display); font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; margin: .5rem 0 .6rem; }
.cv-question input { width: 9rem; }
.cv-score { font-weight: 700; }
.cv-verdict { font-weight: 800; font-size: 1.15rem; } .cv-verdict.ok { color: var(--FA); } .cv-verdict.ko { color: #C0283C; }
.cv-aide { color: var(--muted); }
.cv-rappel { margin-top: 1rem; background: var(--surface); border-left: 5px solid var(--sun); border-radius: 0 12px 12px 0; padding: .7rem 1rem; }
@media print { #print-area .cv-table td { height: 1.1cm; font-size: 14pt; } #print-area .cv-table th { background: #EAF1FD !important; color: #000; border: 1px solid #555; } #print-area .cv-table td { border: 1px solid #555; } }
.cv-legende { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .9rem; font-weight: 700; margin: -.4rem 0 .8rem; }
.cv-legende span::before { content: ""; display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; margin-right: .35rem; vertical-align: -2px; background: var(--k); }

/* ===== Tableau à compléter ===== */
.tb-barre { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.tb-stylos { display: inline-flex; gap: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .45rem; }
.tb-stylo { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 3px solid var(--surface); background: var(--k); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.tb-stylo[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--k); transform: scale(1.08); }
.tb-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: .5rem .9rem; font: inherit; font-weight: 700; cursor: pointer; }
.tb-btn:hover { border-color: var(--night); }
.tb-aide { background: #FFF6DD; border-left: 5px solid var(--sun); border-radius: 0 12px 12px 0; padding: .7rem 1rem; margin-bottom: .8rem; line-height: 1.55; color: #1E2235; }
.tb-cadre { background: #fff; border-radius: 22px; padding: 1rem 1rem 1.2rem; box-shadow: 0 1px 0 var(--line), 0 18px 40px -22px rgba(29,36,82,.35); overflow-x: auto; border: 1px solid var(--line); }
.tb { border-collapse: separate; border-spacing: 0; margin: 0 auto; color: #1E2235; }
.tb thead th { font-family: var(--display); font-weight: 800; color: #fff; background: var(--g); padding: .55rem .2rem .45rem; font-size: 1.15rem; border-right: 3px solid #fff; }
.tb thead tr:first-child th.tb-u:nth-child(even) { background: color-mix(in srgb, var(--g) 82%, #1D2452); }
.tb thead th.tb-u { border-radius: 14px 14px 0 0; }
.tb thead th.tb-u.vide { background: color-mix(in srgb, var(--g) 35%, white); }
.tb thead th small { display: block; font-size: .72rem; font-weight: 700; opacity: .9; letter-spacing: .03em; }
.tb .tb-cap th { background: color-mix(in srgb, var(--g) 18%, white); color: #1E2235; font-size: .82rem; padding: .2rem; border-radius: 0; border-right: 1px solid #fff; }
.tb .tb-cap th.fin { border-right: 3px solid #fff; }
.tb .tb-enonce-h, .tb .tb-res-h { background: #F3F5FB !important; color: #646A80 !important; font-size: .82rem !important; text-transform: uppercase; letter-spacing: .05em; border-radius: 14px 14px 0 0; }
.tb td { border-bottom: 1.5px solid #E3E7F2; }
.tb tbody tr:nth-child(odd) td.tb-c { background: #FBFCFF; }
.tb td.tb-c { position: relative; width: 3.6rem; min-width: 3.6rem; height: 4.2rem; text-align: center; vertical-align: middle; border-right: 1.5px dashed #D5DBE8; cursor: pointer; transition: background .15s; }
.tb td.tb-c.fin { border-right: 3px solid var(--g); }
.tb td.tb-c:hover { background: color-mix(in srgb, var(--g) 8%, white); }
.tb td.tb-c.sel { background: #FFF6DD !important; box-shadow: inset 0 0 0 3px var(--sun); }
.tb-ch { font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; }
.tb-v { position: absolute; top: 0; bottom: 0; right: -9px; width: 18px; border: 0; background: none; cursor: pointer; z-index: 3; color: transparent; font-family: Georgia, serif; font-weight: 900; font-size: 3.4rem; line-height: 1; padding: 0; display: flex; align-items: flex-end; justify-content: center; }
.tb-v:hover { color: rgba(192,40,60,.3); }
.tb-v.on { color: #C0283C; text-shadow: 0 0 4px #fff, 0 0 4px #fff; }
.tb-v.attendue:not(.on) { color: rgba(31,163,122,.75); }
.tb td.tb-enonce, .tb td.tb-res { padding: 0 .5rem; position: relative; }
.tb td input { font: inherit; font-weight: 700; font-size: 1.05rem; border: 0; border-bottom: 2px dotted #C9CDEB; background: transparent; padding: .4rem .2rem; width: 11rem; color: #1E2235; }
.tb td.tb-res input { width: 8rem; font-size: 1.25rem; color: #C0283C; }
.tb td input:focus { outline: none; border-bottom-color: var(--sun); }
.tb-outils { display: inline-flex; gap: .15rem; opacity: .35; transition: opacity .15s; }
.tb tr:hover .tb-outils { opacity: 1; }
.tb-outils button { border: 0; background: #F3F5FB; border-radius: 8px; width: 1.9rem; height: 1.9rem; cursor: pointer; font-size: .95rem; color: #1E2235; }
.tb-outils button:hover { background: #E6EBF8; }
.tb-sol { display: block; font-size: .85rem; font-weight: 800; color: #1FA37A; padding: 0 .2rem .3rem; }
.tb td.tb-c.juste { background: rgba(31,163,122,.12) !important; }
.tb td.tb-c.faux { background: rgba(192,40,60,.12) !important; }
.tb td.tb-c.faux .tb-ch { text-decoration: line-through; text-decoration-color: #C0283C; }
.tb-fantome { font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: rgba(31,163,122,.45); }
.tb-bulle { position: absolute; right: 0; top: 100%; z-index: 5; background: #1D2452; color: #fff; padding: .5rem .7rem; border-radius: 10px; font-size: .85rem; width: 16rem; }
#vue-conversions:fullscreen .tb td.tb-c { width: 4.4rem; height: 5rem; } #vue-conversions:fullscreen .tb-ch, #vue-conversions:fullscreen .tb-fantome { font-size: 3rem; }
.tb td.tb-res { white-space: nowrap; }
.tb td.tb-res .tb-sol { position: absolute; left: .7rem; bottom: .15rem; }

/* ===== Frise chronologique (verticale) ===== */
.fr-outils { display: grid; gap: .6rem; margin-bottom: 1rem; }
.fr-outils .hv-axes { margin: 0; }
.fr-outils-l { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; }
.fr-bascule { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.fr-wrap { display: grid; grid-template-columns: 15rem 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .fr-wrap { grid-template-columns: 1fr; } .fr-nav { position: static !important; display: flex !important; overflow-x: auto; } .fr-nav button { min-width: 11rem; } }
.fr-nav { position: sticky; top: 1rem; display: grid; gap: .3rem; }
.fr-nav button { display: flex; gap: .6rem; align-items: center; text-align: left; border: 0; background: none; padding: .45rem .55rem; border-radius: 12px; cursor: pointer; color: var(--text); font: inherit; }
.fr-nav button i { flex: none; width: .75rem; height: .75rem; border-radius: 50%; background: var(--e); box-shadow: 0 0 0 3px color-mix(in srgb, var(--e) 22%, transparent); }
.fr-nav button b { display: block; font-size: .9rem; line-height: 1.2; }
.fr-nav button small { color: var(--muted); font-size: .75rem; }
.fr-nav button:hover { background: var(--surface); }
.fr-nav button.actif { background: var(--surface); box-shadow: inset 4px 0 0 var(--e), 0 2px 10px rgba(29,36,82,.08); }
.fr-nav button:disabled { opacity: .35; cursor: default; }
.fr-ere { margin-bottom: 2.4rem; scroll-margin-top: 1rem; }
.fr-ere-tete { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.3rem; border-radius: 20px; color: #fff; background: linear-gradient(120deg, var(--e), color-mix(in srgb, var(--e) 55%, #1D2452)); box-shadow: 0 14px 30px -18px var(--e); margin-bottom: 1.2rem; }
.fr-ere-num { font-family: var(--display); font-size: 2.6rem; font-weight: 800; line-height: 1; opacity: .45; }
.fr-ere-dates { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.fr-ere-tete h3 { font-family: var(--display); font-size: 1.6rem; margin: .1rem 0 .3rem; }
.fr-ere-tete p { margin: 0; line-height: 1.5; opacity: .95; max-width: 46rem; }
.fr-liste { list-style: none; margin: 0; padding: 0; position: relative; }
.fr-liste::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: linear-gradient(var(--e), color-mix(in srgb, var(--e) 25%, transparent)); border-radius: 2px; }
.fr-item { position: relative; display: grid; grid-template-columns: 1fr 5.5rem 1fr; align-items: center; margin-bottom: .9rem; }
.fr-item .fr-pt { grid-column: 2; grid-row: 1; justify-self: center; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; border: 4px solid var(--c); z-index: 1; }
.fr-item.perso .fr-pt { width: 1.2rem; height: 1.2rem; background: var(--c); border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.fr-date { grid-row: 1; font-family: var(--display); font-weight: 800; font-size: .95rem; color: var(--c); white-space: nowrap; }
.fr-item.g .fr-carte { grid-column: 1; grid-row: 1; } .fr-item.g .fr-date { grid-column: 3; justify-self: start; padding-left: .2rem; }
.fr-item.d .fr-carte { grid-column: 3; grid-row: 1; } .fr-item.d .fr-date { grid-column: 1; justify-self: end; padding-right: .2rem; }
.fr-carte { position: relative; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .8rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; transition: transform .15s, box-shadow .15s; box-shadow: 0 2px 0 var(--line); }
.fr-carte::after { content: ""; position: absolute; top: 50%; width: 14px; height: 14px; background: var(--surface); border: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.fr-item.g .fr-carte::after { right: -8px; border-left: 0; border-bottom: 0; }
.fr-item.d .fr-carte::after { left: -8px; border-right: 0; border-top: 0; }
.fr-carte:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(29,36,82,.45); border-color: var(--c); }
.fr-carte b { font-family: var(--display); font-size: 1.08rem; line-height: 1.25; }
.fr-type { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--c); }
.fr-texte { font-size: .9rem; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fr-perso { flex-direction: row; align-items: center; gap: .8rem; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface)); }
.fr-perso > span { display: flex; flex-direction: column; gap: .1rem; }
.fr-perso small { font-size: .74rem; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .04em; }
.fr-perso em { font-style: normal; font-size: .85rem; color: var(--muted); }
.fr-extrait { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.fr-perso.vu { outline: 3px solid var(--sun); }
.fr-type-g { display: inline-flex; gap: .3rem; align-items: center; font-weight: 700; color: var(--sun); }
@media (max-width: 640px) { .fr-liste::before { left: 1rem; } .fr-item { grid-template-columns: 2rem 1fr; } .fr-item .fr-pt { grid-column: 1; } .fr-item.g .fr-carte, .fr-item.d .fr-carte { grid-column: 2; } .fr-item .fr-date { grid-column: 2 !important; grid-row: 2; justify-self: start !important; } .fr-carte::after { display: none; } }

/* ===== Carte du monde ===== */
.ct-wrap { display: grid; grid-template-columns: 1fr 21rem; gap: 1rem; align-items: stretch; }
@media (max-width: 960px) { .ct-wrap { grid-template-columns: 1fr; } }
.ct-carte-box { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px -22px rgba(29,36,82,.45); border: 1px solid var(--line); }
.ct-svg-box { position: relative; height: min(74vh, 640px); background: #B9D3EE; }
#ct-svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; user-select: none; }
#ct-svg.tire { cursor: grabbing; }
.ct-pt { cursor: pointer; }
.ct-pt.p circle { fill: var(--c); stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; transition: opacity .15s; }
.ct-pt.p text { fill: #fff; font-family: Georgia, serif; font-weight: 700; text-anchor: middle; pointer-events: none; }
.ct-pt.e rect { fill: #fff; stroke: var(--c); }
.ct-pt:hover circle, .ct-pt:hover rect { opacity: .85; stroke: #FFC845; }
.ct-bulle { position: absolute; z-index: 600; width: min(21rem, calc(100% - 16px)); background: #fff; border-radius: 16px; box-shadow: 0 16px 36px -10px rgba(29,36,82,.45); overflow: hidden; }
.ct-bulle[hidden] { display: none; }
.ct-x { position: absolute; right: .35rem; top: .45rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 0; background: #F1F3F8; color: #1E2235; font-size: 1.15rem; line-height: 1; cursor: pointer; }
.ct-pop > div { padding-right: 1.4rem; }
.ct-zoom { position: absolute; left: 1rem; top: 1rem; z-index: 500; display: grid; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(29,36,82,.2); }
.ct-zoom button { width: 2.4rem; height: 2.4rem; border: 0; border-bottom: 1px solid #E3E6EF; background: #fff; color: #1D2452; font-size: 1.35rem; font-weight: 700; cursor: pointer; }
.ct-zoom button:hover { background: #FFF6DC; }
.ct-vues { position: absolute; left: 4.2rem; top: 1rem; z-index: 500; display: flex; flex-wrap: wrap; gap: .3rem; max-width: calc(100% - 24rem); }
.ct-vues button { border: 0; background: rgba(255,255,255,.92); color: #1D2452; font: 700 .78rem/1 inherit; font-family: inherit; padding: .5rem .7rem; border-radius: 999px; cursor: pointer; box-shadow: 0 3px 10px rgba(29,36,82,.15); }
.ct-vues button:hover { background: #1D2452; color: #fff; }
@media (max-width: 700px) { .ct-vues { max-width: none; right: 1rem; } .ct-legende { display: none; } }
.ct-annee { position: absolute; left: 1rem; bottom: 1rem; z-index: 500; background: rgba(29,36,82,.88); color: #fff; padding: .55rem 1rem .6rem; border-radius: 14px; backdrop-filter: blur(6px); pointer-events: none; }
.ct-annee small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sun); font-weight: 800; }
.ct-annee b { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; }
.ct-legende { position: absolute; right: .8rem; top: .8rem; z-index: 500; display: flex; flex-wrap: wrap; gap: .3rem .7rem; max-width: 18rem; background: rgba(255,255,255,.92); border-radius: 12px; padding: .45rem .7rem; font-size: .75rem; font-weight: 700; color: #1E2235; box-shadow: 0 4px 14px rgba(29,36,82,.12); }
.ct-legende i { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }
.ct-legende i.p { background: #1D2452; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1D2452; } .ct-legende i.e { background: #fff; border: 2px solid #1D2452; border-radius: 4px; }
.ct-panneau { display: flex; flex-direction: column; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1rem; max-height: min(74vh, 640px); }
.ct-filtres .qcat[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.ct-temps { background: var(--bg); border-radius: 14px; padding: .7rem .8rem; }
.ct-temps-t { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: .4rem; }
.ct-temps input { width: 100%; accent-color: #1D2452; }
.ct-eres { display: flex; height: .45rem; border-radius: 4px; overflow: hidden; margin-top: .2rem; }
.ct-eres span { background: var(--e); }
.ct-compte { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 700; }
.ct-liste { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; gap: .35rem; align-content: start; }
.ct-liste button { width: 100%; display: flex; align-items: center; gap: .6rem; text-align: left; border: 1px solid transparent; background: var(--bg); border-left: 4px solid var(--c); border-radius: 10px; padding: .4rem .55rem; cursor: pointer; font: inherit; color: var(--text); }
.ct-liste button:hover { border-color: var(--c); }
.ct-liste b { display: block; font-size: .88rem; line-height: 1.2; }
.ct-liste small { font-size: .74rem; color: var(--muted); }
.ct-liste .hv-portrait { border-radius: 9px; }
.ct-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); font-style: normal; }
.ct-pop { display: flex; gap: .8rem; padding: .9rem 1rem; border-top: 5px solid var(--c); font-family: inherit; color: #1E2235; }
.ct-pop small { display: block; color: #646A80; font-size: .75rem; }
.ct-pop b { display: block; font-size: 1.05rem; margin: .1rem 0 .3rem; }
.ct-pop p { margin: 0 0 .6rem !important; font-size: .85rem; line-height: 1.45; }
.ct-pop .hv-btn { font-size: .82rem; padding: .35rem .7rem; background: #fff; color: #1E2235; }

/* ===== Impression du tableau de conversion ===== */
#print-area .cvp { font-family: Arial, Helvetica, sans-serif; color: #1E2235; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#print-area .cvp-tete { display: flex; justify-content: space-between; align-items: flex-end; background: linear-gradient(110deg, var(--c1), var(--c2)); color: #fff; border-radius: 4mm; padding: 4mm 6mm; margin-bottom: 3mm; }
#print-area .cvp-tete small { font-size: 9pt; opacity: .9; text-transform: uppercase; letter-spacing: .05em; }
#print-area .cvp-tete h1 { font-size: 20pt; margin: 1mm 0 0; color: #fff; }
#print-area .cvp-nom { font-size: 10.5pt; line-height: 1.8; text-align: right; }
#print-area .cvp-rappel { font-size: 10pt; background: #F3F5FB; border-left: 4px solid var(--c1); border-radius: 0 3mm 3mm 0; padding: 2mm 4mm; margin: 0 0 4mm; line-height: 1.45; }
#print-area .cvp-t { border-collapse: separate; border-spacing: 0; margin: 0 auto; }
#print-area .cvp-t th { color: #fff; font-size: 13pt; padding: 2mm 1mm; border-right: 2px solid #fff; }
#print-area .cvp-t th.cvp-u { border-radius: 3mm 3mm 0 0; }
#print-area .cvp-t th small { display: block; font-size: 8pt; font-weight: 600; }
#print-area .cvp-t th.cvp-cap { background: color-mix(in srgb, var(--c1) 22%, white); color: #1E2235; font-size: 9pt; padding: .8mm; border-right: 1px solid #fff; }
#print-area .cvp-t th.cvp-lab { background: #F3F5FB; color: #646A80; font-size: 9pt; text-transform: uppercase; letter-spacing: .05em; border-radius: 3mm 3mm 0 0; }
#print-area .cvp-t td { height: 14.5mm; border-bottom: 1.2px solid #C9CDEB; }
#print-area .cvp-t td.cvp-c { position: relative; min-width: var(--w); width: var(--w); text-align: center; font-size: 22pt; font-weight: 700; border-right: 1px dashed #B8BFD3; }
#print-area .cvp-t tbody tr:nth-child(even) td.cvp-c { background: color-mix(in srgb, var(--c1) 5%, white); }
#print-area .cvp-t td.cvp-c.fin { border-right: 2.5px solid var(--c1); }
#print-area .cvp-t td.cvp-enonce { width: 48mm; padding: 0 3mm; font-size: 11pt; font-weight: 700; border-right: 2.5px solid var(--c1); }
#print-area .cvp-t td.cvp-res { width: 40mm; padding: 0 3mm; font-size: 12pt; font-weight: 700; color: #C0283C; }
#print-area .cvp-t tr.cvp-ex td { background: #FFF8E5 !important; }
#print-area .cvp-tag { display: block; font-size: 7.5pt; font-weight: 800; color: #fff; background: var(--c1); border-radius: 2mm; padding: .3mm 1.5mm; width: max-content; margin-bottom: 1mm; text-transform: uppercase; }
#print-area .cvp-t span.z { color: #E07000; }
#print-area .cvp-virg { position: absolute; right: -1.6mm; bottom: -1mm; font-style: normal; font-size: 26pt; font-weight: 900; color: #C0283C; font-family: Georgia, serif; line-height: 1; }
#print-area .cvp-leg { font-size: 9.5pt; margin-top: 3mm; text-align: center; }
#print-area .cvp-leg span { display: inline-block; width: 3.5mm; height: 3.5mm; border-radius: 1mm; margin: 0 1.5mm 0 5mm; vertical-align: -.5mm; }
#print-area .cvp-leg .k { background: #1E2235; } #print-area .cvp-leg .z { background: #E07000; } #print-area .cvp-leg .v { background: #C0283C; }

@media print { html, body { background: #fff !important; } }

/* Frise : repères de durée */
.fr-date { display: flex; flex-direction: column; line-height: 1.15; }
.fr-item.d .fr-date { align-items: flex-end; }
.fr-ilya { font-family: var(--font, inherit); font-size: .7rem; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.fr-ecart { position: relative; height: var(--h); margin: -.45rem 0 .45rem; display: grid; place-items: center; }
.fr-ecart::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: repeating-linear-gradient(var(--e) 0 4px, transparent 4px 9px); z-index: 1; }
.fr-ecart span { position: relative; z-index: 2; background: var(--bg); border: 1px dashed color-mix(in srgb, var(--e) 60%, transparent); color: color-mix(in srgb, var(--e) 75%, #1D2452); font-size: .76rem; font-weight: 600; padding: .15rem .7rem; border-radius: 999px; white-space: nowrap; }
.fr-ecart b { font-weight: 800; }
.fr-regle-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .9rem 1.1rem 1rem; margin-bottom: 1.2rem; position: sticky; top: .4rem; z-index: 20; box-shadow: 0 10px 24px -18px rgba(29,36,82,.45); }
.fr-regle-t { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; margin-bottom: .55rem; }
.fr-regle-t span { font-size: .8rem; color: var(--muted); }
.fr-regle { position: relative; height: 2.6rem; margin: 1.5rem .3rem 1.1rem; }
.fr-r-ere { position: absolute; top: .9rem; height: .7rem; background: var(--e); opacity: .85; }
.fr-r-ere:first-child { border-radius: 6px 0 0 6px; }
.fr-coupure { position: absolute; top: .55rem; width: .55rem; height: 1.4rem; margin-left: -.27rem; background: var(--surface); transform: skewX(-18deg); border-left: 2px solid var(--muted); border-right: 2px solid var(--muted); z-index: 2; }
.fr-r-pt { position: absolute; top: .45rem; width: 3px; height: .45rem; margin-left: -1.5px; background: var(--c); border-radius: 2px; }
.fr-r-pt.p { top: 1.6rem; height: .4rem; }
.fr-grad { position: absolute; top: 1.95rem; transform: translateX(-50%); font-size: .68rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.fr-grad i { position: absolute; left: 50%; top: -1.1rem; width: 1px; height: 1rem; background: rgba(29,36,82,.35); }
.fr-r-pont { position: absolute; top: .1rem; height: .6rem; border: 3px solid #E8A300; border-bottom: 0; border-radius: 4px 4px 0 0; z-index: 3; }
.fr-r-pont[hidden], .fr-curseur[hidden] { display: none; }
.fr-curseur { position: absolute; top: .1rem; height: 2.2rem; width: 3px; margin-left: -1.5px; background: #1D2452; border-radius: 2px; z-index: 4; transition: left .35s ease; }
.fr-curseur::after { content: attr(data-an); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1D2452; color: #fff; font-size: .68rem; font-weight: 800; padding: .1rem .4rem; border-radius: 6px; white-space: nowrap; }
.fr-comp { display: flex; flex-wrap: wrap; gap: .45rem .6rem; align-items: center; font-size: .88rem; }
.fr-comp-t { font-weight: 800; }
.fr-comp select { max-width: 17rem; font: inherit; font-size: .85rem; padding: .3rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.fr-res { font-size: .9rem; color: var(--text); }
.fr-res b { background: #FFC845; color: #1D2452; padding: .05rem .45rem; border-radius: 6px; }
.fr-nav { top: 13rem; }
@media (max-width: 900px) { .fr-regle-box { position: static; } }
@media (max-width: 640px) { .fr-ecart::before { left: 1rem; } .fr-ecart { justify-items: start; padding-left: 2rem; } }

/* Découpage : vacances scolaires */
.dec-vac-pin { position: absolute; top: 3.6rem; transform: translateX(-50%); z-index: 3; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--v); color: #fff; display: grid; place-items: center; font-size: .85rem; box-shadow: 0 0 0 3px var(--surface); }
.dec-vac-card { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1rem; align-items: center; border-radius: 14px; padding: .8rem 1rem; background: linear-gradient(110deg, color-mix(in srgb, var(--v) 16%, var(--surface)), var(--surface) 70%); border: 2px dashed var(--v); }
.dec-vac-ico { width: 3rem; height: 3rem; border-radius: 50%; background: var(--v); color: #fff; display: grid; place-items: center; font-size: 1.4rem; }
.dec-vac-txt small { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; color: var(--v); }
.dec-vac-txt h3 { margin: .1rem 0 .2rem; font-size: 1.02rem; }
.dec-vac-txt p { margin: 0; font-size: .85rem; color: var(--muted); }
.dec-vac-liens { display: grid; gap: .3rem; }
.dec-vac-dl { display: flex; gap: .35rem; align-items: center; font-size: .8rem; }
.dec-vac-dl b { min-width: 5.2rem; }
.dec-vac-dl a { padding: .2rem .55rem; border-radius: 999px; background: var(--v); color: #fff; font-weight: 700; text-decoration: none; }
.dec-vac-dl a + a { background: transparent; color: var(--v); border: 1.5px solid var(--v); }
@media (max-width: 760px) { .dec-vac-card { grid-template-columns: 1fr; } .dec-vac-ico { display: none; } }

/* Carte : zones (grands foyers des mathématiques) */
.ct-zone { cursor: pointer; }
.ct-zone path { fill: var(--z); fill-opacity: .2; stroke: var(--z); stroke-width: 1.4px; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill-opacity .15s; }
.ct-zone.passe path { fill-opacity: .07; stroke-opacity: .45; }
.ct-zone:hover path { fill-opacity: .34; }
.ct-zone text { fill: color-mix(in srgb, var(--z) 70%, #1D2452); font-family: var(--display, Georgia), serif; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-linejoin: round; letter-spacing: .02em; pointer-events: none; }
.ct-zone.passe text { opacity: .5; }
.ct-zt { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; padding-right: .5rem; border-right: 1px solid #DDE1EC; }
.ct-zones-l { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.ct-zones-l > span { width: 100%; font-weight: 800; font-size: .85rem; }
.ct-zones-l button { border: 1.5px solid var(--z); background: color-mix(in srgb, var(--z) 12%, var(--surface)); color: var(--text); border-radius: 999px; padding: .2rem .55rem; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.ct-zones-l button:hover { background: var(--z); color: #fff; }
.ct-zl { display: flex; flex-wrap: wrap; gap: .25rem; margin: -.2rem 0 .2rem; max-height: 8.5rem; overflow-y: auto; }
.ct-zl > span { width: 100%; font-size: .75rem; font-weight: 800; color: #646A80; }
.ct-zl button { border: 1px solid #DDE1EC; background: #F6F7FB; border-radius: 8px; padding: .15rem .45rem; font: inherit; font-size: .76rem; cursor: pointer; color: #1E2235; text-align: left; }
.ct-zl button:hover { border-color: var(--c); }
.ct-zl i { font-style: normal; color: #8A90A6; }
.ct-pt circle, .ct-pt rect { filter: drop-shadow(0 1px 2px rgba(29,36,82,.35)); }

/* Simulations interactives */
.sim-liste { margin: 0 0 1.4rem; }
.sim-liste h3 { display: flex; align-items: center; gap: .5rem; font-family: var(--display); margin: 0 0 .7rem; font-size: 1.15rem; }
.sim-liste h3 small { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .85rem; }
.sim-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .7rem; }
.sim-carte { display: flex; gap: .8rem; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-top: 4px solid var(--c); background: var(--surface); border-radius: 14px; padding: .8rem .9rem; cursor: pointer; transition: transform .15s, box-shadow .15s; color: var(--text); }
.sim-carte:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(29,36,82,.45); }
.sim-carte b { display: block; font-size: .98rem; line-height: 1.25; }
.sim-carte small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; margin-top: .2rem; }
.sim-ic { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #2F6FE0) 14%, var(--surface)); color: var(--c, #2F6FE0); }
.sim-ic svg.i { width: 1.5rem; height: 1.5rem; }
.sim-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(12,14,34,.6); display: grid; place-items: center; padding: 1rem; backdrop-filter: blur(3px); }
.sim-fen { width: min(1280px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.sim-fen:fullscreen { max-height: none; height: 100vh; border-radius: 0; }
.sim-tete { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--night); color: #fff; }
.sim-tete .sim-ic { background: rgba(255,255,255,.12); color: var(--sun); }
.sim-tete div { flex: 1; } .sim-tete small { color: #C9CDEB; font-size: .8rem; } .sim-tete h2 { margin: 0; font-family: var(--display); font-size: 1.35rem; }
.sim-b { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: .4rem .85rem; font-weight: 700; font-size: .85rem; cursor: pointer; }
.sim-tete .sim-b { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.sim-b:hover { border-color: var(--sun); }
.sim-x { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 2.3rem; height: 2.3rem; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.sim-corps { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; flex: 1; min-height: 0; }
@media (max-width: 900px) { .sim-corps { grid-template-columns: 1fr; overflow-y: auto; } }
.sim-scene { background: #fff; display: grid; place-items: center; padding: .6rem; min-height: 0; }
.sim-svg { width: 100%; height: 100%; max-height: calc(100vh - 8rem); font-family: var(--body); touch-action: none; user-select: none; }
.sim-fen:fullscreen .sim-svg { max-height: calc(100vh - 5rem); }
.sim-svg.tourne { cursor: grab; }
.sim-pt { cursor: grab; } .sim-pt:active { cursor: grabbing; }
.sim-cote { border-left: 1px solid var(--line); padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; background: var(--bg); }
.sim-param span { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; }
.sim-param output { font-family: var(--mono); background: var(--night); color: var(--sun); border-radius: 6px; padding: 0 .45rem; min-width: 3rem; text-align: center; }
.sim-param input { width: 100%; accent-color: var(--night); }
.sim-choix { display: grid; gap: .3rem; font-weight: 700; font-size: .9rem; }
.sim-choix select { font: inherit; padding: .4rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.sim-opt { display: flex; gap: .45rem; align-items: center; font-size: .9rem; cursor: pointer; }
.sim-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.sim-infos { display: grid; gap: .4rem; }
.sim-info { border-left: 4px solid var(--ic, #1D2452); background: var(--surface); border-radius: 8px; padding: .4rem .6rem; }
.sim-info span { display: block; font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.sim-info b { font-size: .98rem; }
.sim-tab { border-collapse: collapse; font-size: .85rem; background: var(--surface); width: 100%; }
.sim-tab th, .sim-tab td { border: 1px solid var(--line); padding: .25rem .4rem; text-align: center; }
.sim-tab th { background: color-mix(in srgb, var(--night) 8%, var(--surface)); }
.sim-tab td.hl { background: #FFE9A8; color: #1D2452; font-weight: 700; }
.sim-pastille { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; }
.sim-defis { background: var(--surface); border-radius: 10px; padding: .5rem .7rem; border: 1px dashed var(--line); }
.sim-defis summary { font-weight: 800; cursor: pointer; }
.sim-defis ol { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .88rem; } .sim-defis li { margin-bottom: .3rem; }

/* Découpage : version imprimable */
@media print {
  #print-area .dp { zoom: .93; font-family: var(--body); color: #1E2235; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9.5pt; }
  #print-area .dp-tete { display: flex; justify-content: space-between; align-items: center; background: #1D2452; color: #fff; border-radius: 10px; padding: 3mm 6mm; margin-bottom: 3mm; }
  #print-area .dp-tete small { color: #C9CDEB; font-size: 8.5pt; }
  #print-area .dp-tete h1 { font-family: var(--display); font-size: 21pt; margin: .5mm 0; color: #fff; }
  #print-area .dp-tete p { margin: 0; font-size: 11pt; color: #FFC845; font-weight: 700; }
  #print-area .dp-badge { width: 19mm; height: 19mm; border-radius: 50%; background: #FFC845; color: #1D2452; display: grid; place-items: center; text-align: center; align-content: center; }
  #print-area .dp-badge b { font-family: var(--display); font-size: 20pt; line-height: 1; } #print-area .dp-badge span { font-size: 8pt; font-weight: 700; }
  #print-area .dp-frise { position: relative; margin: 3mm 1.5mm 1mm; }
  #print-area .dp-vacs { position: relative; height: 5mm; }
  #print-area .dp-vacs span { position: absolute; top: 0; transform: translateX(-50%); width: 5mm; height: 5mm; border-radius: 50%; background: var(--v); color: #fff; font-size: 7.5pt; display: grid; place-items: center; }
  #print-area .dp-barre { display: flex; gap: .6mm; height: 9mm; margin-top: 1mm; }
  #print-area .dp-barre div { background: var(--c); border-radius: 2mm; color: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0 1mm; }
  #print-area .dp-barre div.rev { background: repeating-linear-gradient(45deg, #8A90A6 0 2mm, #A9AEC0 2mm 4mm); }
  #print-area .dp-barre span { font-size: 6.8pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #print-area .dp-graduation { display: flex; margin-top: .8mm; }
  #print-area .dp-graduation i { flex: 1; border-left: .3mm solid #C9CDEB; height: 1.6mm; font-style: normal; font-size: 6.5pt; line-height: 1; color: #646A80; padding: 2.6mm 0 0 .4mm; box-sizing: content-box; }
  #print-area .dp-graduation i.f { border-color: #1D2452; height: 2.4mm; }
  #print-area .dp-semestre { position: absolute; top: 4mm; height: 14mm; border-left: .5mm dashed #1D2452; }
  #print-area .dp-leg { display: flex; flex-wrap: wrap; gap: 1mm 4mm; font-size: 7.8pt; margin: 2mm 0 1mm; color: #3A4060; }
  #print-area .dp-leg i { display: inline-block; width: 3mm; height: 3mm; border-radius: 1mm; background: var(--c); margin-right: 1mm; vertical-align: -.4mm; }
  #print-area .dp-leg .v b { display: inline-grid; place-items: center; width: 3.6mm; height: 3.6mm; border-radius: 50%; background: var(--v); color: #fff; font-size: 6.5pt; margin-right: 1mm; }
  #print-area .dp-h { font-family: var(--display); font-size: 11.5pt; margin: 2mm 0 .5mm; color: #1D2452; border-bottom: .5mm solid #FFC845; padding-bottom: .5mm; }
  #print-area .dp-t { width: 100%; border-collapse: separate; border-spacing: 0 .8mm; }
  #print-area .dp-t th { text-align: left; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .04em; color: #646A80; font-weight: 700; padding: 0 2mm; }
  #print-area .dp-t td { vertical-align: top; padding: 1mm 2.2mm; background: #F6F7FB; break-inside: avoid; }
  #print-area .dp-l { break-inside: avoid; }
  #print-area .dp-sem { width: 21mm; white-space: nowrap; border-left: 1.6mm solid var(--c); border-radius: 2mm 0 0 2mm; text-align: center; }
  #print-area .dp-sem b { display: block; font-family: var(--display); font-size: 11pt; color: var(--c); line-height: 1.1; }
  #print-area .dp-sem small { font-size: 7.5pt; color: #646A80; }
  #print-area .dp-ch b { font-size: 10pt; }
  #print-area .dp-ch p { margin: .3mm 0 0; font-size: 7.9pt; color: #3A4060; line-height: 1.35; }
  #print-area .dp-axe { display: inline-block; background: var(--c); color: #fff; font-size: 7pt; font-weight: 700; border-radius: 1mm; padding: .2mm 1.2mm; margin-right: 1.5mm; vertical-align: .3mm; }
  #print-area .dp-notes { width: 34mm; border-radius: 0 2mm 2mm 0; background: repeating-linear-gradient(#F6F7FB 0 4.6mm, #C9CDEB 4.6mm 4.8mm) !important; }
  #print-area .dp-vac td { background: #fff; border: .4mm dashed var(--v); border-radius: 2mm; color: var(--v); font-weight: 700; font-size: 8pt; padding: .5mm 2.4mm; }
  #print-area .dp-vac span { display: inline-grid; place-items: center; width: 4.5mm; height: 4.5mm; border-radius: 50%; background: var(--v); color: #fff; font-size: 7pt; margin-right: 1mm; }
  #print-area .dp-pied { margin-top: 1.5mm; font-size: 7.5pt; color: #8A90A6; text-align: center; }
}

/* Conversions : démonstration pas à pas et entraînement */
.cv-demo { display: grid; gap: 1rem; }
.cv-enonce { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem 1.2rem; font-family: var(--display); }
.cv-enonce input, .cv-enonce select { font: inherit; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; border: 2px solid var(--line); border-radius: 14px; padding: .25rem .6rem; background: var(--bg); color: var(--text); }
.cv-enonce input { width: 9ch; text-align: right; } .cv-enonce input:focus, .cv-enonce select:focus { border-color: var(--sun); outline: none; }
.cv-enonce .cv-eg { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.cv-res { font-size: clamp(1.8rem, 3.8vw, 2.8rem); font-weight: 800; color: #C0283C; min-width: 4ch; text-align: right; padding: .1rem .7rem; border-radius: 14px; background: color-mix(in srgb, #C0283C 8%, var(--surface)); }
.cv-res.cache { color: var(--muted); }
.cv-pas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.cv-pas button { display: flex; align-items: center; gap: .6rem; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: .55rem .8rem; font-weight: 700; cursor: pointer; text-align: left; }
.cv-pas button b { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--line); }
.cv-pas button[aria-pressed="true"] { border-color: var(--night); }
.cv-pas button[aria-pressed="true"] b { background: var(--night); color: var(--sun); }
#vue-conversions .cv-scroll { padding: .2rem 0 1.4rem; }
#vue-conversions .cv-table { width: 100%; table-layout: fixed; margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 26px -18px rgba(29,36,82,.5); }
#vue-conversions .cv-table th { min-width: 0; font-size: clamp(.9rem, 1.5vw, 1.15rem); }
#vue-conversions .cv-table th.de { box-shadow: inset 0 -5px 0 rgba(255,255,255,.7); }
#vue-conversions .cv-table td { min-width: 0; height: clamp(3.2rem, 6vw, 4.6rem); font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.cv-table .cv-sauts td { height: auto !important; border: 0 !important; background: transparent !important; font-size: 1rem !important; padding: .1rem 0 0; vertical-align: top; }
.cv-sauts span { display: inline-flex; flex-direction: column; align-items: center; color: #C0283C; font-size: 1.5rem; line-height: 1; transform: translateX(-50%); position: relative; left: 50%; }
.cv-sauts span.dr { transform: translateX(-0%); left: 0; } .cv-sauts span.ga { transform: none; left: 0; }
.cv-sauts small { font-size: .72rem; font-family: var(--body); font-weight: 700; }
.cv-etapes2 { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.cv-etapes2 li { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .6rem .9rem; opacity: .45; transition: opacity .2s; }
.cv-etapes2 li.fait { opacity: 1; } .cv-etapes2 li.cour { border-color: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 35%, transparent); }
.cv-etapes2 li > span { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--night); color: var(--sun); display: grid; place-items: center; font-weight: 800; }
.cv-etapes2 p { margin: .1rem 0 0; line-height: 1.5; }
.cv-etapes2 .rouge { color: #C0283C; } .cv-etapes2 .orange { color: #F07A2B; }
.cv-ex2 { display: grid; gap: 1rem; }
.cv-ex-barre { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.cv-niv { display: inline-flex; gap: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2rem; }
.cv-niv button { border: 0; background: none; color: var(--text); border-radius: 999px; padding: .35rem .9rem; font-weight: 700; cursor: pointer; }
.cv-niv button[aria-pressed="true"] { background: var(--night); color: #fff; }
.cv-pastilles { display: flex; gap: .3rem; }
.cv-pastilles i { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .78rem; font-weight: 800; background: var(--surface); border: 2px solid var(--line); color: var(--muted); }
.cv-pastilles i.ok { background: var(--FA); border-color: var(--FA); color: #fff; } .cv-pastilles i.ko { background: #C0283C; border-color: #C0283C; color: #fff; }
.cv-sc { font-weight: 800; margin-left: auto; color: var(--muted); }
.cv-carte { background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 1.4rem 1.2rem 1.2rem; text-align: center; transition: border-color .2s; }
.cv-carte.ok { border-color: var(--FA); background: color-mix(in srgb, var(--FA) 7%, var(--surface)); } .cv-carte.ko { border-color: #C0283C; background: color-mix(in srgb, #C0283C 6%, var(--surface)); }
.cv-consigne { margin: 0 0 .4rem; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 800; color: var(--muted); }
.cv-q { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem; font-family: var(--display); font-size: clamp(1.9rem, 4.4vw, 3.2rem); font-weight: 800; }
.cv-q input { font: inherit; width: 7ch; text-align: center; border: 3px solid var(--line); border-radius: 16px; padding: .1rem .4rem; background: var(--bg); color: var(--text); }
.cv-q input:focus { border-color: var(--sun); outline: none; }
.cv-verdict2 { font-size: 1.25rem; font-weight: 800; margin: .8rem 0 0; } .cv-carte.ok .cv-verdict2 { color: var(--FA); } .cv-carte.ko .cv-verdict2 { color: #C0283C; }
.cv-boutons { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.cv-gros { border: 0; background: var(--night); color: #fff; font-weight: 800; font-size: 1.1rem; padding: .7rem 1.6rem; border-radius: 999px; cursor: pointer; }
.cv-gros:hover { background: var(--night-2); }
.cv-lien { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-weight: 700; }
.cv-bilan { text-align: center; font-size: 1.1rem; background: color-mix(in srgb, var(--sun) 25%, var(--surface)); border-radius: 14px; padding: .7rem; margin: 0; }
.cv-h3 { margin: .2rem 0 0; font-family: var(--display); font-size: 1.1rem; }
@media (max-width: 700px) { .cv-pas { grid-template-columns: 1fr; } }
.sim-range { display: flex; gap: .4rem; align-items: center; }
.sim-play { flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: var(--night); color: var(--sun); cursor: pointer; font-size: .85rem; }
[data-simclic] { cursor: pointer; }
.sim-range input { flex: 1; min-width: 0; }
.tb-enonce-fixe { display: block; font-family: var(--display); font-size: 1.05rem; padding: 0 .4rem; white-space: nowrap; }
.tb-astuce { color: var(--muted); font-size: .85rem; }
/* Simulations « nombres » : animations SVG et journal des étapes */
.sim-glisse { animation: sim-glisse .75s ease-in-out both; }
.sim-glisse.sim-lent { animation-duration: 1s; }
@keyframes sim-glisse { from { transform: translate(var(--dx, 0px), var(--dy, 0px)); } to { transform: translate(0, 0); } }
.sim-pivote { animation: sim-pivote 1s ease-in-out both; }
@keyframes sim-pivote { from { transform: rotate(var(--a0)); } to { transform: rotate(var(--a1)); } }
.sim-apparait { transform-box: fill-box; transform-origin: center; animation: sim-apparait .6s ease-out both; }
@keyframes sim-apparait { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.sim-disparait { transform-box: fill-box; transform-origin: center; animation: sim-disparait 1.1s ease-in .35s both; }
@keyframes sim-disparait { 0% { opacity: 1; transform: scale(1); } 35% { opacity: 1; transform: scale(1.18) rotate(-8deg); } 100% { opacity: .1; transform: scale(.25) rotate(30deg); } }
.sim-envole { transform-box: fill-box; transform-origin: center; animation: sim-envole 1s ease-in .2s both; }
@keyframes sim-envole { to { opacity: .1; transform: translateY(-60px) scale(.6); } }
.sim-fantome { opacity: .1; }
.sim-flotte { animation: sim-flotte 2.2s ease-in-out infinite alternate; }
@keyframes sim-flotte { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.sim-sbtn { cursor: pointer; }
.sim-sbtn:hover rect { fill: #FFF6D6; }
.sim-sbtn:active rect { fill: #FFE9A8; }
.sim-etapes { margin: 0; padding-left: 1.3rem; font-size: .86rem; display: grid; gap: .25rem; }
.sim-etapes li.on { font-weight: 800; color: var(--text); }
.sim-etapes li.apres { opacity: .35; }
.sim-journal { background: var(--surface); border-radius: 10px; padding: .5rem .7rem; border-left: 4px solid #1D2452; font-family: var(--mono, monospace); }
.sim-journal b { display: block; font-family: var(--body); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: .2rem; }
.sim-jl { display: flex; justify-content: space-between; gap: .6rem; font-size: 1.02rem; padding: .1rem 0; }
.sim-jl em { font-style: normal; color: #7B5CD6; font-weight: 700; white-space: nowrap; }
.sim-jl.on span { font-weight: 800; }
.sim-jl.faux { color: #E0475B; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .sim-glisse, .sim-pivote, .sim-apparait, .sim-disparait, .sim-envole, .sim-flotte { animation-duration: .01s; animation-delay: 0s; } }

/* Simulations : la scène garde la hauteur de la fenêtre même quand le panneau latéral est long */
@media (min-width: 901px) { .sim-corps { grid-template-rows: minmax(0, 1fr); } .sim-cote, .sim-scene { min-height: 0; } }
.fig-opt[hidden], .fig-sw[hidden] { display: none !important; }

/* ---------- Glossaire illustré ---------- */
.gl-filtres, .sv-sel { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin: 1rem 0; }
.gl-filtres .lbl, .sv-sel .lbl { font-weight: 700; font-size: .9rem; color: var(--muted); margin-left: .6rem; }
.gl-filtres select, .gl-filtres input, .sv-sel select { border: 1.5px solid var(--line, #D5D9EA); border-radius: 10px; padding: .5rem .7rem; font: inherit; background: #fff; }
.gl-n { color: var(--muted); font-size: .9rem; margin-left: auto; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.gl-card { all: unset; box-sizing: border-box; cursor: pointer; perspective: 900px; height: 15.5rem; display: block; }
.gl-card:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; border-radius: 16px; }
.gl-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.gl-card.ret .gl-in { transform: rotateY(180deg); }
.gl-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; background: #fff; border: 2px solid var(--c); box-shadow: 0 10px 24px -18px rgba(29,36,82,.55); padding: .8rem .9rem; display: flex; flex-direction: column; align-items: center; gap: .4rem; overflow: hidden; }
.gl-v { transform: rotateY(180deg); align-items: flex-start; background: color-mix(in srgb, var(--c) 7%, #fff); }
.gl-tag { align-self: stretch; font-size: .72rem; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .03em; }
.gl-ill { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.gl-ill svg { max-width: 100%; max-height: 100%; height: auto; }
.gl-init { width: 5rem; height: 5rem; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--c); font-family: var(--display); font-weight: 800; font-size: 2.4rem; display: grid; place-items: center; }
.gl-terme { font-family: var(--display); font-weight: 800; font-size: 1.15rem; text-align: center; }
.gl-def { margin: .3rem 0 0; line-height: 1.4; font-size: .95rem; text-align: left; }
.gl-ex { margin: auto 0 0; font-size: .88rem; color: var(--muted); text-align: left; line-height: 1.35; }
@media print {
  #print-area .gl-print .gl-sheet { display: grid; grid-template-columns: repeat(2, 90mm); grid-auto-rows: 66mm; justify-content: center; break-after: page; }
  #print-area .gl-pc { border: .4mm dashed #888; padding: 3mm; display: flex; flex-direction: column; align-items: center; gap: 1.5mm; overflow: hidden; font-size: 9.5pt; color: #000; }
  #print-area .gl-pc.vide { border: 0; }
  #print-area .gl-tag { align-self: stretch; font-size: 7pt; font-weight: 700; color: var(--c); text-transform: uppercase; }
  #print-area .gl-ill { flex: 1; min-height: 0; display: flex; align-items: center; } #print-area .gl-ill svg { max-height: 30mm; max-width: 80mm; height: auto; }
  #print-area .gl-init { width: 18mm; height: 18mm; border-radius: 50%; background: #EEF3FC; display: grid; place-items: center; font-size: 22pt; font-weight: 800; }
  #print-area .gl-terme { font-size: 13pt; font-weight: 800; text-align: center; }
  #print-area .gl-def { font-size: 9.5pt; margin: 1mm 0 0; line-height: 1.35; } #print-area .gl-ex { font-size: 8.5pt; margin: auto 0 0; }
  #print-area .gl-pc:has(.gl-def) { align-items: flex-start; }
}
/* ---------- Suivi de classe ---------- */
.sv-badge { font-size: .7rem; vertical-align: middle; background: var(--sun, #F5B63C); color: #1E2235; border-radius: 99px; padding: .15rem .6rem; margin-left: .4rem; }
.sv-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.sv-wrap { overflow-x: auto; border-radius: 14px; box-shadow: 0 10px 26px -18px rgba(29,36,82,.5); background: #fff; }
.sv-t { border-collapse: collapse; width: 100%; font-size: .95rem; }
.sv-t th, .sv-t td { border: 1px solid #E1E4F2; padding: .35rem .5rem; text-align: center; }
.sv-t thead th { background: #EAF1FD; position: sticky; top: 0; }
.sv-t .sv-nom { text-align: left; min-width: 9rem; } .sv-t .sv-sum { white-space: nowrap; }
.sv-in { border: 0; background: transparent; font: inherit; width: 100%; padding: .2rem; border-radius: 6px; } .sv-in:focus { outline: 2px solid #2F6FE0; background: #fff; }
.sv-c { all: unset; box-sizing: border-box; cursor: pointer; width: 2.2rem; height: 2.2rem; border-radius: 8px; border: 1.5px solid #C9CDEB; display: inline-grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.sv-c.acquis { background: #D8F3E7; border-color: #1FA37A; color: #0E7A55; } .sv-c.enCours { background: #FFEFD3; border-color: #F0A62B; color: #B36B00; }
.sv-c:focus-visible { outline: 3px solid #2F6FE0; outline-offset: 2px; }
.sv-pc { display: inline-block; min-width: 2.6rem; padding: .15rem .3rem; border-radius: 6px; background: linear-gradient(to right, #BFE8D6 var(--p), #F1F3FA var(--p)); font-weight: 700; font-size: .85rem; }
.sv-leg { margin: .8rem 0 .4rem; color: var(--muted); } .sv-obj { padding-left: 1.4rem; line-height: 1.5; } .sv-obj li { margin-bottom: .2rem; }
.dec-head > .dec-print, .sv-actions .dec-print { flex: none; width: auto; align-self: flex-start; }
.gl-tag sup { text-transform: none; }

/* Boutons d'action (imprimer, exporter…) : compacts et colorés */
.obj-print, .dec-print, .sv-actions .btn-sec {
  display: inline-flex; width: auto; align-items: center; gap: .55rem; padding: .6rem 1.15rem; border-radius: 999px;
  background: var(--c, #2F6FE0); color: #fff; border: 0; font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--c, #2F6FE0) 80%, #000); transition: transform .15s, box-shadow .15s, filter .15s;
}
.obj-print svg, .dec-print svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; }
.obj-print:hover, .dec-print:hover, .sv-actions .btn-sec:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 12px 22px -10px color-mix(in srgb, var(--c, #2F6FE0) 80%, #000); }
.obj-print:focus-visible, .dec-print:focus-visible, .sv-actions .btn-sec:focus-visible { outline: 3px solid #1E2235; outline-offset: 2px; }
.dec-print { --c: #1D2452; } .sv-actions .btn-sec { --c: #1FA37A; } .sv-actions .btn-sec:nth-child(2) { --c: #1D2452; } .sv-actions .btn-sec:nth-child(3) { --c: #7C8499; }

/* Fiche « Je sais… » imprimable */
@media print {
  #print-area .sj { font-family: Arial, "Liberation Sans", Helvetica, sans-serif; font-size: 10.5pt; color: #1E2235; }
  #print-area .sj-band { display: flex; border-radius: 8px; overflow: hidden; background: var(--c); color: #fff; margin-bottom: 4mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-area .sj-l { flex: 1; padding: 3.5mm 5mm; } #print-area .sj-sur { font-size: 8.5pt; opacity: .92; }
  #print-area .sj-tit { font-size: 19pt; font-weight: 700; margin: 1mm 0 .5mm; } #print-area .sj-sous { font-size: 10pt; opacity: .95; }
  #print-area .sj-r { width: 34mm; background: rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 12pt; }
  #print-area .sj-nom { font-size: 10pt; margin: 0 0 2mm; } #print-area .sj-lead { font-size: 9.5pt; background: #FFF6DD; border-left: 3px solid #E9B21E; padding: 1.8mm 3mm; margin: 0 0 3mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-area .sj-h { display: flex; align-items: center; gap: 2.5mm; font-size: 12.5pt; color: var(--c); margin: 5mm 0 2mm; }
  #print-area .sj-h span { width: 6.5mm; height: 6.5mm; border-radius: 50%; background: var(--c); color: #fff; text-align: center; line-height: 6.5mm; font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-area .sj-t { width: 100%; border-collapse: collapse; font-size: 10pt; }
  #print-area .sj-t th { background: color-mix(in srgb, var(--c) 14%, #fff); text-align: left; padding: 1.8mm 2.5mm; border: 1px solid #C9CDEB; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-area .sj-t td { padding: 2.2mm 2.5mm; border: 1px solid #C9CDEB; vertical-align: middle; break-inside: avoid; line-height: 1.35; }
  #print-area .sj-t .c { width: 20mm; text-align: center; } #print-area .sj-t .sj-n { width: 8mm; text-align: center; color: var(--c); font-weight: 700; }
  #print-area .sj-case { display: inline-block; width: 4.5mm; height: 4.5mm; border: 1.3px solid #1E2235; border-radius: 1mm; }
  #print-area .sj-voc { display: flex; flex-wrap: wrap; gap: 2mm; margin: 0; } #print-area .sj-voc span { border: 1.3px solid var(--c); color: #1E2235; border-radius: 99px; padding: .8mm 3mm; font-size: 10pt; }
  #print-area .sj-bilan { margin-top: 6mm; border: 1.5px dashed #9AA1B2; border-radius: 6px; padding: 3mm 4mm; break-inside: avoid; }
  #print-area .sj-bilan p { margin: 3mm 0 0; } #print-area .sj-ligne { display: inline-block; width: 120mm; border-bottom: 1px solid #1E2235; }
}
