/* GÉNÉRÉ depuis App/frontend/src/diagramme-commun/rendu.css par `npm run diagramme:plugin` : ne pas modifier ici. */
/* Style des diagrammes interactifs (cf. rendu.js). SOURCE UNIQUE, partagée par l'application et le plugin WordPress : `npm run diagramme:plugin` la
   recopie dans le plugin (assets/css/oa-diagramme-rendu.css). Ne jamais modifier la copie du plugin.
   Les couleurs viennent de l'hôte par des variables (--texte, --bordure, --accent... dans l'application ; rien sur le site, d'où les valeurs de repli).
   Palette : une teinte par série, jamais la couleur seule (un style de trait et la valeur écrite l'accompagnent). Contrastes mesurés le 2026-11-09 :
   au moins 4,7:1 sur blanc et sur le fond beige, séparation des teintes en cas de daltonisme meilleure que l'ancienne palette (écart minimal 6,8
   contre 4,0, cf. docs/design/diagrammes.md). Le mode sombre redéfinira --diag-1 à --diag-8 sous :root[data-theme="dark"]. */
.oad {
  --oad-c1: var(--diag-1, #3b6e8f); --oad-c2: var(--diag-2, #c0392b); --oad-c3: var(--diag-3, #7a6200); --oad-c4: var(--diag-4, #00785a);
  --oad-c5: var(--diag-5, #7b3f98); --oad-c6: var(--diag-6, #a21caf); --oad-c7: var(--diag-7, #7c2d12); --oad-c8: var(--diag-8, #4d4d4d);
  --oad-ref: var(--diag-ref, #2b2a28);
  --oad-texte: var(--texte, #1d2327); --oad-discret: var(--texte-discret, #555); --oad-bordure: var(--bordure, #dedad2);
  --oad-fond: var(--fond, #f7f5f1); --oad-carte: var(--carte-fond, #fff); --oad-accent: var(--accent, var(--oa-accent, #3b6e8f));
  --oad-entete: var(--table-entete, #ebe6dd);
  min-width: 0; color: var(--oad-texte); font-size: 1rem; line-height: 1.4;
}
.oad *, .oad *::before, .oad *::after { box-sizing: border-box; }
.oad-att { opacity: .3; }
.oad [data-i] { transition: opacity .15s; }
.oad [data-i]:focus-visible { outline: 3px solid var(--oad-accent); outline-offset: 2px; }
.oad-bulle { position: fixed; z-index: 100000; transform: translate(-50%, -100%); background: #2b2a28; color: #fff; font: .84rem/1.35 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 6px 10px; border-radius: 7px; pointer-events: none; max-width: 200px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.oad-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.oad-coche { margin-left: 4px; vertical-align: -2px; flex: none; }
.oad-mien { font-weight: 700; }

/* Barres */
.oad-barres { display: flex; flex-direction: column; gap: 6px; }
.oad-barre { padding: 4px 0; border-radius: 6px; }
.oad-barre-tete { display: flex; justify-content: space-between; gap: 10px; font-size: .92em; margin-bottom: 3px; }
.oad-barre-nom { display: inline-flex; align-items: center; }
.oad-barre-fond { display: block; background: var(--oad-bordure); border-radius: 6px; height: 14px; overflow: hidden; }
.oad-barre-rempli { display: block; height: 100%; background: var(--oad-c1); border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) { .oad-barre-rempli { transition: width .5s; } .oad-colonne-haut { transition: height .5s; } }

/* Colonnes */
.oad-colonnes-zone { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 20px; border-bottom: 2px solid var(--oad-bordure); }
.oad-colonne { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; border-radius: 6px; }
.oad-colonne strong { font-size: .82em; }
.oad-colonne-haut { display: block; width: 100%; max-width: 64px; background: var(--oad-c1); border-radius: 6px 6px 0 0; }
.oad-colonne.oad-mien .oad-colonne-haut { outline: 2px solid var(--oad-texte); outline-offset: -2px; }
.oad-colonnes-noms { display: flex; gap: 10px; font-size: .8em; color: var(--oad-discret); text-align: center; margin-top: 4px; }
.oad-colonnes-noms span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Anneau */
.oad-anneau { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.oad-anneau-graphe { position: relative; width: 180px; height: 180px; flex: none; }
.oad-anneau-graphe svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.oad-part { fill: none; stroke-width: 6; }
.oad-part:focus-visible { outline: none; stroke-width: 7.5; }
.oad-anneau-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 0 34px; }
.oad-anneau-centre strong { font-size: 1.5em; line-height: 1.1; }
.oad-anneau-centre small { font-size: .74em; color: var(--oad-discret); overflow-wrap: anywhere; }
.oad-courbe .oad-legende, .oad-legende { list-style: none; margin: 0; padding: 0; flex: 1 1 150px; min-width: 150px; }
.oad-legende li { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: .92em; margin: 0; }
.oad-legende i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.oad-legende strong { margin-left: auto; padding-left: 8px; white-space: nowrap; }

/* Courbes */
.oad-courbe { min-width: 0; }
.oad-sous-titre { margin: 0 0 8px; font-size: .88em; color: var(--oad-discret); }
.oad-courbe .oad-puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; padding-inline-start: 0; list-style: none; }
.oad-courbe .oad-puces li { margin: 0; padding: 0; }
.oad-puce { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 2px solid var(--oad-bordure); border-radius: 20px; background: var(--oad-carte); color: var(--oad-texte); font: inherit; font-size: .92em; cursor: pointer; }
.oad-puce[aria-pressed="true"] { border-color: var(--c); font-weight: 700; background: color-mix(in srgb, var(--c) 10%, var(--oad-carte)); }
.oad-puce[aria-pressed="false"] { color: var(--oad-discret); text-decoration: line-through; opacity: .75; }
.oad-echantillon { width: 20px; height: 10px; flex: none; }
.oad-axe-y { font-size: .84em; color: var(--oad-discret); margin-bottom: 2px; }
.oad-courbe-dessin { display: block; max-width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; overflow: visible; }
.oad-courbe-dessin text { font-size: 12px; fill: var(--oad-discret); }
.oad-grille { stroke: var(--oad-bordure); }
.oad-repere { stroke: var(--oad-discret); }
.oad-ligne { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.oad-reference { stroke: var(--oad-ref); stroke-width: 2; }
.oad-courbe-dessin .oad-libelle-ref { fill: var(--oad-ref); font-weight: 700; paint-order: stroke; stroke: var(--oad-carte); stroke-width: 3px; }
.oad-curseur { stroke: var(--oad-texte); stroke-width: 1.5; }
.oad-rond { fill: var(--oad-carte); stroke-width: 3; }
.oad-courbe .oad-refs, .oad-refs { padding-inline-start: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; font-size: .84em; color: var(--oad-discret); }
.oad-refs li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.oad-refs .oad-echantillon { width: 22px; height: 8px; }
.oad-lecture { margin-top: 8px; min-height: calc(var(--n, 1) * 30px + 52px); border: 1px solid var(--oad-bordure); border-radius: 10px; padding: 10px 12px; background: var(--oad-fond); font-size: .94em; }
.oad-aide { margin: 0; color: var(--oad-discret); }
.oad-date { display: block; margin-bottom: 6px; }
.oad-courbe .oad-lecture ul, .oad-lecture ul { list-style: none; margin: 0; padding: 0; padding-inline-start: 0; }
.oad-lecture li { display: flex; align-items: center; gap: 8px; padding: 3px 0; margin: 0; }
.oad-lecture li i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.oad-lecture li b { margin-left: 6px; white-space: nowrap; }

/* Outils et tableau */
.oad-outils { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.oad-lien { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; min-height: 40px; color: var(--oad-accent); text-decoration: underline; font: inherit; font-size: .92em; cursor: pointer; }
.oad-tableau-zone { margin-top: 6px; max-height: 320px; overflow: auto; border: 1px solid var(--oad-bordure); border-radius: 8px; }
.oad-tableau { border-collapse: collapse; width: 100%; font-size: .88em; }
.oad-tableau th, .oad-tableau td { padding: 5px 8px; border-bottom: 1px solid var(--oad-bordure); text-align: right; white-space: nowrap; }
.oad-tableau thead th { background: var(--oad-entete); position: sticky; top: 0; z-index: 1; text-align: right; }
.oad-tableau th[scope="col"]:first-child, .oad-tableau tbody th, .oad-tableau td:first-child { text-align: left; }
.oad-tableau tbody th { font-weight: 400; position: sticky; left: 0; background: var(--oad-carte); }

/* Alignement à gauche sans retrait, quoi qu'en dise le thème ou l'éditeur de blocs (listes de pastilles, de lecture et de références). */
.oad ul, .oad ol { margin-inline-start: 0 !important; padding-inline-start: 0 !important; list-style: none !important; }
.oad li { margin-inline-start: 0 !important; padding-inline-start: 0 !important; text-indent: 0 !important; }
.oad-lecture li { justify-content: flex-start; }
