/* Supa SaaS - Styles principaux */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent-blue: #60a5fa;
    --black: #000000;
    --dark-gray: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border-radius: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 20px;
    color: var(--primary-blue);
    font-weight: bold;
}

/* Navigation */
.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(5px);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    font-size: 18px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-gray);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-col {
    flex: 1;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th {
    background: var(--primary-blue);
    color: var(--white);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.table tr:hover {
    background: #f8fafc;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    opacity: 0.7;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--success);
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--warning);
    color: #92400e;
}

.alert-error {
    background: #fef2f2;
    border-color: var(--error);
    color: #991b1b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray);
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-primary { color: var(--primary-blue); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }











/* Styles pour les alertes modernes */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

.alert i {
    margin-right: 12px;
    font-size: 20px;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #34d399;
    color: #065f46;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fbbf24;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #60a5fa;
    color: #1e40af;
}

.alert-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* Animation */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Style pour les alertes toast (popup) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
}

.toast {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
    border-left: 4px solid;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-close {
    margin-left: 15px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background-color: #f0fdf4;
    border-color: #34d399;
    color: #065f46;
}

.toast-error {
    background-color: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

.toast-warning {
    background-color: #fffbeb;
    border-color: #fbbf24;
    color: #92400e;
}

.toast-info {
    background-color: #eff6ff;
    border-color: #60a5fa;
    color: #1e40af;
}


 /* Style pour les boîtes de dialogue personnalisées */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .confirm-dialog {
        background: white;
        border-radius: 12px;
        width: 90%;
        max-width: 400px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        transform: translateY(20px);
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    .modal-overlay.active .confirm-dialog {
        transform: translateY(0);
    }
    
    .confirm-header {
        padding: 20px;
        background: var(--primary);
        color: white;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .confirm-header i {
        font-size: 24px;
    }
    
    .confirm-body {
        padding: 25px 20px;
        color: var(--dark);
        line-height: 1.5;
    }
    
    .confirm-footer {
        padding: 15px 20px;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        border-top: 1px solid #e5e7eb;
    }
    
    .confirm-btn {
        padding: 8px 16px;
        border-radius: 6px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .confirm-btn-cancel {
        background: white;
        border: 1px solid #e5e7eb;
        color: var(--dark);
    }
    
    .confirm-btn-cancel:hover {
        background: #f3f4f6;
    }
    
    .confirm-btn-ok {
        background: var(--primary);
        color: white;
        border: 1px solid var(--primary);
    }
    
    .confirm-btn-ok:hover {
        background: #1a56db;
    }
	
	
	
	
	
	  /*  -------------------- others ----------------*/
	  
	  
	  /* Styles pour la section admin du sidebar */
.nav-separator {
    margin: 20px 0 10px;
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.nav-separator span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Badge de notification pour les paiements en attente */
.notification-badge {
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.notification-badge.urgent {
    background: #dc2626;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Style spécial pour les liens admin */
.nav-item:has(.fa-credit-card) .nav-link,
.nav-item:has(.fa-users) .nav-link,
.nav-item:has(.fa-chart-bar) .nav-link {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-item:has(.fa-credit-card) .nav-link:hover,
.nav-item:has(.fa-users) .nav-link:hover,
.nav-item:has(.fa-chart-bar) .nav-link:hover {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.nav-item:has(.fa-credit-card) .nav-link.active,
.nav-item:has(.fa-users) .nav-link.active,
.nav-item:has(.fa-chart-bar) .nav-link.active {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

/* Effet de brillance pour les notifications urgentes */
.notification-badge.urgent::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 12px;
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Style responsive pour mobile */
@media (max-width: 768px) {
    .nav-separator {
        margin: 15px 0 8px;
        padding: 0 15px;
        padding-top: 12px;
    }
    
    .notification-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 18px;
    }
}

/* Animation d'apparition pour les nouvelles notifications */
@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.notification-badge.new {
    animation: bounceIn 0.5s ease-out;
}

/* Indicateur sonore visuel pour les notifications critiques */
.nav-item:has(.notification-badge.urgent) {
    position: relative;
}

.nav-item:has(.notification-badge.urgent)::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

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