/* ══ ACADÉMIE, PARCOURS « DU QUOTIDIEN AUX CHIFFRES » (28/10/2026), préfixe aqc- ════════════════════════════════════════════════
   Shared/AcademieQuotidien.razor (catalogue, écran d'un événement) et l'entrée du parcours (Shared/AcademieFenetre.razor).
   • Grammaire de l'Académie (css/academie.css) : surfaces --surf-*, textes --tx1 / --tx2 / --mut1, marque --brand, filets --o8 / --o12 ;
     thème clair par html[data-theme="light"] ; Mat et Papier ; Compact.
   • Grand écran : deux colonnes (réglages et frise à gauche, lectures et panneaux à droite), chacune défile seule. Sous 900 px : une
     colonne, un seul défilement ; la frise devient une bande qui défile de côté (dans son cadre, jamais la page). Téléphone (≤ 640 px) :
     cibles de 44 px, aucun défilement horizontal de la page à 375 px.
   • Panneaux d'écarts : requête de conteneur ; étroits, « avant » et « après » passent sous le libellé.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Entrée, dans le parcours ── */
.aqc-entree { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 12px 0 14px; padding: 14px 16px; border-radius: 14px;
              border: 1px solid color-mix(in srgb, var(--brand, #00B1CF) 42%, transparent);
              background: linear-gradient(120deg, color-mix(in srgb, var(--brand, #00B1CF) 14%, transparent), color-mix(in srgb, var(--pal-6, #7c6cf0) 10%, transparent)); }
html[data-theme="light"] .aqc-entree { border-color: #9fd6e2; background: linear-gradient(120deg, #e9f7fa, #f1effd); }
.aqc-entree-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
                 background: color-mix(in srgb, var(--brand, #00B1CF) 20%, transparent); color: var(--brand-strong, var(--brand, #00B1CF)); }
html[data-theme="light"] .aqc-entree-ic { color: var(--brand-strong, #006f85); }
.aqc-entree-ic svg { width: 20px; height: 20px; }
.aqc-entree-tx { flex: 1 1 360px; min-width: 0; }
.aqc-entree-tx h4 { margin: 0 0 2px; font-size: 16px; font-weight: 700; }
.aqc-entree-tx p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-entree-tx p { color: #24343e; }
.aqc-entree-ev { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.aqc-entree-go { flex: 0 0 auto; }

/* ── Catalogue ── */
.aqc-cat { display: flex; flex-direction: column; gap: 12px; }
.aqc-cat > .aca-retour { margin-bottom: -6px; }
.aqc-cat-tete .aca-lead { margin-bottom: 0; }
.aqc-fam { display: grid; gap: 10px; }
.aqc-fam + .aqc-fam { padding-top: 14px; border-top: 1px solid var(--o8, rgba(255,255,255,.08)); }
html[data-theme="light"] .aqc-fam + .aqc-fam { border-top-color: rgba(15, 38, 56, .1); }
.aqc-fam-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; }
.aqc-fam-h small { font-size: 11.5px; font-weight: 600; color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-fam-h small { color: #4b5d68; }
.aqc-fam-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
              background: color-mix(in srgb, var(--brand, #00B1CF) 14%, transparent); color: var(--brand-strong, var(--brand, #00B1CF)); }
html[data-theme="light"] .aqc-fam-ic { color: var(--brand-strong, #006f85); }
.aqc-fam.is-vide .aqc-fam-h { opacity: .62; }
/* Familles empilées en bandes pleine largeur ; cartes en grille régulière, toutes de la même hauteur (29/10/2026). */
.aqc-fams { display: flex; flex-direction: column; gap: 14px; }
.aqc-cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; align-items: stretch; }
.aqc-cartes > li { display: flex; min-width: 0; }
.aqc-carte { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; height: 100%; min-height: 128px; padding: 13px 34px 13px 14px; border-radius: 12px; text-align: left;
             transition: border-color .15s, transform .15s, background-color .15s;
             font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--o12, rgba(255,255,255,.12));
             background: color-mix(in srgb, var(--surf-1, #0b1f29) 52%, transparent); }
html[data-theme="light"] .aqc-carte { border-color: rgba(15, 38, 56, .14); background: rgba(255, 255, 255, .72); }
.aqc-carte:hover { border-color: color-mix(in srgb, var(--brand, #00B1CF) 55%, transparent); transform: translateY(-1px);
                   background-color: color-mix(in srgb, var(--brand, #00B1CF) 6%, var(--surf-1, #0b1f29)); }
html[data-theme="light"] .aqc-carte:hover { background-color: color-mix(in srgb, var(--brand, #00B1CF) 6%, #ffffff); }
.aqc-carte:focus-visible { outline: 2px solid var(--brand, #00B1CF); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .aqc-carte, .aqc-carte:hover { transition: none; transform: none; } }
.aqc-carte b { font-size: 14px; line-height: 1.3; }
.aqc-carte-tx { font-size: 12.5px; line-height: 1.5; color: var(--tx2, #c2cdd6);
                display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html[data-theme="light"] .aqc-carte-tx { color: #24343e; }
.aqc-carte-go { position: absolute; top: 12px; right: 10px; display: inline-flex; color: var(--brand-strong, var(--brand, #00B1CF)); opacity: .75; }
.aqc-carte:hover .aqc-carte-go { opacity: 1; }
html[data-theme="light"] .aqc-carte-go { color: var(--brand-strong, #006f85); }

/* ── L'écran d'un événement : deux colonnes ── */
.aqc { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.aqc-g { min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 18px;
         border-right: 1px solid var(--o8, rgba(255,255,255,.08)); background: color-mix(in srgb, var(--surf-1, #0b1f29) 34%, transparent); scrollbar-width: thin; }
html[data-theme="light"] .aqc-g { border-right-color: rgba(15, 38, 56, .1); background: rgba(255, 255, 255, .5); }
.aqc-g > .aca-retour { margin-bottom: -6px; }
.aqc-g .aca-h { margin: 0; }
.aqc-fam-ey { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.aqc-accroche { margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-accroche { color: #24343e; }
.aqc-d { position: relative; min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px;
         padding: 0 20px 20px; scrollbar-width: thin; }
.aqc-d > * { flex-shrink: 0; }

.aqc-bloc { display: grid; gap: 6px; min-width: 0; }
.aqc-bloc .aca-eyebrow { margin: 0; }
.aqc-bloc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aqc-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; border-radius: 10px; border: 1px solid var(--o12, rgba(255,255,255,.12)); }
html[data-theme="light"] .aqc-seg { border-color: rgba(15, 38, 56, .16); }
.aqc-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 0 6px; border: 0; border-radius: 7px; background: none;
                  font: inherit; font-size: 12.5px; font-weight: 600; color: inherit; cursor: pointer; }
.aqc-seg button:hover { background: var(--o6, rgba(255,255,255,.06)); }
html[data-theme="light"] .aqc-seg button:hover { background: rgba(15, 38, 56, .05); }
.aqc-seg button[aria-pressed="true"] { background: var(--brand, #00B1CF); color: #032530; }
.aqc-seg button.is-off { opacity: .6; }
.aqc-src-lib { margin: 0; font-size: 12px; color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-src-lib { color: #4b5d68; }

/* Réglages */
.aqc-reglages { gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--o8, rgba(255,255,255,.08)); background: color-mix(in srgb, var(--surf-1, #0b1f29) 46%, transparent); }
html[data-theme="light"] .aqc-reglages { border-color: rgba(15, 38, 56, .12); background: rgba(255, 255, 255, .7); }
.aqc-p { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.aqc-p-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.aqc-p-l { font-size: 13px; font-weight: 650; padding: 0; }
.aqc-champ { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 0; border-radius: 8px; border: 1px solid var(--o20, rgba(255,255,255,.2));
             background: var(--surf-1, rgba(255,255,255,.03)); }
html[data-theme="light"] .aqc-champ { border-color: rgba(15, 38, 56, .24); background: #fff; }
.aqc-champ:focus-within { border-color: var(--brand, #00B1CF); }
.aqc-champ input { width: 104px; height: 32px; padding: 0 0 0 9px; border: 0; outline: none; background: transparent; color: inherit; font: inherit; font-size: 14px;
                   font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color-scheme: dark; }
html[data-theme="light"] .aqc-champ input { color-scheme: light; }
.aqc-jour .aqc-champ input { width: 148px; text-align: left; padding-right: 2px; }
.aqc-champ input:disabled { opacity: .55; }
.aca .aqc-champ input:focus-visible { outline: none; }
.aqc-u { font-size: 12.5px; color: var(--mut1, #8aa0ad); }
.aqc-range { width: 100%; height: 26px; margin: 0; accent-color: var(--brand, #00B1CF); cursor: pointer; }
.aqc-bornes { display: flex; justify-content: space-between; gap: 8px; margin-top: -4px; font-size: 11px; color: var(--mut1, #8aa0ad); font-variant-numeric: tabular-nums; }
html[data-theme="light"] :is(.aqc-u, .aqc-bornes) { color: #4b5d68; }
.aqc-aide { display: block; font-size: 11.5px; line-height: 1.45; color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-aide { color: #4b5d68; }
.aqc-aide .aca-lien { margin-left: 4px; padding: 0 6px; min-height: 22px; }
.aqc-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.aqc-opts .aca-chip { min-height: 32px; }
.aqc-switch { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.aqc-switch-t { position: relative; flex: 0 0 auto; width: 36px; height: 20px; border-radius: 999px; background: var(--o20, rgba(255,255,255,.2)); transition: background .15s; }
.aqc-switch-t::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html[data-theme="light"] .aqc-switch-t { background: rgba(15, 38, 56, .25); }
.aqc-switch[aria-checked="true"] .aqc-switch-t { background: var(--brand, #00B1CF); }
.aqc-switch[aria-checked="true"] .aqc-switch-t::after { transform: translateX(16px); }
html[data-motion="reduites"] :is(.aqc-switch-t, .aqc-switch-t::after) { transition: none; }

/* Frise du temps : verticale dans la colonne de gauche. */
.aqc-h4 { display: flex; align-items: center; gap: 7px; margin: 4px 0 2px; font-size: 13.5px; font-weight: 700; }
.aqc-h4 svg { color: var(--brand-strong, var(--brand, #00B1CF)); flex: none; }
html[data-theme="light"] .aqc-h4 svg { color: var(--brand-strong, #006f85); }
.aqc-frise { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.aqc-pt { position: relative; display: grid; gap: 2px; padding: 0 0 12px 20px; font-size: 12.5px; min-width: 0; }
.aqc-pt::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surf-2, #102733);
                  box-shadow: inset 0 0 0 2px var(--brand, #00B1CF); }
.aqc-pt::after { content: ""; position: absolute; left: 8px; top: 17px; bottom: -2px; width: 1px; background: var(--o20, rgba(255,255,255,.2)); }
.aqc-pt:last-child::after { display: none; }
html[data-theme="light"] .aqc-pt::before { background: #fff; }
html[data-theme="light"] .aqc-pt::after { background: rgba(15, 38, 56, .2); }
.aqc-pt.is-j::before { background: var(--brand, #00B1CF); }
.aqc-pt.is-clo::before { box-shadow: inset 0 0 0 2px var(--pal-6, #7c6cf0); }
.aqc-pt.is-hors::before { box-shadow: inset 0 0 0 1.5px var(--mut1, #8aa0ad); }
.aqc-pt.is-hors { opacity: .75; }
.aqc-pt-d { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--mut1, #8aa0ad); font-variant-numeric: tabular-nums; }
html[data-theme="light"] .aqc-pt-d { color: #4b5d68; }
.aqc-pt-l { font-size: 13px; }
.aqc-pt-v { color: var(--tx2, #c2cdd6); }
.aqc-pt-v b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.aqc-pt-m { font-size: 11.5px; color: var(--mut1, #8aa0ad); font-variant-numeric: tabular-nums; }
html[data-theme="light"] .aqc-pt-v { color: #24343e; }
html[data-theme="light"] .aqc-pt-m { color: #4b5d68; }

.is-plus { color: var(--st-green, #34d399); }
.is-moins { color: var(--st-red, #f87171); }
html[data-theme="light"] .is-plus { color: #047857; }
html[data-theme="light"] .is-moins { color: #b42318; }

/* ── Colonne de droite : état du calcul (collant), lectures, panneaux ── */
.aqc-etat { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
            margin: 0 -20px; padding: 10px 20px; border-bottom: 1px solid var(--o8, rgba(255,255,255,.08));
            background: color-mix(in srgb, var(--surf-2, #102733) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html[data-theme="light"] .aqc-etat { background: rgba(255, 255, 255, .9); border-bottom-color: rgba(15, 38, 56, .1); }
html[data-style="mat"] .aqc-etat { background: var(--mt-carte) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-papier] .aqc-etat { background: var(--pp-carte) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.aqc-etat-tx { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-etat-tx { color: #24343e; }
.aqc-etat-tx > svg { flex: none; color: var(--st-green, #34d399); }
.aqc-etat-tx small { color: var(--mut1, #8aa0ad); font-variant-numeric: tabular-nums; }
.aqc-roue { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--brand, #00B1CF) 30%, transparent);
            border-top-color: var(--brand, #00B1CF); animation: aqc-roue .8s linear infinite; }
@keyframes aqc-roue { to { transform: rotate(360deg); } }
html[data-motion="reduites"] .aqc-roue { animation: none; }
@media (prefers-reduced-motion: reduce) { .aqc-roue { animation: none; } }
.aqc-d.is-calcul :is(.aqc-lecture, .aqc-panneaux) { opacity: .45; transition: opacity .2s; }
.aqc-attente p { margin: 8px 0; font-size: 13px; color: var(--mut1, #8aa0ad); }

.aqc-lecture { display: grid; gap: 8px; min-width: 0; }
.aqc-lecture > p { margin: 0; max-width: 80ch; font-size: 13.5px; line-height: 1.6; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-lecture > p { color: #24343e; }
.aqc-lecture b { color: var(--tx1, #eafdff); font-variant-numeric: tabular-nums; }
html[data-theme="light"] .aqc-lecture b { color: #10212b; }
.aqc-regles { font-size: 12.5px; }
.aqc-regles summary { min-height: 32px; display: flex; align-items: center; cursor: pointer; font-weight: 650; color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-regles summary { color: #4b5d68; }
.aqc-regles ul, .aqc-regles-l { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 12.5px; line-height: 1.5; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] :is(.aqc-regles ul, .aqc-regles-l) { color: #24343e; }

/* Journal des écritures (lecture comptable) */
.aqc-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aqc-ecr { min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--o8, rgba(255,255,255,.08)); background: color-mix(in srgb, var(--surf-1, #0b1f29) 52%, transparent); }
html[data-theme="light"] .aqc-ecr { border-color: rgba(15, 38, 56, .12); background: rgba(255, 255, 255, .72); }
.aqc-ecr.is-hors { border-style: dashed; opacity: .8; }
.aqc-ecr.is-moteur { border-color: color-mix(in srgb, var(--pal-6, #7c6cf0) 40%, transparent); }
.aqc-ecr-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 12.5px; }
.aqc-ecr-d { font-weight: 700; font-variant-numeric: tabular-nums; }
.aqc-jnl { padding: 1px 6px; border-radius: 5px; font: 700 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
           background: color-mix(in srgb, var(--brand, #00B1CF) 16%, transparent); color: var(--brand-strong, var(--brand, #00B1CF)); }
html[data-theme="light"] .aqc-jnl { color: var(--brand-strong, #006f85); background: #e9f7fa; }
.aqc-ecr-lib { color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-ecr-lib { color: #4b5d68; }
.aqc-tag { padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 650; border: 1px solid var(--o20, rgba(255,255,255,.2)); color: var(--mut1, #8aa0ad); }
.aqc-tag.is-moteur { border-color: color-mix(in srgb, var(--pal-6, #7c6cf0) 50%, transparent); color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-tag { color: #4b5d68; border-color: rgba(15, 38, 56, .2); }
.aqc-ecr-l { width: 100%; table-layout: fixed; margin: 6px 0 4px; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.aqc-ecr-l th { padding: 2px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: right; color: var(--mut1, #8aa0ad); }
.aqc-ecr-l th:first-child { text-align: left; }
.aqc-ecr-l :is(th, td):nth-child(n+2) { width: 108px; }
@media (max-width: 640px) { .aqc-ecr-l :is(th, td):nth-child(n+2) { width: 84px; } }
.aqc-ecr-l td { padding: 3px 4px; border-top: 1px solid var(--o8, rgba(255,255,255,.08)); text-align: right; white-space: nowrap; vertical-align: top; }
.aqc-ecr-l td:first-child { text-align: left; white-space: normal; overflow-wrap: anywhere; }
html[data-theme="light"] .aqc-ecr-l td { border-top-color: rgba(15, 38, 56, .08); }
html[data-theme="light"] .aqc-ecr-l th { color: #4b5d68; }
.aqc-cpt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; }
.aqc-ecr-l small { color: var(--mut1, #8aa0ad); }
.aqc-ecr-lect { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-ecr-lect { color: #24343e; }

/* Les quatre panneaux d'écarts */
.aqc-panneaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
.aqc-panneaux-h { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.aqc-panneaux-h .aca-eyebrow { margin: 0; }
.aqc-pan { container-type: inline-size; min-width: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--o8, rgba(255,255,255,.08));
           background: color-mix(in srgb, var(--surf-1, #0b1f29) 52%, transparent); }
html[data-theme="light"] .aqc-pan { border-color: rgba(15, 38, 56, .12); background: rgba(255, 255, 255, .72); }
.aqc-pan-h { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.aqc-pan-h svg { color: var(--brand-strong, var(--brand, #00B1CF)); flex: none; }
html[data-theme="light"] .aqc-pan-h svg { color: var(--brand-strong, #006f85); }
.aqc-pan-sous { margin: 0 0 6px; font-size: 12px; line-height: 1.5; color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-pan-sous { color: #4b5d68; }
.aqc-pan-pied { margin: 6px 0 0; font-size: 11.5px; color: var(--mut1, #8aa0ad); }
.aqc-tab { display: grid; }
.aqc-tab.is-norm { margin-top: 10px; }
.aqc-l { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 0 8px; align-items: baseline; padding: 4px 0; font-size: 12.5px;
         border-top: 1px solid var(--o8, rgba(255,255,255,.06)); font-variant-numeric: tabular-nums; }
html[data-theme="light"] .aqc-l { border-top-color: rgba(15, 38, 56, .07); }
.aqc-l > span:not(.aqc-l-lib) { text-align: right; white-space: nowrap; }
.aqc-l.is-tete { border-top: 0; padding-top: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mut1, #8aa0ad); }
html[data-theme="light"] .aqc-l.is-tete { color: #4b5d68; }
.aqc-l-lib { min-width: 0; overflow-wrap: anywhere; }
.aqc-l-av, .aqc-l-ap { color: var(--tx2, #c2cdd6); }
html[data-theme="light"] :is(.aqc-l-av, .aqc-l-ap) { color: #33444f; }
.aqc-l:not(.is-bouge):not(.is-tete) .aqc-l-ec { color: var(--mut1, #8aa0ad); }
.aqc-l.is-bouge .aqc-l-ec { font-weight: 700; }
.aqc-l.is-total { font-weight: 650; border-top-color: var(--o20, rgba(255,255,255,.18)); }
html[data-theme="light"] .aqc-l.is-total { border-top-color: rgba(15, 38, 56, .2); }
.aqc-est { margin-left: 2px; color: var(--st-amber, #fbbf24); font-weight: 700; cursor: help; }
html[data-theme="light"] .aqc-est { color: #8a5a00; }
@container (max-width: 400px) {
    .aqc-l { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lib ec" "av ap"; row-gap: 1px; }
    .aqc-l-lib { grid-area: lib; }
    .aqc-l-ec { grid-area: ec; }
    .aqc-l > .aqc-l-av { grid-area: av; text-align: left; font-size: 11.5px; }
    .aqc-l > .aqc-l-ap { grid-area: ap; font-size: 11.5px; }
    .aqc-l-av::before { content: attr(data-l) " "; color: var(--mut1, #8aa0ad); }
    .aqc-l-ap::before { content: attr(data-l) " "; color: var(--mut1, #8aa0ad); }
    .aqc-l.is-tete > span:nth-child(2), .aqc-l.is-tete > span:nth-child(3) { display: none; }
}
.aqc-nat { margin-left: auto; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 650;
           border: 1px solid var(--o20, rgba(255,255,255,.2)); color: var(--tx2, #c2cdd6); }
.aqc-nat.is-rec { border-color: color-mix(in srgb, var(--st-green, #34d399) 55%, transparent); color: var(--st-green, #34d399); }
html[data-theme="light"] .aqc-nat { color: #24343e; border-color: rgba(15, 38, 56, .2); }
html[data-theme="light"] .aqc-nat.is-rec { color: #047857; border-color: #6cc7a6; }
.aqc-valo-tx { display: grid; gap: 6px; margin: 10px 0 8px; }
.aqc-valo-tx p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--tx2, #c2cdd6); }
html[data-theme="light"] .aqc-valo-tx p { color: #24343e; }
.aqc-valo-tx p.aqc-pan-sous { color: var(--mut1, #8aa0ad); }

/* Notes et équilibre */
.aqc-note { display: flex; gap: 7px; align-items: flex-start; margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--mut1, #8aa0ad); }
.aqc-note > svg, .aqc-note > sup { flex: none; margin-top: 2px; }
.aqc-note.is-ko { color: var(--st-red, #f87171); }
.aqc-note.is-lock { color: var(--st-amber, #fbbf24); }
.aqc-note > sup { color: var(--st-amber, #fbbf24); font-weight: 700; }
html[data-theme="light"] .aqc-note { color: #4b5d68; }
html[data-theme="light"] .aqc-note.is-ko { color: #b42318; }
html[data-theme="light"] :is(.aqc-note.is-lock, .aqc-note > sup) { color: #8a5a00; }
.aqc-eq { display: flex; gap: 7px; align-items: flex-start; margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--mut1, #8aa0ad); }
.aqc-eq > svg { flex: none; margin-top: 2px; }
.aqc-eq.is-ok > svg { color: var(--st-green, #34d399); }
.aqc-eq.is-ko { color: var(--st-red, #f87171); }
html[data-theme="light"] .aqc-eq { color: #4b5d68; }
.aqc-notes { display: grid; gap: 2px; }

/* ── Mat, Papier, Compact ── */
html[data-style="mat"] :is(.aqc-entree, .aqc-carte, .aqc-g, .aqc-reglages, .aqc-ecr, .aqc-pan, .aqc-seg) { border-color: var(--mt-trait) !important; }
html[data-style="mat"] :is(.aqc-carte, .aqc-reglages, .aqc-ecr, .aqc-pan) { background: var(--mt-carte-2) !important; }
html[data-papier] :is(.aqc-entree, .aqc-carte, .aqc-reglages, .aqc-ecr, .aqc-pan, .aqc-seg, .aqc-champ) { border-radius: 4px !important; }
html[data-papier] :is(.aqc-entree-tx h4, .aqc-pan-h, .aqc-fam-h) { font-family: var(--pp-serif); }
html[data-density="compact"] .aqc-g { padding: 10px 12px 14px; gap: 9px; }
html[data-density="compact"] .aqc-d { padding: 0 16px 16px; gap: 10px; }
html[data-density="compact"] .aqc-etat { margin: 0 -16px; padding: 7px 16px; }
html[data-density="compact"] .aqc-l { padding: 2px 0; }

/* ── Une colonne (fenêtre étroite, tablette) : un seul défilement, frise en bande défilante ── */
@media (max-width: 900px) {
    .aqc { display: block; overflow-y: auto; overscroll-behavior: contain; }
    .aqc-g { overflow: visible; border-right: 0; border-bottom: 1px solid var(--o8, rgba(255,255,255,.08)); }
    html[data-theme="light"] .aqc-g { border-bottom-color: rgba(15, 38, 56, .1); }
    .aqc-d { overflow: visible; padding-top: 0; }
    .aqc-frise { display: flex; gap: 8px; padding: 2px 2px 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
    .aqc-pt { flex: 0 0 min(220px, 72%); scroll-snap-align: start; padding: 10px 10px 10px 26px; border-radius: 10px; border: 1px solid var(--o8, rgba(255,255,255,.08)); }
    html[data-theme="light"] .aqc-pt { border-color: rgba(15, 38, 56, .12); }
    .aqc-pt::before { left: 10px; top: 14px; }
    .aqc-pt::after { display: none; }
}
@media (max-width: 640px) {
    .aqc-g { padding: 10px 16px 14px; }
    .aqc-d { padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
    .aqc-etat { margin: 0 -16px; padding: 8px 16px; }
    .aqc-seg button, .aqc-switch, .aqc-opts .aca-chip, .aqc-carte, .aqc-regles summary, .aqc-panneaux-h .aca-lien, .aqc-bloc-h .aca-lien, .aqc-aide .aca-lien { min-height: 44px; }
    .aqc-champ input { height: 44px; font-size: 16px; }
    .aqc-range { height: 44px; }
    .aqc-entree-go { width: 100%; }
    .aqc-etat .aca-btn { min-height: 44px; }
}
