/* ============================================
   DESIGN ÉLÉGANT SEEG POWER
   Couleurs: Bleus profonds | Gold | Typographie fine
   Bordures carrées
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --ocean-deep: #1A2655;
    --bright-marine: #2872B5;
    --baltic-blue: #10579E;
    --steel-azure: #144786;
    --steel-azure-2: #124D8F;
    --gold: #F59E0B;
    --gold-light: #F59E0B;
    --gold-dark: #F59E0B;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f57c00;
    --info: #0288d1;
    
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --white: #ffffff;
    
    --sidebar-width: 260px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    background: var(--white);
    color: var(--gray-800);
    line-height: 1.5;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--ocean-deep);
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo, .logo_seeg {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    display: flex;
    border-radius: 50%;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img, .logo_seeg img {
    width: 100%;
    height: 100%;
}

.sidebar-title {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

.sidebar-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    margin-top: 5px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    margin: 2px 0;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 400;
    border-left: 3px solid transparent;
}

.nav-link-custom i {
    width: 20px;
    font-size: 0.9rem;
}

.nav-link-custom:hover {
    background: rgba(201,160,61,0.1);
    color: var(--gold);
    border-left-color: var(--gold);
}

.nav-link-custom.active {
    background: rgba(201,160,61,0.15);
    color: var(--gold);
    border-left-color: var(--gold);
}

.badge-new {
    background: var(--gold);
    color: var(--steel-azure);
    font-size: 0.55rem;
    padding: 2px 8px;
    margin-left: auto;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.submenu {
    padding-left: 52px;
    margin-top: 3px;
    margin-bottom: 5px;
}

.submenu-link {
    display: block;
    padding: 6px 0;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
}

.submenu-link:hover {
    color: var(--gold);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.4);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 20px 30px;
}

/* Top Bar */
.top-bar {
    background: var(--white);
    padding: 12px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--gray-200);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--ocean-deep), var(--baltic-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-weight: 500;
    font-size: 0.9rem;
}

.user-details h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--gray-800);
}

.user-details p {
    font-size: 0.65rem;
    color: var(--gray-500);
    margin: 0;
}

.balance-card {
    background: var(--ocean-deep);
    padding: 6px 18px;
    color: var(--white);
}

.balance-card span {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
}

.balance-card strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    margin-left: 8px;
}

/* ========== CARDS ========== */
.card-elite {
    background: var(--white);
    margin-bottom: 25px;
    border: 1px solid var(--gray-200);
}

.card-header-elite {
background: var(--ocean-deep);
    padding: 15px 20px;
}

.card-header-elite h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: var(--white);
    letter-spacing: 0.5px;
}

.card-header-elite h3 i {
    color: var(--gold);
    margin-right: 8px;
}

.card-body-elite {
    padding: 20px;
}

/* ========== FORMULAIRES ========== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    font-size: 0.65rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--steel-azure);
    display: block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-label i {
    color: var(--gold);
    margin-right: 5px;
}

.form-control-elite {
    width: 100%;
    max-width: 360px;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    font-size: 0.8rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--gray-700);
}

.form-control-elite:focus {
    outline: none;
    border-color: var(--gold);
}

.form-control-elite.error {
    border-color: var(--danger);
    background: rgba(198,40,40,0.02);
}

.input-icon {
    position: relative;
    max-width: 360px;
}

.input-icon i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 0.8rem;
}

.input-icon .form-control-elite {
    padding-left: 32px;
}

small.text-muted {
    font-size: 0.6rem;
    color: var(--gray-500);
    margin-top: 5px;
    display: block;
}

small.text-muted i {
    color: var(--gold);
    margin-right: 4px;
}

/* ========== BOUTONS ========== */
.btn-elite {
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary-elite {
    background: var(--ocean-deep);
    color: var(--white);
}

.btn-primary-elite:hover {
    background: linear-gradient(135deg, var(--baltic-blue), var(--bright-marine));
}

.btn-secondary-elite {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-secondary-elite:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-success-elite {
    background: var(--gold);
    color: var(--steel-azure);
}

.btn-success-elite:hover {
    background: var(--gold-dark);
}

.btn-outline-elite {
    background: transparent;
    border: 1px solid var(--ocean-deep);
    color: var(--ocean-deep);
}

.btn-outline-elite:hover {
    background: var(--ocean-deep);
    color: var(--white);
}

/* ========== TABLES ========== */
.table-container {
    overflow-x: auto;
}

.table-elite {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.table-elite thead th {
    text-align: left;
    padding: 10px 10px;
    background: var(--ocean-deep);
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--white);
    text-transform: uppercase;
}

.table-elite tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.table-elite tbody tr:hover {
    background: rgba(12,102,180,0.05);
}

/* ========== ALERTES ========== */
.alert-elite {
    padding: 10px 15px;
    margin-bottom: 18px;
    font-size: 0.75rem;
    border-left: 3px solid;
}

.alert-danger-elite {
    background: rgba(198,40,40,0.05);
    border-left-color: var(--danger);
    color: var(--danger);
}

.alert-success-elite {
    background: rgba(46,125,50,0.05);
    border-left-color: var(--success);
    color: var(--success);
}

.alert-info-elite {
    background: rgba(2,136,209,0.05);
    border-left-color: var(--info);
    color: var(--info);
}

.alert-warning-elite {
    background: rgba(245,124,0,0.05);
    border-left-color: var(--warning);
    color: var(--warning);
}

/* ========== INFO CARD ========== */
.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--steel-azure);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.info-label i {
    color: var(--gold);
    margin-right: 5px;
}

.info-value {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--gray-800);
}

/* ========== PAGE DE CONNEXION AVEC ANIMATIONS ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
background: var(--ocean-deep);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animation de fond - cercles flottants */
.login-container::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201,160,61,0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: floatCircle 20s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201,160,61,0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -250px;
    left: -250px;
    animation: floatCircle 25s ease-in-out infinite reverse;
}

/* Vagues animées */
.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(201,160,61,0.05)" fill-opacity="1" d="M0,192L48,197.3C96,203,192,213,288,208C384,203,480,181,576,176C672,171,768,181,864,197.3C960,213,1056,235,1152,234.7C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') repeat-x;
    background-size: cover;
    animation: waveAnimation 10s linear infinite;
}

.wave:nth-child(2) {
    bottom: 30px;
    opacity: 0.5;
    animation: waveAnimation 15s linear infinite reverse;
}

.wave:nth-child(3) {
    bottom: 60px;
    opacity: 0.3;
    animation: waveAnimation 20s linear infinite;
}

/* Particules flottantes */
.particle {
    position: absolute;
    background: rgba(201,160,61,0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle linear infinite;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

@keyframes waveAnimation {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Carte de connexion */
.login-card {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
background: var(--ocean-deep);
    padding: 35px;
    text-align: center;
    position: relative;
}

.login-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: rgb(255,255,255);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    width: 50px;
    height: 50px;
}

.login-header h1 {
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.login-header p {
    color: rgba(255,255,255,0.7);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
}

.login-body {
    padding: 35px;
}

.login-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.6rem;
    color: var(--gray-500);
}

/* ========== TICKET ========== */
.ticket {
    background: var(--white);
    width: 350px;
    margin: 0 auto;
    padding: 15px;
    border: 1px solid var(--gray-200);
}

.ticket pre {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12,102,180,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-elite {
    background: var(--white);
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--gray-200);
}

.modal-header-elite {
    padding: 15px 20px;
    background: var(--ocean-deep);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-elite h4 {
    color: var(--gold);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.modal-close {
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
}

.modal-close:hover {
    color: var(--gold);
}

.modal-body-elite {
    padding: 20px;
}

.modal-footer-elite {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== DATATABLES STYLES ========== */
.dataTables_wrapper {
    margin-top: 20px;
}

.dt-buttons {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dt-button-excel,
.dt-button-pdf,
.dt-button-print {
    background: transparent !important;
    border: 1px solid var(--gray-300) !important;
    color: var(--gray-600) !important;
    padding: 6px 15px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: var(--transition) !important;
}

.dt-button-excel:hover,
.dt-button-pdf:hover,
.dt-button-print:hover {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}

.dataTables_filter {
    margin-bottom: 20px;
    text-align: right;
}

.dataTables_filter input {
    border: 1px solid var(--gray-300);
    padding: 6px 10px;
    margin-left: 8px;
    font-size: 0.75rem;
}

.dataTables_filter input:focus {
    outline: none;
    border-color: var(--gold);
}

.dataTables_paginate {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.paginate_button {
    padding: 6px 12px !important;
    background: transparent !important;
    border: 1px solid var(--gray-300) !important;
    color: var(--gray-600) !important;
    font-size: 0.7rem !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}

.paginate_button:hover {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}

.paginate_button.current {
    background:  var(--ocean-deep) !important;
    border-color: transparent !important;
    color: var(--white) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    .mobile-menu-btn {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1100;
        background: var(--ocean-deep);
        border: 1px solid var(--gold);
        color: var(--gold);
        width: 40px;
        height: 40px;
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 12px;
    }
    .card-body-elite {
        padding: 15px;
    }
    .form-control-elite, .input-icon {
        max-width: 100%;
    }
    .login-body {
        padding: 25px;
    }
    .login-header {
        padding: 25px;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--gold);
    animation: spin 0.6s linear infinite;
    margin: 20px auto;
}

/* ========== FOCUS VISIBLE ========== */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ========== LOADING STATES ========== */
.btn-elite:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== ICÔNES DANS LES CHAMPS ========== */
.input-icon i {
    color: var(--gold) !important;
}

.form-label i {
    color: var(--gold) !important;
}

/* ========== BOUTON LOGIN ========== */
.btn-login {
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}
