

.affaires { display: block; margin-bottom: 16px; }
.split-affaires {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "releve liste" "portes liste";
  gap: 14px; align-items: start;
}

.releve-affaires {
  --entree: #4ADE80;
  --sortie: #F87171;
  grid-area: releve;
  position: sticky; top: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--monde) 82%, #6B5A3A) 0%, var(--monde) 70%);
  color: #F2EDE2;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px; padding: 18px;
}
.releve-affaires .k {
  font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--nuit-sous); font-weight: 700;
}
.releve-affaires .v {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 30px; font-weight: 800; color: #fff; margin: 6px 0 2px;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.releve-affaires .contre { font-size: 12px; color: var(--nuit-sous); }
.releve-affaires .l {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 10px;
}
.releve-affaires .l + .l { margin-top: 0; }
.releve-affaires .l .n { font-size: 12.5px; color: var(--nuit-sous); min-width: 0; }
.releve-affaires .l .n b { display: block; color: #F2EDE2; font-size: 13px; }
.releve-affaires .l .m {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.releve-affaires .l.att .montant { color: var(--sortie); }
.releve-affaires .sous-bloc { margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
.releve-affaires .sous-bloc .k { margin-bottom: 6px; }

.releve-affaires .l2 {
  display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 4px 0;
  width: 100%; border: 0; background: none; color: inherit; font-family: inherit; text-align: left;
}
.releve-affaires button.l2 { cursor: pointer; }

.releve-affaires .l2.on b { color: var(--or-marque); }
.releve-affaires .l2 b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.releve-affaires .l2 span { color: var(--nuit-sous); font-variant-numeric: tabular-nums; white-space: nowrap; }

.affaires .delta {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.affaires .delta.up { background: color-mix(in srgb, var(--vert-vif) 18%, transparent); color: var(--entree); }
.affaires .delta.down { background: color-mix(in srgb, var(--sortie) 18%, transparent); color: var(--sortie); }
.affaires .delta.plat { background: color-mix(in srgb, var(--gris) 18%, transparent); color: var(--gris); }

.portes-affaires {
  grid-area: portes;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 12px 8px;
}
.portes-affaires .porte {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; font: inherit; color: var(--encre); cursor: pointer;
  font-size: 10.5px; font-weight: 700; padding: 4px 0; border-radius: 12px;
}
.portes-affaires .porte:hover { background: var(--survol); }
.portes-affaires .porte:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.portes-affaires .porte i {
  width: 44px; height: 44px; border-radius: 50%; background: var(--puce);
  display: grid; place-items: center; color: var(--or-texte);
}

.liste-affaires {
  grid-area: liste; min-width: 0;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 16px;
  padding: 4px 18px 10px; overflow: hidden;
}
.sect-affaires {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 12px 2px 6px; border-top: 1px solid var(--filet);
  font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--gris-fort); font-weight: 700;
}
.sect-affaires:first-child { border-top: 0; }
.sect-affaires .droite { letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--or-texte); text-align: right; }

.rang-affaire {
  display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(150px, 1fr) auto;
  gap: 14px; align-items: center;
  width: 100%; padding: 11px 2px; border: 0; border-top: 1px solid var(--filet);
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.rang-affaire:hover { background: color-mix(in srgb, var(--encre) 4%, transparent); }
.rang-affaire:focus-visible { outline: 2px solid var(--or); outline-offset: -2px; }
.rang-affaire.muette { opacity: .78; }

.disque-affaire {
  width: 44px; height: 44px; border-radius: 50%; background: var(--puce);
  display: grid; place-items: center; color: var(--or-texte);
  font-size: 22px; line-height: 1;
}

.liste-affaires .rang-affaire.sans-bande .disque-affaire { font-size: 19px; }
.rang-affaire .q { min-width: 0; }
.rang-affaire h3 {
  margin: 0; font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rang-affaire .point { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.rang-affaire .lieu { font-size: 11.5px; color: var(--gris); margin-top: 2px; }
.rang-affaire .lieu b { color: var(--or-texte); font-weight: 700; }
.rang-affaire .mots { font-size: 12px; color: var(--gris-fort); line-height: 1.45; margin-top: 4px; }
.rang-affaire .mots b { color: var(--encre); font-weight: 700; }
.rang-affaire .mots .att { color: var(--sortie); font-weight: 700; }
.rang-affaire .mots .muet { color: var(--gris); font-style: italic; }

.rang-affaire .milieu-bande { min-width: 0; }
.rang-affaire .bande-jours { height: 30px; gap: 3px; }
.rang-affaire .bande-pieds { display: none; }
.rang-affaire .milieu-bande.vide { height: 30px; }
.rang-affaire .m { text-align: right; white-space: nowrap; }
.rang-affaire .m .v { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rang-affaire .m .e { font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.rang-affaire .m .e.up { color: var(--entree); }
.rang-affaire .m .e.down { color: var(--sortie); }
.rang-affaire .m .e.plat { color: var(--gris); }

.mod {
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; flex: none;
}
.mod.b { background: color-mix(in srgb, var(--or) 20%, transparent); color: var(--or-texte); }
.mod.p { background: color-mix(in srgb, #2F6DB5 22%, transparent); color: #245891; }
:root[data-sombre="oui"] .mod.p { color: #6FA3E0; }
.mod.c { background: color-mix(in srgb, var(--gris) 22%, transparent); color: var(--gris-fort); }

#liste-boutiques .groupe-menu {
  margin: 6px 0 0; padding: 6px 12px 2px;
  font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--gris-fort); font-weight: 700;
}
#liste-boutiques span.affaire { display: flex; flex-direction: column; gap: 1px; }
#liste-boutiques span.affaire b { font-weight: 700; }
#liste-boutiques span.affaire small { font-size: 11px; color: var(--gris); }

.graphe-parking { margin-top: 14px; }
.graphe-parking .bande-jours { height: 64px; gap: 5px; margin-top: 10px; }

.disque-engin {
  width: 32px; height: 32px; border-radius: 9px; background: var(--puce);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none;
}
.engin-texte { min-width: 0; flex: 1; }
.engin-rangee .gauche { flex: 1; min-width: 0; }
.jauge-engin { height: 4px; background: var(--puce); border-radius: 2px; margin-top: 6px; width: min(100%, 260px); }
.jauge-engin i { display: block; height: 100%; background: var(--or); border-radius: 2px; }
.heures { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 72px; margin-top: 12px; }
.heures i { display: block; background: var(--or); border-radius: 0; }
.heures i.rien { background: color-mix(in srgb, var(--encre) 14%, transparent); }
.heures-axe { display: grid; grid-template-columns: repeat(24, 1fr); font-size: 10px; color: var(--gris); margin-top: 4px; }
.heures-axe span { white-space: nowrap; }
.deux-parking { margin-top: 14px; }
.rangee .mnt.sub { font-weight: 500; }

@media (min-width: 981px) and (max-width: 1200px) {
  .split-affaires { grid-template-columns: 260px minmax(0, 1fr); }
  .page-affaire .split-affaires { grid-template-columns: 260px minmax(0, 1fr); }
  .gauche-affaire { max-height: calc(100vh - 24px); }
  .rang-affaire { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
  .rang-affaire .milieu-bande { display: none; }
  
  .page-affaire .rang-affaire.choix { grid-template-columns: 44px minmax(0, 1fr); }
  .page-affaire .rang-affaire.choix .m { grid-column: 2; text-align: left; white-space: normal; margin-top: 2px; }
  .rang-affaire .m .sous-menus { justify-content: flex-start; }
}

@media (max-width: 980px) {
  .split-affaires {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "releve" "pastilles" "reglette" "liste" "portes";
    gap: 0;
  }

.affaires-ici header.bandeau .titre-ligne { display: none; }
  .affaires-ici header.bandeau .barre { height: 54px; }
  .affaires-ici header.bandeau { background: var(--fond); color: var(--encre); border-bottom: 0; }
  .affaires-ici header.bandeau .nom .accent,
  .affaires-ici header.bandeau .nom .lawe,
  .affaires-ici header.bandeau .fente { color: var(--or-actif); }
  .affaires-ici header.bandeau .sous,
  .affaires-ici header.bandeau .bouton-icone { color: var(--gris); }
  .affaires-ici header.bandeau .bouton-icone:hover { color: var(--encre); background: var(--survol); }

.releve-affaires {
    position: static;
    background: linear-gradient(135deg, #1B1610, var(--nuit));
    border: 1px solid #312917; border-radius: 18px;
    padding: 16px 18px 14px; margin-bottom: 8px;
  }
  .releve-affaires .k {
    font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--nuit-sous); font-weight: 700;
  }
  .releve-affaires .v {
    font-size: 30px; font-weight: 800; color: #fff; margin-top: 6px;
    display: flex; align-items: center; gap: 10px;
  }
  .releve-affaires .contre { font-size: 12px; color: var(--nuit-sous); margin-top: 2px; }
  
  .releve-affaires .sous-bloc { display: none; }
  
  .releve-affaires .l { display: none; }

.pastilles-affaires {
    grid-area: pastilles; display: flex; gap: 8px; justify-content: center;
    flex-wrap: wrap; margin: 0 0 12px;
  }
  .pastilles-affaires .l {
    display: flex; gap: 6px; align-items: center; border: 0; margin: 0;
    padding: 7px 12px; border-radius: 99px; font-size: 12px; font-weight: 700;
  }
  .pastilles-affaires .l.b { background: color-mix(in srgb, var(--or) 18%, transparent); color: var(--or-texte); }
  .pastilles-affaires .l.p { background: color-mix(in srgb, #2F6DB5 18%, transparent); color: #245891; }
  .pastilles-affaires .l.c { background: color-mix(in srgb, var(--encre) 9%, transparent); color: var(--gris-fort); }
  .pastilles-affaires .l.att { background: color-mix(in srgb, var(--sortie) 15%, transparent); color: var(--sortie); }
  .pastilles-affaires .l .n b { display: inline; font-size: 12px; font-weight: 700; color: inherit; }
  .pastilles-affaires .l .n span { display: none; }
  .pastilles-affaires .l .m { display: block; font-weight: 500; opacity: .8; color: inherit; }
  .pastilles-affaires .l .m .montant { font-size: 12px; font-weight: 500; color: inherit; }
  .pastilles-affaires .l .delta { display: none; }

.split-affaires > .filtres {
    grid-area: reglette; margin: 0 0 10px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
  }
  .split-affaires > .filtres .menu-boutique { grid-column: 1; }
  .split-affaires > .filtres .menu:not(.menu-boutique) { grid-column: 2; grid-row: 1; }
  .split-affaires > .filtres .segments { grid-column: 1 / -1; margin: 0; }
  .split-affaires > .filtres .pilule,
  .split-affaires > .filtres .pilule-icone,
  .split-affaires > .filtres .segments {
    background: var(--carte); border-color: var(--bord); color: var(--encre);
  }
  .split-affaires > .filtres .pilule .chevron,
  .split-affaires > .filtres .pilule-icone svg { color: var(--gris); }

.liste-affaires { background: none; border: 0; border-radius: 0; padding: 0; overflow: visible; }
  .sect-affaires {
    margin: 10px 2px 6px; padding: 0; border-top: 0;
    font-size: 10.5px; letter-spacing: 1px; color: var(--gris-fort); font-weight: 700;
  }
  .sect-affaires .droite {
    display: inline; letter-spacing: 0; text-transform: none;
    font-weight: 600; color: var(--or-texte);
  }

.rang-affaire {
    display: flex; align-items: center; gap: 12px;
    background: var(--carte); border: 1px solid var(--bord); border-radius: 14px;
    padding: 10px 12px; margin-bottom: 6px;
  }
  .rang-affaire:hover { background: var(--carte); }
  .rang-affaire.muette { opacity: .75; }
  
  .rang-affaire .milieu-bande { display: none; }
  .rang-affaire .q { flex: 1; min-width: 0; }
  .rang-affaire h3 {
    font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  
  .rang-affaire h3 .mod { display: none; }
  .rang-affaire .sous-affaire {
    font-size: 11.5px; color: var(--gris); margin-top: 1px; line-height: 1.45;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .rang-affaire .sous-affaire b { color: var(--or-texte); font-weight: 700; }
  .rang-affaire .sous-affaire .att { color: var(--sortie); font-weight: 700; }
  .rang-affaire .sous-affaire .muet { color: var(--gris); font-style: italic; }
  .rang-affaire .m { text-align: right; flex: none; }
  .rang-affaire .m .v { font-size: 15px; font-weight: 800; }
  .rang-affaire .m .e { font-size: 11px; font-weight: 700; margin-top: 0; }

.portes-affaires {
    grid-area: portes; display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 6px; margin: 12px 0 4px; background: none; border: 0; padding: 0;
    border-radius: 0;
  }
}
@media (max-width: 980px) {
  
  .page-affaire .split-affaires { grid-template-areas: "releve" "liste"; }
  .gauche-affaire { position: static; max-height: none; overflow: visible; gap: 10px; }
  
  .page-affaire .releve-affaires .sous-bloc { display: block; }
  
  .page-affaire .sect-affaires .droite.somme { display: inline; }
  
  .page-affaire .rang-affaire .mots { white-space: normal; }
  .page-affaire .rang-affaire.sans-bande { grid-template-columns: 44px minmax(0, 1fr) auto; }
}

.graph-affaire { padding: 10px 2px 4px; }
.barres-jours { display: flex; align-items: flex-end; gap: 5px; height: 120px; border-bottom: 1px solid var(--filet); }
.barres-jours i { flex: 1; display: block; background: var(--or); opacity: .55; border-radius: 4px 4px 0 0; min-height: 3px; }
.barres-jours i.on { opacity: 1; }
.barres-jours i.rien { height: 3px; background: var(--gris); opacity: .5; }
.axe-jours { display: flex; gap: 5px; margin-top: 6px; }
.axe-jours span, .axe-jours b { flex: 1; text-align: center; font-size: 10.5px; color: var(--gris); text-transform: uppercase; }
.axe-jours b { color: var(--or-texte); }
.pied-jours { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--gris-fort); }
.pied-jours b { color: var(--encre); }

.mod.ok { background: color-mix(in srgb, var(--vert-vif) 18%, transparent); color: var(--entree); }

.disque-affaire.photo { background: var(--or); color: #241D12; font-size: 15px; font-weight: 800; overflow: hidden; }
.disque-affaire.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rang-affaire .q .champ-texte { max-width: 320px; margin-bottom: 4px; }
.rang-affaire .m .sous-menus { justify-content: flex-end; flex-wrap: wrap; }
.rang-affaire .m .bouton + .bouton { margin-left: 8px; }
.filtres-histo .filtres-rapport { width: 100%; }
.filtres-histo .lbl-rapport { margin-top: 8px; }

@media (max-width: 720px) {
  .page-affaire .rang-affaire.choix { grid-template-columns: 44px minmax(0, 1fr); }
  .page-affaire .rang-affaire.choix .m { grid-column: 2; text-align: left; white-space: normal; margin-top: 2px; }
  .rang-affaire .m .sous-menus { justify-content: flex-start; }
}

.rang-affaire.bouge { animation: bouge-clair 3.6s ease-out; }

@keyframes bouge-clair {
  0%   { background: rgba(201, 162, 75, .38); }
  22%  { background: rgba(201, 162, 75, .38); }
  100% { background: transparent; }
}

:root[data-sombre="oui"] .rang-affaire.bouge { animation: bouge-sombre 3.6s ease-out; }

@keyframes bouge-sombre {
  0%   { background: rgba(201, 162, 75, .20); }
  22%  { background: rgba(201, 162, 75, .20); }
  100% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .rang-affaire.bouge,
  :root[data-sombre="oui"] .rang-affaire.bouge { animation: none; background: rgba(201, 162, 75, .22); }
}
