/* ================================
   🎨 CHARTE GRAPHIQUE DEVTEK
   Design moderne & coloré - Style SaaS
   ================================ */

:root {
    /* Couleurs principales DevTek */
    --primary-color: #1e73b1;
    --primary-dark: #155b8a;
    --secondary-color: #ee722b;
    --secondary-dark: #d46224;

    /* Couleurs système */
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Couleurs neutres */
    --black: #000000;
    --white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #777777;
    --bg-light: #f8f9fa;
    --border-color: #e5e5e5;

    /* Gradients modernes */
    --gradient-primary: linear-gradient(135deg, #1e73b1 0%, #155b8a 100%);
    --gradient-secondary: linear-gradient(135deg, #ee722b 0%, #d46224 100%);
    --gradient-hero: linear-gradient(135deg, #1e73b1 0%, #2d8bd1 50%, #ee722b 100%);

    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* ================================
   BASE & TYPOGRAPHY
   ================================ */

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ================================
   NAVBAR MODERNE
   ================================ */

.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar .btn {
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition-base);
}

.navbar .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* ================================
   BOUTONS MODERNES
   ================================ */

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(30, 115, 177, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 115, 177, 0.4);
    background: var(--primary-dark);
}

.btn-secondary,
.btn-warning {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(238, 114, 43, 0.3);
}

.btn-secondary:hover,
.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(238, 114, 43, 0.4);
    background: var(--secondary-dark);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

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

.btn-light:hover,
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0) !important;
}

.btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ================================
   CARDS MODERNES
   ================================ */

.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--white);
    transition: var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 16px 16px 0 0 !important;
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    border: none;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.card-header.bg-warning {
    background: var(--gradient-secondary) !important;
}

.card-body {
    padding: 1.5rem;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ================================
   BADGES & TAGS
   ================================ */

.badge {
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.badge.bg-secondary {
    background: #6c757d !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.badge.bg-warning {
    background: var(--gradient-secondary) !important;
    color: var(--white) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* ================================
   FORMS MODERNES
   ================================ */

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 115, 177, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ================================
   TABLE MODERNE
   ================================ */

.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-primary);
    font-weight: 700;
    border: none;
    padding: 1rem;
}

.table-hover tbody tr {
    transition: var(--transition-fast);
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background: rgba(30, 115, 177, 0.05);
    transform: scale(1.01);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* ================================
   ALERTS MODERNES
   ================================ */

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.15) 100%) !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #065f46 !important;
    border-left: 4px solid #10b981 !important;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%) !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #991b1b !important;
    border-left: 4px solid #ef4444 !important;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(238, 114, 43, 0.1) 0%, rgba(212, 98, 36, 0.15) 100%) !important;
    background-color: rgba(238, 114, 43, 0.1) !important;
    color: #92400e !important;
    border-left: 4px solid var(--secondary-color) !important;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.15) 100%) !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #1e40af !important;
    border-left: 4px solid #3b82f6 !important;
}

/* ================================
   PRE & CODE
   ================================ */

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
}

code {
    background: rgba(30, 115, 177, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    color: var(--primary-color);
}

/* ================================
   ANIMATIONS
   ================================ */

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

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

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

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

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

.slide-in-right {
    animation: slideInRight 0.5s ease;
}

/* ================================
   SPINNER / LOADER
   ================================ */

.spinner-border {
    border-width: 0.25em;
    animation: spin 0.75s linear infinite;
}

/* ================================
   TOAST NOTIFICATIONS
   ================================ */

.toast {
    min-width: 300px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: none;
}

.toast-header {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
}

/* ================================
   FOOTER MODERNE
   ================================ */

footer {
    background: var(--black);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
}

footer a {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

footer a:hover {
    color: var(--secondary-color);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .card-header h4,
    .card-header h5 {
        font-size: 1.1rem;
    }

    pre {
        font-size: 0.8rem;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .card {
        border-radius: 12px;
    }

    .btn {
        font-size: 0.85rem;
    }
}

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

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-hero {
    background: var(--gradient-hero);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
