/* Vigie-Cyber : specifique du projet uniquement. Tout le reste vient du socle.
   Aucune couleur en dur : toujours var(--...). */

body { flex-direction: row; }

main {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.vc-centre {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: var(--gap-lg, 24px);
}

.vc-soustitre {
  color: var(--text-muted);
  margin: calc(var(--gap-sm, 8px) * -1) 0 var(--gap-md, 16px);
  font-size: 13px;
}

/* --- Choix du profil dans la sidebar --- */
.vc-profil-choix {
  padding: 0 var(--gap-md, 16px) var(--gap-sm, 8px);
}
.vc-profil-choix label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.vc-profil-choix .vc-select {
  width: 100%;
  color-scheme: dark;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 8px;
  font-family: var(--font);
  font-size: 13px;
}

/* --- Tuiles de la vue d'ensemble : carrees --- */
.vc-tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap-md, 16px);
  margin-bottom: var(--gap-lg, 24px);
}
.vc-tuile {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--glass-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  text-align: center;
  padding: var(--gap-md, 16px);
}
.vc-tuile-nombre { font-size: 44px; font-weight: 600; color: var(--accent); line-height: 1; }
.vc-tuile-titre { font-size: 13px; color: var(--text); }
.vc-tuile-note { font-size: 11px; color: var(--text-muted); }
.vc-tuile.alerte .vc-tuile-nombre { color: var(--error); }

/* --- Ce qui presse : des vignettes carrees, impossibles a rater ---
   Reservees aux avis critiques. Ils sont peu nombreux (une dizaine), donc ils tiennent
   sur un ecran sans defilement, et c'est justement ce qu'on veut voir en premier. */
.vc-urgences {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap-md, 16px);
  margin-bottom: var(--gap-lg, 24px);
}

.vc-vignette {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  padding: var(--gap-md, 16px);
  background: var(--glass-surface);
  border: 1px solid var(--error);
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.vc-vignette:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.vc-vignette-haut {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
/* Le titre occupe le milieu de la vignette et y est centre : sans cela il flottait en haut
   et laissait un grand vide au centre du carre. */
.vc-vignette-milieu {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
}

/* Le titre a la place qu'il faut : il ne partage plus la vignette avec un pave de texte,
   le detail vit dans la colonne de droite. Il reste coupe proprement au-dela de 6 lignes. */
.vc-vignette-titre {
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}
.vc-vignette-bas {
  margin-top: auto;
  padding-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vc-vignette-produit {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.vc-titre-groupe {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  margin: 0 0 var(--gap-sm, 8px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.vc-titre-groupe .puce { width: 8px; height: 8px; border-radius: 50%; }
.vc-titre-groupe .puce.rouge { background: var(--error); }
.vc-titre-groupe .puce.or { background: var(--accent); }

/* --- Liste d'avis --- */
.vc-liste { display: flex; flex-direction: column; gap: var(--gap-sm, 8px); }

/* Liste DENSE : une ligne par avis, sans pave de texte. Le detail s'ouvre a droite au clic.
   Trois fois plus d'avis a l'ecran, donc on parcourt au lieu de lire. */
.vc-liste.dense { gap: 2px; }
.vc-liste.dense .vc-avis {
  padding: 9px var(--gap-md, 16px);
  align-items: center;
  border-radius: var(--radius-sm, 6px);
}
.vc-liste.dense .vc-avis-titre {
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-liste.dense .vc-avis-corps {
  display: flex;
  align-items: center;
  gap: var(--gap-md, 16px);
}
.vc-liste.dense .vc-avis-titre { flex: 1; min-width: 0; }
.vc-liste.dense .vc-avis-meta { flex: none; }
.vc-liste.dense .vc-avis-resume { display: none; }

.vc-avis {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-md, 16px);
  padding: var(--gap-md, 16px);
  background: var(--glass-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.vc-avis:hover { border-color: var(--accent); background: var(--bg-card); }
.vc-avis.prio-critique { border-left-color: var(--error); }
.vc-avis.prio-elevee   { border-left-color: var(--warning); }
.vc-avis.prio-normale  { border-left-color: var(--accent); }
.vc-avis.prio-info     { border-left-color: var(--text-muted); }

.vc-avis-corps { flex: 1; min-width: 0; }
.vc-avis-titre {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}
.vc-avis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}
.vc-avis-resume {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}
.vc-avis-action {
  font-size: 12px;
  color: var(--text);
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(var(--accent-rgb), .09);
  border-left: 2px solid var(--accent);
}

.vc-etiq {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.vc-etiq.critique { color: var(--error); border-color: var(--error); }
.vc-etiq.elevee   { color: var(--warning); border-color: var(--warning); }
.vc-etiq.kev      { color: var(--error); border-color: var(--error); font-weight: 600; }
.vc-etiq.famille  { color: var(--accent); border-color: rgba(var(--accent-rgb), .5); }
.vc-etiq.attente  { color: var(--warning); border-color: var(--warning); }
.vc-etiq.valide   { color: var(--success); border-color: var(--success); }

/* --- Colonne de detail, TOUJOURS visible ---
   Elle remplace le retournement de carte : l'information s'affiche a cote au lieu de se
   cacher derriere. Survol = apercu, clic = epingle. La liste reste lisible pendant ce temps. */
.vc-detail {
  width: 420px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vc-detail-head {
  display: flex;
  align-items: center;
  gap: var(--gap-sm, 8px);
  padding: var(--gap-md, 16px);
  border-bottom: 1px solid var(--border);
}
.vc-detail-head strong { flex: 1; font-size: 13px; }
.vc-detail-head .btn-close-panel { display: none; }
.vc-detail.epingle .btn-close-panel { display: block; }

/* Etat au repos : la colonne dit quoi faire plutot que de rester vide. */
.vc-detail-repos {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.vc-detail-repos .icone {
  font-family: var(--font-icon);
  font-size: 34px;
  opacity: .35;
}

/* Element survole ou epingle : on voit tout de suite d'ou vient le detail affiche. */
.vc-avis.actif, .vc-vignette.actif { border-color: var(--accent); }
.vc-avis.epingle, .vc-vignette.epingle {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.vc-detail-corps { overflow-y: auto; padding: var(--gap-md, 16px); }
.vc-detail-bloc { margin-bottom: var(--gap-md, 16px); }
.vc-detail-bloc h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.vc-detail-bloc p, .vc-detail-bloc div { font-size: 13px; color: var(--text); line-height: 1.5; }
.vc-detail-bloc a { color: var(--accent); word-break: break-all; }

/* --- File de validation --- */
.vc-valider-actions { display: flex; gap: var(--gap-sm, 8px); margin-top: var(--gap-sm, 8px); }
.vc-btn-valider, .vc-btn-rejeter {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
}
.vc-btn-valider:hover { border-color: var(--success); color: var(--success); }
.vc-btn-rejeter:hover { border-color: var(--error); color: var(--error); }

/* --- Sources : la transparence rend la clause credible --- */
.vc-source {
  display: flex;
  align-items: center;
  gap: var(--gap-md, 16px);
  padding: var(--gap-sm, 8px) var(--gap-md, 16px);
  border-bottom: 1px solid var(--border);
}
.vc-source:last-child { border-bottom: none; }
.vc-source-nom { flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.vc-source-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.vc-pastille { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); }
.vc-pastille.ok { background: var(--success); }
.vc-pastille.erreur { background: var(--error); }
.vc-pastille.inactif { background: var(--text-muted); opacity: .4; }

.vc-avertissement {
  padding: var(--gap-md, 16px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-md, 10px);
  background: var(--glass-surface);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: var(--gap-lg, 24px);
}

/* --- Filtres --- */
.vc-filtres {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm, 8px);
  margin-bottom: var(--gap-md, 16px);
  align-items: center;
}
.vc-filtres .vc-recherche { width: 340px; }
.vc-filtres .vc-filtre-select { width: 190px; }
.vc-filtres input[type=text].vc-recherche,
.vc-filtres select.vc-filtre-select {
  color-scheme: dark;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  padding: 7px 10px;
  font-family: var(--font);
  font-size: 13px;
}

/* --- Ecran de veille : lisible de loin, sur televiseur --- */
body.mural .sidebar, body.mural .vc-detail { display: none; }
body.mural .vc-centre { padding: 32px 48px; }
body.mural .vc-avis-titre { font-size: 22px; }
body.mural .vc-avis-meta { font-size: 15px; }
body.mural .vc-tuile-nombre { font-size: 72px; }
body.mural .vc-tuile-titre { font-size: 17px; }
body.mural h1 { font-size: 34px; }
.vc-mural-sortie {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
}

.vc-vide {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.vc-vide .vc-vide-icone {
  font-family: var(--font-icon);
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: .5;
}

@media (max-width: 1100px) {
  .vc-detail { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 92vw); z-index: 40; }
}
