:root {
    --primary: #ff385c;
    --primary-hover: #d90b3e;
    --secondary: #2d3436;
    --bg-body: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --radius: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sidebar-width: 260px;
}

body {
    background-color: var(--bg-body);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT STRUCTURE --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: calc(100% - var(--sidebar-width));
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    .mobile-toggle {
        display: flex;
    }
}

/* Sidebar Content */
.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: #f9fafb;
    color: var(--text-main);
}

.nav-item.active {
    background-color: rgba(255, 56, 92, 0.1);
    color: var(--primary);
}

.nav-item i {
    font-size: 1.2rem;
}

.user-profile {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Cards */
.card-modern {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.card-header-modern {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card-title {
    font-weight: 800;
    color: var(--secondary);
    margin: 0;
    font-size: 1.1rem;
}

.card-body-modern {
    padding: 1.5rem;
}

/* Forms */
.form-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #f3f4f6;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.1);
}

/* Buttons */
.btn-primary-modern {
    background: #ff385c;
    border: none;
    color: white;
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 56, 92, 0.4);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-modern:hover {
    background: #e00b41;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 56, 92, 0.5);
    color: white;
}

.btn-outline-modern {
    background-color: white;
    border: 2px solid #e5e7eb;
    color: #1f2937;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-modern:hover {
    border-color: #1f2937;
    background-color: #1f2937;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-outline-danger {
    border: 2px solid #fee2e2;
    color: #ef4444;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-outline-danger:hover {
    background-color: #ef4444;
    border-color: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-white-modern {
    background: white;
    border: 1px solid #e5e7eb;
    color: var(--text-main);
    border-radius: 8px;
    padding: 8px 12px;
}

/* Navigation Tabs (Vertical & Horizontal) */
.nav-pills .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.2s;
    border-radius: 12px; /* Carré arrondi pour vertical */
    text-align: left;
    margin-bottom: 4px;
}

.nav-pills .nav-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: #e5e7eb;
    color: var(--text-main);
}

.nav-pills .nav-link i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* List Group */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem;
}
.list-group-item:last-child {
    border-bottom: none;
}
