/* public/assets/css/style.css */
:root{
  --bg:#0e0f12;
  --card:#ffffff;
  --muted:#a5a7ac;
  --accent:#8b5cf6;   /* violet doux */
  --accent2:#22c55e;  /* vert */
  --accent3:#f97316;  /* orange */
  --text:#e5e7eb;
}

*{box-sizing:border-box}
:focus{outline:2px solid var(--accent);outline-offset:2px}

body.dark{
  margin:0;background:var(--bg);color:var(--text);
  font-family:system-ui,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

/* Layout */
.container{max-width:1100px;margin:40px auto;padding:0 16px}
.header{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #222}
.header .logo{font-weight:700}
.header .logo .accent{color:var(--accent)}
.header nav a{margin:0 10px;color:#c7c8cc}
.header nav a.active{color:#fff;text-decoration:underline}

/* Grid cartes */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:16px
}
/* Par défaut, chaque carte occupe 3 colonnes (4 par ligne) */
.card{grid-column:span 3}
.card.wide{grid-column:span 12}

.card{
  position:relative;          /* évite les chevauchements visuels */
  isolation:isolate;          /* nouveau contexte d’empilement */
  background:var(--card);color:#111;padding:16px;
  border-radius:14px;box-shadow:0 5px 25px rgba(0,0,0,.25);
  overflow:hidden;            /* coupe l’ombre interne et les débordements */
}
.card h2{margin:.2em 0 .6em 0}
.card .big{font-size:2.4rem;font-weight:700;color:#111}

/* Listes génériques */
.list .row{display:flex;justify-content:space-between;padding:10px;border-bottom:1px dashed #eee;color:#111}
.list .row:hover{background:#fafafa}
.meta span{margin-right:12px;color:#444}
.sm{color:#333;font-size:.9rem}
.error{background:#fee2e2;color:#991b1b;padding:8px;border-radius:8px;margin-bottom:10px}

/* Formulaires */
form label{display:block;margin-bottom:10px;font-size:.95rem;color:#333}
form input, form textarea, form select{
  width:100%;padding:10px;border:1px solid #ddd;border-radius:10px;background:#fff;color:#111
}
button{background:#111;color:#fff;border:none;border-radius:12px;padding:10px 14px;cursor:pointer}
button:hover{opacity:.92}

.footer{color:#a0a0a0;font-size:.9rem;padding:30px 16px;text-align:center}

/* Responsive */
@media (max-width:1100px){
  .container{max-width:940px}
}
@media (max-width:900px){
  .grid{grid-template-columns:1fr}
  .card,.card.wide{grid-column:span 1}
}

/* ——— Dashboard (sans graph) ——— */
.kcard h2{margin:.2rem 0 .6rem 0}
.khead{display:flex;justify-content:space-between;align-items:center}
.muted{color:#666}
.muted.small{font-size:.9rem;margin-top:6px}
.bigline{margin:.2rem 0 .8rem 0}

.kactions{display:flex;gap:8px;margin-top:.6rem;flex-wrap:wrap}
.btn-ghost{
  display:inline-block;border:1px solid #e5e7eb;border-radius:10px;
  padding:8px 12px;color:#111;background:#fff
}
.btn-ghost:hover{background:#f7f7f7}
.btn-primary{
  display:inline-block;border:0;border-radius:10px;padding:8px 12px;
  background:var(--accent);color:#fff
}

/* Badges / chips */
.chip{font-size:.85rem;border-radius:999px;padding:2px 10px;border:1px solid #eee}
.chip-ok{background:var(--accent2);color:#fff;border:none}
.chip-warn{background:#fde68a;color:#8a6b00;border:none}
.chip-info{background:#eef2ff;color:#4f46e5;border:0}

/* KPI list */
.kpis{list-style:none;margin:0;padding:0}
.kpis li{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 0;border-bottom:1px dashed #eee
}
.kpis li:last-child{border-bottom:0}

/* Progress bars */
.progress{width:100%;height:10px;border-radius:999px;background:#eee;overflow:hidden;margin:.4rem 0}
.progress .bar{height:100%;background:var(--accent)}
.progress .bar--accent{ background: var(--accent); }      /* violet (bouton) */
.progress .bar--warn{ background: #fde68a; }              /* jaune (chip-warn) */

/* Semaine chips (si utilisé) */
.wkline{display:flex;gap:8px;margin-top:6px}
.wkchip{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:8px;border:1px solid #e5e7eb;font-weight:700
}
.wkchip.ok{background:#ecfeff;border-color:#06b6d4;color:#0e7490}
.wkchip.ko{background:#fef2f2;border-color:#ef4444;color:#991b1b}

/* Last watch */
.lastwatch{
  display:flex;justify-content:space-between;align-items:center;
  padding:12px;border:1px solid #eee;border-radius:12px;background:#fafafa
}
.lw-title{font-size:1.05rem;font-weight:700;color:#111}
.lw-sub{margin-top:6px;display:flex;gap:8px;flex-wrap:wrap;color:#555}
.tag{background:#eef2ff;color:#4f46e5;border-radius:8px;padding:2px 8px;font-size:.85rem}

/* Répartition types (jauges) */
.meter-list{list-style:none;margin:0;padding:0}
.meter-list li{
  display:grid;grid-template-columns:1fr 1fr auto;
  gap:10px;align-items:center;padding:6px 0
}
.meter{height:8px;background:#eee;border-radius:8px;overflow:hidden}
.meter>div{height:100%;background:var(--accent2)}

/* Top domaines */
.toplist{list-style:decimal;margin:.2rem 0 0 1.2rem;padding:0}
.toplist li{display:flex;justify-content:space-between;align-items:center;padding:6px 0}


/* ====== Watch list & detail ====== */
.subheader{display:flex;justify-content:space-between;align-items:end;margin:0 0 12px 0}
.subheader h1{margin:0}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.search{display:flex;gap:8px}
.search input{padding:8px 10px;border:1px solid #2a2a2a;border-radius:10px;background:#0f1115;color:#e5e7eb}

.pill{
  display:inline-block;border-radius:999px;padding:4px 10px;
  background:#f3f4f6;color:#111;border:1px solid #e5e7eb;font-size:.85rem
}
.pill--muted{background:#eef2f7;color:#334155}
.pill--violet{background:#eef2ff;color:#4f46e5;border-color:#e5e7ff}
.pill--green{background:#ecfdf5;color:#065f46;border-color:#d1fae5}
.pill--orange{background:#fff7ed;color:#9a3412;border-color:#fed7aa}

/* Grille d’historiques */
.watch-grid .watch-card{transition:transform .15s ease, box-shadow .15s ease}
.watch-card:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(0,0,0,.25)}
.watch-card .watch-card__top{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.watch-card .watch-card__title{margin:.2rem 0 .2rem 0;color:#111}
.watch-card__cta{margin-top:6px}

/* ===== Veille - Show (vw-*) ===== */
.vw-muted{color:#666}
.vw-small{color:#444;font-size:.95rem}

/* HERO */
.vw-hero{padding:20px 18px}
.vw-hero__head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap}
.vw-title{margin:.2rem 0;color:#111}
.vw-chips{display:flex;gap:8px;flex-wrap:wrap}
.vw-chip{
  display:inline-block;border-radius:999px;padding:4px 10px;
  background:#f3f4f6;color:#111;border:1px solid #e5e7eb;font-size:.85rem
}
.vw-chip--muted{background:#eef2f7;color:#334155}
.vw-chip--violet{background:#eef2ff;color:#4f46e5;border-color:#e5e7ff}
.vw-chip--green{background:#ecfdf5;color:#065f46;border-color:#d1fae5}
.vw-chip--orange{background:#fff7ed;color:#9a3412;border-color:#fed7aa}

/* GRID dédiée au show (indépendante) */
.vw-grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:16px;
  margin:16px 0 24px 0;   /* >>> espace sous la grille pour ne pas coller la section suivante */
}
.vw-col-8{grid-column:span 8;align-self:start}
.vw-col-4{grid-column:span 4;align-self:start}
@media (max-width:900px){
  .vw-grid{grid-template-columns:1fr;margin:12px 0 20px 0}
  .vw-col-8,.vw-col-4{grid-column:span 1}
}

/* Sections */
.vw-section + .vw-section{margin-top:14px}
.vw-h2{margin:.2rem 0 .6rem 0;color:#111}

/* Bullets */
.vw-bullets{margin:.2rem 0 0 1.1rem;padding:0}
.vw-bullets li{margin:6px 0;color:#111}

/* Box info (signaux faibles) */
.vw-box{
  display:flex;gap:12px;align-items:flex-start;
  border:1px solid #eee;background:#fafafa;border-radius:12px;padding:12px
}
.vw-box__num{
  min-width:42px;height:42px;border-radius:10px;
  background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:700
}
.vw-box__text{color:#222}

/* KPIs latéraux */
.vw-kpis{list-style:none;margin:0;padding:0}
.vw-kpis li{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 0;border-bottom:1px dashed #eee
}
.vw-kpis li:last-child{border-bottom:0}
.vw-actions{margin-top:12px}

/* Sources */
.vw-sources__head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.vw-sources{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px
}
@media (max-width:1100px){ .vw-sources{grid-template-columns:1fr} }

.vw-source{
  border:1px solid #eee;background:#fff;border-radius:12px;padding:14px;color:#111
}
.vw-source__header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.vw-source__title{font-weight:700;color:#111}
.vw-source__title:hover{text-decoration:underline}
.vw-source__tags{display:flex;gap:8px;flex-wrap:wrap}

/* Ratings en barre (0–5) */
.vw-ratings{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:8px 0
}
@media (max-width:900px){ .vw-ratings{grid-template-columns:1fr 1fr} }
.vw-rate{
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;
  font-size:.95rem;color:#222
}
.vw-rate span{color:#555}
.vw-rate em{font-style:normal;color:#555}
.vw-rate i{
  --v:3;
  position:relative;height:8px;border-radius:999px;background:#eee;display:block;overflow:hidden
}
.vw-rate i::after{
  content:"";display:block;height:100%;
  width:calc(var(--v) * 20%);
  background:linear-gradient(90deg,var(--accent) 0%, var(--accent2) 100%);
}

/* Bouton fantôme */
.btn-ghost{
  display:inline-block;border:1px solid #e5e7eb;border-radius:10px;
  padding:8px 12px;color:#111;background:#fff
}
.btn-ghost:hover{background:#f7f7f7}
