* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #fafbfc;
    --card-bg: #ffffff;
    --text-primary: #0a1628;
    --text-secondary: #64748b;
    --accent: #1e3a8a;
    --accent-light: #3b82f6;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 10px 25px -5px rgba(30, 58, 138, 0.15), 0 8px 10px -6px rgba(30, 58, 138, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(30, 58, 138, 0.05) 0%, transparent 50%);
}

/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    height: 56px;
    width: auto;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #059669;
    font-weight: 500;
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Main */
.container {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero {
    text-align: center;
    margin-bottom: 3.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:not(.disabled):hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}

.card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.card-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.card-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.card-status.online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.card-status.soon {
    padding: 0.2rem 0.5rem;
    background: var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 640px) {
    .topbar { padding: 1rem 1.25rem; }
    .logo { height: 44px; }
    .status-pill { font-size: 0.7rem; padding: 0.3rem 0.7rem; }
    .container { padding: 2rem 1rem; }
    .hero h1 { font-size: 1.8rem; }
}

/* Statuts dynamiques */
.card-status.checking,
.card-status.online,
.card-status.offline {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.card-status.checking {
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
    animation: pulse 1s ease-in-out infinite;
}

.card-status.online {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.card-status.offline {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Badge global - etats */
.status-pill[data-state="checking"] {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.3);
    color: #64748b;
}
.status-pill[data-state="checking"] .dot {
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.status-pill[data-state="ok"] {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}
.status-pill[data-state="ok"] .dot {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-pill[data-state="partial"] {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #d97706;
}
.status-pill[data-state="partial"] .dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.status-pill[data-state="down"],
.status-pill[data-state="unknown"] {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}
.status-pill[data-state="down"] .dot,
.status-pill[data-state="unknown"] .dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
