/* ============================================
   HODD Global - Styles personnalisés
   ============================================ */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* ============================================
   Général
   ============================================ */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.main-content {
    min-height: 100vh;
}

/* ============================================
   Navigation
   ============================================ */

.navbar-brand {
    font-size: 1.5rem;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    overflow-y: auto;
    z-index: 1000;
}

/* Décalage du contenu pour la sidebar fixe */
.flex-grow-1 {
    margin-left: 250px !important;
}

.sidebar .nav-link {
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color) !important;
}

/* ============================================
   Cards & Widgets
   ============================================ */

.stat-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card.info {
    border-left-color: var(--info-color);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* ============================================
   Tables
   ============================================ */

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ============================================
   Badges & Status
   ============================================ */

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   Forms
   ============================================ */

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* ============================================
   Login Page
   ============================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 2rem;
    text-align: center;
}

.login-header i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ============================================
   Dashboard
   ============================================ */

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.quick-action-btn {
    width: 100%;
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Project Cards
   ============================================ */

.project-card {
    border-radius: 10px;
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 10px 10px 0 0;
}

.project-budget {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

/* ============================================
   Progress Bars
   ============================================ */

.progress {
    height: 25px;
    border-radius: 15px;
}

.progress-bar {
    border-radius: 15px;
    font-weight: 500;
}

/* ============================================
   Timeline
   ============================================ */

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
}

/* ============================================
   Responsive
   ============================================ */

/* ============================================
   Responsive
   ============================================ */

/* Desktop styles (default behavior defined above, but we enforce fixed positioning here for larger screens) */
@media (min-width: 769px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 250px;
        overflow-y: auto;
        z-index: 1000;
        display: block !important;
    }

    .flex-grow-1 {
        margin-left: 250px !important;
        width: calc(100% - 250px) !important;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .d-flex {
        flex-direction: column;
    }

    .sidebar {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        /* Override inline style removed but just in case */
        position: relative !important;
        margin-bottom: 1rem;
    }

    .sidebar .nav {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .sidebar .nav-item {
        margin-right: 0.5rem;
        margin-bottom: 0 !important;
    }

    .sidebar .sidebar-logo {
        max-width: 150px;
        margin: 0 auto 1rem auto;
        display: block;
    }

    /* Hide user info on mobile to save space, or style differently */
    .sidebar h5,
    .sidebar p.text-muted {
        display: none;
    }

    .flex-grow-1 {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem !important;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .dashboard-header {
        padding: 1.5rem;
        text-align: center;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* ============================================
   Utilities
   ============================================ */

.text-muted-light {
    color: #6c757d;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.shadow-sm-hover {
    transition: box-shadow 0.3s;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   Activity Gallery Animations
   ============================================ */

.transition-scale {
    transition: transform 0.5s ease;
}

.project-card:hover .transition-scale {
    transform: scale(1.1);
}

.transition-opacity {
    transition: opacity 0.3s ease-in-out;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

/* Ensure images cover the area well */
.object-fit-cover {
    object-fit: cover;
}