/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Supprime les outlines de focus sauf navigation clavier (accessibilité préservée) */
*:focus:not(:focus-visible) {
    outline: none;
}
h1:focus, h2:focus, h3:focus, h4:focus, section:focus, div:focus {
    outline: none;
}

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none; /* empêche le rebond élastique iOS/Android */
    background: #030812;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Allow scrolling on admin pages */
body.app-mode {
    overflow: auto;
}

/* ===== Dashboard pod table ===== */
.pod-table .mud-table-row {
    border-bottom: 1px solid #1e293b !important;
}

.pod-table .mud-table-row:hover {
    background: rgba(59, 130, 246, 0.05) !important;
}

.pod-table .mud-table-head .mud-table-cell {
    background: #0d1117 !important;
    border-bottom: 1px solid #1e293b !important;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-green  { background: #4ade80; box-shadow: 0 0 6px #4ade8066; }
.dot-yellow { background: #fbbf24; box-shadow: 0 0 6px #fbbf2466; }
.dot-red    { background: #f87171; box-shadow: 0 0 6px #f8717166; animation: blink 1.5s infinite; }
.dot-gray   { background: #475569; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ===== MudBlazor dark theme overrides ===== */
.mud-nav-link {
    border-radius: 8px !important;
    margin: 2px 8px !important;
    transition: background 0.2s !important;
}

.mud-nav-link:hover {
    background: rgba(59, 130, 246, 0.12) !important;
}

.mud-nav-link.active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #a5b4fc !important;
}

/* ===== Responsive admin layout ===== */
@media (max-width: 768px) {
    body.app-mode {
        overflow: auto;
    }
}

/* ===== Reconnexion Blazor ===== */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal.components-reconnect-show {
    display: flex;
}

.reconnect-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 18, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.reconnect-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 36px 44px;
    background: linear-gradient(160deg, rgba(18,28,65,0.98) 0%, rgba(8,14,36,0.99) 100%);
    border: 1px solid rgba(99, 155, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 0 60px rgba(59,130,246,0.15), 0 8px 48px rgba(0,0,0,0.6);
    text-align: center;
    max-width: 340px;
    animation: reconnect-appear 0.3s ease;
}

@keyframes reconnect-appear {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.reconnect-icon {
    color: rgba(147, 197, 253, 0.9);
    animation: reconnect-spin 2s linear infinite;
}

@keyframes reconnect-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.reconnect-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

.reconnect-sub {
    font-size: 13px;
    color: rgba(148, 163, 184, 0.8);
    line-height: 1.5;
    margin: 0;
}

.reconnect-dots {
    display: flex;
    gap: 7px;
    margin-top: 4px;
}

.reconnect-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(99, 155, 255, 0.7);
    animation: reconnect-pulse 1.2s ease-in-out infinite;
}

.reconnect-dots span:nth-child(2) { animation-delay: 0.2s; }
.reconnect-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes reconnect-pulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40%            { opacity: 1;   transform: scale(1.2); }
}
