/* ================================================
   VARIABLES CSS ADMIN
   ================================================ */
:root {
    --green-dark: #1a3c34;
    --green-medium: #2e6b52;
    --green-light: #3d8c6f;
    --gold: #d4af37;
    --admin-sidebar: #1e2a24;
}

/* ================================================
   BASE
   ================================================ */
body {
    font-family: 'Inter', sans-serif;
}

/* ================================================
   PAGE DE CONNEXION
   ================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
}

.admin-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--green-medium), var(--green-light));
    border-radius: 12px;
    margin: 0 auto 1rem;
}

.btn-login {
    background-color: var(--green-medium);
    border-color: var(--green-medium);
}

.btn-login:hover {
    background-color: var(--green-dark);
    border-color: var(--green-dark);
}

.dev-info {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    color: white;
}

.dev-info code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* ================================================
   SIDEBAR ADMIN
   ================================================ */
.admin-sidebar {
    width: 260px;
    background-color: var(--admin-sidebar);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--green-medium), var(--green-light));
    border-radius: 8px;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link.active {
    color: white;
    background-color: rgba(62, 140, 111, 0.2);
    border-left-color: var(--green-light);
}

.btn-logout {
    background-color: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
    border: none;
}

.btn-logout:hover {
    background-color: rgba(231, 76, 60, 0.3);
    color: #ff6b6b;
}

/* ================================================
   CONTENU PRINCIPAL
   ================================================ */
.main-content {
    margin-left: 260px;
    padding: 2rem;
}

/* ================================================
   STATISTIQUES
   ================================================ */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-blue {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.stat-icon-green {
    background: rgba(62, 140, 111, 0.1);
    color: var(--green-medium);
}

.stat-icon-orange {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.stat-icon-purple {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

/* ================================================
   CARTES ACTION
   ================================================ */
.action-card {
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
    color: inherit;
}

.action-card i {
    font-size: 2rem;
    color: var(--green-medium);
}

/* ================================================
   ACTIVITÉ
   ================================================ */
.activity-icon {
    font-size: 1.5rem;
}

/* ================================================
   CARTES CATÉGORIES
   ================================================ */
.category-card {
    cursor: move;
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: var(--green-light) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-handle {
    color: #999;
    cursor: grab;
}

.category-handle:active {
    cursor: grabbing;
}

/* ================================================
   TABLE PRODUITS
   ================================================ */
.table-image img {
    width: 60px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
}

.badge-green {
    background-color: rgba(62, 140, 111, 0.1);
    color: var(--green-medium);
}

.badge-blue {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.badge-orange {
    background-color: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-visible {
    background-color: #198754;
}

.status-hidden {
    background-color: #6c757d;
}

.status-soon {
    background-color: #fd7e14;
}

/* ================================================
   UPLOAD DE FICHIERS
   ================================================ */
.file-upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-zone:hover {
    border-color: var(--green-medium);
    background-color: rgba(62, 140, 111, 0.02);
}

.upload-placeholder {
    color: #6c757d;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.upload-preview {
    position: relative;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.btn-remove-file {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-file:hover {
    background-color: #bb2d3b;
    transform: scale(1.1);
}

/* ================================================
   BOUTONS PERSONNALISÉS
   ================================================ */
.btn-primary-green {
    background-color: var(--green-medium);
    border-color: var(--green-medium);
    color: white;
}

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

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

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

    .sidebar-toggle {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
}
