/* --- TES STYLES ACTUELS (Inchangés) --- */
:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --success: #22c55e;
    --danger: #ef4444;
    --accent: #38bdf8;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 900px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.status-bar {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

#services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #334155;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 { margin: 0; font-size: 1.1rem; }
.url { color: #94a3b8; font-size: 0.85rem; margin: 5px 0 0 0; }

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.up { background: var(--success); color: white; }
.status-badge.down { background: var(--danger); color: white; }

footer {
    margin-top: 40px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* --- LES NOUVEAUTÉS POUR LE VRAI PING --- */

/* Style pour l'affichage de la latence (ms) */
.url small {
    color: var(--accent);
    font-weight: 600;
    margin-left: 5px;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Animation de pulsation pour les badges "En ligne" */
.status-badge.up {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Animation subtile pour les badges "Hors ligne" */
.status-badge.down {
    animation: shake 0.5s ease-in-out infinite alternate;
}

@keyframes shake {
    from { transform: translateX(0); }
    to { transform: translateX(2px); }
}

/* --- NOUVEAUTÉ : ÉTAT DYNAMIQUE DU BANDEAU GLOBAL --- */

/* Ajout d'une transition pour que le changement de couleur soit fluide */
.status-bar {
    transition: all 0.4s ease-in-out;
}

/* Style rouge quand au moins un service est hors ligne */
.status-bar.down {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}