/* Veille techno : même charte que intra.spartiates.fr */
:root {
  --bg: #f4f6fa; --card: #ffffff; --text: #1b2333; --muted: #5d6b82;
  --line: #dde3ee; --accent: #4472c4; --accent-soft: #e6edf9; --on-accent: #ffffff;
  --ok: #1f9d55; --ko: #c53434; --warn: #d9822b;
}
:root[data-theme="dark"] {
  --bg: #10151f; --card: #182030; --text: #e8edf6; --muted: #93a0b8;
  --line: #263149; --accent: #7aa2ee; --accent-soft: #1d2a45; --on-accent: #0c1424;
  --ok: #3ecf7a; --ko: #f06a6a; --warn: #f0a35a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--text); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; }
.wrap.etroit { max-width: 820px; }
.sr { position: absolute; left: -9999px; }

/* En-tête */
header { padding: 40px 0 20px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 30px; letter-spacing: -.01em; }
h1 span { color: var(--accent); }
.sub { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.bar label { flex: 1 1 300px; display: flex; }
.recherche { flex: 1; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.etat { color: var(--muted); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }

/* Boutons */
.btn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.danger { color: var(--ko); border-color: var(--ko); }
.btn.carre { padding: 0 13px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.segs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.seg { min-height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; border-radius: 8px; }
.seg[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Icône du thème : soleil en sombre, lune en clair */
.i-soleil { display: none; }
:root[data-theme="dark"] .i-soleil { display: block; }
:root[data-theme="dark"] .i-lune { display: none; }

/* Sections et tuiles (comme intra) */
h2.sec { margin: 34px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { display: flex; gap: 14px; padding: 16px; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; transition: transform .12s, border-color .12s, box-shadow .12s; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 18px rgba(20, 40, 90, .12); color: inherit; }
.card.on { border-color: var(--accent); }
.ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--accent-soft); color: var(--accent); }
.ico.lg { background: #ffffff; border: 1px solid var(--line); }
.ico.lg img { width: 30px; height: 30px; object-fit: contain; }
.corps { min-width: 0; flex: 1; }
.titre { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; line-height: 1.35; }
.titre span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.desc { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.host { color: var(--accent); font-size: 13px; margin-top: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 7px; background: var(--line); }
.dot.nonlu { background: var(--accent); }
.dot.ok { background: var(--ok); }

/* Résumé du jour */
.resume { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.resume-tete { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.resume-tete .corps { flex: 1 1 300px; }
.points { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.point { background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.point b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }

/* Mode Personnaliser */
.si-gerer { display: none !important; }
body.gerer .si-gerer { display: inline-flex !important; }

/* Mes flux */
.abo { margin-top: 12px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.abo:hover { border-color: var(--accent); }
.abo[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Paramètres */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 18px; flex-wrap: wrap; }
.row + .row { border-top: 1px solid var(--line); }
.rt { font-weight: 600; }
.rd { color: var(--muted); font-size: 14px; }
.panel .segs { background: var(--bg); }
.panel .seg[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(20, 40, 90, .15); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 100%; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.tag button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.champ { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.interrupteur { position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; cursor: pointer; flex: none; background: var(--line); }
.interrupteur[aria-checked="true"] { background: var(--accent); }
.interrupteur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.interrupteur[aria-checked="true"]::after { left: 25px; }

/* Connexion */
.connexion { min-height: 100vh; display: flex; flex-direction: column; }
.connexion main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 16px 64px; }
.boite { width: 100%; max-width: 440px; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.lbl { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.form .champ { width: 100%; }
.aide { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* Navigation de la maquette */
.nav-maquette { display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: center; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Vue mobile */
.telephone { width: 390px; max-width: 100%; height: 844px; margin: 32px auto; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(10, 16, 30, .25); }
.telephone header { padding: 26px 16px 12px; display: flex; justify-content: space-between; align-items: center; }
.telephone .contenu { flex: 1; overflow: auto; padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.telephone .card { padding: 14px; gap: 12px; }
.telephone .ico { width: 42px; height: 42px; }
.telephone .ico.lg img { width: 28px; height: 28px; }
.onglets { display: flex; border-top: 1px solid var(--line); background: var(--card); }
.onglets a { flex: 1; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 12px; }
.onglets a.actif { color: var(--accent); font-weight: 600; }

/* ===== Application ===== */
[hidden] { display: none !important; }
.vue { min-height: 100vh; }
.msg { color: var(--ko); font-size: 14px; min-height: 1.2em; margin: 0; }
.vide { color: var(--muted); padding: 24px 0; }
.lien-titre { color: inherit; text-decoration: none; }
.lien-titre:hover { color: var(--accent); }
.card.lu .titre { font-weight: 500; color: var(--muted); }
.pied-tuile { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.pied-tuile .host { margin-top: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etoile { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.etoile:hover { border-color: var(--line); }
.etoile[aria-pressed="true"] { color: #e0a100; }
.etoile[aria-pressed="true"] svg { fill: currentColor; }
.plus { margin-top: 12px; }
.dot.warn { background: var(--warn); }
.dot.ko { background: var(--ko); }
.erreur-flux { color: var(--ko); font-size: 13px; margin-top: 4px; }
.ajout { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ajout .champ-url { flex: 1 1 320px; }
.ajout .champ { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 10; max-width: calc(100vw - 32px); }
.tourne svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  header { padding-top: 24px; }
  h1 { font-size: 26px; }
}

/* Résumé du jour */
.point p { margin: 0; }
.point ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.point li { margin-top: 2px; }
.point li a { text-decoration: none; }
.point li a:hover { text-decoration: underline; }
#msg-prefs { color: var(--muted); }

/* Graphe : nouveaux articles par jour (palette catégorielle validée, ordre fixe) */
:root {
  --serie-1: #2a78d6; --serie-2: #eb6834; --serie-3: #1baf7a; --serie-4: #eda100;
  --serie-5: #e87ba4; --serie-6: #008300; --serie-7: #4a3aa7; --serie-8: #e34948;
  --serie-autres: #9aa3b2;
}
:root[data-theme="dark"] {
  --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500;
  --serie-5: #d55181; --serie-6: #008300; --serie-7: #9085e9; --serie-8: #e66767;
  --serie-autres: #6c7a92;
}
.viz { margin-bottom: 4px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.graphe { position: relative; margin-top: 8px; }
.graphe svg { display: block; width: 100%; overflow: visible; }
.graphe .axe { fill: var(--muted); font-size: 11px; }
.graphe .grille { stroke: var(--line); stroke-width: 1; }
.graphe .jour { fill: transparent; cursor: default; outline: none; }
.graphe .jour:hover, .graphe .jour:focus-visible { fill: var(--accent-soft); fill-opacity: .55; }
.infobulle { position: absolute; z-index: 2; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; box-shadow: 0 6px 18px rgba(20, 40, 90, .15); min-width: 150px; }
.infobulle b { display: block; margin-bottom: 4px; }
.infobulle div { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.infobulle div span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.infobulle i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.chiffres { margin-top: 10px; font-size: 13px; color: var(--muted); }
.chiffres summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.table-defile { overflow-x: auto; margin-top: 6px; }
.table-defile table { border-collapse: collapse; font-size: 12px; color: var(--text); }
.table-defile th, .table-defile td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.table-defile th:first-child, .table-defile td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); }

/* Marque FLUX3 */
.marque { display: flex; gap: 14px; align-items: center; }
.marque img { flex: none; width: 48px; height: 48px; border-radius: 12px; }

/* Panneau de tri (comme FreshRSS) : rubriques dépliables, flux, compteurs de non lus */
#vue-dashboard .wrap { max-width: 1380px; }
.disposition { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.colonne { flex: 999 1 560px; min-width: 0; }
.tri { flex: 1 1 260px; max-width: 300px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; margin-top: 22px; }
.tri summary { list-style: none; font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; padding: 8px 10px; cursor: pointer; }
.tri summary::-webkit-details-marker { display: none; }
.nav-ligne { display: flex; align-items: center; }
.nav-item { flex: 1; min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.nav-item:hover { background: var(--accent-soft); }
.nav-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item img, .nav-item .mini { width: 18px; height: 18px; flex: none; border-radius: 4px; object-fit: contain; }
.nav-item .mini { display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.nav-item svg { flex: none; }
.compte { flex: none; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; text-align: center; font-weight: 500; }
.nav-item[aria-current="true"] .compte { background: var(--card); color: var(--accent); }
.chevron { flex: none; width: 32px; height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.chevron:hover { background: var(--accent-soft); }
.chevron svg { transition: transform .15s; }
.chevron[aria-expanded="true"] svg { transform: rotate(90deg); }
.nav-flux { padding-left: 28px; }
.nav-flux .nav-item { font-size: 14px; min-height: 36px; }
.nav-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.titre-selection { margin: 22px 0 0; font-size: 22px; }
@media (max-width: 860px) {
  .tri { position: static; max-width: none; max-height: none; flex-basis: 100%; }
}

/* Anneaux (camemberts) : part de chaque rubrique par période */
.anneaux { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.anneau { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.anneau svg { width: 180px; max-width: 100%; height: auto; overflow: visible; }
.anneau .periode { font-size: 14px; font-weight: 600; }
.anneau .part { cursor: default; outline: none; transition: opacity .12s; }
.anneau svg:hover .part:not(:hover), .anneau svg:focus-within .part:not(:focus) { opacity: .45; }
.anneau .total { fill: var(--text); font-size: 28px; font-weight: 700; }
.anneau .unite { fill: var(--muted); font-size: 12px; }
.anneau .vide-anneau { fill: none; stroke: var(--line); }

/* Courbe : total des nouveaux articles par jour */
.courbe-titre { margin: 22px 0 6px; font-size: 14px; font-weight: 600; }
.courbe svg { display: block; width: 100%; overflow: visible; }
.courbe .ligne { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe .aire { fill: var(--accent); fill-opacity: .12; }
.courbe .repere { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.courbe .point { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.courbe .survol { fill: transparent; outline: none; cursor: crosshair; }
.courbe .survol:focus-visible { stroke: var(--accent); stroke-width: 1; }
