/* Variables */
:root {
    --primary-color: #271090;
    --secondary-color: #f7fafc;
    --accent-color: #271090;
    --text-color: #2d3748;
    --light-text: #f8f9fa;
    --shadow: 0 4px 16px rgba(94, 114, 228, 0.10);
    --card-radius: 0.95rem;
    --transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
}

/* Body & Main */
body {
    background: linear-gradient(135deg, #f7fafc 0%, #e3e9f7 100%);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.main-content {
    margin-left: 280px;
    padding: 2rem 1.5rem 2.5rem 1.5rem;
    transition: var(--transition);
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
        padding: 1.2rem 0.5rem 2.5rem 0.5rem;
    }
}

/* Navbar */
.navbar-brand img {
    height: 36px;
    margin-right: 10px;
}

.navbar {
    border-bottom: 1.5px solid #e3e9f7;
    background: #fff;
    box-shadow: var(--shadow);
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    transition: color 0.18s;
}

.nav-link:hover,
.nav-link.active {
    color: #271090 !important;
    background: #f6f9fe;
    border-radius: 6px;
}

/* Alerts */
.alert {
    border-radius: 0.7rem;
    box-shadow: var(--shadow);
    font-size: 1rem;
    padding: 1rem 1.25rem;
}

/* Card styling */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    background: #fff;
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 32px rgba(94, 114, 228, 0.13);
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

/* Table styling */
.table {
    border-radius: 0.7rem;
    overflow: hidden;
}

.table thead {
    background: #f6f9fe;
    color: var(--primary-color);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background: #f0f4fa;
}

.table-striped>tbody>tr:nth-of-type(odd) {
    background: #f8fafc;
}

/* Icon shapes */
.icon-shape {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3e9f7 0%, #10B98122 100%);
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary,
.btn-outline-primary:hover {
    /* background: var(--primary-color); */
    border: none;
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
}

.btn-warning,
.btn-outline-warning:hover {
    background: #dda20a;
    color: #222;
    border: none;
}

.btn-outline-warning {
    color: #dda20a;
    border: 1.5px solid #dda20a;
    background: transparent;
}

.btn-outline-warning:hover {
    color: #fff;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 24px 0 16px 0;
    background: #f6f9fe;
    border-top: 1.5px solid #e3e9f7;
    text-align: center;
    color: #888;
    font-size: 1rem;
}

footer .nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: color 0.18s;
}

footer .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Scrollbar custom */
::-webkit-scrollbar {
    width: 8px;
    background: #e3e9f7;
}

::-webkit-scrollbar-thumb {
    background: #10B98155;
    border-radius: 4px;
}

/* Responsive table for mobile */
@media (max-width: 576px) {
    .table-responsive {
        font-size: 0.97rem;
    }

    .card-title {
        font-size: 1.15rem;
    }
}

.member-id-card {
    font-family: 'Montserrat', Arial, sans-serif;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #f8fafc 80%, #10B98111 100%);
}

/* Cas où la sidebar est absente (pages d'authentification) */
/* body:not(.authenticated) .main-content {
    margin-left: 0;
}
body:not(.authenticated) .navbar {
    border-bottom: none;
    box-shadow: none;
} */