/* HANDZONE - Styles principaux */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --navbar-height: 60px;
}

/* Mode sombre */
body.theme-dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.theme-dark .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
}

body.theme-dark .sidebar {
    background-color: #2d2d2d;
    border-right-color: #444;
}

body.theme-dark .main-content {
    background-color: #1a1a1a;
}

/* Mode sombre - Menu sidebar */
body.theme-dark .sidebar-menu a {
    color: #e0e0e0 !important;
}

body.theme-dark .sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

body.theme-dark .sidebar-menu li {
    border-bottom-color: #444 !important;
}

/* Mode sombre - Sous-menus */
body.theme-dark .sidebar-menu .submenu a {
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: #d0d0d0 !important;
}

body.theme-dark .sidebar-menu .submenu a:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Mode sombre - Nom du club */
body.theme-dark .club-name {
    color: #e0e0e0 !important;
}

body.theme-dark .sidebar-header h5 {
    color: #ffffff !important;
}

/* Layout général */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    height: var(--navbar-height);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .club-name {
    display: none;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.sidebar-logo {
    max-width: 50px;
    margin-bottom: 0.5rem;
}

.club-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #dee2e6;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-menu a:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar-menu a i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu a i {
    margin-right: 0;
}

/* Sous-menus */
.sidebar-menu .has-submenu > a {
    cursor: pointer;
}

.sidebar-menu .submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.sidebar-menu .has-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-menu .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    padding-left: 0;
}

.sidebar-menu .has-submenu.active .submenu {
    max-height: 500px;
}

.sidebar-menu .submenu li {
    margin: 0;
}

.sidebar-menu .submenu a {
    padding: 0.6rem 1rem 0.6rem 3rem;
    font-size: 0.9rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-menu .submenu a:hover {
    background-color: rgba(0, 0, 0, 0.2);
    padding-left: 3.2rem;
}

.sidebar.collapsed .submenu {
    display: none;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Cards */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Login page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 100%;
}

.login-logo {
    max-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Utilitaires */
.badge {
    font-size: 0.7rem;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}