:root {
    --primary: #15231e;
    --secondary: #d3ab4f;
    --tertiary: #22302b;
    --white: #ffffff;
    --light: #f5f6f4;
    --text: #26312c;
    --muted: #7c8782;
    --border: #e3e7e4;
    --sidebar-width: 270px;
    --shadow: 0 8px 30px rgba(21, 35, 30, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Noto Sans", "Alegreya Sans", Arial, sans-serif;
    background: var(--light);
    color: var(--text);
}

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1050;
}

.sidebar-brand {
    height: 85px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 43px; height: 43px;
    border-radius: 12px;
    background: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-right: 12px;
}

.brand-title { font-size: 19px; font-weight: 700; }
.sidebar-brand small { color: rgba(255,255,255,.55); }

.sidebar-menu {
    flex: 1;
    padding: 20px 13px;
    overflow-y: auto;
}

.menu-title {
    color: rgba(255,255,255,.38);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin: 18px 12px 8px;
}

.sidebar-link {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 14px;
    margin-bottom: 5px;
    color: rgba(255,255,255,.72);
    text-decoration: none;
    border-radius: 10px;
    transition: .2s;
}

.sidebar-link i { font-size: 17px; width: 20px; text-align: center; }
.sidebar-link:hover { background: rgba(255,255,255,.07); color: white; }
.sidebar-link.active { background: var(--secondary); color: var(--primary); font-weight: 700; }

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.admin-mini { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--secondary); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
}
.admin-mini strong { display: block; font-size: 13px; }
.admin-mini small { color: rgba(255,255,255,.5); }

.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; }

.topbar {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.topbar-title { font-weight: 700; font-size: 18px; }
.mobile-menu-btn { display: none; }

.page-content { padding: 30px; }

.card-custom {
    background: white;
    border: 0;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.btn-primary-custom {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.btn-primary-custom:hover {
    background: var(--tertiary);
    border-color: var(--tertiary);
    color: white;
}

.btn-gold {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--primary);
    font-weight: 700;
}
.btn-gold:hover {
    background: #c29a3e;
    border-color: #c29a3e;
    color: var(--primary);
}

/* Fond cliquable derrière le menu latéral, sur mobile uniquement */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(21, 35, 30, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: .25s; }
    .sidebar.show { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .mobile-menu-btn {
        display: inline-flex;
        width: 40px; height: 40px;
        align-items: center; justify-content: center;
        border: 0; border-radius: 10px;
        background: var(--primary); color: white;
    }
}

@media (min-width: 992px) {
    /* Sur ordinateur le menu est toujours visible : pas de fond assombri */
    .sidebar-overlay { display: none; }
}

@media (max-width: 575px) {
    .page-content { padding: 18px; }
    .topbar { padding: 0 18px; }
}
