/* Variables J-Mobil */
:root {
    --jmobil-green: #016c34;
    --jmobil-green-dark: #014d26;
    --jmobil-green-light: #028f45;
    --jmobil-orange: #ef6e34;
    --jmobil-orange-dark: #d45a20;
    --jmobil-orange-light: #ff8550;
    --jmobil-black: #000000;
    --jmobil-gray-light: #f8f9fa;
}

/* Styles globaux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--jmobil-gray-light);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.navbar-nav .nav-link {
    transition: background-color 0.2s;
    border-radius: 0.25rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card.border-orange {
    border-left: 4px solid var(--jmobil-orange) !important;
}

.card.border-green {
    border-left: 4px solid var(--jmobil-green) !important;
}

.card.border-primary {
    border-left: 4px solid #0d6efd !important;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Forms */
.form-control:focus {
    border-color: var(--jmobil-green);
    box-shadow: 0 0 0 0.2rem rgba(1, 108, 52, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary, .btn-success {
    background-color: var(--jmobil-green);
    border-color: var(--jmobil-green);
}

.btn-primary:hover, .btn-success:hover {
    background-color: var(--jmobil-green-dark);
    border-color: var(--jmobil-green-dark);
}

.btn-primary:focus, .btn-success:focus {
    background-color: var(--jmobil-green-dark);
    border-color: var(--jmobil-green-dark);
    box-shadow: 0 0 0 0.2rem rgba(1, 108, 52, 0.5);
}

.btn-warning, .btn-info {
    background-color: var(--jmobil-orange);
    border-color: var(--jmobil-orange);
    color: white;
}

.btn-warning:hover, .btn-info:hover {
    background-color: var(--jmobil-orange-dark);
    border-color: var(--jmobil-orange-dark);
    color: white;
}

.btn-warning:focus, .btn-info:focus {
    background-color: var(--jmobil-orange-dark);
    border-color: var(--jmobil-orange-dark);
    box-shadow: 0 0 0 0.2rem rgba(239, 110, 52, 0.5);
    color: white;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Sous-menu dropdown imbriqué */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > .dropdown-toggle::after {
    transform: rotate(-90deg);
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -2px;
}

/* Responsive - sous-menus en mode mobile */
@media (max-width: 992px) {
    .dropdown-submenu > .dropdown-menu {
        position: relative;
        left: 0;
        margin-left: 1rem;
        margin-top: 0;
        box-shadow: none;
        border-left: 2px solid var(--jmobil-green);
    }
    
    .dropdown-submenu > .dropdown-toggle::after {
        transform: rotate(0deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

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

.card, .alert {
    animation: fadeIn 0.3s ease;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}
