/* Dashboard Nouvelles — styles.css (v2) */
:root{
  --bg:#0b0e12;
  --panel:#111621;
  --panel2:#0f1420;
  --text:#e8edf6;
  --muted:#aeb7c8;
  --line:rgba(255,255,255,.12);
  --chip:#1b2436;
  --btn:#1a2436;
  --btn2:#24324a;
  --accent:#6aa9ff;
  --shadow: 0 10px 35px rgba(0,0,0,.35);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* Light mode overrides */
html[data-theme="light"]{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --panel2:#fbfcff;
  --text:#121826;
  --muted:#44536b;
  --line:rgba(0,0,0,.12);
  --chip:#eef3ff;
  --btn:#eef3ff;
  --btn2:#e4ecff;
  --accent:#1e68ff;
  --shadow: 0 10px 35px rgba(10,25,65,.10);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 500px at 20% -10%, rgba(106,169,255,.25), transparent 60%),
              radial-gradient(900px 500px at 80% -20%, rgba(255,255,255,.08), transparent 60%),
              var(--bg);
  color:var(--text);
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.srOnly{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  display:flex;
  gap: 18px;
  justify-content: space-between;
  align-items: stretch;
  padding: 16px 18px;
  background: rgba(10, 12, 18, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .topbar{
  background: rgba(255,255,255,.75);
}

.brand{
  display:flex;
  gap: 12px;
  align-items: center;
  min-width: 280px;
}
.logo{
  width: 44px;
  height: 44px;
  display:grid;
  place-items:center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(106,169,255,.22), rgba(106,169,255,.08));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 20px;
}
h1{
  margin:0;
  font-size: 18px;
  letter-spacing: .2px;
}
.subtitle{
  margin: 2px 0 0 0;
  color: var(--muted);
  font-size: 12.8px;
}

.controls{
  display:flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  max-width: 560px;
}
.row{
  display:flex;
  gap: 10px;
  align-items:center;
  width:100%;
  justify-content: flex-end;
}
.row.small{ gap: 14px; }
.row.end{ justify-content:flex-end; }
.meta{ color: var(--muted); font-size: 12.5px; }

.btn{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--btn);
  color: var(--text);
  cursor:pointer;
  font-weight: 600;
}
.btn:hover{ background: var(--btn2); }
.btn.primary{
  border-color: rgba(106,169,255,.35);
  background: linear-gradient(135deg, rgba(106,169,255,.25), rgba(106,169,255,.10));
}
.btn.primary:hover{
  background: linear-gradient(135deg, rgba(106,169,255,.32), rgba(106,169,255,.14));
}

.toggle{
  display:flex;
  gap: 8px;
  align-items:center;
  color: var(--muted);
  user-select:none;
  font-size: 12.8px;
}
.toggle input{
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

#search{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}
#search::placeholder{ color: rgba(174,183,200,.7); }

.container{
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px;
}

/* Ticker (fil déroulant) */
.tickerWrap{
  margin: 12px 0 14px;
  display:flex;
  gap: 10px;
  align-items:center;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.tickerLabel{
  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: .8px;
  font-size: 12px;
  color: var(--text);
  border-right: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(106,169,255,.25), rgba(106,169,255,.08));
  white-space: nowrap;
}
.ticker{
  position: relative;
  overflow:hidden;
  width:100%;
  padding: 10px 0;
}
.tickerInner{
  display:inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: marquee 42s linear infinite;
  color: var(--muted);
  font-size: 13px;
}
.ticker:hover .tickerInner{ animation-play-state: paused; }
@keyframes marquee{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-100%); }
}

/* Layout with side nav */
.layout{
  display:flex;
  gap: 14px;
  align-items: flex-start;
}
.sidenav{
  position: sticky;
  top: 90px;
  align-self: flex-start;
  width: 250px;
  min-width: 250px;
  max-height: calc(100vh - 110px);
  overflow:auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 10px;
}
.navTitle{
  font-size: 12px;
  color: var(--muted);
  margin: 4px 6px 10px;
  letter-spacing: .2px;
}
.navGroup{
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.navLink{
  display:flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  text-decoration:none;
  font-weight: 650;
  font-size: 13px;
}
.navLink:hover{
  text-decoration:none;
  border-color: rgba(106,169,255,.35);
  background: rgba(106,169,255,.06);
}
.navLink .mini{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-left:auto;
}

.content{
  flex: 1;
  min-width: 0;
}

@media (max-width: 1060px){
  .layout{ flex-direction: column; }
  .sidenav{
    position: relative;
    top: auto;
    width: 100%;
    min-width: auto;
    max-height: none;
  }
}

/* Quick links */
.quicklinks{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow);
  margin: 0 0 14px;
}
.quicklinks h2{
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .2px;
}
.chips{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
}
.chip:hover{
  text-decoration:none;
  border-color: rgba(106,169,255,.4);
}

/* Live section */
.live{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin: 0 0 14px;
}
.liveHeader{
  display:flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 0 2px 10px;
  margin-bottom: 10px;
}
.liveHeader h2{
  margin:0;
  font-size: 14.5px;
}
.liveHeader p{
  margin:0;
  font-size: 12.5px;
}
.liveGrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 820px){
  .liveGrid{ grid-template-columns: 1fr; }
}
.liveCard{
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow:hidden;
  background: rgba(255,255,255,.02);
}
.liveCardHeader{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  background: linear-gradient(180deg, var(--panel2), transparent);
  border-bottom: 1px solid var(--line);
}
.liveCardHeader .title{
  font-weight: 750;
  font-size: 13px;
}
.liveCardHeader .open{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.liveFrame{
  aspect-ratio: 16/9;
  width:100%;
  border: 0;
  display:block;
}

/* Grid + cards */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card{
  grid-column: span 6;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction: column;
  min-height: 220px;
}
.card.wide{ grid-column: span 12; }
@media (max-width: 980px){
  .card{ grid-column: span 12; }
  .topbar{ position: relative; flex-direction: column; align-items: flex-start; }
  .controls{ width: 100%; align-items: flex-start; }
  .row{ justify-content: flex-start; }
}

.cardHeader{
  display:flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  background: linear-gradient(180deg, var(--panel2), transparent);
  border-bottom: 1px solid var(--line);
}
.cardHeader h3{
  margin:0;
  font-size: 14.5px;
}
.badges{
  display:flex;
  gap: 8px;
  align-items:center;
}
.badge{
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.04);
}
.badge.ok{ color: #b7f3c5; border-color: rgba(183,243,197,.25); background: rgba(183,243,197,.08); }
.badge.warn{ color: #ffe3a6; border-color: rgba(255,227,166,.25); background: rgba(255,227,166,.08); }
.badge.err{ color: #ffb1b1; border-color: rgba(255,177,177,.25); background: rgba(255,177,177,.08); }

.list{
  padding: 6px 8px 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.item{
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  display:flex;
  gap: 10px;
  align-items: flex-start;
}
.item:hover{
  border-color: rgba(106,169,255,.35);
  background: rgba(106,169,255,.06);
}

.thumb{
  flex: 0 0 94px;
  width: 94px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow:hidden;
  background: rgba(255,255,255,.04);
}
.thumb img{ width:100%; height:100%; object-fit: cover; display:block; }

.itemMain{ flex: 1; min-width: 0; }
.itemTitle{
  margin:0;
  font-size: 13.2px;
  line-height: 1.2;
}
.itemTitle a{
  color: var(--text);
  text-decoration:none;
}
.itemTitle a:hover{ text-decoration:underline; }
.itemMeta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag{
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.snippet{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.footer{
  margin: 18px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.muted{ color: var(--muted); }
code{
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}

/* dialog */
#settingsDialog::backdrop{
  background: rgba(0,0,0,.55);
}
.dialog{
  width: min(720px, 92vw);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog h3{ margin: 0 0 6px; }
.formgrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px;
}
.formgrid label{
  display:flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.formgrid label.span2{ grid-column: span 2; }
.formgrid input, .formgrid select{
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
}
@media (max-width: 680px){
  .formgrid{ grid-template-columns: 1fr; }
  .formgrid label.span2{ grid-column: auto; }
}
