﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* =============================================================================
   DARK MODE GLOBAL STYLES
   ============================================================================= */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

h1:focus {
    outline: none;
}

/* =============================================================================
   FORM CONTROLS - DARK MODE
   ============================================================================= */
.btn-icon
{
    width:28px;
}
.btn-icon-medium {
    width: 36px;
}
.form-control {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
}

.form-control:focus {
    background-color: #363636;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    color: #ffffff;
    outline: 0;
}

.form-control::placeholder {
    color: #999999;
}

label {
    color: #e0e0e0;
    font-weight: 500;
}

/* =============================================================================
   BUTTONS - DARK MODE
   ============================================================================= */

.btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5);
}

/* =============================================================================
   TABLES - DARK MODE
   ============================================================================= */

table {
    color: #e0e0e0;
    border-collapse: collapse;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #e0e0e0;
    vertical-align: top;
    border-color: #404040;
}

.table th,
.table td {
    padding: 0.5rem;
    border-top: 1px solid #404040;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #404040;
    background-color: #2d2d2d;
    color: #ffffff;
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =============================================================================
   ERROR UI - DARK MODE
   ============================================================================= */

#blazor-error-ui {
    background: #ffc107;
    color: #000;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000; /* Above menu */
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
        color: #000;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyN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        content: "An error has occurred."
    }
/* =============================================================================
   MAIN LAYOUT STYLES - DARK MODE
   ============================================================================= */

.page {
    min-height: 100vh;
    background: #1a1a1a;
    color: #e0e0e0;
}

main {
    margin: 0;
    padding: 0; /* Removed all padding */
    background: #1a1a1a;
}

.content {
    padding: 0; /* Removed all padding */
    margin: 0;
    background: #1a1a1a;
    min-height: 100vh; /* Changed to full viewport height */
    color: #e0e0e0;
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

/* =============================================================================
   CONTENT PAGES - DARK MODE STYLING
   ============================================================================= */

article {
    padding: 0rem;
    background: #1a1a1a;
    color: #e0e0e0;
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #666666;
    }




.page {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-height: 100vh;
    background: #1a1a1a;
    color: #e0e0e0;
}

main {
    flex: 1;
    min-height: 100vh;
    background: #1a1a1a;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
article {
    flex: 1;
    width: 100%;
}

.sideMenu {
    background: #222;
    box-shadow: 2px 2px 5px #58a6ff44;
    position: relative;
    height: 100vh;
    border: 0px solid #58a6ff;
}
.sideMenu::-webkit-scrollbar {
    width: 4px;
}
.sideMenu::-webkit-scrollbar-track {
    background: rgba(48, 54, 61, 0.3);
}
.sideMenu::-webkit-scrollbar-thumb {
    background: rgba(88, 166, 255, 0.4);
    border-radius: 2px;
}
.sideMenu::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 166, 255, 0.6);
}
.menuItem {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alignement � gauche au lieu de center */
    width: 100%;
    padding: 0.2rem 0.2rem; /* Padding horizontal seulement, le vertical est g�r� par height */
    background: transparent;
    border: none;
    color: rgba(224, 224, 224, 0.9);
    text-decoration: none;
    cursor: pointer;
    border-left: 3px solid transparent;
    position: relative;
}

.menuItem:hover {
    background: rgba(48, 54, 61, 0.3);
    color: #58a6ff;
    border-left-color: #58a6ff;
}

    .menuItem.active {
        background: rgba(56, 139, 253, 0.051);
        color: #58a6ff;
        border-left-color: #58a6ff;
        filter: drop-shadow(0 0 5px #58a6ff);
    }
.menuItemLabel{
    margin-right:5px;
}
.menuItemIcon {
    font-size: 1.5rem; /* Taille responsive bas�e sur la hauteur du viewport */
    width: 50px; /* Largeur responsive */
    height: 50px; /* Largeur responsive */
    flex-shrink: 0;
    text-align: center;
}

.menuItemIcon.active {
    filter: drop-shadow(0 0 3px #58a6ff); /* #58a6ff */
}

.menuItem:focus {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
}


.iconButton {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    border-radius: 4px;
    padding: 0;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #363636;
    filter: drop-shadow(0 0 5px #58a6ff);
    margin: 3px;
}

    .iconButton:hover {
        transform: translateY(-0.1dvw);
        background-color: #363636;
        filter: drop-shadow(0 0 2px #58a6ff);
    }

    .iconButton.active {
        background: rgba(56, 139, 253, 0.051);
        color: #58a6ff;
        border-bottom-color: #58a6ff;
        filter: drop-shadow(0 0 5px #58a6ff);
    }

.iconButtonLabel {
    margin-right: 5px;
}

.iconButtonIcon {
    font-size: 1.5rem; /* Taille responsive bas�e sur la hauteur du viewport */
    width: 48px; /* Largeur responsive */
    height: 48px; /* Largeur responsive */
    flex-shrink: 0;
    text-align: center;
}

    .iconButtonIcon.active {
        filter: drop-shadow(0 0 3px #58a6ff); /* #58a6ff */
    }

.iconButton:focus {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
}



/* =============================================================================
   RECONNECTION UI - DARK MODE
   ============================================================================= */

#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    animation: fadeIn 0.3s ease-in;
}

/* Overlay background */
.components-reconnect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Modal content box */
.components-reconnect-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 2px solid #58a6ff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    max-width: 90%;
    width: 420px;
    box-shadow: 0 0 40px rgba(88, 166, 255, 0.3),
                0 8px 32px rgba(0, 0, 0, 0.6);
    text-align: center;
    animation: slideIn 0.4s ease-out;
}

/* Icon */
.components-reconnect-icon {
    color: #58a6ff;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.components-reconnect-icon svg {
    filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.5));
}

/* Title */
.components-reconnect-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

/* Message */
.components-reconnect-message {
    color: #e0e0e0;
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Spinner container */
.components-reconnect-spinner {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

/* Animated spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(88, 166, 255, 0.2);
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Reload button */
.components-reconnect-button {
    background: #58a6ff;
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.components-reconnect-button:hover {
    background: #4a8fd9;
    box-shadow: 0 6px 16px rgba(88, 166, 255, 0.4);
    transform: translateY(-1px);
}

.components-reconnect-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

/* Show modal when connection is lost */
#components-reconnect-modal.components-reconnect-show {
    display: block;
}

/* Update styles when reconnection fails */
#components-reconnect-modal.components-reconnect-failed .components-reconnect-title {
    color: #ff6b6b;
}

#components-reconnect-modal.components-reconnect-failed .components-reconnect-icon {
    color: #ff6b6b;
    animation: shake 0.5s ease-in-out;
}

#components-reconnect-modal.components-reconnect-failed .components-reconnect-content {
    border-color: #ff6b6b;
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.3),
                0 8px 32px rgba(0, 0, 0, 0.6);
}

#components-reconnect-modal.components-reconnect-failed .components-reconnect-message::after {
    content: " Connection failed. Please check your network.";
}

#components-reconnect-modal.components-reconnect-failed .spinner {
    display: none;
}

#components-reconnect-modal.components-reconnect-rejected .components-reconnect-title {
    color: #ffa500;
}

#components-reconnect-modal.components-reconnect-rejected .components-reconnect-icon {
    color: #ffa500;
}

#components-reconnect-modal.components-reconnect-rejected .components-reconnect-content {
    border-color: #ffa500;
    box-shadow: 0 0 40px rgba(255, 165, 0, 0.3),
                0 8px 32px rgba(0, 0, 0, 0.6);
}

#components-reconnect-modal.components-reconnect-rejected .components-reconnect-message::after {
    content: " Connection rejected by server. Please reload.";
}

#components-reconnect-modal.components-reconnect-rejected .spinner {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .components-reconnect-content {
        width: 90%;
        padding: 2rem 1.5rem;
    }

    .components-reconnect-title {
        font-size: 1.5rem;
    }

    .components-reconnect-message {
        font-size: 0.9rem;
    }
}


.btn-primary{
    background-color: #363636;
    filter: drop-shadow(0 0 5px #58a6ff);
    margin:3px;
}
    .btn-primary:hover {
        transform: translateY(-0.1dvw);
        background-color: #363636;
        filter: drop-shadow(0 0 2px #58a6ff);
    }
.btn-outline-primary {
    background-color: #363636;
    filter: drop-shadow(0 0 2px #58a6ff);
    padding: 0.2dvw;
}
    .btn-outline-primary :hover {
        transform: translateY(-0.1dvw);
        border-color: #555555;
    }

