/**
 * ============================================================================
 * SHOPIPLUS THEME - CONFIGURATION VARIABLES
 * ============================================================================
 * Pour modifier le thème, utilisez Rechercher/Remplacer sur les valeurs ci-dessous
 *
 * PALETTE DE COULEURS
 * -------------------
 * Couleur primaire (rouge iCasque):    #ff3c47
 * Couleur secondaire (noir):           #000000
 * Couleur accent (gris foncé):         #2c3e50
 * Couleur texte principal:             #333333
 * Couleur texte secondaire:            #6c757d
 * Couleur fond page:                   #f8f9fa
 * Couleur fond carte:                  #ffffff
 * Couleur bordure:                     #dee2e6
 * Couleur hover:                       #ff1f2d
 * Couleur succès:                      #28a745
 * Couleur danger:                      #dc3545
 * Couleur warning:                     #ffc107
 * Couleur info:                        #17a2b8
 *
 * TYPOGRAPHIE
 * -----------
 * Police principale:                   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif
 * Taille police base:                  14px
 * Taille police petite:                12px
 * Taille police grande:                16px
 * Taille titre h1:                     28px
 * Taille titre h2:                     24px
 * Taille titre h3:                     20px
 *
 * PROPORTIONS & ESPACEMENTS
 * -------------------------
 * Espacement base (unit):              8px
 * Espacement petit:                    4px
 * Espacement moyen:                    16px
 * Espacement grand:                    24px
 * Espacement extra-grand:              32px
 * Largeur sidebar ouverte:             260px
 * Largeur sidebar fermée:              70px
 * Hauteur header:                      70px
 * Border radius:                       4px
 * Border radius carte:                 8px
 *
 * ============================================================================
 */

/* ====================
   RESET & BASE
   ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #ff3c47;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff1f2d;
}

/* ====================
   LAYOUT STRUCTURE
   ==================== */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ====================
   SIDEBAR
   ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #000000;
    color: #ffffff;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #ff3c47;
    border-radius: 4px;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    max-width: 180px;
    height: auto;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-logo {
    max-width: 40px;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.sidebar-menu-item {
    position: relative;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-menu-link:hover,
.sidebar-menu-link.active {
    color: #ffffff;
    background-color: rgba(255, 60, 71, 0.1);
    border-left: 3px solid #ff3c47;
}

.sidebar-menu-icon {
    font-size: 20px;
    min-width: 24px;
    margin-right: 16px;
    text-align: center;
}

.sidebar.collapsed .sidebar-menu-icon {
    margin-right: 0;
}

.sidebar-menu-text {
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-menu-text {
    opacity: 0;
    width: 0;
}

.sidebar-menu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-menu-arrow {
    opacity: 0;
}

.sidebar-menu-item.open .sidebar-menu-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.3);
}

.sidebar-menu-item.open .sidebar-submenu {
    max-height: 1000px;
}

.sidebar-submenu-link {
    display: block;
    padding: 10px 24px 10px 64px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-submenu-link {
    padding-left: 24px;
}

.sidebar-submenu-link:hover,
.sidebar-submenu-link.active {
    color: #ffffff;
    background-color: rgba(255, 60, 71, 0.1);
}

/* ====================
   MAIN CONTENT
   ==================== */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 70px;
}

/* ====================
   HEADER
   ==================== */
.header {
    position: sticky;
    top: 0;
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-toggle-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #333333;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.header-toggle-btn:hover {
    background-color: #f8f9fa;
    color: #ff3c47;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-notification {
    position: relative;
    cursor: pointer;
}

.header-notification-icon {
    font-size: 20px;
    color: #333333;
    transition: color 0.3s ease;
}

.header-notification:hover .header-notification-icon {
    color: #ff3c47;
}

.header-notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff3c47;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.header-lang {
    display: flex;
    align-items: center;
    position: relative;
}

.header-lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.header-lang-btn:hover {
    background-color: #f8f9fa;
}

.header-lang-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

/* Language dropdown menu flags */
.header-lang .dropdown-menu img {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    position: relative;
}

.header-user:hover {
    background-color: #f8f9fa;
}

.header-user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    color: inherit;
}

.header-user-btn:hover {
    background-color: #f8f9fa;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff3c47;
}

.header-user-info {
    display: flex;
    flex-direction: column;
}

.header-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    white-space: nowrap;
}

.header-user-role {
    font-size: 11px;
    color: #6c757d;
}

.header-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.header-user.show .header-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333333;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.header-user-dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.header-user-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.header-user-dropdown-item:hover {
    background-color: #f8f9fa;
    color: #ff3c47;
}

.header-user-dropdown-icon {
    font-size: 16px;
}

/* ====================
   BREADCRUMB
   ==================== */
.breadcrumb-container {
    background-color: #ffffff;
    padding: 16px 24px;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 8px;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #6c757d;
}

.breadcrumb-item a:hover {
    color: #ff3c47;
}

.breadcrumb-item.active {
    color: #333333;
    font-weight: 500;
}

/* ====================
   CONTENT AREA
   ==================== */
.content-area {
    flex: 1;
    padding: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 24px;
}

.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #ff3c47;
}

/* ====================
   FOOTER
   ==================== */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 16px 24px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-logo {
    height: 20px;
}

/* ====================
   BUTTONS
   ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #ff3c47;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #ff1f2d;
    color: #ffffff;
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #218838;
}

/* ====================
   FORMS
   ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #ff3c47;
    box-shadow: 0 0 0 3px rgba(255, 60, 71, 0.1);
}

/* ====================
   DATATABLES CUSTOMIZATION
   ==================== */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
}

.dataTables_wrapper .dt-buttons {
    margin-bottom: 16px;
}

.dataTables_wrapper .dt-buttons .btn {
    background-color: #f8f9fa;
    color: #333333;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    margin-right: 8px;
}

.dataTables_wrapper .dt-buttons .btn:hover {
    background-color: #ff3c47;
    color: #ffffff;
    border-color: #ff3c47;
}

table.dataTable {
    width: 100% !important;
    border-collapse: collapse;
}

table.dataTable thead th {
    background-color: #f8f9fa;
    color: #333333;
    font-weight: 600;
    padding: 12px;
    border-bottom: 2px solid #ff3c47;
}

table.dataTable tbody td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

table.dataTable tbody tr:hover {
    background-color: rgba(255, 60, 71, 0.05);
}

/* ====================
   SELECT2 CUSTOMIZATION
   ==================== */
.select2-container--default .select2-selection--single {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #ff3c47;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #ff3c47;
}

/* ====================
   SWEETALERT2 CUSTOMIZATION
   ==================== */
.swal2-popup {
    border-radius: 8px;
}

.swal2-confirm {
    background-color: #ff3c47 !important;
}

.swal2-confirm:hover {
    background-color: #ff1f2d !important;
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .header-user-info {
        display: none;
    }
}

/* ====================
   UTILITIES
   ==================== */
.text-primary { color: #ff3c47; }
.text-secondary { color: #6c757d; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }

.bg-primary { background-color: #ff3c47; }
.bg-light { background-color: #f8f9fa; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 16px; }

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay i {
    color: #ff3c47;
}

/* ====================
   DROPZONE IMAGE UPLOAD
   ==================== */
.container-profil-logo > .profil-logo .dz-preview,
.container-profil-image > .profil-image .dz-preview {
    display: none;
}

.container-profil-logo > .profil-logo,
.container-profil-image > .profil-image {
    text-align: center;
    display: block;
    width: 190px;
    height: auto;
    min-height: 150px;
    margin: 0 auto 8px auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.container-profil-logo > .profil-logo {
    height: auto;
    background: #ffffff;
    width: 250px;
    max-width: 100%;
}

.container-profil-logo > .profil-logo .filled-logo img,
.container-profil-image > .profil-image .filled-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.container-profil-logo > .profil-logo .empty-logo,
.container-profil-image > .profil-image .empty-image {
    border: 2px dashed #dee2e6;
    padding: 20px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.container-profil-logo > .profil-logo .empty-logo:hover,
.container-profil-image > .profil-image .empty-image:hover {
    border-color: #ff3c47;
    background-color: rgba(255, 60, 71, 0.05);
}

.container-profil-logo > .profil-logo .empty-logo {
    padding: 15px 0px;
}

.container-profil-logo:after,
.container-profil-image:after {
    content: " ";
    clear: both;
    display: block;
}

.container-profil-logo .content-filled-logo,
.container-profil-image .content-filled-image {
    max-width: 100%;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.container-profil-logo .content-filled-logo:hover,
.container-profil-image .content-filled-image:hover {
    transform: scale(1.02);
}

.container-profil-image .dz-message,
.container-profil-logo .dz-message {
    margin: 0;
}

.container-profil-image .dz-message h6,
.container-profil-logo .dz-message h6 {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.container-profil-image .dz-message i,
.container-profil-logo .dz-message i {
    color: #ff3c47;
    font-size: 48px;
    margin-bottom: 12px;
}

.container-profil-image .dz-message .upload-hint,
.container-profil-logo .dz-message .upload-hint {
    color: #495057;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.container-profil-image .dz-message small,
.container-profil-logo .dz-message small {
    display: block;
    color: #6c757d;
    font-size: 12px;
    font-weight: 400;
}

.container-uploader > .uploader-group {
    text-align: center;
    display: block;
    margin: 0 auto;
}

.profil-email-upload .dz-preview {
    display: none;
}

/* ========================================
   Tree Toolbar Styles
   ======================================== */

.jstree.has-toolbar {
    padding-top: 40px;
}

.jstree {
    position: relative;
}

.tree-toolbar {
    height: 35px;
    width: 100%;
    position: absolute;
    top: 0;
    background: #f5f5f5;
    border-bottom: 1px solid #e3e6f0;
    left: 0;
    z-index: 10;
    padding: 5px 10px;
}

.tree-toolbar a.toolbar-button {
    display: inline-block;
    height: 28px;
    width: 32px;
    margin: 0 2px;
    border-radius: 4px;
    background-color: #556ee6;
    color: #fff;
    text-align: center;
    line-height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tree-toolbar a.toolbar-button:hover {
    background-color: #4553b8;
    box-shadow: 0 2px 4px rgba(85, 110, 230, 0.3);
}

.tree-toolbar a.toolbar-button i {
    line-height: 28px;
}
