/* Portail partenaire SOCinBlue — d'après les maquettes du dashboard.
   Barre latérale marine fixe, bandeau de titre, puis le contenu en blocs.
   La criticité est le seul endroit où la couleur est forte : c'est
   l'information que le lecteur cherche en premier. */

/* Thème : les couleurs sont toutes des variables, le mode sombre ne fait que
   les redéfinir. « auto » suit le réglage du système d'exploitation, les deux
   autres forcent le choix du visiteur. Aucun JavaScript n'intervient : la
   classe est posée sur <body> par le serveur. */
:root {
  --encre:        #16222e;
  --encre-douce:  #5a6b7a;
  --papier:       #eef1f4;
  --surface:      #ffffff;
  --trait:        #dfe3e7;
  --marine:       #16305c;
  --marine-fonce: #0f2444;
  --marine-clair: #2b5699;
  --sarcelle:     #1f7c6d;

  --critique: #8c1d2f;
  --haute:    #c4461f;
  --moyenne:  #b0760d;
  --basse:    #2f6a8f;
  --info:     #5a6b7a;

  --laterale: 15.5rem;
}

/* Mode sombre, appliqué soit par choix explicite, soit par le système. */
body.theme-sombre,
body.theme-auto {
  color-scheme: light dark;
}

body.theme-sombre {
  --encre:        #e7edf3;
  --encre-douce:  #9bb0c4;
  --papier:       #0f1823;
  --surface:      #16222e;
  --trait:        #2a3a4a;
  --marine:       #0f2038;
  --marine-fonce: #0a1727;
  --marine-clair: #6ea8e8;
  --sarcelle:     #3fae9a;

  --critique: #e0637a;
  --haute:    #e8834f;
  --moyenne:  #d7a53d;
  --basse:    #6aa8cc;
  --info:     #9bb0c4;
}

@media (prefers-color-scheme: dark) {
  body.theme-auto {
    --encre:        #e7edf3;
    --encre-douce:  #9bb0c4;
    --papier:       #0f1823;
    --surface:      #16222e;
    --trait:        #2a3a4a;
    --marine:       #0f2038;
    --marine-fonce: #0a1727;
    --marine-clair: #6ea8e8;
    --sarcelle:     #3fae9a;

    --critique: #e0637a;
    --haute:    #e8834f;
    --moyenne:  #d7a53d;
    --basse:    #6aa8cc;
    --info:     #9bb0c4;
  }
}

/* Les quelques fonds écrits en dur deviennent des variables en mode sombre. */
body.theme-sombre .alertes tbody tr:hover,
body.theme-sombre .ligne-statut a:hover { background: #1c2b3a; }
body.theme-sombre .pastille-aucune { background: #46535f; color: var(--encre); }
body.theme-sombre .erreur { background: #3a1d23; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 15px/1.55 "Segoe UI", Roboto, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

a { color: var(--marine-clair); }
a:hover { color: var(--marine); }
:focus-visible { outline: 2px solid var(--marine-clair); outline-offset: 2px; }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem .75rem; }

/* --- Structure ------------------------------------------------------------ */
.cadre { display: flex; min-height: 100vh; }

.laterale {
  width: var(--laterale);
  flex: 0 0 var(--laterale);
  background: var(--marine);
  color: #cfdaea;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0 1rem;
}

.marque { display: flex; align-items: center; gap: .6rem; padding: 0 1rem 1.5rem; }
.logo {
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  background: var(--sarcelle);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.marque-nom { font-size: 1.05rem; font-weight: 600; color: #fff; }

.menu { list-style: none; margin: 0; padding: 0; }
.menu > li > a {
  display: flex; align-items: center; gap: .45rem;
  padding: .55rem 1rem;
  color: #cfdaea;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.menu > li > a:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu > li > a[aria-current="page"] {
  background: var(--marine-fonce);
  border-left-color: var(--sarcelle);
  color: #fff;
  font-weight: 600;
}

.menu-titre { margin: 1.5rem 1rem .35rem; font-size: .8rem; color: #8ea4c4; }
.menu-clients { font-size: .93rem; overflow-y: auto; }
.menu-clients > li > a { padding: .3rem 1rem; }
.chevron { color: #8ea4c4; font-size: .7rem; width: .7rem; }
.client-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compte { background: rgba(255,255,255,.14); border-radius: 10px; padding: 0 .4rem; font-size: .76rem; }
.sous-entree {
  display: block;
  padding: .2rem 1rem .35rem 2.4rem;
  font-size: .85rem;
  color: #fff;
}

.profil {
  margin-top: auto;
  display: flex; align-items: center; gap: .6rem;
  padding: 1rem 1rem 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.avatar {
  width: 2rem; height: 2rem; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16);
  color: #fff; font-weight: 600; font-size: .85rem;
}
.profil-texte { min-width: 0; }
.profil-nom { display: block; font-size: .88rem; color: #cfdaea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil button {
  background: none; border: none; padding: 0;
  color: #8ea4c4; font: inherit; font-size: .82rem;
  text-decoration: underline; cursor: pointer;
}
.profil button:hover { color: #fff; }

.panneau { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.barre {
  background: var(--surface);
  border-bottom: 1px solid var(--trait);
  padding: .8rem 2rem .9rem;
}
.fil { margin: 0; font-size: .82rem; color: var(--encre-douce); }
.barre h1 { margin: .1rem 0 0; font-size: 1.35rem; font-weight: 600; }

.contenu { padding: 1.5rem 2rem 2.5rem; }

/* --- Chiffres clés -------------------------------------------------------- */
.chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.carte-chiffre {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-top: 3px solid var(--marine);
  padding: 1rem 1.1rem;
}
.chiffre-valeur { display: block; font-size: 1.9rem; line-height: 1.15; font-weight: 600; }
.chiffre-libelle { display: block; margin-top: .15rem; font-size: .87rem; color: var(--encre-douce); }
.chiffre-alerte    { border-top-color: var(--critique); }
.chiffre-alerte .chiffre-valeur { color: var(--critique); }
.chiffre-attention { border-top-color: var(--moyenne); }
.chiffre-ok        { border-top-color: var(--sarcelle); }

/* --- Blocs ---------------------------------------------------------------- */
.bloc {
  background: var(--surface);
  border: 1px solid var(--trait);
  padding: 1.1rem 1.35rem 1.35rem;
  margin-bottom: 1.25rem;
}
.bloc h2 { margin: 0 0 .9rem; font-size: 1rem; font-weight: 600; }

.colonnes-graphiques { display: grid; grid-template-columns: 5fr 6fr; gap: 1.25rem; }
.colonnes-bas { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
.colonnes-fiche { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; align-items: start; }
.colonnes-graphiques .bloc, .colonnes-bas .bloc, .colonnes-fiche .bloc { margin-bottom: 0; }

/* --- Anneau --------------------------------------------------------------- */
.graphique { display: flex; gap: 1.5rem; align-items: center; }
.anneau { width: 11rem; height: 11rem; flex: none; transform: rotate(-90deg); }
.anneau-total {
  transform: rotate(90deg);
  transform-origin: 21px 21px;
  text-anchor: middle;
  font-size: 6px;
  font-weight: 600;
  fill: var(--encre);
}
.anneau-mention {
  transform: rotate(90deg);
  transform-origin: 21px 21px;
  text-anchor: middle;
  font-size: 2.6px;
  fill: var(--encre-douce);
}

.legende { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: .92rem; }
.legende li { display: flex; align-items: center; gap: .5rem; padding: .18rem 0; }
.puce { display: block; width: .7rem; height: .7rem; flex: none; }
.legende-libelle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legende-valeur { color: var(--encre-douce); }
.legende-horizontale { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .9rem; font-size: .85rem; }
.legende-horizontale li { gap: .35rem; }

/* --- Barres empilées ------------------------------------------------------ */
.empilees { list-style: none; margin: 0; padding: 0; }
.empilees li {
  display: grid;
  grid-template-columns: 8rem 1fr 2.5rem;
  align-items: center;
  gap: .75rem;
  padding: .25rem 0;
}
.empilee-libelle { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* SVG : les segments sont des <rect>, la couleur et la largeur des attributs
   (pas de style inline, la CSP stricte passe). La piste reste le fond. */
.empilee-piste { display: block; width: 100%; height: .85rem; background: var(--papier); }
.empilee-total { text-align: right; font-size: .9rem; color: var(--encre-douce); }

/* --- Suivi des alertes ---------------------------------------------------- */
.statuts { list-style: none; margin: 0 0 1rem; padding: 0; }
.ligne-statut a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .25rem;
  border-bottom: 1px solid var(--papier);
  text-decoration: none;
  color: inherit;
}
.ligne-statut a:hover { background: #fafbfc; }
.jalon { width: .6rem; height: .6rem; flex: none; border-radius: 50%; }
.jalon-open { background: var(--critique); }
.jalon-in_progress { background: var(--moyenne); }
.jalon-closed { background: var(--encre-douce); }
.statut-libelle { flex: 1; }
.statut-nb { font-weight: 600; font-size: 1.05rem; }
.mention { margin: 0; font-size: .85rem; color: var(--encre-douce); }
.mention-haut { margin: -.4rem 0 1.25rem; }

/* --- Tableau -------------------------------------------------------------- */
/* Six colonnes dont plusieurs insécables : sur téléphone le tableau défile dans
   son propre cadre, sans entraîner toute la page. */
.cadre-tableau { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.alertes { width: 100%; border-collapse: collapse; font-size: .92rem; }
.alertes th {
  text-align: left; font-weight: 600; font-size: .84rem;
  color: var(--encre-douce);
  border-bottom: 1px solid var(--trait);
  padding: 0 .55rem .45rem;
}
.alertes td { padding: .5rem .55rem; border-bottom: 1px solid var(--papier); vertical-align: top; }
.alertes tbody tr:hover { background: #fafbfc; }
.colonne-date { white-space: nowrap; }
.machine { display: block; }
.utilisateur { display: block; color: var(--encre-douce); font-size: .87rem; }

.pastille {
  display: inline-block; padding: .08rem .5rem;
  font-size: .81rem; color: #fff; white-space: nowrap;
}
.pastille-critical { background: var(--critique); }
.pastille-high     { background: var(--haute); }
.pastille-medium   { background: var(--moyenne); }
.pastille-low      { background: var(--basse); }
.pastille-info     { background: var(--info); }
.pastille-aucune   { background: #c3c9ce; color: var(--encre); }

.statut { font-size: .87rem; white-space: nowrap; }
.statut-open { color: var(--critique); font-weight: 600; }
.statut-in_progress { color: var(--moyenne); }
.statut-closed { color: var(--encre-douce); }

.vide { color: var(--encre-douce); background: var(--papier); padding: 1.1rem; margin: 0; }
.lien-suite { margin: .9rem 0 0; font-size: .9rem; }

/* --- Filtres -------------------------------------------------------------- */
.filtres {
  background: var(--surface); border: 1px solid var(--trait);
  padding: .9rem 1.2rem; margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .9rem; align-items: flex-end;
}
.champ { margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.champ label { font-size: .84rem; color: var(--encre-douce); }
.champ select, .champ input {
  font: inherit; padding: .32rem .5rem;
  border: 1px solid var(--trait); background: var(--surface); color: var(--encre);
}
.champ-recherche input { min-width: 14rem; }
.champ-actions { flex-direction: row; align-items: center; gap: .75rem; }
.champ-actions button {
  font: inherit; padding: .38rem 1rem;
  background: var(--marine); color: #fff; border: none; cursor: pointer;
}
.champ-actions button:hover { background: var(--marine-clair); }

/* --- Pagination ----------------------------------------------------------- */
.pagination { display: flex; align-items: center; gap: .35rem; margin-top: 1rem; font-size: .9rem; }
.pagination a, .pagination span[aria-current] {
  padding: .22rem .6rem; border: 1px solid var(--trait); text-decoration: none;
}
.pagination span[aria-current] { background: var(--marine); color: #fff; border-color: var(--marine); }
.pagination-total { margin-left: auto; color: var(--encre-douce); border: none; }

/* --- Fiche d'alerte ------------------------------------------------------- */
.bandeau-alerte {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--marine);
  padding: .9rem 1.35rem;
  margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center;
}
.bandeau-titre { margin: 0; font-size: 1.05rem; font-weight: 600; flex: 1; min-width: 12rem; }
.bandeau-etiquettes { margin: 0; display: flex; gap: .75rem; align-items: center; }

.details { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.details dt { color: var(--encre-douce); font-size: .8rem; margin-top: .7rem; }
.details dt:first-child { margin-top: 0; }
.details dd { margin: .1rem 0 0; word-break: break-word; }
.details-dates { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--papier); }

.chronologie { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--trait); }
.chronologie li { display: flex; gap: .75rem; padding: 0 0 1rem .75rem; position: relative; }
.chronologie li::before {
  content: ""; position: absolute; left: -1.33rem; top: .4rem;
  width: .55rem; height: .55rem; background: var(--sarcelle); border-radius: 50%;
}
.chrono-heure { font-size: .85rem; color: var(--encre-douce); flex: none; width: 2.6rem; }
.chrono-corps { min-width: 0; }
.chrono-libelle { display: block; font-weight: 600; font-size: .93rem; }
.chrono-message { display: block; font-size: .9rem; }
.chrono-date { display: block; font-size: .8rem; color: var(--encre-douce); margin-top: .1rem; }

/* --- Connexion ------------------------------------------------------------ */
.page-connexion { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--marine); }
.connexion { background: var(--surface); padding: 2.5rem; width: min(25rem, 92vw); }
.connexion h1 { margin: 0 0 .3rem; font-size: 1.4rem; color: var(--marine); }
.connexion-intro { margin: 0 0 1.75rem; color: var(--encre-douce); font-size: .93rem; }
.connexion .champ { margin-bottom: 1rem; }
.connexion input { width: 100%; }
.connexion button {
  width: 100%; font: inherit; padding: .55rem;
  background: var(--marine); color: #fff; border: none; cursor: pointer;
}
.connexion button:hover { background: var(--marine-clair); }
.connexion-aide { margin: 1.5rem 0 0; font-size: .86rem; color: var(--encre-douce); }
.erreur {
  background: #fdf0f1; border-left: 3px solid var(--critique); color: var(--critique);
  padding: .55rem .8rem; margin: 0 0 1.25rem; font-size: .9rem;
}

/* --- Écrans étroits ------------------------------------------------------- */
@media (max-width: 75rem) {
  .colonnes-graphiques, .colonnes-bas, .colonnes-fiche { grid-template-columns: 1fr; }
}
@media (max-width: 60rem) {
  .cadre { flex-direction: column; }
  .laterale { width: 100%; flex: none; }
  .menu-clients { max-height: 11rem; }
  .barre, .contenu { padding-left: 1.25rem; padding-right: 1.25rem; }
  .graphique { flex-direction: column; align-items: stretch; }
  .anneau { align-self: center; }
  .empilees li { grid-template-columns: 6rem 1fr 2.2rem; }
}


/* --- Menu en haut ---------------------------------------------------------
   Même balisage, disposition différente : la barre latérale devient un bandeau
   horizontal et le contenu occupe toute la largeur. Utile sur un écran large,
   où une colonne de 15 rem à gauche est de la place perdue. */
body.menu-haut .cadre { flex-direction: column; }

body.menu-haut .laterale {
  width: 100%;
  flex: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  padding: .6rem 1.5rem;
}
body.menu-haut .marque { padding: 0; }
body.menu-haut .menu { display: flex; gap: .25rem; }
body.menu-haut .menu > li > a {
  padding: .45rem .9rem;
  border-left: none;
  border-bottom: 3px solid transparent;
  border-radius: 4px 4px 0 0;
}
body.menu-haut .menu > li > a[aria-current="page"] {
  border-left-color: transparent;
  border-bottom-color: var(--sarcelle);
}

/* La liste des clients passe en menu déroulant : vingt entrées en ligne
   seraient illisibles. */
body.menu-haut .menu-titre { display: none; }
body.menu-haut .menu-clients {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  max-height: 2.4rem;
  overflow-y: auto;
  font-size: .86rem;
  flex: 1;
  min-width: 10rem;
}
body.menu-haut .menu-clients > li > a { padding: .25rem .6rem; border-left: none; }
body.menu-haut .chevron, body.menu-haut .sous-entree { display: none; }

body.menu-haut .profil,
body.menu-haut .reglages {
  margin-top: 0;
  border-top: none;
  padding: 0;
}
body.menu-haut .reglages { gap: .5rem; }
body.menu-haut .reglages-titre { display: none; }
body.menu-haut .contenu { max-width: 90rem; margin: 0 auto; width: 100%; }

@media (max-width: 60rem) {
  body.menu-haut .laterale { flex-direction: column; align-items: stretch; }
  body.menu-haut .menu-clients { max-height: 8rem; }
}

/* --- Réglages d'affichage -------------------------------------------------- */
.reglages {
  margin-top: auto;
  padding: 1rem 1rem .75rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .5rem;
}
.reglages-titre {
  width: 100%;
  margin: 0;
  font-size: .78rem;
  color: #8ea4c4;
}
.reglage { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 6.5rem; }
.reglage label { font-size: .78rem; color: #8ea4c4; }
.reglage select {
  font: inherit;
  font-size: .85rem;
  padding: .25rem .35rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #dce9ff;
  border-radius: 4px;
}
.reglages button {
  font: inherit;
  font-size: .82rem;
  padding: .3rem .7rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #cfdaea;
  border-radius: 4px;
  cursor: pointer;
}
.reglages button:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* La barre latérale garde son fond marine dans les deux thèmes : elle sert de
   repère, et son contraste est déjà élevé. */
.profil + .reglages, .reglages + .profil { margin-top: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Messages après un formulaire (contacts) */
.message {
  border: 1px solid currentColor;
  border-left-width: 4px;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 16px;
}
.message p { margin: 0; }
.message-ok { color: #1e6b3a; background: rgba(30, 107, 58, 0.08); }
.message-erreur { color: #a93226; background: rgba(169, 50, 38, 0.08); }
.message-detail { margin-top: 8px !important; }
.message-detail code {
  display: block;
  padding: 8px;
  border-radius: 4px;
  background: rgba(127, 127, 127, 0.12);
  color: inherit;
  word-break: break-all;
  user-select: all;
}
.theme-sombre .message-ok { color: #8fdcaa; }
.theme-sombre .message-erreur { color: #ffaaa0; }
@media (prefers-color-scheme: dark) {
  .theme-auto .message-ok { color: #8fdcaa; }
  .theme-auto .message-erreur { color: #ffaaa0; }
}

/* Page de connexion : information et liens de langue */
.information { padding: 10px 14px; border-radius: 6px; background: rgba(30, 107, 58, 0.1); }
.langues { display: flex; gap: 14px; justify-content: flex-end; margin: 0 0 8px; font-size: 0.9rem; }
.langues [aria-current] { font-weight: 600; }

/* Formulaire d'un contact */
.formulaire-contact .champs-grille,
.seuils .champs-grille {
  display: grid;
  gap: 4px 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.champ-libelle { display: block; font-size: 0.85rem; opacity: 0.75; }
.cases { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0; }
.cases label { display: inline-flex; align-items: center; gap: 8px; }
.seuils { border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 6px; padding: 8px 16px 4px; margin: 0 0 12px; }
.seuils legend { padding: 0 6px; font-weight: 600; }
.verrou { border-left: 3px solid rgba(127, 127, 127, 0.5); padding-left: 10px; }
input[readonly] { opacity: 0.7; cursor: not-allowed; }

/* Liste des contacts */
.liste-seuils { margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }
.etiquette {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.78rem;
  background: rgba(127, 127, 127, 0.16);
}
.etiquette-attente { margin-left: 0; background: rgba(176, 118, 13, 0.18); }
a.bouton {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid currentColor;
  text-decoration: none;
  font-weight: 600;
}
.bouton-danger { border-color: #a93226; color: #a93226; background: transparent; }

/* Thème sombre : les listes déroulantes et les champs natifs suivent le thème
   (sinon les choix d'un <select> s'affichent en blanc sur blanc). */
.theme-clair { color-scheme: light; }
.theme-sombre { color-scheme: dark; }
.theme-sombre select option { background-color: #1d2c42; color: #e7edf7; }
@media (prefers-color-scheme: dark) {
  .theme-auto { color-scheme: dark; }
  .theme-auto select option { background-color: #1d2c42; color: #e7edf7; }
}
/* Les listes du menu latéral (marine dans les deux thèmes) : choix lisibles. */
.reglage select option { background-color: #16305c; color: #ffffff; }

/* Logo officiel (assets/soc-logo.png) */
/* Icône SOCinBlue (socinblue_logo.ico) en tête du menu, carrée. */
.marque .logo-image { display: block; width: 48px; height: 48px; object-fit: contain; }
.connexion h1 { margin: 0 0 8px; }
.logo-connexion { display: block; max-width: 220px; width: 100%; height: auto; margin: 0 auto 1.5rem; }

/* Cartes de chiffres cliquables (vue d'ensemble, fiche client) */
a.carte-lien { display: block; color: inherit; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease; }
a.carte-lien:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
a.carte-lien:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { a.carte-lien, a.carte-lien:hover { transition: none; transform: none; } }

/* Tableau complet des alertes : 12 colonnes, défile horizontalement si besoin */
.alertes-complet { min-width: 1100px; }
.alertes-complet td { vertical-align: top; }
.alertes-complet .colonne-date, .alertes-complet .colonne-heure, .alertes-complet .colonne-ip { white-space: nowrap; }
.alertes-complet .colonne-texte { min-width: 160px; max-width: 260px; }
.vide-cellule { opacity: 0.5; }

/* Un champ suivi de ses boutons, dans un bloc (Mes notifications…) : de l'air
   entre la liste et le bouton. */
.bloc .champ + .champ-actions { margin-top: .75rem; }

/* Filtres placés à l'intérieur d'un bloc (fiche client) : sans second cadre. */
.filtres-bloc { border: none; padding: 0; margin: 0 0 1rem; background: none; }
.champ select { max-width: 16rem; }