/* ================================
   FASTPANEL - PAGE STATUS
   Design professionnel 2024
   Monitoring des serveurs
   ================================ */

/* Variables CSS */
:root {
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748b;
    --primary-400: #94a3b8;
    --primary-300: #cbd5e1;
    --primary-200: #e2e8f0;
    --primary-100: #f1f5f9;

    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --blue-300: #93c5fd;

    --green-600: #16a34a;
    --green-500: #22c55e;
    --green-400: #4ade80;

    --red-500: #ef4444;
    --red-400: #f87171;

    --orange-500: #f97316;
    --orange-400: #fb923c;

    --white: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ================================
   HERO SECTION
   ================================ */

.status-hero-section {
    background: linear-gradient(135deg, var(--primary-900) 0%, #0c1929 50%, var(--primary-800) 100%);
    position: relative;
    overflow: hidden;
    padding: 140px 0 80px;
    min-height: 40vh;
}

/* Fondu en bas du hero */
.status-hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(15, 23, 42, 0.3) 30%,
        rgba(15, 23, 42, 0.7) 60%,
        var(--primary-900) 100%
    );
    z-index: 3;
    pointer-events: none;
}

.status-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(34, 197, 94, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(34, 197, 94, 0.08) 0%, transparent 40%);
}

.status-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.status-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--green-400);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s ease-in-out infinite;
}

.status-particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.status-particle:nth-child(2) { top: 60%; left: 20%; animation-delay: 3s; }
.status-particle:nth-child(3) { top: 30%; left: 80%; animation-delay: 6s; }
.status-particle:nth-child(4) { top: 70%; left: 70%; animation-delay: 9s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50% { transform: translateY(-30px) translateX(10px); opacity: 0.5; }
}

.status-gradient-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    animation: pulseOrb 6s ease-in-out infinite;
}

.status-orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
}

.status-orb-2 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    right: 10%;
    animation-delay: 3s;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

@keyframes pulseOrb {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

.status-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Badge */
.status-badge {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-full);
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.status-badge i {
    color: var(--green-400);
    font-size: 14px;
}

.status-badge span {
    color: var(--green-400);
    font-size: 14px;
    font-weight: 600;
}

/* Title */
.status-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.status-title-gradient {
    background: linear-gradient(135deg, var(--green-400) 0%, var(--blue-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Breadcrumb */
.status-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    margin-top: 20px;
}

.status-breadcrumb a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-300);
    text-decoration: none;
    transition: all 0.2s ease;
}

.status-breadcrumb a:hover {
    color: var(--green-400);
}

.status-breadcrumb .fa-chevron-right {
    color: var(--primary-500);
    font-size: 10px;
}

.status-breadcrumb > span {
    color: var(--green-400);
    font-weight: 600;
}

/* ================================
   MAIN SECTION
   ================================ */

.status-main-section {
    background: var(--primary-900);
    padding: 80px 0 100px;
    position: relative;
}

/* Info Card */
.status-info-card {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.status-info-card p {
    color: var(--primary-200);
    margin: 0;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.status-info-card i {
    color: var(--blue-400);
}

#last-update {
    color: var(--blue-400) !important;
    font-weight: 500;
}

#next-refresh {
    color: var(--green-400) !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#next-refresh i {
    animation: spin 2s linear infinite;
    color: var(--green-400);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#countdown {
    display: inline-block;
    min-width: 20px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--green-400);
    font-size: 1rem;
}

/* ================================
   STATS CARDS
   ================================ */

.status-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.status-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.status-stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
}

.status-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.status-stat-label {
    color: var(--primary-400);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Online stat card */
.status-stat-card.online {
    border-color: rgba(34, 197, 94, 0.2);
}

.status-stat-card.online:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.status-stat-card.online .status-stat-number {
    background: linear-gradient(135deg, var(--green-400) 0%, var(--green-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Offline stat card */
.status-stat-card.offline {
    border-color: rgba(239, 68, 68, 0.2);
}

.status-stat-card.offline:hover {
    border-color: rgba(239, 68, 68, 0.4);
}

.status-stat-card.offline .status-stat-number {
    background: linear-gradient(135deg, var(--red-400) 0%, var(--red-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   TABLE
   ================================ */

.status-glass-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.status-table {
    width: 100%;
    border-collapse: collapse;
}

.status-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.status-table thead th {
    padding: 20px 24px;
    text-align: left;
    color: var(--primary-300);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.status-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.status-table tbody tr:last-child {
    border-bottom: none;
}

.status-table tbody td {
    padding: 18px 24px;
    color: var(--primary-200);
    font-size: 0.9375rem;
}

/* ID Column */
.status-id {
    font-weight: 600;
    color: var(--primary-400) !important;
    font-family: 'Courier New', monospace;
    width: 80px;
}

/* Name Column */
.status-name {
    font-weight: 600;
    color: var(--white) !important;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator i {
    font-size: 10px;
}

.status-online {
    color: var(--green-400);
    animation: pulseDot 2s ease-in-out infinite;
}

.status-offline {
    color: var(--red-400);
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: 600;
    font-size: 0.875rem;
}

.status-text.online {
    color: var(--green-400);
}

.status-text.offline {
    color: var(--red-400);
}

/* Ping Column */
.status-ping {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
}

.status-ping.good {
    color: var(--green-400);
    background: rgba(34, 197, 94, 0.1);
}

.status-ping.medium {
    color: var(--orange-400);
    background: rgba(249, 115, 22, 0.1);
}

.status-ping.bad {
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.1);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 992px) {
    .status-hero-section {
        padding: 120px 0 60px;
    }

    .status-title {
        font-size: 2.25rem;
    }

    .status-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .status-hero-section {
        padding: 100px 0 50px;
        min-height: auto;
    }

    .status-title {
        font-size: 1.875rem;
    }

    .status-badge {
        padding: 8px 16px;
        gap: 8px;
    }

    .status-badge span {
        font-size: 12px;
    }

    .status-breadcrumb {
        font-size: 12px;
        gap: 8px;
    }

    .status-main-section {
        padding: 60px 0 80px;
    }

    .status-info-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .status-info-card p {
        flex-direction: column;
        gap: 12px;
    }

    .status-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .status-stat-card {
        padding: 20px 16px;
    }

    .status-stat-number {
        font-size: 2rem;
    }

    .status-table thead th,
    .status-table tbody td {
        padding: 14px 16px;
        font-size: 0.8125rem;
    }

    .status-glass-container {
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 480px) {
    .status-hero-section {
        padding: 90px 0 40px;
    }

    .status-title {
        font-size: 1.5rem;
    }

    .status-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .status-stat-card {
        padding: 16px 12px;
    }

    .status-stat-number {
        font-size: 1.75rem;
    }

    .status-stat-label {
        font-size: 0.6875rem;
    }

    .status-table {
        display: block;
        overflow-x: auto;
    }

    .status-table thead th,
    .status-table tbody td {
        padding: 12px;
        white-space: nowrap;
    }
}
