/* Composants (1/2) : boutons, badges, cartes, tuiles, grilles, tableaux, formulaires */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--surface-2); } .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--crit); border-color: var(--crit-bg); } .btn-danger:hover { background: var(--crit-bg); }
.btn-ghost { border-color: transparent; background: transparent; } .btn-ghost:hover { background: var(--gray-bg); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-bg); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-crit { background: var(--crit-bg); color: var(--crit); } .badge-info { background: var(--info-bg); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.2s infinite; } @keyframes pulse { 50% { opacity: .3; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile .v { font-size: 26px; font-weight: 700; line-height: 1.1; } .tile .l { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.tile.ok .v { color: var(--ok); } .tile.warn .v { color: var(--warn); } .tile.crit .v { color: var(--crit); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.site-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .1s, box-shadow .1s; display: flex; flex-direction: column; }
.site-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,24,40,.12); }
.site-card.disabled { opacity: .6; }
.thumb { aspect-ratio: 16 / 9; background: var(--gray-bg); position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; position: relative; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.site-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.site-card .name { font-weight: 650; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.site-card .meta { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.site-card .issue-line { font-size: 13px; color: var(--crit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; } table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover, .table tr.selected { background: var(--surface-2); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; } .field label { font-weight: 600; font-size: 13px; } .field .hint { color: var(--muted); font-size: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { min-height: 80px; font-family: var(--mono); font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; } .check input { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } @media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.error { color: var(--crit); background: var(--crit-bg); border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.notice { color: var(--info); background: var(--info-bg); border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
