/* Reset et variables */
:root {
    --primary-color: #4F46E5;
    /* Indigo modern */
    --primary-hover: #4338CA;
    --secondary-color: #1E293B;
    /* Slate dark */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --light-color: #F3F4F6;
    --dark-color: #111827;
    --text-color: #374151;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #F9FAFB;
    -webkit-font-smoothing: antialiased;
}

/* Header & Glassmorphism */
header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-buttons {
    justify-content: center;
}

.nav-links {
    display: none;
}

.mobile-menu-btn {
    display: block;
}


.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    /* Réduit de 1.5rem */
    letter-spacing: -0.025em;
    color: var(--dark-color) !important;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    /* Réduit pour gagner de l'espace */
    color: var(--secondary-color) !important;
    padding: 0.5rem 0.6rem !important;
    /* Réduit le padding horizontal */
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    /* Empêche le retour à la ligne du texte */
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(79, 70, 229, 0.05);
}

.nav-link.active {
    color: white !important;
    background-color: var(--primary-color) !important;
}

/* Supprime le surbrillance bleue au clic sur mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Dropdown au survol (Desktop uniquement) */
@media (min-width: 992px) {
    .dropdown-hover:hover>.dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.2s ease-in-out;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons Modernisés */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
    /* Changé de none pour supporter les boutons outline */
}

.btn-primary {
    background-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: #edf2f7;
    /* Gris bleuté plus visible */
    color: var(--secondary-color);
    border: 1px solid #cbd5e0;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e0;
    color: var(--dark-color) !important;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    background-color: #f7fafc;
    border-color: #cbd5e0;
    color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: #edf2f7;
    border-color: var(--secondary-color);
    color: var(--secondary-color) !important;
}

/* Corrections pour les autres variantes Bootstrap */
.btn-info:hover,
.btn-warning:hover,
.btn-light:hover {
    color: var(--dark-color) !important;
}

.btn-light {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.btn-light:hover {
    background-color: #e9ecef;
}

.btn-success:hover,
.btn-danger:hover,
.btn-primary:hover,
.btn-success:active,
.btn-danger:active,
.btn-primary:active,
.btn-success:focus,
.btn-danger:focus,
.btn-primary:focus {
    color: white !important;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: 4rem 0;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

}

/* Optimisation Header pour écrans intermédiaires (Tablettes/Laptops) */
@media (min-width: 992px) and (max-width: 1250px) {
    .navbar-nav .nav-link {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.9rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }

    .me-3 {
        margin-right: 0.5rem !important;
    }

    .dropdown-toggle {
        font-size: 0.9rem;
    }
}