:root{
  --bg:#070A12;
  --panel:#0B1222;
  --panel2:#0E1730;
  --border:rgba(140,160,255,.18);
  --text:#EAF0FF;
  --muted:rgba(234,240,255,.68);
  --accent:#7C5CFF;
  --accent2:#00D4FF;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --nav-surface: linear-gradient(135deg, rgba(18, 29, 55, .78), rgba(10, 17, 33, .64));
  --nav-pop-a: #ff4fd8;
  --nav-pop-b: #32f3ff;
  --nav-pop-c: #ffe14d;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  background: radial-gradient(1200px 700px at 20% 10%, rgba(124,92,255,.18), transparent 55%),
              radial-gradient(900px 600px at 80% 30%, rgba(0,212,255,.12), transparent 60%),
              var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

body.home-page{
  min-height: 100vh;
  background:
    radial-gradient(1200px 640px at 18% 6%, rgba(124,92,255,.22), transparent 58%),
    radial-gradient(980px 700px at 82% 20%, rgba(0,212,255,.16), transparent 62%),
    linear-gradient(160deg, #060A14 0%, #090F1D 52%, #0B1324 100%);
}

.bg-grid{
  position: fixed;
  inset: 0;
  pointer-events:none;
  background-image:
    linear-gradient(to right, rgba(140,160,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140,160,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 15%, rgba(0,0,0,.92), rgba(0,0,0,.58) 54%, rgba(0,0,0,0) 92%);
  opacity: .52;
}

/* --- MISE EN PAGE PLEIN ECRAN --- */
.container {
    width: 99%;      /* Occupe presque tout l'écran */
    max-width: none; /* Supprime la limite de largeur */
    margin: 0 auto;
    padding: 10px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:.02em;
}

.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 22px rgba(124,92,255,.55);
}

.subtitle{ color: var(--muted); margin-top: 6px; }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 18px;
}

.nav{ display:flex; gap:10px; flex-wrap:wrap; }

.nav-link{
  position: relative;
  isolation: isolate;
}

.nav-link::after{
  content:"";
  position:absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nav-pop-a), var(--nav-pop-b), var(--nav-pop-c));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
  opacity: .92;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after{
  transform: scaleX(1);
}

.nav-link-active{
  border-color: rgba(50, 243, 255, .62);
  box-shadow: 0 0 0 1px rgba(50,243,255,.22), 0 12px 30px rgba(0,0,0,.35);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: linear-gradient(180deg, rgba(14,23,48,.92), rgba(11,18,34,.92));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: fadeInUp .28s ease both;
}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(124,92,255,.38);
  box-shadow: 0 26px 70px rgba(0,0,0,.52);
}

.glow{
  position:relative;
  overflow:hidden;
}
.glow:before{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(circle at 30% 30%, rgba(124,92,255,.22), transparent 55%),
              radial-gradient(circle at 60% 60%, rgba(0,212,255,.16), transparent 55%);
  transform: rotate(8deg);
  opacity:.9;
  pointer-events:none;
}

h1{ margin: 0 0 10px 0; font-size: 28px; }
h2{ margin: 0 0 8px 0; font-size: 18px; }
p{ margin: 0; color: var(--muted); line-height: 1.5; }

.actions{ margin-top: 14px; display:flex; gap:10px; flex-wrap:wrap; }

/* BOUTONS COMPACTS */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 4px 10px; /* Réduit pour le mode compact */
  border-radius: 12px;
  border: 1px solid rgba(124,92,255,.45);
  background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(0,212,255,.08));
  color: var(--text);
  text-decoration:none;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
  will-change: transform;
  font-size: 11px; /* Police réduite */
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(0,212,255,.55);
  filter: brightness(1.06);
}

.btn:active{
  transform: translateY(0px) scale(.99);
}

.btn-secondary{
  border-color: rgba(0,212,255,.42);
  background: linear-gradient(135deg, rgba(0,212,255,.14), rgba(124,92,255,.08));
}

.btn-ghost{
  border-color: rgba(140,160,255,.20);
  background: rgba(255,255,255,.03);
}

.muted{ color: var(--muted); }

.footer{ margin-top: 18px; }

.pill-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px; }
.pill{
  border: 1px solid rgba(140,160,255,.18);
  background: rgba(255,255,255,.03);
  border-radius: 999px;
  padding: 2px 6px; /* Compact */
  color: var(--muted);
  font-size: 10px; /* Compact */
}


.home-page .topbar{
  background: var(--nav-surface);
  border: 1px solid rgba(140,160,255,.16);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}

.home-page .brand{
  font-size: 1.08rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.home-page .subtitle{
  letter-spacing: .01em;
}

.home-page .card{
  border: 1px solid rgba(140,160,255,.2);
  background:
    linear-gradient(180deg, rgba(14,24,50,.94), rgba(10,16,32,.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 22px 62px rgba(0,0,0,.4);
}

.home-page .card h2{
  letter-spacing: .03em;
}

.signature-badge{
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: rgba(234,240,255,.72);
  background: rgba(7,11,24,.58);
  border: 1px solid rgba(140,160,255,.2);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0,0,0,.24);
}

.easter-egg{
  font-size: 12px;
  opacity: .82;
  transition: transform .2s ease, opacity .2s ease;
}

.signature-badge:hover .easter-egg{
  transform: translateY(-1px) scale(1.08);
  opacity: 1;
}

@media (max-width: 700px){
  .signature-badge{
    right: 8px;
    bottom: 8px;
    font-size: 10px;
    padding: 5px 8px;
  }
}

@keyframes fadeInUp{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}

/* --- TABLEAU COMPACT ET RESPONSIVE --- */

.table-wrap {
    width: 100%;
    overflow-x: auto; /* Scroll uniquement si écran trop petit */
    border-radius: 16px;
    border: 1px solid rgba(140,160,255,.18);
}

table {
    width: 100%;
    table-layout: auto; /* Laisse le navigateur gérer les largeurs */
    border-collapse: collapse;
}

th, td {
    padding: 6px 4px;       /* Padding réduit */
    border-bottom: 1px solid rgba(140,160,255,.12);
    vertical-align: middle; /* Alignement vertical centré c'est plus joli */
    font-size: 12px;        /* Police réduite */
    
    /* IMPORTANT : Gestion des retours à la ligne */
    white-space: normal;    /* Autorise le texte sur plusieurs lignes */
    word-wrap: break-word;  /* Coupe les mots si nécessaire */
}

/* Colonnes spécifiques : largeur max pour forcer le retour à la ligne */
td:nth-child(6){ max-width: 200px; }  /* consequence */
td:nth-child(8){ max-width: 220px; }  /* actionnabilité */
td:nth-child(9){ max-width: 220px; }  /* commentaire */

/* Styles pour les inputs dans le tableau */
td input, td select, td textarea {
    background: rgba(255,255,255,.04);
    color: var(--text);
    border: 1px solid rgba(140,160,255,.18);
    width: 100%;
    min-width: unset !important; /* Force la largeur à suivre la cellule */
    max-width: 100%;
    font-size: 12px;
    padding: 4px;
    height: auto;
    outline: none;
    border-radius: 6px;
}

select option{
  background: #0B1222;
  color: var(--text);
}

.mono {
    font-family: 'Consolas', monospace;
    font-size: 11px;
    letter-spacing: -0.5px;
}
.input {
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid rgba(140,160,255,.18);
  width: 100%;
  font-size: 12px;
  padding: 8px;
  border-radius: 8px;
}

/* --- AJOUTS POUR LA GESTION VARIANTS --- */

/* Code couleur des lignes du tableau selon statut */
tr.row-validated td { background: rgba(58, 197, 114, 0.08) !important; border-bottom: 1px solid rgba(58, 197, 114, 0.3); }
tr.row-validated td:first-child { border-left: 4px solid #3ac572; }

tr.row-invalidated td { background: rgba(255, 95, 109, 0.08) !important; border-bottom: 1px solid rgba(255, 95, 109, 0.3); }
tr.row-invalidated td:first-child { border-left: 4px solid #ff5f6d; }

tr.row-tovalidate td { background: rgba(255, 190, 80, 0.05) !important; }
tr.row-tovalidate td:first-child { border-left: 4px solid #ffbe50; }

tr.row-triage td:first-child { border-left: 4px solid rgba(140,160,255,0.3); }

/* Badges Tier AMP */
.tier-badge {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    display: inline-block;
}
.tier-ia{ background: rgba(229,57,53,.2); color:#ffb4b1; border:1px solid rgba(229,57,53,.45); }
.tier-ib{ background: rgba(239,83,80,.2); color:#ffc4c2; border:1px solid rgba(239,83,80,.45); }
.tier-iic{ background: rgba(142,68,173,.22); color:#e9c9ff; border:1px solid rgba(142,68,173,.45); }
.tier-iid{ background: rgba(165,105,189,.24); color:#efd7ff; border:1px solid rgba(165,105,189,.45); }
.tier-iii{ background: rgba(31,120,180,.2); color:#bde9ff; border:1px solid rgba(31,120,180,.45); }
.tier-unknown{ background: rgba(140,160,255,.1); color:#a9b7ff; border:1px solid rgba(140,160,255,.35); }

/* Badges Classe AMP (alignées avec NGS + synoptique PDF) */
.class-badge {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
}
.class-i{ background: rgba(229,57,53,.2); color:#ffb4b1; border-color: rgba(229,57,53,.45); }
.class-ii{ background: rgba(142,68,173,.22); color:#e9c9ff; border-color: rgba(142,68,173,.45); }
.class-iii{ background: rgba(31,120,180,.2); color:#bde9ff; border-color: rgba(31,120,180,.45); }
.class-unknown{ background: rgba(140,160,255,.1); color:#a9b7ff; border-color: rgba(140,160,255,.35); }

/* Cellules composées (Grouping) */
.cell-group { display: flex; flex-direction: column; gap: 4px; }
.cell-main { font-weight: bold; font-size: 13px; color: var(--text); }
.cell-sub { font-size: 11px; color: var(--muted); font-family: 'Consolas', monospace; }

.metric-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    font-size: 11px;
}
.metric-label { color: var(--muted); text-transform: uppercase; font-size: 9px; }
.metric-value { font-family: 'Consolas', monospace; text-align: right; }

/* Filtres rapides (Javascript) */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.03);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.filter-btn {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
}
.filter-btn.active { opacity: 1; font-weight: bold; text-decoration: underline; color: var(--accent2); }

/* Ajustement inputs dans tableau */
.dense-input { padding: 6px !important; font-size: 12px !important; background: rgba(0,0,0,0.2) !important; }


/* --- NOUVEAUTÉS DESIGN (V2) --- */

/* 1. Nouveau Header de Cas (Hero Section) */
.case-hero {
    background: linear-gradient(90deg, rgba(11,18,34,0.95) 0%, rgba(14,23,48,0.8) 100%);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}
.case-hero::before {
    content: ""; position: absolute; top: 0; left: 0; width: 6px; height: 100%;
    background: var(--accent);
}
.hero-title { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.hero-meta { display: flex; gap: 20px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.hero-badge { 
    background: rgba(124,92,255,0.2); border: 1px solid rgba(124,92,255,0.4); 
    color: #bfaaff; padding: 4px 12px; border-radius: 99px; font-weight: 600; text-transform: uppercase; font-size: 11px;
}

/* 2. Colonne Identité (Gene Pill & Altération) */
.gene-pill {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #5e42d6);
    color: white;
    font-weight: 800;
    font-size: 15px;
    padding: 6px 14px;
    border-radius: 99px;
    box-shadow: 0 4px 12px rgba(124,92,255,0.4);
    margin-bottom: 6px;
}
.alteration-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}
/* Couleurs dynamiques simulées (sera appliqué via JS ou logique backend idéalement, ici CSS générique) */
.alt-missense { color: #ffbe50; border-color: rgba(255,190,80,0.3); background: rgba(255,190,80,0.1); }
.alt-frameshift, .alt-stop { color: #ff5f6d; border-color: rgba(255,95,109,0.3); background: rgba(255,95,109,0.1); }
.alt-other { color: #00d4ff; border-color: rgba(0,212,255,0.3); background: rgba(0,212,255,0.1); }

/* 3. Colonne Métriques (Boîtes séparées) */
.metrics-container { display: flex; flex-direction: column; gap: 6px; }
.metric-box {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(140,160,255,0.1);
    border-radius: 6px;
    padding: 4px 8px;
}
.m-label { font-size: 9px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.m-value { font-family: 'Consolas', monospace; font-weight: bold; font-size: 12px; }
.val-high { color: #ff5f6d; } /* VAF critique par ex */

/* 4. Visualisation Workflow (Stepper) */
.stepper { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; opacity: 0.8; }
.step { height: 4px; flex: 1; background: rgba(255,255,255,0.1); border-radius: 2px; }
.step.active { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
.step.done { background: var(--accent2); }
.step-label { font-size: 9px; color: var(--muted); margin-top: 4px; text-align: center; }

/* 5. Bouton Save Flottant (plus clair) */
.btn-save-row {
    width: 36px; height: 36px; border-radius: 50%; 
    border: none; background: var(--accent); color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer; transition: 0.2s;
}
.btn-save-row:hover { transform: scale(1.1); background: #6b4ce6; }


/* --- AJOUTS V2 --- */

/* Style des badges d'altération (Missense, etc.) */
.alteration-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.alt-missense { background: rgba(255, 190, 80, 0.2); color: #ffbe50; border: 1px solid rgba(255, 190, 80, 0.4); }
.alt-frameshift, .alt-stop { background: rgba(255, 95, 109, 0.2); color: #ff9a9e; border: 1px solid rgba(255, 95, 109, 0.4); }
.alt-other { background: rgba(140, 160, 255, 0.1); color: #8ca0ff; border: 1px solid rgba(140, 160, 255, 0.3); }

/* Petites infos sous le gène */
.tiny-pos { font-family: 'Consolas', monospace; font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Ajustement Stepper */
.stepper { display: flex; gap: 4px; height: 4px; margin-top: 4px; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,0.1); }
.step { flex: 1; background: transparent; }
.step.done { background: #3ac572; } /* Vert si fait */
.step.active { background: #ffbe50; } /* Jaune si en cours */

/* --- AMÉLIORATIONS VISUELLES V3 --- */

/* 1. Nouveau statut "Gris" (À interpréter) */
tr.row-todo td {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
tr.row-todo td:first-child { border-left: 4px solid #6b7280; } /* Gris neutre */

/* Ajustements existants pour cohérence */
tr.row-tovalidate td:first-child { border-left: 4px solid #ffbe50; }
tr.row-validated td:first-child { border-left: 4px solid #3ac572; }
tr.row-invalidated td:first-child { border-left: 4px solid #ff5f6d; }


/* 2. Liste des lecteurs (Double lecture) */
.reviewer-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.reviewer-item {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    display: flex; justify-content: space-between;
    border-left: 2px solid transparent;
}
.reviewer-item.rev-validated { border-left-color: #3ac572; color: #a3e6be; }
.reviewer-item.rev-invalidated { border-left-color: #ff5f6d; color: #ffb3ba; }

/* Zone "Ma lecture" */
.my-review-box {
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(140, 160, 255, 0.05);
    border: 1px dashed rgba(140, 160, 255, 0.2);
    border-radius: 6px;
}
.btn-choice {
    flex: 1; font-size: 10px; padding: 4px;
    border: 1px solid; background: transparent; cursor: pointer;
    border-radius: 4px; transition: 0.2s;
}
.btn-choice:hover { opacity: 0.8; transform: translateY(-1px); }

/* Réduire la colonne Actionnabilité */
textarea.action-input {
    min-height: 40px !important; /* Plus petit par défaut */
    font-size: 10px !important;
}

.review-title { font-size: 10px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.review-form textarea { min-height: 38px; }
.review-badge { border-radius: 999px; padding: 1px 6px; font-size: 10px; font-weight: 700; }
.review-badge-valid { background: rgba(58,197,114,0.2); color: #3ac572; border: 1px solid rgba(58,197,114,0.35); }
.review-badge-invalid { background: rgba(255,95,109,0.15); color: #ff9a9e; border: 1px solid rgba(255,95,109,0.35); }
.review-badge-pending { background: rgba(140,160,255,0.12); color: #8ca0ff; border: 1px solid rgba(140,160,255,0.35); }
.step-label-left { text-align: left; font-size: 10px; }

@media (max-width: 1600px) {
  .ngs-table th, .ngs-table td { font-size: 11px; padding: 5px 4px; }
  .ngs-table .dense-input { font-size: 11px !important; padding: 5px !important; }
  .ngs-table .action-input { min-height: 44px !important; }
}


/* Séparation visuelle subtile entre variants + alternance légère */
.variant-row td { border-bottom: 1px solid rgba(140,160,255,.16); }
.variant-row.row-alt-odd td { background: rgba(255,255,255,0.012); }
.variant-row.row-alt-even td { background: rgba(0,212,255,0.018); }

/* --- Variant knowledge UI tokens (scalable) --- */
.row-wrap{ flex-wrap: wrap; }
.u-nowrap{ white-space: nowrap; }
.u-mt-8{ margin-top: 8px; }
.u-mt-10{ margin-top: 10px; }
.u-mt-12{ margin-top: 12px; }
.u-mt-14{ margin-top: 14px; }

.context-list{ display:flex; flex-direction:column; gap:8px; }
.context-list-wide{ min-width: 520px; }
.context-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.pill-cancer{
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.35);
  color: #8ee8ff;
}
.pill-source{
  background: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.38);
  color: #c9bcff;
}

.status-badge{
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
}
.status-actionable{
  background: rgba(58, 197, 114, 0.18);
  color: #8ce4ad;
  border-color: rgba(58, 197, 114, 0.44);
}
.status-neutral{
  background: rgba(140,160,255,.1);
  color: #a9b7ff;
  border-color: rgba(140,160,255,.35);
}

.gene-card-compact{ display:flex; flex-direction:column; gap:4px; }
.comment-card{ border:1px solid rgba(140,160,255,.18); border-radius:12px; padding:10px; }

.synoptic-hero{
  border-color: rgba(0,212,255,.32);
}
.synoptic-grid{
  display:grid;
  gap:10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.synoptic-block{
  border:1px solid rgba(140,160,255,.25);
  border-radius:12px;
  padding:10px;
  background: rgba(8,14,30,.55);
  transition: border-color .15s ease, transform .15s ease;
}
.synoptic-block:hover{ border-color: rgba(0,212,255,.45); transform: translateY(-1px); }
.synoptic-label{ font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.synoptic-value{ font-size:16px; font-weight:700; margin-top:4px; }
.interactive-row{ transition: background-color .16s ease, transform .16s ease; }
.interactive-row:hover{ background-color: rgba(124,92,255,.08); transform: translateX(1px); }

.quick-nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  position: sticky;
  top: 8px;
  z-index: 8;
  margin: 0 0 12px 0;
  padding: 8px;
  border: 1px solid rgba(140,160,255,.18);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(14,22,44,.86), rgba(10,18,35,.78));
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(6px);
}

.quick-nav .btn{ font-size: 10px; padding: 3px 9px; }

.pop-card-enter{
  animation: popCardEnter .34s cubic-bezier(.2,.9,.26,1) both;
}

.pop-card-enter:nth-child(2){ animation-delay: .05s; }
.pop-card-enter:nth-child(3){ animation-delay: .1s; }
.pop-card-enter:nth-child(4){ animation-delay: .15s; }

@keyframes popCardEnter{
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.context-row-grid{
  display:grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(90px, auto) minmax(138px, auto) minmax(64px, auto) 1fr auto;
  gap:8px;
  align-items:center;
  border:1px solid rgba(140,160,255,.16);
  border-radius:12px;
  padding:8px 10px;
  background: rgba(7,12,26,.48);
}

.context-actions-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

.synoptic-value-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:4px;
}

/* Vue transversale en tableau (alignement fort) */
.transverse-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(140,160,255,.18);
  border-radius: 12px;
  overflow: hidden;
  min-width: 980px;
}
.transverse-table th,
.transverse-table td{
  padding: 9px 10px;
  border-bottom: 1px solid rgba(140,160,255,.12);
  vertical-align: middle;
}
.transverse-table th{
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 11px;
  color: rgba(234,240,255,.72);
  background: rgba(255,255,255,.03);
  white-space: nowrap;
}
.transverse-table tbody tr:last-child td{ border-bottom: 0; }
.transverse-table tbody tr:hover{ background: rgba(124,92,255,.08); }
.context-item-count{ white-space: nowrap; }

@media (max-width: 1200px){
  .context-row-grid{ grid-template-columns: minmax(120px, 1fr) minmax(90px, auto) minmax(138px, auto) minmax(64px, auto) 1fr; }
  .context-row-grid .btn{ grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 1050px){
  .synoptic-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .synoptic-grid{ grid-template-columns: 1fr; }
  .context-row-grid{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  .card,
  .btn,
  .synoptic-block,
  .interactive-row{
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .quick-nav{
    position: static;
  }
}
