﻿/* IZGestia — mise en forme du logiciel (chargée par index.html). */
:root {
    --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981; --success-dark: #059669;
    --warning: #f59e0b; --warning-dark: #d97706;
    --danger: #ef4444; --danger-dark: #dc2626;
    --info: #06b6d4; --dark: #1e293b;
    --light: #f8fafc; --gray: #64748b; --gray-light: #e2e8f0; --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; line-height: 1.6; background: var(--gradient-primary); color: var(--dark); min-height: 100vh; }
.main-card { background: var(--white); border-radius: 24px; box-shadow: var(--shadow-xl); overflow: hidden; min-height: 90vh; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); }
.header { background: var(--gradient-dark); color: var(--white); padding: 35px; text-align: center; position: relative; overflow: hidden; }
.header::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(45deg, transparent 30%, rgba(99, 102, 241, 0.1) 50%, rgba(139, 92, 246, 0.1) 70%, transparent 90%); animation: headerFlow 8s ease-in-out infinite; }
@keyframes headerFlow { 0%, 100% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(5deg) scale(1.05); } }
.title-container { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 15px; position: relative; z-index: 2; }
.electric-logo { font-size: 4.5rem; animation: logoFloat 3s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)); position: relative; }
.electric-logo i { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.header h1 { font-size: 3.2rem; margin: 0; font-weight: 800; background: linear-gradient(135deg, #a78bfa, #c084fc, #e879f9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 3px; text-transform: uppercase; }
.header .subtitle { font-size: 1.1rem; opacity: 0.9; margin-top: 10px; position: relative; z-index: 2; color: #94a3b8; font-weight: 300; letter-spacing: 2px; }
.nav-tabs { display: flex; background: var(--white); border-bottom: 2px solid var(--gray-light); padding: 0 20px; flex-wrap: wrap; gap: 5px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav-tab { padding: 16px 20px; background: none; border: none; font-size: 0.9rem; font-weight: 600; color: var(--gray); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 8px; white-space: nowrap; position: relative; border-radius: 8px 8px 0 0; flex-shrink: 0; }
.nav-tab i { font-size: 1.1rem; transition: transform 0.3s ease; }
.nav-tab:hover { color: var(--primary); background: linear-gradient(to top, rgba(99, 102, 241, 0.05), transparent); }
.nav-tab:hover i { transform: translateY(-2px); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: linear-gradient(to top, rgba(99, 102, 241, 0.1), transparent); }
.content { padding: 30px; background: var(--light); }
.section { display: none; animation: fadeIn 0.4s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
h2 { color: var(--dark); font-size: 1.8rem; font-weight: 700; margin-bottom: 25px; display: flex; align-items: center; gap: 12px; border-left: 5px solid var(--primary); padding-left: 20px; }
h2 i { color: var(--primary); background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
h3 { color: var(--dark); font-size: 1.3rem; font-weight: 600; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.btn { padding: 12px 24px; border: none; border-radius: 12px; cursor: pointer; font-size: 0.95rem; font-weight: 600; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; gap: 10px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.btn::before { content: ""; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); transition: width 0.5s, height 0.5s; }
.btn:hover::before { width: 300px; height: 300px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gradient-primary); color: var(--white); box-shadow: var(--shadow-md), var(--shadow-glow); }
.btn-success { background: var(--gradient-success); color: var(--white); box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.2); }
.btn-danger { background: var(--gradient-danger); color: var(--white); box-shadow: var(--shadow-md), 0 0 20px rgba(239, 68, 68, 0.2); }
.btn-warning { background: var(--gradient-warning); color: var(--dark); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--gradient-dark); color: var(--white); }
.btn-info { background: var(--gradient-secondary); color: var(--white); box-shadow: var(--shadow-md); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-xs { padding: 4px 10px; font-size: 0.7rem; border-radius: 6px; }
.form-container { background: var(--white); padding: 30px; border-radius: 20px; margin-bottom: 30px; border: 1px solid var(--gray-light); box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 20px; position: relative; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--dark); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 2px solid var(--gray-light); border-radius: 12px; font-size: 1rem; transition: all 0.3s; background: var(--white); color: var(--dark); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-row .form-group { flex: 1; }
.suggestions-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 2px solid var(--primary); border-top: none; border-radius: 0 0 12px 12px; max-height: 250px; overflow-y: auto; z-index: 100; display: none; box-shadow: var(--shadow-lg); }
.suggestions-dropdown.show { display: block; }
.suggestions-dropdown .suggestion-item { padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--gray-light); font-size: 0.9rem; transition: background 0.2s; }
.suggestions-dropdown .suggestion-item:hover { background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1)); }
.suggestions-dropdown .suggestion-item:last-child { border-bottom: none; }
.suggestions-dropdown .suggestion-item .sugg-reference { color: var(--primary); font-weight: 600; font-size: 0.8rem; }
.suggestions-dropdown .suggestion-item .sugg-stock { color: var(--gray); font-size: 0.75rem; float: right; }
.table-container { background: var(--white); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-md); margin-top: 20px; border: 1px solid var(--gray-light); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { background: var(--gradient-dark); color: var(--white); padding: 16px 20px; text-align: left; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
td { padding: 14px 20px; border-bottom: 1px solid var(--gray-light); color: var(--dark); }
tr { transition: background 0.2s ease; }
tr:hover { background: linear-gradient(to right, rgba(99, 102, 241, 0.03), transparent); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin-bottom: 35px; }
.stat-card { background: var(--white); padding: 30px 25px; border-radius: 20px; box-shadow: var(--shadow-md); text-align: center; border: none; position: relative; overflow: hidden; transition: all 0.3s ease; }
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gradient-primary); }
.stat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.stat-value { font-size: 2.8rem; font-weight: 800; background: linear-gradient(135deg, var(--dark), var(--primary-dark)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-unit { font-size: 0.9rem; color: var(--gray); margin-left: 5px; font-weight: 400; }
.alert { padding: 18px 25px; border-radius: 16px; margin-bottom: 25px; display: flex; align-items: flex-start; gap: 18px; border: none; position: relative; overflow: hidden; box-shadow: var(--shadow-md); flex-wrap: wrap; }
.alert-warning { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-left: 6px solid var(--warning); color: #92400e; }
.alert-danger { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-left: 6px solid var(--danger); color: #991b1b; }
.alert-info { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-left: 6px solid var(--info); color: #1e3a8a; }
.alert-critical { background: linear-gradient(135deg, #fee2e2, #fecaca); border-left: 6px solid var(--danger); color: #991b1b; animation: alertPulse 1s ease-in-out infinite; }
.alert-fournisseur { background: linear-gradient(135deg, #fff7ed, #ffedd5); border-left: 6px solid #f97316; color: #7c2d12; }
@keyframes alertPulse { 0%, 100% { box-shadow: var(--shadow-md); } 50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.5); } }
.progress-container { margin: 25px 0; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; color: var(--dark); }
.progress-bar { height: 12px; background: var(--gray-light); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient-primary); border-radius: 100px; transition: width 0.5s ease; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); z-index: 1000; align-items: flex-start; justify-content: center; padding: 15px; overflow-y: auto; }
.modal-content { background: var(--white); border-radius: 28px; padding: 35px; width: 90%; max-width: 800px; position: relative; animation: modalSlideIn 0.3s ease; box-shadow: var(--shadow-xl); max-height: 90vh; overflow-y: auto; margin: 20px auto; }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.close { position: absolute; right: 25px; top: 25px; font-size: 28px; cursor: pointer; color: var(--gray); transition: all 0.3s; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--light); }
.close:hover { color: var(--danger); background: #fee2e2; transform: rotate(90deg); }
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--gradient-primary); }
.login-box { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); padding: 45px; border-radius: 32px; width: 100%; max-width: 450px; box-shadow: var(--shadow-xl); text-align: center; border: 1px solid rgba(255, 255, 255, 0.3); }
.login-box h2 { color: var(--primary); margin-bottom: 10px; font-size: 2.2rem; border: none; padding: 0; justify-content: center; }
.login-box p { color: var(--gray); margin-bottom: 35px; }
.login-box input { width: 100%; padding: 16px 18px; margin-bottom: 20px; border: 2px solid var(--gray-light); border-radius: 16px; font-size: 1rem; transition: all 0.3s; background: var(--white); }
.login-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.stock-light { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: 10px; vertical-align: middle; box-shadow: 0 0 15px currentColor; animation: lightPulse 1.5s ease-in-out infinite; }
.stock-light.red { background: var(--danger); color: var(--danger); box-shadow: 0 0 20px var(--danger); }
.stock-light.green { background: var(--success); color: var(--success); box-shadow: 0 0 20px var(--success); }
@keyframes lightPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.1); } }
.price { font-weight: 700; color: var(--success-dark); }
.price::after { content: " DH"; font-size: 0.85em; opacity: 0.7; }
#notification { position: fixed; top: 20px; right: 20px; padding: 16px 28px; border-radius: 16px; color: var(--white); z-index: 1000; display: none; animation: slideIn 0.3s ease; box-shadow: var(--shadow-lg); font-weight: 500; max-width: 90vw; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.payment-methods { display: flex; gap: 20px; margin-bottom: 25px; }
.payment-method { flex: 1; padding: 20px; border: 2px solid var(--gray-light); border-radius: 20px; cursor: pointer; text-align: center; transition: all 0.3s; background: var(--white); }
.payment-method:hover, .payment-method.active { border-color: var(--primary); background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05)); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.payment-method i { font-size: 2.5rem; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 12px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.cart-container { background: var(--white); border-radius: 16px; padding: 20px; margin-bottom: 25px; border: 2px solid var(--primary-light); }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.cart-items { max-height: 300px; overflow-y: auto; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid var(--gray-light); flex-wrap: wrap; gap: 8px; }
.cart-total { text-align: right; font-size: 1.2rem; font-weight: 700; margin-top: 15px; padding-top: 10px; border-top: 2px solid var(--primary); }
.remise-totale { background: #fef3c7; border: 2px dashed var(--warning); border-radius: 12px; padding: 15px; margin-top: 15px; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.badge-warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.badge-danger { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; }
.badge-info { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.client-list-container, .fournisseur-list-container { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.client-list-sidebar, .fournisseur-list-sidebar { background: var(--white); border-radius: 16px; padding: 15px; box-shadow: var(--shadow-md); max-height: 600px; overflow-y: auto; }
.client-list-item, .fournisseur-list-item { padding: 12px 15px; margin-bottom: 5px; border-radius: 12px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; display: flex; align-items: center; gap: 10px; }
.client-list-item:hover, .fournisseur-list-item:hover { background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05)); border-color: var(--primary-light); }
.client-list-item.active, .fournisseur-list-item.active { background: var(--gradient-primary); color: var(--white); }
.client-detail-content { background: var(--white); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-md); }
.client-header-info { background: var(--gradient-dark); color: var(--white); padding: 20px; border-radius: 16px; margin-bottom: 20px; }
.situation-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 500px; }
.situation-table th { background: var(--dark); color: var(--white); padding: 12px 10px; font-size: 0.8rem; }
.situation-table td { padding: 10px; border-bottom: 1px solid var(--gray-light); }
.reste-total { background: var(--gradient-primary); color: var(--white); padding: 15px 20px; border-radius: 12px; margin-top: 20px; font-size: 1.3rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.type-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-align: center; min-width: 80px; }
.type-badge.BL { background: #dbeafe; color: #1e40af; }
.type-badge.VERSEMENT { background: #d1fae5; color: #065f46; }
.type-badge.SOLDE_INITIAL { background: #fef9c3; color: #713f12; font-weight: bold; }
.type-badge.CHEQUE { background: #fce7f3; color: #9d174d; }
.type-badge.LCN { background: #e0e7ff; color: #3730a3; }
.type-badge.VIREMENT { background: #cffafe; color: #155e75; }
.type-badge.FACTURE { background: #dbeafe; color: #1e40af; }
.type-badge.BON_ACHAT { background: #e0e7ff; color: #3730a3; }
.type-badge.REMISE { background: #fecaca; color: #991b1b; }
.photo-thumbnail { width: 150px; height: auto; cursor: pointer; border-radius: 8px; transition: transform 0.2s; }
.photo-thumbnail:hover { transform: scale(1.05); }
.photo-fullscreen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-fullscreen img { max-width: 90%; max-height: 90%; object-fit: contain; }
.categorie-simple-card { background: var(--white); border-radius: 16px; padding: 20px; margin-bottom: 15px; border: 1px solid var(--gray-light); display: flex; align-items: center; justify-content: space-between; }
.categorie-simple-info { display: flex; align-items: center; gap: 15px; flex: 1; }
.categorie-simple-info i { font-size: 1.5rem; color: var(--primary); }
.user-role-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-left: 10px; background: rgba(255,255,255,0.2); color: white; }
.fullscreen-btn { position: fixed; top: 15px; right: 15px; z-index: 9999; background: var(--gradient-primary); color: white; border: none; border-radius: 50%; width: 45px; height: 45px; cursor: pointer; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.3s; }
.fullscreen-btn:hover { transform: scale(1.1); }
.btn-confirm-lcn { background: linear-gradient(135deg, #10b981, #34d399) !important; color: white !important; border: none !important; padding: 8px 16px !important; border-radius: 20px !important; cursor: pointer !important; font-weight: bold !important; font-size: 0.85rem !important; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3) !important; white-space: nowrap !important; transition: all 0.3s !important; }
.btn-confirm-lcn:hover { transform: scale(1.05) !important; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5) !important; }
.mobile-card { display: none; }
.situation-action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.lcn-alert-item { padding: 10px 12px; background: rgba(255,255,255,0.9); border-radius: 8px; border-left: 4px solid #3b82f6; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.date-filter-bar { background: var(--white); border-radius: 16px; padding: 15px 20px; margin-bottom: 15px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 15px; flex-wrap: wrap; border: 1px solid var(--gray-light); }
.date-filter-bar label { font-weight: 600; font-size: 0.85rem; color: var(--dark); white-space: nowrap; }
.date-filter-bar input[type="date"] { padding: 8px 12px; border: 2px solid var(--gray-light); border-radius: 10px; font-size: 0.85rem; transition: all 0.3s; }
.date-filter-bar input[type="date"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); outline: none; }
.date-filter-bar .btn-reset { padding: 8px 16px; font-size: 0.85rem; border-radius: 10px; background: var(--light); color: var(--gray); border: 1px solid var(--gray-light); cursor: pointer; }
.payment-mode-link { color: var(--primary); cursor: pointer; text-decoration: underline; font-weight: 600; transition: all 0.2s; }
.payment-mode-link:hover { color: var(--primary-dark); text-decoration: none; }
.mobile-transaction-card { background: var(--white); border: 1px solid var(--gray-light); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.mobile-transaction-card .mtc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 5px; }
.mobile-transaction-card .mtc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; font-size: 0.8rem; }
.mobile-transaction-card .mtc-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.photo-upload-mini { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 6px 10px; background: var(--light); border-radius: 8px; border: 1px dashed var(--primary-light); font-size: 0.8rem; color: var(--primary); transition: all 0.2s; }
.photo-upload-mini:hover { background: rgba(99, 102, 241, 0.1); border-color: var(--primary); }
.photo-upload-mini img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.traite-filter-bar { background: var(--white); border-radius: 16px; padding: 12px 20px; margin-bottom: 15px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--gray-light); }
.traite-filter-bar button { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--gray-light); background: var(--white); cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.traite-filter-bar button.active { background: var(--gradient-primary); color: white; border-color: var(--primary); }
.search-bar-cheque { background: var(--white); border-radius: 16px; padding: 12px 20px; margin-bottom: 15px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 10px; border: 1px solid var(--gray-light); }
.search-bar-cheque input { flex: 1; padding: 10px 14px; border: 2px solid var(--gray-light); border-radius: 10px; font-size: 0.9rem; min-width: 200px; }
.search-bar-cheque input:focus { outline: none; border-color: var(--primary); }
.articles-history-modal-content { max-width: 1000px; width: 95%; }
.articles-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 15px; }
.articles-table th { background: var(--gradient-dark); color: white; padding: 12px 10px; font-size: 0.8rem; text-align: left; }
.articles-table td { padding: 10px; border-bottom: 1px solid var(--gray-light); }
.articles-table tr:hover { background: rgba(99, 102, 241, 0.03); }
.articles-summary { background: var(--gradient-primary); color: white; padding: 15px 20px; border-radius: 12px; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.btn-articles-history { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 0.85rem; transition: all 0.3s; white-space: nowrap; box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2); }
.btn-articles-history:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.btn-articles-history-fournisseur { background: linear-gradient(135deg, #f97316, #ea580c); }
.btn-articles-history-fournisseur:hover { box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4); }
@media (max-width: 900px) { .client-list-container, .fournisseur-list-container { grid-template-columns: 1fr; gap: 15px; } .client-list-sidebar, .fournisseur-list-sidebar { max-height: 200px; overflow-x: auto; display: flex; flex-wrap: nowrap; gap: 8px; padding: 10px; } .client-list-item, .fournisseur-list-item { flex-shrink: 0; white-space: nowrap; margin-bottom: 0; font-size: 0.85rem; padding: 10px 14px; } .client-list-sidebar input, .fournisseur-list-sidebar input { margin-bottom: 10px; } .client-list-sidebar > div:first-child { min-width: 100%; } .situation-table { min-width: 100%; font-size: 0.75rem; } .situation-table th, .situation-table td { padding: 8px 6px; font-size: 0.7rem; } .desktop-table { display: none; } .mobile-card { display: block; } .client-header-info h3 { font-size: 1.1rem; } .client-header-info > div { grid-template-columns: 1fr 1fr !important; gap: 10px !important; } .reste-total { font-size: 1rem; } .reste-total span { font-size: 0.9rem; } .modal-content { padding: 20px 15px; width: 95%; border-radius: 20px; } .modal-content h3 { font-size: 1rem; } .modal-content table { min-width: 100%; font-size: 0.65rem; } .modal-content th, .modal-content td { padding: 4px 3px; font-size: 0.6rem; } .close { right: 10px; top: 10px; font-size: 22px; width: 32px; height: 32px; } .date-filter-bar { flex-direction: column; align-items: stretch; } }
@media (max-width: 768px) { .content { padding: 10px; } .nav-tabs { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 5px; gap: 3px; } .nav-tab { padding: 10px 12px; font-size: 0.7rem; border-radius: 20px; border: 1px solid var(--gray-light); border-bottom: 1px solid var(--gray-light); flex-shrink: 0; } .nav-tab.active { border-left: none; border-color: var(--primary); background: var(--gradient-primary); color: white; } .nav-tab i { font-size: 0.85rem; } .form-row { flex-direction: column; gap: 10px; } .stats-grid { grid-template-columns: 1fr; gap: 10px; } .header h1 { font-size: 1.8rem; } .header { padding: 20px 10px; } .electric-logo { font-size: 2.5rem; } .title-container { flex-direction: column; gap: 10px; } .payment-methods { flex-direction: column; } h2 { font-size: 1.3rem; border-left-width: 3px; padding-left: 10px; } .btn { padding: 10px 15px; font-size: 0.85rem; width: 100%; justify-content: center; } .btn-sm { width: auto; padding: 6px 12px; font-size: 0.75rem; } .stat-value { font-size: 2rem; } .form-container { padding: 15px; border-radius: 14px; } table { min-width: 100%; font-size: 0.7rem; } th, td { padding: 8px 6px; font-size: 0.7rem; } .reste-total { font-size: 1rem; flex-direction: column; text-align: center; } .situation-action-row { flex-direction: column; } .situation-action-row .btn { width: 100%; } .cart-item { flex-direction: column; align-items: flex-start; } .alert { flex-direction: column; gap: 10px; padding: 12px 15px; } .lcn-alert-item { flex-direction: column; align-items: flex-start; } .btn-confirm-lcn { align-self: flex-end; } .consult-bon-content-inner { padding: 10px !important; } .consult-bon-content-inner table { font-size: 0.55rem !important; } .consult-bon-content-inner th, .consult-bon-content-inner td { padding: 2px 2px !important; } .search-bar-cheque { flex-direction: column; } .search-bar-cheque input { width: 100%; } .articles-table { font-size: 0.7rem; } .articles-table th, .articles-table td { padding: 6px 4px; } }
@media (max-width: 480px) { .header h1 { font-size: 1.4rem; letter-spacing: 1px; } .subtitle { font-size: 0.75rem; } .nav-tab { font-size: 0.65rem; padding: 8px 10px; } .nav-tab i { font-size: 0.75rem; } .stat-card { padding: 15px 10px; } .stat-value { font-size: 1.5rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; } .client-header-info > div { grid-template-columns: 1fr !important; text-align: center; } .client-header-info { padding: 12px; } .situation-table th, .situation-table td { padding: 5px 3px; font-size: 0.6rem; } .type-badge { font-size: 0.6rem; padding: 2px 6px; min-width: 50px; } .situation-table th:nth-child(4), .situation-table td:nth-child(4) { display: none; } .situation-table th:nth-child(2), .situation-table td:nth-child(2) { display: none; } }
/* ===== V2 : composants additionnels (mêmes tokens que le template) ===== */
.alert-success { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-left: 6px solid var(--success); color: #065f46; }
.iz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.iz-access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.iz-access-item { text-transform: none !important; letter-spacing: 0 !important; margin-bottom: 0 !important; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid var(--gray-light); border-radius: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 500; background: var(--white); transition: all 0.2s; }
.iz-access-item:hover { border-color: var(--primary-light); }
.iz-access-item.checked { border-color: var(--primary); background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08)); }
.iz-access-item.disabled { cursor: default; opacity: 0.75; }
.iz-access-item input { width: 16px; height: 16px; cursor: pointer; }
.iz-magasin-bar { background: var(--white); border-radius: 16px; padding: 12px 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 15px; flex-wrap: wrap; border: 1px solid var(--gray-light); border-left: 5px solid var(--primary); }
.iz-magasin-bar label { font-weight: 600; font-size: 0.85rem; color: var(--dark); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.iz-magasin-bar select { padding: 10px 14px; border: 2px solid var(--primary-light); border-radius: 12px; font-size: 0.95rem; font-weight: 600; color: var(--dark); background: var(--white); min-width: 200px; }
.iz-magasin-bar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.stat-card.iz-stat-danger::before { background: var(--gradient-danger); }
.stat-card.iz-stat-success::before { background: var(--gradient-success); }
.stat-card.iz-stat-warning::before { background: var(--gradient-warning); }
.stat-card.iz-stat-info::before { background: var(--gradient-secondary); }
.iz-money-grid .stat-value { font-size: 2rem; }
@media (max-width: 900px) { .iz-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .iz-magasin-bar { flex-direction: column; align-items: stretch; } .iz-magasin-bar select { width: 100%; } .iz-access-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .iz-access-grid { grid-template-columns: 1fr; } }
/* ===== V5 : utilisateur dans les historiques ===== */
.iz-user-badge { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; color: #4338ca; font-weight: 600; font-size: 0.78rem; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.iz-busy { opacity: 0.6; pointer-events: none; }
/* Messages toujours lisibles, même quand une fenêtre est ouverte (ils passaient derrière le fond de la fenêtre) ;
   fenêtres au-dessus du bouton « plein écran », pour que la croix de fermeture reste accessible sur téléphone */
#notification { z-index: 10001 !important; }
#iz-modal { z-index: 10000; }
#iz-modal-body > h3 { padding-right: 44px; }
/* ===== V6 : page Stock (colonne « Magasin ») ===== */
#stock-table th, #stock-table td { padding-left: 12px; padding-right: 12px; }
#stock-table td:nth-child(7) { white-space: nowrap; }
/* ===== V6 : Gestion des transferts ===== */
.iz-tf-nb { margin-left: auto; background: rgba(99, 102, 241, 0.12); color: var(--primary-dark); font-weight: 700; font-size: 0.75rem; padding: 2px 10px; border-radius: 20px; }
.client-list-item.active .iz-tf-nb { background: rgba(255, 255, 255, 0.25); color: var(--white); }
.client-list-item small { opacity: 0.75; font-size: 0.75rem; }
.iz-tf-fleche { color: var(--primary); margin: 0 6px; }
.client-header-info h3 { color: var(--white); }
.iz-tf-recherche { flex: 1; min-width: 180px; padding: 8px 14px; border: 2px solid var(--gray-light); border-radius: 10px; font-size: 0.85rem; }
.iz-tf-recherche:focus { outline: none; border-color: var(--primary); }
@media (max-width: 900px) {
    .client-list-sidebar, .fournisseur-list-sidebar { display: block; max-height: none; overflow: visible; min-width: 0; }
    .client-detail-content { min-width: 0; }
    #client-list-items, #fournisseur-list-items, #iz-tf-users { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
}
/* ===== V6 : Rapport ===== */
.iz-rp-ligne { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.iz-rp-dettes { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fecaca; border-radius: 16px; padding: 14px 20px; margin-bottom: 20px; }
.iz-rp-dettes-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--gradient-danger); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.iz-rp-dettes-txt { flex: 1; min-width: 200px; }
.iz-rp-dettes-txt strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: #991b1b; }
.iz-rp-dettes-txt span { font-size: 0.78rem; color: var(--danger-dark); }
.iz-rp-dettes-val { font-size: 1.5rem; font-weight: 800; color: var(--danger-dark); white-space: nowrap; }
.iz-rp-hero { background: var(--gradient-primary); color: var(--white); border-radius: 20px; padding: 28px 20px; text-align: center; box-shadow: var(--shadow-md), var(--shadow-glow); margin-bottom: 25px; }
.iz-rp-hero small { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.95; }
.iz-rp-hero strong { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1.25; margin: 4px 0; }
.iz-rp-hero span { font-size: 0.85rem; opacity: 0.95; }
.iz-rp-hero.iz-rp-vert { background: linear-gradient(135deg, #059669 0%, #10b981 100%); box-shadow: var(--shadow-md); }
.iz-rp-note { text-align: center; color: var(--gray); font-size: 0.8rem; margin-top: 5px; }
.iz-rp-moins { color: var(--danger-dark) !important; }
#section-rapport tfoot td { font-weight: 700; background: var(--light); }
@media (max-width: 768px) { .iz-rp-hero strong { font-size: 1.8rem; } .iz-rp-dettes-val { font-size: 1.2rem; } }
/* ===== V6 : Paramètres — installer l'application ===== */
.iz-install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.iz-install-carte { border: 2px solid var(--gray-light); border-radius: 16px; padding: 20px 15px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.iz-install-carte > i { font-size: 2.2rem; color: var(--primary); margin-bottom: 4px; }
.iz-install-carte small { color: var(--gray); margin-bottom: 10px; }
.iz-install-etapes { margin: 0 0 18px 22px; line-height: 1.9; color: var(--dark); }
.iz-install-adresse { display: inline-block; background: var(--light); border: 1px solid var(--gray-light); border-radius: 8px; padding: 2px 10px; font-weight: 700; color: var(--primary-dark); word-break: break-all; }
/* ===== V4 : Employés & Gestion des charges ===== */
.iz-ch-cards { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.iz-ch-cards .stat-card { text-align: center; padding: 25px 18px; }
.iz-ch-cards .stat-card h3 { font-size: 1.05rem; justify-content: flex-start; }
.iz-ch-cards .stat-value { font-size: 1.75rem; white-space: nowrap; }
.stat-card.iz-card-outline { border: 2px solid transparent; }
.stat-card.iz-card-outline-primary { border-color: var(--primary-light); }
.stat-card.iz-card-outline-info { border-color: #7dd3fc; }
.stat-card.iz-card-outline-success { border-color: var(--success); }
.stat-card.iz-card-outline-success::before { background: var(--gradient-success); }
.iz-panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 20px; }
.iz-panel-head h3 { margin: 0; flex: 1; min-width: 200px; font-size: 1.1rem; }
.iz-rapides { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 20px 15px; font-size: 0.8rem; font-weight: 600; color: var(--gray); }
.iz-chip { display: inline-flex; border-radius: 20px; overflow: hidden; border: 1.5px solid; font-size: 0.78rem; }
.iz-chip button { background: none; border: none; padding: 5px 10px; cursor: pointer; font-weight: 600; color: inherit; display: inline-flex; align-items: center; gap: 5px; }
.iz-chip button + button { border-left: 1.5px solid; border-color: inherit; padding: 5px 8px; }
.iz-chip button:hover:not(:disabled) { filter: brightness(0.95); background: rgba(0,0,0,0.04); }
.iz-chip button:disabled { opacity: 0.5; cursor: not-allowed; }
.iz-chip-orange { color: #b45309; border-color: #f59e0b; background: #fffbeb; }
.iz-chip-green { color: #047857; border-color: #10b981; background: #ecfdf5; }
.iz-pay-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.iz-mini-btn { border: 1px solid var(--gray-light); background: var(--white); border-radius: 8px; padding: 3px 8px; cursor: pointer; color: var(--gray); font-size: 0.75rem; }
.iz-mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.iz-mini-del:hover { border-color: var(--danger); color: var(--danger); }
.iz-btn-soft { border: none; border-radius: 8px; padding: 5px 12px; font-size: 0.75rem; font-weight: 600; cursor: pointer; margin-right: 4px; }
.iz-soft-green { background: #dcfce7; color: #15803d; } .iz-soft-green:hover { background: #bbf7d0; }
.iz-soft-blue { background: #dbeafe; color: #1d4ed8; } .iz-soft-blue:hover { background: #bfdbfe; }
.iz-check { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--dark); margin: 5px 0 20px; cursor: pointer; }
.iz-check input { width: 17px; height: 17px; }
.iz-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.iz-modal-actions .btn { justify-content: center; width: 100%; }
.iz-mois-card { border: 1px solid var(--gray-light); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; background: var(--white); }
.iz-mois-card.iz-mois-courant { border: 2px solid var(--success); }
.iz-mois-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; color: var(--dark); flex-wrap: wrap; }
.iz-mois-head i { color: var(--success); }
.iz-mois-total { color: var(--success-dark); font-weight: 800; }
.iz-mois-sub { font-size: 0.8rem; color: var(--gray); margin: 6px 0; }
.iz-mois-sub b { color: var(--dark); }
.iz-badge-mois { background: var(--success); color: #fff; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.iz-mois-card details summary { cursor: pointer; color: var(--primary); font-size: 0.8rem; font-weight: 600; margin: 4px 0; }
.iz-detail-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 0; margin-top: 6px; }
.iz-detail-table td { padding: 7px 8px; border-bottom: 1px solid var(--gray-light); }
.iz-detail-head th { background: var(--gradient-dark); color: #fff; padding: 8px; font-size: 0.72rem; text-transform: uppercase; }
.iz-detail-table td[style*="text-align:right"] { white-space: nowrap; }
#section-charges .table-responsive th { font-size: 0.72rem; padding: 14px 16px; }
#section-charges .table-responsive td { font-size: 0.85rem; padding: 12px 16px; }
.iz-type-pill { background: #dcfce7; color: #15803d; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.iz-type-pill.iz-pill-sal { background: #e0e7ff; color: #4338ca; }
.iz-pill-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--gray-light); border-radius: 20px; padding: 6px 14px; min-width: 220px; flex: 1; max-width: 320px; color: var(--primary); font-size: 0.8rem; }
.iz-pill-search input { border: none; outline: none; flex: 1; font-size: 0.85rem; background: none; }
.iz-pill-select { border: 1px solid var(--gray-light); border-radius: 20px; padding: 7px 12px; font-size: 0.85rem; background: var(--white); }
.iz-emp-table th { font-size: 0.72rem; padding: 14px 14px; }
.iz-emp-table td { font-size: 0.82rem; padding: 12px 14px; white-space: nowrap; }
.iz-emp-table td:first-child { text-transform: uppercase; }
.iz-emp-nonpaye { color: #dc2626; }
.iz-emp-paye { color: #0f172a; }
.iz-emp-sep td { background: #f0fdf4; color: #15803d; font-weight: 700; font-size: 0.78rem; padding: 8px 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.iz-paie-cell { text-align: center; }
.iz-paie-date { font-size: 0.85rem; font-weight: 600; color: var(--gray); margin-bottom: 4px; white-space: nowrap; }
.iz-paie-date.iz-due { color: #dc2626; font-weight: 700; }
.iz-btn-payer { background: #15803d; color: #fff; border: none; border-radius: 6px; padding: 4px 14px; font-size: 0.75rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.iz-btn-payer:hover { background: #166534; }
.iz-net-pos { color: #15803d; font-weight: 700; }
.iz-net-neg { color: #dc2626; font-weight: 700; }
.iz-net-detail { font-size: 0.7rem; color: var(--gray); margin-top: 2px; }
.iz-emp-actions { display: flex; gap: 5px; }
.iz-act { border: none; border-radius: 7px; width: 34px; height: 28px; cursor: pointer; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.15s; }
.iz-act:hover { transform: translateY(-2px); }
.iz-act-indigo { background: #e0e7ff; color: #4338ca; } .iz-act-amber { background: #fef3c7; color: #b45309; } .iz-act-red { background: #fee2e2; color: #dc2626; }
.iz-act-green { background: #dcfce7; color: #15803d; } .iz-act-dark { background: #1e293b; color: #fff; } .iz-act-edit { background: #f59e0b; color: #fff; } .iz-act-del { background: #ef4444; color: #fff; }
.iz-lieu-item { display: flex; justify-content: space-between; align-items: center; background: #faf7f2; border-radius: 10px; padding: 9px 12px; margin-bottom: 7px; font-weight: 600; font-size: 0.9rem; }
@media (max-width: 768px) { .iz-panel-head { flex-direction: column; align-items: stretch; } .iz-pill-search { max-width: none; } .iz-ch-cards .stat-value { font-size: 1.5rem; } }
    