/* Campagnes : l'écran.
   Charte Xerus (fond #0A0A0A, accent #fe1f58, Kanit), en sombre par défaut et
   en clair si l'appareil le demande. L'accent ne sert qu'à l'interface (bouton,
   choix courant, le point) ; les données portent la palette catégorielle
   validée (skill dataviz), une couleur par client, jamais par rang. */

@font-face { font-family: "Kanit"; font-weight: 300; font-display: swap; src: url("/app/fonts/kanit-300.woff2") format("woff2"); }
@font-face { font-family: "Kanit"; font-weight: 400; font-display: swap; src: url("/app/fonts/kanit-400.woff2") format("woff2"); }
@font-face { font-family: "Kanit"; font-weight: 500; font-display: swap; src: url("/app/fonts/kanit-500.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --page: #0a0a0a;
  --plan: #151515;
  --plan-2: #1d1d1d;
  --plan-3: #262626;
  --encre: #f3f2ef;
  --encre-2: #b9b8b3;
  --encre-3: #85847f;
  --filet: rgba(255, 255, 255, 0.08);
  --filet-2: rgba(255, 255, 255, 0.14);
  --grille: #2a2a28;
  --base: #3a3a37;
  --accent: #fe1f58;
  --accent-encre: #ffffff;
  --ok: #0ca30c;
  --attention: #fab219;
  --serieux: #ec835a;
  --critique: #e05252;
  --hausse: #2fbf5b;
  --baisse: #ef6b6b;
  --ombre: 0 24px 60px rgba(0, 0, 0, 0.55);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --rayon: 14px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --page: #f4f3f0;
    --plan: #ffffff;
    --plan-2: #f7f6f3;
    --plan-3: #eceae5;
    --encre: #0b0b0b;
    --encre-2: #52514e;
    --encre-3: #7d7c77;
    --filet: rgba(11, 11, 11, 0.08);
    --filet-2: rgba(11, 11, 11, 0.16);
    --grille: #e6e5df;
    --base: #c3c2b7;
    --hausse: #0a7d2c;
    --baisse: #c43030;
    --ombre: 0 24px 60px rgba(20, 20, 20, 0.16);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
    --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f4f3f0;
  --plan: #ffffff;
  --plan-2: #f7f6f3;
  --plan-3: #eceae5;
  --encre: #0b0b0b;
  --encre-2: #52514e;
  --encre-3: #7d7c77;
  --filet: rgba(11, 11, 11, 0.08);
  --filet-2: rgba(11, 11, 11, 0.16);
  --grille: #e6e5df;
  --base: #c3c2b7;
  --hausse: #0a7d2c;
  --baisse: #c43030;
  --ombre: 0 24px 60px rgba(20, 20, 20, 0.16);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--encre);
  font: 400 15px/1.45 "Kanit", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ la tête */
.tete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px max(16px, env(safe-area-inset-left)) 14px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--filet);
}
.marque { font-weight: 500; font-size: 22px; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.marque i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 2px; }
.vues { display: flex; gap: 4px; padding: 3px; background: var(--plan); border-radius: 999px; border: 1px solid var(--filet); }
.vues button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; color: var(--encre-2);
}
.vues button[aria-pressed="true"] { background: var(--plan-3); color: var(--encre); }
.tete .espace { flex: 1; }
.compte {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--encre-2); white-space: nowrap;
}
.voyant { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.voyant.rouge { background: var(--critique); }
.voyant.gris { background: var(--encre-3); }
.fraicheur { font-size: 13px; color: var(--encre-3); white-space: nowrap; }
.actualiser {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 9px 16px;
  background: var(--accent); color: var(--accent-encre); font-weight: 500;
}
.actualiser:disabled { opacity: 0.75; cursor: progress; }
.actualiser svg { width: 15px; height: 15px; }
.actualiser.tourne svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.reglage {
  border: 1px solid var(--filet-2); background: transparent; border-radius: 999px;
  padding: 7px 12px; font-size: 13px; color: var(--encre-2);
}

/* --------------------------------------------------------- les filtres */
.page { max-width: 1480px; margin: 0 auto; padding: 0 16px 80px; }
.filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 18px 0 6px; }
.puces { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  flex: none; border: 1px solid var(--filet-2); background: transparent; color: var(--encre-2);
  border-radius: 999px; padding: 6px 13px; font-size: 14px; white-space: nowrap;
}
.puce:hover { color: var(--encre); border-color: var(--encre-3); }
.puce[aria-pressed="true"] { background: var(--encre); color: var(--page); border-color: var(--encre); }
.puce .pastille { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.champ-date { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--encre-2); }
.champ-date input {
  background: var(--plan); border: 1px solid var(--filet-2); border-radius: 10px; padding: 5px 9px; color: var(--encre);
  color-scheme: inherit;
}
.champ-date button { border: 0; background: none; color: var(--encre-3); padding: 4px; }
.separateur { width: 1px; height: 22px; background: var(--filet-2); }

/* ------------------------------------------------------------- le chiffre de tête */
.ouverture {
  display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.4fr); gap: 32px;
  padding: 28px 0 30px; border-bottom: 1px solid var(--filet); align-items: end;
}
.ouverture .quand { color: var(--encre-2); font-size: 15px; margin: 0 0 6px; }
.ouverture .quand b { color: var(--encre); font-weight: 500; }
.gros { font-size: clamp(54px, 7.4vw, 104px); font-weight: 500; line-height: 0.95; letter-spacing: -0.035em; margin: 0; }
.gros small { font-size: 0.32em; letter-spacing: 0; color: var(--encre-2); font-weight: 400; margin-left: 10px; }
.ecart { margin: 12px 0 0; font-size: 15px; color: var(--encre-2); }
.hausse { color: var(--hausse); }
.baisse { color: var(--baisse); }
.retombees { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 22px 0 0; padding: 0; list-style: none; }
.retombees li { font-size: 15px; color: var(--encre-2); }
.retombees b { display: block; font-size: 30px; font-weight: 500; color: var(--encre); letter-spacing: -0.02em; line-height: 1.1; }
.annexes { margin: 18px 0 0; font-size: 13px; color: var(--encre-3); }
.annexes span + span::before { content: "·"; margin: 0 8px; }

.graphe-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.graphe-tete h2 { font-size: 14px; font-weight: 400; color: var(--encre-2); margin: 0; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--encre-2); margin: 10px 0 0; padding: 0; list-style: none; }
.legende i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
svg.barres { width: 100%; height: 180px; display: block; overflow: visible; }
svg.barres .axe { stroke: var(--base); stroke-width: 1; }
svg.barres .grille { stroke: var(--grille); stroke-width: 1; }
svg.barres text { fill: var(--encre-3); font-size: 11px; font-family: inherit; }
svg.barres .hors { opacity: 0.28; }
svg.barres .cible { fill: transparent; }
svg.barres .cible:hover + g, svg.barres g.survol { filter: brightness(1.15); }

/* ------------------------------------------------------------ les alertes */
.alertes { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 2px; }
.alerte {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 10px;
  padding: 11px 14px; background: var(--plan); border-radius: 10px;
}
.alerte:first-child { border-top-left-radius: var(--rayon); border-top-right-radius: var(--rayon); }
.alerte:last-child { border-bottom-left-radius: var(--rayon); border-bottom-right-radius: var(--rayon); }
.alerte svg { width: 18px; height: 18px; margin-top: 2px; }
.alerte b { font-weight: 500; }
.alerte p { margin: 2px 0 0; color: var(--encre-2); font-size: 14px; }
.alerte.lien { cursor: pointer; }
.alerte.lien:hover { background: var(--plan-2); }
.alerte .aller { color: var(--encre-3); font-size: 13px; align-self: center; }
.ic-rouge { color: var(--critique); }
.ic-orange { color: var(--serieux); }
.ic-jaune { color: var(--attention); }

/* ------------------------------------------------------------ les campagnes */
.section-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-titre h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.section-titre p { margin: 0; color: var(--encre-3); font-size: 14px; }

.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 18px; }
.carte {
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  background: var(--plan); border-radius: var(--rayon); overflow: hidden; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.carte:hover { transform: translateY(-2px); box-shadow: var(--ombre); }
.carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visuel { position: relative; background: var(--plan-3); min-height: 300px; }
.visuel .vide { position: absolute; inset: 0; display: grid; place-items: center; color: var(--encre-3); font-size: 13px; }
.visuel .badge, .crea .badge {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 12px; padding: 3px 9px 3px 7px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge svg { width: 11px; height: 11px; }
.visuel .autres { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.visuel .autres img {
  width: 48px; height: 60px; object-fit: cover; border-radius: 7px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55);
}
.visuel .autres span {
  height: 60px; min-width: 48px; display: grid; place-items: center; border-radius: 7px;
  background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 13px; padding: 0 8px;
}

.corps { padding: 18px 20px 16px; display: flex; flex-direction: column; min-width: 0; }
.corps .haut { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--encre-2); }
.client-nom { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--encre); }
.client-nom i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.statut { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.statut .voyant { width: 7px; height: 7px; }
.corps h3 {
  margin: 8px 0 4px; font-size: 21px; font-weight: 500; line-height: 1.15; letter-spacing: -0.015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.corps .infos { font-size: 13px; color: var(--encre-3); margin: 0; }
.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 12px; }
.chiffres div { min-width: 0; }
.chiffres dt { font-size: 12px; color: var(--encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chiffres dd { margin: 1px 0 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.chiffres small { display: block; font-size: 12px; color: var(--encre-3); white-space: nowrap; }
.chiffres .principal dd { color: var(--encre); }
.etincelle-legende { display: flex; justify-content: space-between; font-size: 11px; color: var(--encre-3); margin-top: 4px; }

/* ------------------------------------------------------------ les créas */
.barre-tri { display: flex; align-items: center; gap: 10px; color: var(--encre-3); font-size: 14px; }
.creas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.crea { background: var(--plan); border-radius: var(--rayon); overflow: hidden; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.crea:hover { transform: translateY(-2px); box-shadow: var(--ombre); }
.crea .image { position: relative; aspect-ratio: 4 / 5; background: var(--plan-3); }
.crea .rang {
  position: absolute; top: 10px; right: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 500;
  padding: 2px 9px; border-radius: 999px;
}
.crea .texte { padding: 12px 14px 14px; }
.crea .qui { font-size: 12px; color: var(--encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crea .qui b { color: var(--encre-2); font-weight: 500; }
.crea .ligne { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.crea .ligne strong { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.crea .ligne span { font-size: 13px; color: var(--encre-2); }
.crea .petit { font-size: 12px; color: var(--encre-3); margin-top: 3px; }

/* ------------------------------------------------------------ les clients */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.client { background: var(--plan); border-radius: var(--rayon); overflow: hidden; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.client:hover { transform: translateY(-2px); box-shadow: var(--ombre); }
.mosaique { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 16 / 10; background: var(--plan-3); }
.mosaique img { width: 100%; height: 100%; object-fit: cover; }
.mosaique img:first-child { grid-row: 1 / 3; }
.mosaique.une img:first-child { grid-column: 1 / 3; }
.client .texte { padding: 14px 16px 16px; }
.client h3 { margin: 0; font-size: 22px; font-weight: 500; display: flex; align-items: center; gap: 9px; }
.client h3 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.client .somme { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; margin: 8px 0 2px; }
.client .somme small { font-size: 14px; color: var(--encre-3); font-weight: 400; margin-left: 6px; }
.client p { margin: 0; font-size: 14px; color: var(--encre-2); }

/* ------------------------------------------------------------ le tiroir */
.voile { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 40; opacity: 0; transition: opacity 0.2s ease; }
.voile.ouvert { opacity: 1; }
.tiroir {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); z-index: 41;
  background: var(--page); border-left: 1px solid var(--filet); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tiroir.ouvert { transform: none; }
.tiroir-tete {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--filet);
}
.tiroir-tete .fermer { margin-left: auto; border: 1px solid var(--filet-2); background: transparent; border-radius: 999px; padding: 6px 14px; color: var(--encre-2); }
.tiroir-corps { padding: 22px 20px 60px; }
.tiroir h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; margin: 6px 0 8px; }
.tiroir .infos { color: var(--encre-3); font-size: 14px; margin: 0; }
.tiroir .lien-gestionnaire { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; color: var(--encre-2); text-decoration: none; border-bottom: 1px solid var(--filet-2); }
.tiroir .lien-gestionnaire:hover { color: var(--encre); }
.tiroir h3 { font-size: 18px; font-weight: 500; margin: 34px 0 12px; }
.tiroir .chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
.galerie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.galerie .crea { cursor: default; }
.galerie .crea:hover { transform: none; box-shadow: none; }
.galerie .crea .nom-pub { font-size: 13px; color: var(--encre-2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.galerie .crea .corps-texte { font-size: 12px; color: var(--encre-3); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ensembles { width: 100%; border-collapse: collapse; font-size: 14px; }
.ensembles td, .ensembles th { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--filet); text-align: left; vertical-align: top; }
.ensembles th { font-weight: 400; color: var(--encre-3); font-size: 12px; }
.ensembles td:last-child, .ensembles th:last-child { text-align: right; padding-right: 0; }

/* ------------------------------------------------------------ les muettes, le pied */
.muettes { margin-top: 40px; background: var(--plan); border-radius: var(--rayon); padding: 4px 18px; }
.muettes summary { cursor: pointer; padding: 14px 0; color: var(--encre-2); }
.muettes table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.muettes td { padding: 8px 10px 8px 0; border-top: 1px solid var(--filet); color: var(--encre-2); }
.muettes td:first-child { color: var(--encre); white-space: nowrap; }
.pied { margin-top: 44px; font-size: 13px; color: var(--encre-3); line-height: 1.6; }
.vide-etat { padding: 60px 0; text-align: center; color: var(--encre-3); }
.vide-etat b { display: block; color: var(--encre); font-weight: 500; font-size: 20px; margin-bottom: 6px; }

/* ------------------------------------------------------------ la bulle */
#bulle {
  position: fixed; z-index: 60; pointer-events: none; min-width: 150px; max-width: 280px;
  background: var(--plan-2); color: var(--encre); border: 1px solid var(--filet-2); border-radius: 10px;
  padding: 9px 11px; font-size: 13px; box-shadow: var(--ombre);
}
#bulle .t { color: var(--encre-2); margin-bottom: 5px; }
#bulle .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
#bulle .r i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }
#bulle .r b { font-weight: 500; font-variant-numeric: tabular-nums; }
#bulle .tot { border-top: 1px solid var(--filet-2); margin-top: 6px; padding-top: 6px; }

/* ------------------------------------------------------------ l'avis, la porte */
.avis {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  background: var(--encre); color: var(--page); padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--ombre); max-width: calc(100vw - 32px);
}
.porte { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.porte .boite { max-width: 380px; text-align: left; }
.porte .marque { font-size: 52px; }
.porte p { color: var(--encre-2); margin: 16px 0 28px; }
.porte .actualiser { padding: 12px 22px; font-size: 16px; }
.porte .erreur { color: var(--critique); }

.squelette { background: linear-gradient(90deg, var(--plan) 0%, var(--plan-2) 50%, var(--plan) 100%); background-size: 200% 100%; animation: luit 1.4s ease infinite; border-radius: var(--rayon); }
@keyframes luit { to { background-position: -200% 0; } }

/* ------------------------------------------------------------ le téléphone */
@media (max-width: 1100px) {
  .ouverture { grid-template-columns: 1fr; gap: 26px; align-items: start; }
  .cartes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tete { flex-wrap: wrap; gap: 10px 12px; padding-top: max(12px, env(safe-area-inset-top)); }
  .tete .vues { order: 5; width: 100%; justify-content: space-between; }
  .tete .vues button { flex: 1; }
  .tete .espace, .fraicheur, .compte .texte-long { display: none; }
  .actualiser { padding: 8px 13px; }
  .actualiser .mot { display: none; }
  .filtres { gap: 10px; }
  .filtres .puces { width: 100%; }
  .separateur { display: none; }
  .carte { grid-template-columns: 1fr; }
  .visuel { min-height: 0; aspect-ratio: 4 / 3; }
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .creas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .crea .texte { padding: 10px 11px 12px; }
  .crea .ligne strong { font-size: 18px; }
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiroir .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-titre h2 { font-size: 22px; }
  .muettes td:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------ couleurs des clients (classes : la CSP refuse style="") */
.coul-1 { fill: var(--s1); background: var(--s1); } .coul-2 { fill: var(--s2); background: var(--s2); }
.coul-3 { fill: var(--s3); background: var(--s3); } .coul-4 { fill: var(--s4); background: var(--s4); }
.coul-5 { fill: var(--s5); background: var(--s5); } .coul-6 { fill: var(--s6); background: var(--s6); }
.coul-7 { fill: var(--s7); background: var(--s7); } .coul-8 { fill: var(--s8); background: var(--s8); }
.eteint { color: var(--encre-3); }

/* ------------------------------------------------------------ graphes : axes en HTML */
.graphe { position: relative; padding-left: 40px; }
.graphe svg { width: 100%; display: block; overflow: visible; }
.graphe .grille { stroke: var(--grille); stroke-width: 1; vector-effect: non-scaling-stroke; }
.graphe .axe, svg.etincelle .axe { stroke: var(--base); stroke-width: 1; vector-effect: non-scaling-stroke; }
.graphe .hors, svg.etincelle .hors { opacity: 0.28; }
.graphe .cible, svg.etincelle .cible { fill: transparent; }
.ax-y span { position: absolute; left: 0; width: 34px; text-align: right; transform: translateY(-50%); font-size: 11px; color: var(--encre-3); line-height: 1; white-space: nowrap; }
.ax-x { position: relative; height: 20px; }
.ax-x span { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; color: var(--encre-3); white-space: nowrap; }
.ax-x span.debut { transform: none; }
.ax-x span.fin { transform: translateX(-100%); }
svg.etincelle { width: 100%; display: block; margin-top: auto; overflow: visible; }

/* ------------------------------------------------------------ la créa entière sur son propre fond flou */
img.fond { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(22px) saturate(1.15); opacity: 0.6; }
img.avant { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.visuel, .crea .image { overflow: hidden; }
.visuel .autres img { width: 40px; height: 50px; }
.carte.eteinte .visuel img.avant { filter: grayscale(0.85); opacity: 0.75; }

@media (max-width: 720px) {
  .filtres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filtres::-webkit-scrollbar { display: none; }
  .filtres > * { flex: none; }
  .filtres .puces { width: auto; overflow: visible; }
  .filtres:first-of-type .puces, .filtres:last-of-type .puces { overflow-x: auto; }
  .graphe { padding-left: 34px; }
  .ax-y span { width: 30px; }
}

/* « Classer par » et ses boutons : à la ligne et en défilement sur téléphone (141 px de débordement vus le 20/10/2026). */
.barre-tri { min-width: 0; }
.barre-tri .puces { min-width: 0; }
@media (max-width: 720px) {
  .section-titre { flex-wrap: wrap; }
  .barre-tri { width: 100%; }
  .barre-tri .puces { overflow-x: auto; }
}
.barre-tri > span, .barre-tri { white-space: nowrap; }
