/* Variables globales */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --download-color: linear-gradient(135deg, #f59e0b, #d97706);
    --primary-color: #2563eb;
    --primary-blue: #0077b6;
    --primary-blue-light: #90e0ef;
    --primary-blue-dark: #023e8a;
    --secondary-blue: #48cae4;
    --accent-cyan: #00b4d8;
    --white: #ffffff;
    --gray-50: #f9f9f9;
    --gray-100: #f1f1f1;
    --gray-200: #e0e0e0;
    --gray-300: #cccccc;
    --gray-400: #999999;
    --gray-500: #777777;
    --gray-600: #555555;
    --gray-700: #333333;
    --gray-800: #1a1a1a;
    --gray-900: #0d0d0d;
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --text-white: var(--white);
    --bg-primary: var(--gray-50);
    --bg-secondary: var(--gray-50);
    --bg-dark: var(--gray-900);
    --bg-card: var(--white);
    --bg-accent: rgba(0, 119, 182, 0.05);
    --border-color: var(--gray-200);
    --border-color-hover: var(--primary-blue);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.09);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-colored: 0 10px 25px rgba(0, 119, 182, 0.12);
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));

    --gradient-subtle: linear-gradient(135deg, rgba(0, 119, 182, 0.05), rgba(0, 180, 216, 0.05));
    --max-width-site: 1400px;
    --max-width-content: 1200px;
    --max-width-text: 800px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.2s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    --navbar-height: 60px;
    --sidebar-width: 0px;
    --secondary-color: #48cae4;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --primary-dark: #1d4ed8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--dark-color);
    min-height: 100vh;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/*-------------------------------------------------------------Dashboard-Card*/
.header-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}
a {
    text-decoration: none;
}

    /* Pour que le lien reste identique après avoir été cliqué */
    a:visited {
        text-decoration: none;
    }
.stat-card {
    flex: 1 1 calc(100% - 15px);
    min-width: 250px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

/* Pour les tablettes */
@media (min-width: 768px) {
    .stat-card {
        flex: 1 1 calc(50% - 15px);
    }

    .header-wrapper h1 {
        font-size: 26px;
    }
}

/* Pour les écrans d'ordinateur */
@media (min-width: 1200px) {
    .stat-card {
        flex: 1 1 calc(25% - 15px);
    }

    .header-wrapper h1 {
        font-size: 28px;
    }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}



    .stat-card h3 i {
        color: var(--primary-color);
    }

.stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .value {
        font-size: 28px;
    }
}

.trend {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}

    .trend.positive {
        background-color: #e8f5e9;
        color: var(--success-color);
    }

    .trend.negative {
        background-color: #ffebee;
        color: var(--danger-color);
    }

    .trend.neutral {
        background-color: var(--light-color);
        color: #616161;
    }

.stat-footer {
    margin-top: 10px;
}

.stat-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

    .stat-link:hover {
        color: var(--primary-color);
    }

/* ----------------------DashboardSection*/
.dashboard-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
    overflow-x: auto;
}

@media (min-width: 768px) {
    .dashboard-section {
        padding: 20px;
        margin-bottom: 30px;
    }
}

.dashboard-section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

    .dashboard-section-header h2 {
        font-size: 18px;
        color: var(--primary-color);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

@media (min-width: 768px) {
    .dashboard-section-header h2 {
        font-size: 20px;
    }
}

.dashboard-section-header h2 i {
    color: var(--secondary-color);
}

/* Tables responsives */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 650px;
}

    .data-table th {
        text-align: left;
        padding: 12px 15px;
        background-color: #f8f9fa;
        color: var(--gray-color);
        font-weight: 500;
        border-bottom: 2px solid #eee;
        white-space: nowrap;
    }

    .data-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        vertical-align: middle;
    }

    .data-table tr:last-child td {
        border-bottom: none;
    }

    .data-table tr:hover {
        background-color: #f8f9fa;
    }

.dashboard-section-header .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Styles pour la légende de statuts cliquable */
.status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.legend-item {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

    .legend-item:hover {
        transform: translateY(-2px);
    }

.shop-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    color: #495057;
    font-size: 14px;
}

    .shop-info svg {
        width: 16px;
        height: 16px;
        color: #007bff;
    }

.validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}


 h3 {
    color: white;
}



/*Invoice Create Modal RFIDSTORAGE*/



.card-header {
    background: var(--gradient-primary);
    padding: 24px 32px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

    .card-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
        opacity: 0.3;
    }

.card-footer {
    padding: 24px 32px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}


.invoice-type-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.invoice-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

    .invoice-option:hover:not(.disabled) {
        border-color: #3b82f6;
        background-color: #f8fafc;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .invoice-option.disabled {
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }

.option-icon {
    margin-right: 15px;
    color: #3b82f6;
    flex-shrink: 0;
}

.option-content h4 {
    margin: 0 0 5px 0;
    color: #1f2937;
    font-weight: 600;
}

.option-content p {
    margin: 0 0 5px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.text-muted {
    color: #6b7280;
    font-size: 12px;
}

.text-warning {
    color: var(--warning-color);
    font-size: 12px;
}

.processing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 10px;
    background-color: #f8fafc;
    border-radius: 4px;
    margin-top: 15px;
}


.truncate-20 {
    display: inline-block;
    max-width: 20ch; /* environ 20 caractères */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}


.container {
    margin-top: 80px;
}

/*Inventory empty*/

.search-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-accent);
    border-bottom: 1px solid var(--border-color);
}

.active-filters-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--primary-blue);
    color: var(--text-white);
    font-size: 0.9rem;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    text-align: center;
    color: var(--text-secondary);
}

    .no-results svg {
        color: var(--text-muted);
        margin-bottom: var(--spacing-lg);
    }

    .no-results h3 {
        margin: var(--spacing-md) 0;
        color: var(--text-primary);
    }

@media (max-width: 768px) {
    .container {
        margin-top: 0;
    }
}
h4 {
    grid-column: 1 / -1;
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--secondary-color);
}


/*shop*/
/* =====================================================
   SHOP SEPARATOR - Séparateur de boutiques
   ===================================================== */

.shop-separator {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 20px;
    margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    width:700px;
}

    .shop-separator::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.1) 75%, transparent 75%, transparent);
        background-size: 50px 50px;
        opacity: 0.3;
        pointer-events: none;
    }

.shop-separator-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    z-index: 1;
    margin-left:20px;
}

    .shop-separator-icon svg {
        stroke: var(--white);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

.shop-separator-content {
    flex: 1;
    z-index: 1;
}

.shop-separator-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
    .shop-separator-title a{
        color:var(--white);
        text-decoration:underline;
    }
        .shop-separator-title a:visited {
            color: var(--white);
            text-decoration: underline;
        }
    .shop-separator-stats {
        display: flex;
        gap: var(--spacing-lg);
        margin-top: var(--spacing-xs);
    }

.shop-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

    .shop-stat svg {
        stroke: rgba(255, 255, 255, 0.8);
    }

.shop-separator-address {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    z-index: 1;
    margin:
}

    .shop-separator-address svg {
        stroke: rgba(255, 255, 255, 0.9);
        flex-shrink: 0;
    }

/* Loader */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    gap: var(--spacing-lg);
}

    .loading-container .spinner {
        width: 48px;
        height: 48px;
        border: 4px solid var(--gray-200);
        border-top: 4px solid var(--primary-color);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .loading-container p {
        color: var(--text-secondary);
        font-size: 1rem;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =====================================================
   RESPONSIVE - Shop Separator
   ===================================================== */

@media (max-width: 768px) {
    .shop-separator {
        padding: var(--spacing-md);
        flex-wrap: wrap;
    }

    .shop-separator-icon {
        width: 40px;
        height: 40px;
    }

        .shop-separator-icon svg {
            width: 20px;
            height: 20px;
        }

    .shop-separator-title {
        font-size: 1.25rem;
    }

    .shop-separator-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .shop-stat {
        font-size: 0.85rem;
    }

    .shop-separator-address {
        width: 100%;
        margin-top: var(--spacing-sm);
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .shop-separator {
        margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    }

    .shop-separator-content {
        width: 100%;
    }

    .shop-separator-stats {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}


