/* Veille AO — feuille de style sobre, responsive, sans dependance CDN. */

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2329;
    background: #f4f5f7;
    line-height: 1.5;
}
a { color: #1d6fb8; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
.muted { color: #8a9099; }

/* Barre de navigation */
.topbar {
    display: flex; align-items: center; gap: 1.5rem;
    background: #1f2329; color: #fff; padding: .7rem 1.2rem;
}
.topbar .brand { color: #fff; font-weight: 700; }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.topbar nav a, .topbar .logout { color: #cdd3da; }
.topbar .userbox { display: flex; gap: 1rem; align-items: center; font-size: .85rem; }

.container { max-width: 1080px; margin: 1.5rem auto; padding: 0 1rem; }
.footer { text-align: center; color: #8a9099; font-size: .8rem; padding: 2rem 1rem; }

/* Cartes / formulaires */
.card {
    background: #fff; border: 1px solid #e2e5e9; border-radius: 8px;
    padding: 1rem; margin-bottom: 1.2rem;
}
.form { max-width: 420px; }
.form label, .filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; margin-bottom: .8rem; }
input, select, textarea {
    font: inherit; padding: .5rem; border: 1px solid #c7ccd3; border-radius: 6px; background: #fff;
}
button, .btn {
    display: inline-block; cursor: pointer; font: inherit;
    background: #1d6fb8; color: #fff; border: 0; border-radius: 6px;
    padding: .55rem 1rem; text-align: center;
}
button:hover, .btn:hover { background: #155a96; text-decoration: none; }
.btn.ok { background: #2e7d4f; }
.btn.ko { background: #b03636; }

/* Filtres dashboard */
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filters label { margin-bottom: 0; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Tableau */
table.grid { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e5e9; border-radius: 8px; overflow: hidden; }
table.grid th, table.grid td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid #eef0f3; vertical-align: top; }
table.grid th { background: #fafbfc; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #6b727b; }
table.grid tr:last-child td { border-bottom: 0; }

/* Badges de score */
.badge {
    display: inline-block; min-width: 1.6rem; text-align: center;
    padding: .15rem .45rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #fff;
}
.badge.s0 { background: #8a9099; }
.badge.s4 { background: #c9a227; }
.badge.s6 { background: #5a9e6f; }
.badge.s8 { background: #2e7d4f; }
.badge.na { background: #c7ccd3; color: #333; }

.deadline { font-size: .85rem; }
.deadline.urgent { color: #b03636; font-weight: 700; }
.fb.ok { color: #2e7d4f; font-weight: 600; }
.fb.ko { color: #b03636; font-weight: 600; }

/* Pagination */
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.2rem 0; }

/* Detail */
.detail .meta { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .9rem; margin-bottom: 1rem; }
.detail .scores { display: flex; gap: .6rem; margin-bottom: 1rem; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { background: #eef2f6; border-radius: 6px; padding: .2rem .5rem; font-size: .85rem; }
.fb-actions { display: flex; gap: .8rem; }

/* Alerts */
.alert { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert.error { background: #fde8e8; color: #8a1f1f; }
.alert.ok { background: #e5f4ec; color: #1f5c3a; }

/* Stats */
.kpis { display: flex; flex-wrap: wrap; gap: 1rem; }
.kpi { flex: 1 1 180px; text-align: center; }
.kpi .num { display: block; font-size: 1.6rem; font-weight: 700; }
.kpi .lbl { color: #6b727b; font-size: .82rem; }
.bar { display: inline-block; height: .7rem; background: #1d6fb8; border-radius: 3px; min-width: 2px; }

/* Responsive : tableau -> cartes */
@media (max-width: 720px) {
    .topbar { flex-wrap: wrap; gap: .6rem; }
    table.grid, table.grid thead, table.grid tbody, table.grid th, table.grid td, table.grid tr { display: block; }
    table.grid thead { display: none; }
    table.grid tr { border: 1px solid #e2e5e9; border-radius: 8px; margin-bottom: .8rem; background: #fff; }
    table.grid td { border: 0; padding: .4rem .7rem; }
    table.grid td::before { content: attr(data-label); font-weight: 600; color: #6b727b; display: block; font-size: .72rem; text-transform: uppercase; }
}
