/* assets/css/style.css */

:root {
    --primary-color: #c85a3c;
    --primary-hover: #e07a5f;
    --primary-bg-light: #fceee9;
    --primary-border: #f7d7cd;
    --primary-dark: #8c2d19;
    --primary-darker: #5c1d10;
    --primary-bg-soft: #fff5f2;
    --primary-rgba-shadow: rgba(200, 90, 60, 0.25);
    --primary-rgba-shadow-hover: rgba(200, 90, 60, 0.35);
    --primary-rgba-shadow-light: rgba(200, 90, 60, 0.2);
    --primary-rgba-shadow-light-hover: rgba(200, 90, 60, 0.3);
    --primary-rgba-bg-today: rgba(200, 90, 60, 0.04);
    --primary-rgba-select-focus: rgba(200, 90, 60, 0.1);
    --primary-rgba-input-focus: rgba(200, 90, 60, 0.08);

    /* Module Messagerie (Tchat) variables */
    --tchat-color: #e67e22;
    --tchat-hover: #d35400;
    --tchat-bg-light: #fff3e0;
    --tchat-bg-soft: #fff8f0;
    --tchat-rgba-shadow: rgba(230, 126, 34, 0.3);
    --tchat-rgba-shadow-light: rgba(230, 126, 34, 0.15);
    --tchat-rgba-shadow-very-light: rgba(230, 126, 34, 0.1);

    /* Module Clients variables (Thème Bleu) */
    --client-color: #3498db;
    --client-hover: #2980b9;
    --client-bg-light: #eaf6ff;
    --client-bg-soft: #f9fbfd;
    --client-bg-selected: #d6eaf8;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Supprimer les spinners (flèches) des navigateurs sur tous les inputs number par sécurité */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    appearance: textfield;
}

/* --- SIDEBAR (MENU GAUCHE) --- */
#sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex; flex-direction: column; flex-shrink: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    z-index: 100;
}

.logo {
    font-size: 24px; font-weight: bold; text-align: center;
    padding: 20px; border-bottom: 1px solid #eee;
    background-color: #fff; color: #2c3e50;
}

#main-menu {
    list-style: none; padding: 0; margin-top: 10px;
    flex-grow: 1; overflow-y: auto;
}

#main-menu li a {
    display: block; padding: 12px 20px;
    color: #555; text-decoration: none;
    transition: 0.2s; border-left: 5px solid transparent; font-weight: 500;
}

#main-menu li a:hover { background-color: #f8f9fa; padding-left: 25px; }
#main-menu li a i { margin-right: 10px; width: 20px; text-align: center; }

/* COULEURS MENU ACTIF */
#main-menu li a[data-route="dashboard"].active { border-color: #2c3e50; color: #2c3e50; background: #ecf0f1; }
#main-menu li a[data-route="clients"].active { border-color: #3498db; color: #3498db; background: #eaf6ff; }
#main-menu li a[data-route="offers"].active { border-color: #1abc9c; color: #1abc9c; background: #e0f9f4; }
#main-menu li a[data-route="cre_offer"].active { border-color: #2980b9; color: #2980b9; background: #eaf6ff; }
#main-menu li a[data-route="orders"].active { border-color: #27ae60; color: #27ae60; background: #eafaf1; }
#main-menu li a[data-route="invoices"].active { border-color: #9b59b6; color: #9b59b6; background: #f5eef8; }
#main-menu li a[data-route="products"].active { border-color: #3f51b5; color: #3f51b5; background: #e8eaf6; }
#main-menu li a[data-route="projects"].active { border-color: #795548; color: #795548; background: #efebe9; }
#main-menu li a[data-route="stock"].active { border-color: #607d8b; color: #607d8b; background: #eceff1; }
#main-menu li a[data-route="planning"].active { border-color: #c85a3c; color: #c85a3c; background: #fceee9; }
#main-menu li a[data-route="tchat"].active { border-color: #e67e22; color: #e67e22; background: #fff3e0; }
#main-menu li a[data-route="settings"].active { border-color: #7f8c8d; color: #7f8c8d; background: #f0f0f0; }

/* STATUT NAS */
.nas-status-container { padding: 15px; border-top: 1px solid #eee; background: #f9f9f9; text-align: center; }
.nas-badge {
    display: inline-block; padding: 8px 15px; border-radius: 20px;
    color: white; font-weight: bold; font-size: 0.9em; width: 100%;
    cursor: default; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nas-connected { background-color: #27ae60; border: 1px solid #2ecc71; }
.nas-disconnected { background-color: #c0392b; border: 1px solid #e74c3c; }

/* --- CONTENU PRINCIPAL --- */
#app-content {
    flex-grow: 1; overflow-y: auto; padding: 30px;
    background-color: #f4f6f9; position: relative;
}

/* ELEMENTS GENERIQUES */
h1, h2 { color: #2c3e50; margin-bottom: 20px; }
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
.btn { padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: 0.2s; }
.btn-primary { background-color: #3498db; color: white; }
.btn-primary:hover { background-color: #2980b9; }
.btn-primary:disabled { background-color: #bdc3c7; cursor: not-allowed; }

.card-header-select {
    font-size: 0.8em;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-weight: bold;
    color: #2c3e50;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
}
.card-header-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* --- MODULE CLIENTS --- */

/* Header & Recherche */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid #eef2f7; gap: 15px;
    flex-wrap: wrap; 
}
.page-header-no-border { border-bottom: none; padding-bottom: 0; margin-bottom: 15px; }
.header-left { display: flex; align-items: center; gap: 20px; }
.page-header h1 { font-size: 1.8rem; margin: 0; white-space: nowrap; }
.page-header h1 i { color: #3498db; margin-right: 10px; background: #eaf6ff; padding: 10px; border-radius: 8px; }

.page-header h1 i.icon-purple-bg { color: #9b59b6; background: #f5eef8; }
.page-header h1 i.icon-green-bg { color: #27ae60; background: #e9f7ef; }
.page-header h1 i.icon-teal-bg { color: #1abc9c; background: #e0f9f4; }
.page-header h1 i.icon-indigo-bg { color: #3f51b5; background: #e8eaf6; }
.page-header h1 i.icon-brown-bg { color: #795548; background: #efebe9; }
.page-header h1 i.icon-gray-bg { color: #2c3e50; background: #ecf0f1; }
.page-header h1 i.icon-terracotta-bg { color: #c85a3c; background: #fceee9; }

.header-search-wrapper { display: flex; align-items: center; gap: 12px; }
.badge-count {
    background-color: #3498db; color: white; padding: 5px 14px; 
    border-radius: 20px; font-weight: bold; font-size: 0.9em; 
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

.search-container { position: relative; width: 300px; }
.search-container input {
    width: 100%; padding: 10px 10px 10px 35px; border: 1px solid #ddd;
    border-radius: 30px; font-size: 14px; transition: border-color 0.3s;
}
.search-container input:focus { border-color: #3498db; outline: none; }
.search-container i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #aaa; }

/* --- NOUVEAU : Classes génériques pour la croix de recherche (Réutilisables partout) --- */
.search-container input.has-clear-btn {
    padding-right: 35px; /* Empêche le texte de se cacher sous la croix */
}
.search-container i.btn-clear-search {
    left: auto;          /* Annule le left: 12px de l'icône de loupe */
    right: 12px;         /* Positionne la croix à droite */
    cursor: pointer;
    color: #7f8c8d;
    z-index: 10;
}
.search-container i.btn-clear-search:hover {
    color: #e74c3c;      /* Rouge au survol pour montrer l'action de suppression */
}

/* Actions Toolbar */
.header-actions { position: relative; display: flex; gap: 12px; align-items: center; }
.btn-action {
    padding: 10px 15px; border-radius: 6px; border: none; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 5px;
    transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-new { background-color: #3498db; color: white; border-radius: 30px; padding: 10px 20px; font-size: 0.95rem; box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3); border: none; }
.btn-new:hover { background-color: #2980b9; transform: translateY(-2px); }

/* NOUVEAU : Bouton Éditer (Blanc, Bordure Noir, Texte Noir) */
.btn-edit { 
    background-color: #ffffff; 
    color: #000000; 
    border: 2px solid #000000; 
    border-radius: 30px; 
    padding: 10px 22px; 
    font-size: 0.95rem; 
    font-weight: 600; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    display: none; 
}
.btn-edit:hover { 
    background-color: #f0f0f0; 
    transform: translateY(-2px); 
}

.btn-delete { background-color: #e74c3c; color: white; display: none; }
.btn-delete:hover { background-color: #c0392b; transform: translateY(-2px); }

.btn-columns { background-color: #4d525e; color: #ffffff; border-radius: 30px; padding: 10px 22px; font-size: 0.95rem; box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2); border: none; }
.btn-columns:hover { background-color: #374151; transform: translateY(-2px); }

.columns-dropdown-menu { position: absolute; top: 110%; left: 0; background: white; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 1000; padding: 16px; min-width: 220px; }
.dropdown-title { font-weight:bold; margin-bottom:12px; border-bottom:1px solid #e2e8f0; padding-bottom:8px; color:#1e293b; font-size: 1.05em; }
.dropdown-item { display:flex; align-items:center; gap:12px; margin-bottom:10px; cursor:pointer; font-size:0.95em; color:#475569; transition: color 0.2s; }
.dropdown-item:hover { color: #3498db; }
.dropdown-checkbox { cursor:pointer; width:18px; height:18px; accent-color: #3498db; }

/* Table Tabulator Custom (Style global des tableaux de l'ERP) */
.custom-tabulator {
    border: none; background-color: white; border-radius: 8px;
    overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    user-select: none;
}

/* ───────────────────────────────────────────────────────── */
/* STYLE SPÉCIFIQUE DU TABLEAU DES CLIENTS (THÈME BLEU)      */
/* ───────────────────────────────────────────────────────── */

/* En-tête du tableau avec couleur bleue thématique */
#clients-table .tabulator-header,
#clients-table .tabulator-header .tabulator-col {
    background-color: var(--client-color) !important; 
    color: white !important;
    border-bottom: none !important; 
    font-family: 'Segoe UI', sans-serif; 
    font-weight: 600;
}

/* Lignes et alternance de couleur pour l'effet zèbre */
#clients-table .tabulator-row { border-bottom: 1px solid #f0f0f0; background-color: #fff; }
#clients-table .tabulator-row:nth-child(even) { background-color: var(--client-bg-soft); }

/* Effet de survol sur les lignes */
#clients-table .tabulator-row:hover { background-color: var(--client-bg-light) !important; }

/* Ligne sélectionnée active */
#clients-table .tabulator-row.tabulator-selected {
    background-color: var(--client-bg-selected) !important; box-shadow: inset 5px 0 0 var(--client-hover) !important;
    border-left: none !important; font-weight: bold; color: #2c3e50 !important;
}

/* Style appliqué aux clients désactivés ou bloqués administrativement */
.row-client-bloque {
    text-decoration: line-through;
    color: #e74c3c !important;
}
.row-client-bloque .tabulator-cell {
    color: #e74c3c !important;
}
.row-client-bloque.tabulator-selected {
    background-color: #f8d7da !important; box-shadow: inset 5px 0 0 #c0392b !important;
}

/* ───────────────────────────────────────────────────────── */
/* PANNEAUX LATÉRAUX DE VISUALISATION (SLIDEOUT PANELS)      */
/* ───────────────────────────────────────────────────────── */

/* Arrière-plan semi-transparent et flouté à l'ouverture du panneau */
.side-panel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 998; display: none; backdrop-filter: blur(2px);
}

/* Conteneur principal coulissant du panneau latéral */
.side-panel {
    position: fixed; top: 0; right: -650px; width: 600px; height: 100vh;
    background: white; z-index: 999; box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column;
}
.side-panel.open { right: 0; }

/* Responsive mobile : le panneau prend tout l'écran */
@media (max-width: 768px) {
    .side-panel { width: 100%; right: -100%; }
    .side-panel.open { right: 0; }
    #sidebar { display: none; }
}

/* En-tête du panneau avec style premium et ombrage */
.side-panel-header {
    padding: 20px 25px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradients thématiques par module/panneau latéral */
#client-form-panel .side-panel-header,
#client-view-panel .side-panel-header {
    background: linear-gradient(135deg, #3498db, #5caced);
}
#offre-view-panel .side-panel-header {
    background: linear-gradient(135deg, #1abc9c, #48c9b0);
}
#order-view-panel .side-panel-header {
    background: linear-gradient(135deg, #27ae60, #58d68d);
}
#invoice-view-panel .side-panel-header {
    background: linear-gradient(135deg, #9b59b6, #af7ac5);
}
#project-view-panel .side-panel-header,
#project-edit-panel .side-panel-header {
    background: linear-gradient(135deg, #795548, #9c644f);
}
#product-form-panel .side-panel-header,
#product-view-panel .side-panel-header {
    background: linear-gradient(135deg, #3f51b5, #5c6bc0);
}

.side-panel-header h3 { margin: 0; font-weight: 600; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.side-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.8;
    transition: transform 0.2s, opacity 0.2s;
}
.side-panel-close:hover {
    opacity: 1;
    transform: scale(1.1);
}
.side-panel-body { padding: 20px; overflow-y: auto; flex-grow: 1; background: #f8fafc; }

/* Forms & Panels */
.form-section { background: white; padding: 15px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 15px; }

/* Sections thématiques du formulaire Client */
.form-section-profil { margin-bottom: 0; border-top: 4px solid #3498db; }
.form-section-coord { margin-bottom: 0; border-top: 4px solid #27ae60; }
.form-section-loc { margin-bottom: 0; border-top: 4px solid #e67e22; }
.form-section-cond { margin-bottom: 0; background-color: #fdfaf7; border: 1px solid #f3e5d8; border-left: 4px solid #f39c12; }
.form-section-comments { margin-bottom: 20px; border-top: 4px solid #f39c12; }

/* Titres des sections thématiques */
.title-profil { margin-top:0; color:#3498db; border-bottom:1px solid #eee; padding-bottom:10px; margin-bottom:15px; font-size:1.1em; }
.title-coord { margin-top:0; color:#27ae60; border-bottom:1px solid #eee; padding-bottom:10px; margin-bottom:15px; font-size:1.1em; }
.title-loc { margin-top:0; color:#e67e22; border-bottom:1px solid #eee; padding-bottom:10px; margin-bottom:15px; font-size:1.1em; }
.title-cond { margin-top:0; color:#d35400; border-bottom:1px solid #f3e5d8; padding-bottom:10px; margin-bottom:15px; font-size:1.1em; }
.title-comments { margin-top:0; color:#f39c12; border-bottom:1px solid #eee; padding-bottom:10px; margin-bottom:15px; font-size:1.1em; }

.form-icon { color:#95a5a6; width:18px; }
.title-icon { margin-right: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-layout-gap { gap: 20px; }
.form-group label { display: block; margin-bottom: 5px; color: #7f8c8d; font-size: 0.9em; font-weight: 600; }
.form-group input, .form-group select {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; background: white;
}
.form-group input:focus, .form-group select:focus {
    border-color: #3498db; outline: none; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.form-footer { padding: 20px 25px; background: white; border-top: 1px solid #eee; text-align: right; }

.input-rabais { font-weight:bold; color:#d35400; }

option.statut-bon { color: #27ae60; font-weight: bold; }
option.statut-surveiller { color: #e67e22; font-weight: bold; }
option.statut-bloquer { color: #c0392b; font-weight: bold; }

/* Vue détaillée - Base */
.view-section { background: white; padding: 20px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 20px; }
.view-row { margin-bottom: 12px; border-bottom: 1px solid #f5f5f5; padding-bottom: 8px; }
.view-row:last-child { border-bottom: none; }

/* Champs d'information Client (Vue panel) */
.view-grid-1 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.view-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.view-field-container { display: flex; flex-direction: column; margin-bottom: 12px; }
.view-field-label { font-size: 0.85em; color: #7f8c8d; font-weight: 600; margin-bottom: 4px; }
.view-field-value { font-size: 1.05em; color: #2c3e50; font-weight: 500; padding-left: 26px; }
.view-field-icon { color: #95a5a6; width: 22px; text-align: center; }
.view-val-large { font-size:1.2em; font-weight:bold; }
.view-link-email { color:#3498db; text-decoration:none; font-weight:bold; }
.view-link-tel { color:#2c3e50; text-decoration:none; }

.view-rabais-container { display: flex; justify-content: space-between; align-items: center; }
.view-rabais-label { font-weight: 600; color: #d35400; }
.view-rabais-value { font-size: 1.3em; font-weight: bold; color: #e67e22; background: white; padding: 4px 10px; border-radius: 6px; border: 1px solid #f3e5d8; }

.header-panel-actions { display: flex; gap: 10px; margin-left: 20px; }
.btn-panel-action {
    background: rgba(255,255,255,0.2); color: white; border: none; padding: 5px 12px;
    border-radius: 4px; font-size: 0.85em; cursor: pointer; transition: 0.2s;
}
.btn-panel-action:hover { background: rgba(255,255,255,0.4); }

.quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: auto; }
.quick-actions-5 { grid-template-columns: repeat(5, 1fr); gap: 5px; }
.btn-quick {
    padding: 15px; text-align: center; border-radius: 8px; font-weight: bold; cursor: pointer;
    border: 1px solid #ddd; transition: 0.2s; background: white; color: #555;
}
.btn-quick:hover { background: #ecf0f1; border-color: #bbb; transform: translateY(-2px); }
.btn-quick i { display: block; font-size: 1.5em; margin-bottom: 5px; color: #3498db; }

.btn-quick.active-tab {
    background-color: #eaf6ff;
    border-color: #3498db;
    color: #2980b9;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.05);
}
.btn-quick.active-tab i {
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* ========================================================================= */
/* --- SECTION COMMENTAIRES --- */
/* ========================================================================= */
.comments-input-container { display: flex; flex-direction: column; gap: 10px; }
.comment-textarea { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #cbd5e1; font-family: inherit; resize: vertical; }
.comment-textarea:focus { border-color: #3498db; outline: none; }
.btn-save-comment { background-color: #f39c12; color: white; align-self: flex-end; }
.btn-save-comment:hover { background-color: #e67e22; }

.view-section-history { background-color: #f8f9fa; }
.title-history { margin-top:0; color:#2c3e50; border-bottom:1px solid #ddd; padding-bottom:10px; margin-bottom:15px; font-size:1.1em; }
.empty-comments-container { text-align: center; padding: 20px; color: #95a5a6; }
.empty-comments-icon { font-size: 2em; margin-bottom: 10px; }

/* Design des cartes "Commentaires" ajusté selon la capture d'écran */
.comments-list { display: flex; flex-direction: column; gap: 15px; }
.comment-card { 
    background: white; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 15px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}
.comment-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #f1f5f9; 
    padding-bottom: 12px; 
    margin-bottom: 12px; 
}

/* Espace et alignement strict (Capture d'écran) */
.comment-header > div:first-child { 
    display: flex; 
    align-items: center; 
    gap: 15px; /* Espace équilibré entre les éléments */
    flex-wrap: wrap;
}
.comment-header > div:last-child { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.comment-user { 
    font-weight: 600; 
    color: #334155; 
    font-size: 0.95em; 
    display: flex;
    align-items: center;
    gap: 6px;
}
.comment-user-icon { 
    color: #94a3b8; 
    font-size: 1.1em;
}
.comment-date { 
    font-size: 0.9em; 
    color: #64748b; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    margin-left: 0 !important; 
}
.comment-date i { color: #94a3b8; }

/* Design du Bouton Crayon (et Cloche) type "Carré Arrondi Flat" */
.btn-edit-comment, .btn-rappel-comment {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
    transition: all 0.2s ease;
    font-size: 0.95em !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

.btn-edit-comment:hover, .btn-rappel-comment:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Accentuation couleur pour la cloche (Rappel) */
.btn-rappel-comment { color: #f39c12 !important; }
.btn-rappel-comment:hover { color: #d35400 !important; border-color: #f3dcb5 !important; background-color: #fffaf0 !important; }

/* Pastille visuelle lorsqu'un rappel est actif */
.badge-rappel {
    font-size: 0.85em; color: #d35400; background-color: #fff3e0; 
    padding: 4px 10px; border-radius: 12px; font-weight: 600;
    border: 1px solid #fdebd0;
    margin-left: 0 !important;
}

.comment-body { color: #334155; font-size: 0.95em; line-height: 1.5; }

/* Utilitaires Chargement et État des vues (Onglets Panel) */
.tab-loading-container { text-align: center; padding: 40px; }
.tab-loading-icon-teal { font-size: 2em; color: #1abc9c; margin-bottom: 15px; }
.tab-loading-icon-green { font-size: 2em; color: #27ae60; margin-bottom: 15px; }
.tab-loading-icon-purple { font-size: 2em; color: #9b59b6; margin-bottom: 15px; }
.tab-loading-title { color: #2c3e50; }

.tab-empty-container { text-align:center; padding: 30px; }
.tab-empty-icon { font-size: 3em; color: #bdc3c7; margin-bottom: 15px; }
.tab-empty-text { color: #7f8c8d; font-size: 1.1em; }

.tab-error-container { text-align:center; color:#e74c3c; padding: 20px; }
.tab-error-icon { font-size: 2em; margin-bottom:10px; }

/* Offres */
.client-offers-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.offer-card { border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; background: white; }
.offer-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.offer-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 10px; font-weight: bold; font-size: 1.05em; color: #2c3e50; }
.offer-card-body { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; font-size: 0.9em; color: #444; }
.offer-card-body > div:nth-child(1) { grid-column: span 2; order: 1; }
.offer-card-body > div:nth-child(3) { grid-column: span 1 !important; order: 2; }
.offer-card-body > div:nth-child(2) { grid-column: span 1; order: 3; }
.offer-card-body i { color: #95a5a6; width: 20px; }
.offer-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.1); font-size: 1.15em; font-weight: bold; color: #2c3e50; }
.card-version-text { font-size:0.85em; color:#7f8c8d; }
.card-footer-label { font-size: 0.85em; color: #7f8c8d; font-weight: normal; }
.card-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.offer-card.status-valide { background-color: rgba(39, 174, 96, 0.08); border-color: rgba(39, 174, 96, 0.3); }
.offer-card.status-attente { background-color: rgba(243, 156, 18, 0.08); border-color: rgba(243, 156, 18, 0.3); }
.offer-card.status-annule { background-color: rgba(231, 76, 60, 0.08); border-color: rgba(231, 76, 60, 0.3); }

/* Commandes */
.client-orders-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.order-card { border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s, box-shadow 0.2s; cursor: default; background: white; }
.order-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 10px; font-weight: bold; font-size: 1.05em; color: #2c3e50; }
.order-card-body { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; font-size: 0.9em; color: #444; }
.order-card-body i { color: #95a5a6; width: 20px; }

.order-card.status-mesurer { background-color: rgba(243, 156, 18, 0.08); border-color: rgba(243, 156, 18, 0.3); }
.order-card.status-commander { background-color: rgba(52, 152, 219, 0.08); border-color: rgba(52, 152, 219, 0.3); }
.order-card.status-planifie { background-color: rgba(200, 90, 60, 0.08); border-color: rgba(200, 90, 60, 0.3); }
.order-card.status-pose { background-color: rgba(26, 188, 156, 0.08); border-color: rgba(26, 188, 156, 0.3); }
.order-card.status-livre { background-color: rgba(39, 174, 96, 0.08); border-color: rgba(39, 174, 96, 0.3); }
.order-card.status-default { background-color: #f9f9f9; border-color: #ddd; }

.badge-mesurer { background-color: #fcf3cf; color: #d35400; }
.badge-commander { background-color: #ebf5fb; color: #2980b9; }
.badge-planifie { background-color: #fceee9; color: #c85a3c; }
.badge-pose { background-color: #e8f8f5; color: #16a085; }
.badge-livre { background-color: #e9f7ef; color: #27ae60; }
.badge-default { background-color: #f2f3f4; color: #7f8c8d; }

/* Factures */
.client-invoices-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.invoice-card { border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s, box-shadow 0.2s; cursor: default; background: white; }
.invoice-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.invoice-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 10px; font-weight: bold; font-size: 1.05em; color: #2c3e50; }
.invoice-card-body { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; font-size: 0.9em; color: #444; }
.invoice-card-body i { color: #95a5a6; width: 20px; }
.invoice-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.1); font-size: 1.15em; font-weight: bold; color: #2c3e50; }

.invoice-card.status-attente { background-color: rgba(243, 156, 18, 0.08); border-color: rgba(243, 156, 18, 0.3); }
.invoice-card.status-paye { background-color: rgba(39, 174, 96, 0.08); border-color: rgba(39, 174, 96, 0.3); }
.invoice-card.status-default { background-color: #f9f9f9; border-color: #ddd; }


/* SPINNER */
.fa-spinner { animation: spin 1s infinite linear; }
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CORRECTIF ERREUR TABULATOR */
.tabulator-loader-msg.tabulator-loading {
    border: none !important;
    background: rgba(255,255,255,0.8) !important;
    color: #3498db !important;
    font-weight: bold !important;
}
.tabulator-loader-msg.tabulator-error {
    display: none !important;
}

/* ========================================================================= */
/* --- CLASSES UTILITAIRES ET COMPOSANTS (EXTRAITS DU JAVASCRIPT) --- */
/* ========================================================================= */

.hidden-input { display: none !important; }
.hidden-element { display: none !important; }
.m-0 { margin: 0 !important; }
.my-15 { margin: 15px 0 !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-5 { margin-top: 5px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-25 { margin-top: 25px !important; }
.max-w-400 { max-width: 400px; }
.text-center { text-align: center; }
.text-center-mb20 { text-align: center; margin-bottom: 20px; }
.mt-30-center { margin-top: 30px; text-align: center; }
.flex-between-mb15 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }

/* Utilitaires de Grille Modulaire 12 Colonnes */
.form-layout { display: grid; gap: 15px; }
.form-grid-2-1 { grid-template-columns: 2fr 1fr; }
.form-grid-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Classes d'espacement (Span) */
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }

/* Utilitaires divers */
.w-100 { width: 100%; }
.w-20px { width: 20px; }
.text-muted { color: #7f8c8d; }
.text-danger { color: #e74c3c; font-weight: bold; }
.text-sm { font-size: 0.9em; }
.fw-bold-dark { font-weight: bold; color: #2c3e50; }
.fw-bold-navy { font-weight: bold; color: #34495e; }

/* Composants de Formulaire */
.input-readonly { 
    background-color: #f1f5f9 !important; 
    cursor: not-allowed; 
    font-weight: bold; 
    color: #64748b; 
    border-color: #cbd5e1 !important;
}
.input-bold { font-weight: bold; }

.form-footer-column { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    background-color: #f4f6f9; 
}

/* Composants Boutons Secondaires & Couleurs Spécifiques */
.btn-sm { padding: 8px 5px !important; font-size: 0.85em !important; }
.btn-cancel { background-color: #f8fafc; color: #475569; border: 1.5px solid #cbd5e1; margin-right: 10px; }
.btn-cancel:hover { background-color: #f1f5f9; border-color: #94a3b8; color: #1e293b; }
.btn-cancel-user-style { margin-top: 10px; text-align: center; }

.btn-secondary { background-color: #95a5a6; color: white; }
.btn-secondary:hover { background-color: #7f8c8d; }

.btn-danger { background-color: #e74c3c !important; color: white !important; }
.btn-danger:hover { background-color: #c0392b !important; }

.btn-blue { background-color: #3498db !important; color: white; border-radius: 30px; padding: 10px 20px; }
.btn-blue:hover { background-color: #2980b9 !important; transform: translateY(-2px); }

.btn-purple { background-color: #9b59b6 !important; color: white; border-radius: 30px; padding: 10px 20px; }
.btn-purple:hover { background-color: #8e44ad !important; transform: translateY(-2px); }

.btn-green { background-color: #27ae60 !important; color: white; border-radius: 30px; padding: 10px 20px; }
.btn-green:hover { background-color: #1e8449 !important; transform: translateY(-2px); }

.btn-teal { background-color: #1abc9c !important; color: white; border-radius: 30px; padding: 10px 20px; }
.btn-teal:hover { background-color: #16a085 !important; transform: translateY(-2px); }

.btn-indigo { background-color: #3f51b5 !important; color: white; border-radius: 30px; padding: 10px 20px; }
.btn-indigo:hover { background-color: #303f9f !important; transform: translateY(-2px); }

.btn-brown { background-color: #795548 !important; color: white; border-radius: 30px; padding: 10px 20px; }
.btn-brown:hover { background-color: #5d4037 !important; transform: translateY(-2px); }

/* Badges & Pastilles (Design Translucide) */
.badge {
    padding: 4px 10px; 
    border-radius: 12px; 
    font-size: 0.8em; 
    font-weight: bold; 
    display: inline-block; 
}
.badge-purple { background-color: rgba(155, 89, 182, 0.15); color: #8e44ad; border: 1px solid rgba(155, 89, 182, 0.3); }
.badge-green  { background-color: rgba(39, 174, 96, 0.15); color: #27ae60; border: 1px solid rgba(39, 174, 96, 0.3); }
.badge-orange { background-color: rgba(243, 156, 18, 0.15); color: #d35400; border: 1px solid rgba(243, 156, 18, 0.3); }
.badge-blue   { background-color: rgba(52, 152, 219, 0.15); color: #2980b9; border: 1px solid rgba(52, 152, 219, 0.3); }
.badge-delete { background-color: rgba(231,76,60,0.15); color: #c0392b; border: 1px solid rgba(231,76,60,0.3); }
.badge-default-log { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.ext-badge { color: white; padding: 3px 6px; border-radius: 4px; font-size: 0.8em; font-weight: bold; text-transform: uppercase; display: inline-block; min-width: 40px; text-align: center; }

/* Anciens badges statuts conservés pour Tabulator */
.badge-status { 
    padding: 4px 10px; 
    border-radius: 12px; 
    font-size: 0.85em; 
    font-weight: 600; 
    display: inline-block; 
}
.badge-bon { background-color: #d4edda; color: #155724; }
.badge-surveiller { background-color: #fff3cd; color: #856404; }
.badge-bloquer { background-color: #f8d7da; color: #721c24; }

/* ========================================================================= */
/* --- MODULE NOTIFICATIONS (RAPPELS) --- */
/* ========================================================================= */
.notification-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: 80px; backdrop-filter: blur(2px);
}
.notification-box {
    background: white; width: 90%; max-width: 550px;
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    overflow: hidden; animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.notification-header {
    background: #1e293b; color: white; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.notification-header h3 { margin: 0; font-size: 1.2rem; color: white; display: flex; align-items: center; gap: 10px;}
.notification-header .btn-close-modal { color: white; opacity: 0.8; }
.notification-header .btn-close-modal:hover { opacity: 1; color: #ef4444; }

.notification-body { padding: 20px; max-height: 70vh; overflow-y: auto; background: #f8fafc; }
.rappel-item {
    background: white; border: 1px solid #cbd5e1; border-left: 4px solid #f39c12;
    border-radius: 8px; padding: 15px; margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.rappel-item:last-child { margin-bottom: 0; }
.rappel-header { font-size: 0.95em; color: #64748b; margin-bottom: 10px; display: flex; align-items: center; gap: 8px;}
.rappel-text { font-size: 1.05em; color: #1e293b; font-weight: 500; margin-bottom: 15px; line-height: 1.4; background: #f1f5f9; padding: 10px; border-radius: 6px;}
.rappel-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.snooze-select { padding: 8px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.9em; flex-grow: 1; min-width: 150px;}

.shake-bell { animation: ring 2s infinite; display: inline-block; transform-origin: top center; }
@keyframes ring {
    0% { transform: rotate(0); }
    5% { transform: rotate(15deg); }
    10% { transform: rotate(-15deg); }
    15% { transform: rotate(20deg); }
    20% { transform: rotate(-20deg); }
    25% { transform: rotate(10deg); }
    30% { transform: rotate(-10deg); }
    35% { transform: rotate(5deg); }
    40% { transform: rotate(-5deg); }
    45%, 100% { transform: rotate(0); }
}


/* ========================================================================= */
/* --- MODULE DASHBOARD --- */
/* ========================================================================= */

.dashboard-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    margin-bottom: 20px; 
}
.stat-value { font-size: 2em; font-weight: bold; }
.text-success { color: #27ae60; }
.text-warning { color: #f39c12; }

/* Limiter la hauteur de la liste des commandes à ~2 éléments et activer le scroll */
#list-commandes-container {
    max-height: 275px; 
    overflow-y: auto;
    padding-right: 8px; 
}

/* Personnalisation de la barre de défilement pour ce conteneur */
#list-commandes-container::-webkit-scrollbar {
    width: 6px;
}
#list-commandes-container::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}
#list-commandes-container::-webkit-scrollbar-thumb {
    background: #bdc3c7; 
    border-radius: 4px;
}
#list-commandes-container::-webkit-scrollbar-thumb:hover {
    background: #95a5a6; 
}

/* ========================================================================= */
/* --- MODULE INVOICES --- */
/* ========================================================================= */

#invoices-table .tabulator-header, 
#invoices-table .tabulator-header .tabulator-col {
    background-color: #9b59b6 !important; color: white !important; border-bottom: none !important; font-family: 'Segoe UI', sans-serif; font-weight: 600;
}
#invoices-table .tabulator-row { border-bottom: 1px solid #f0f0f0; background-color: #fff; }
#invoices-table .tabulator-row:nth-child(even) { background-color: #fdfefe; } 
#invoices-table .tabulator-row:hover { background-color: #f5eef8 !important; }
#invoices-table .tabulator-row.tabulator-selected { background-color: #ebdef0 !important; box-shadow: inset 5px 0 0 #8e44ad !important; border-left: none !important; font-weight: bold; color: #512e5f !important; }

/* ========================================================================= */
/* --- MODULE ORDERS --- */
/* ========================================================================= */

#orders-table .tabulator-header, 
#orders-table .tabulator-header .tabulator-col {
    background-color: #27ae60 !important; color: white !important; border-bottom: none !important; font-family: 'Segoe UI', sans-serif; font-weight: 600;
}
#orders-table .tabulator-row { border-bottom: 1px solid #f0f0f0; background-color: #fff; }
#orders-table .tabulator-row:nth-child(even) { background-color: #f9fdfa; }
#orders-table .tabulator-row:hover { background-color: #e9f7ef !important; }
#orders-table .tabulator-row.tabulator-selected { background-color: #abebc6 !important; box-shadow: inset 5px 0 0 #1e8449 !important; border-left: none !important; font-weight: bold; color: #145a32 !important; }

/* ========================================================================= */
/* --- MODULE OFFERS --- */
/* ========================================================================= */

#offres-table .tabulator-header, 
#offres-table .tabulator-header .tabulator-col {
    background-color: #1abc9c !important; color: white !important; border-bottom: none !important; font-family: 'Segoe UI', sans-serif; font-weight: 600;
}
#offres-table .tabulator-row { border-bottom: 1px solid #f0f0f0; background-color: #fff; }
#offres-table .tabulator-row:nth-child(even) { background-color: #fcfefe; }
#offres-table .tabulator-row:hover { background-color: #e0f9f4 !important; }
#offres-table .tabulator-row.tabulator-selected { background-color: #a3e4d7 !important; box-shadow: inset 5px 0 0 #117864 !important; border-left: none !important; font-weight: bold; color: #1a5246 !important; }

/* ========================================================================= */
/* --- MODULE PRODUCTS --- */
/* ========================================================================= */

#products-table .tabulator-header, 
#products-table .tabulator-header .tabulator-col {
    background-color: #3f51b5 !important; color: white !important; border-bottom: none !important; font-family: 'Segoe UI', sans-serif; font-weight: 600;
}
#products-table .tabulator-row { border-bottom: 1px solid #f0f0f0; background-color: #fff; }
#products-table .tabulator-row:nth-child(even) { background-color: #f8f9fc; } 
#products-table .tabulator-row:hover { background-color: #e8eaf6 !important; }
#products-table .tabulator-row.tabulator-selected { background-color: #c5cae9 !important; box-shadow: inset 5px 0 0 #303f9f !important; border-left: none !important; font-weight: bold; color: #1a237e !important; }

/* ========================================================================= */
/* --- MODULE PROJECTS --- */
/* ========================================================================= */

#projects-table .tabulator-header { border-bottom: none !important; font-family: 'Segoe UI', sans-serif; }
#projects-table .tabulator-header .tabulator-col-group-title { border-bottom: 2px solid rgba(0,0,0,0.4) !important; padding: 8px !important; font-weight: bold !important; color: black !important; }
#projects-table .tabulator-header .tabulator-col-title { color: black !important; font-weight: bold !important; text-align: center; }

.tabulator-col.grp-clients, .tabulator-col.grp-clients .tabulator-col-content { background-color: #5D4037 !important; border-color: rgba(255,255,255,0.2) !important; }
.tabulator-col.grp-produits, .tabulator-col.grp-produits .tabulator-col-content { background-color: #1976D2 !important; border-color: rgba(255,255,255,0.2) !important; }
.tabulator-col.grp-mesures, .tabulator-col.grp-mesures .tabulator-col-content { background-color: #E65100 !important; border-color: rgba(255,255,255,0.2) !important; }
.tabulator-col.grp-livraisons, .tabulator-col.grp-livraisons .tabulator-col-content { background-color: #6A1B9A !important; border-color: rgba(255,255,255,0.2) !important; }
.tabulator-col.grp-pose, .tabulator-col.grp-pose .tabulator-col-content { background-color: #2E7D32 !important; border-color: rgba(255,255,255,0.2) !important; }

.cell-clients { background-color: #F9F8F7 !important; }
.cell-produits { background-color: #F5F9FD !important; }
.cell-mesures { background-color: #FFF9F5 !important; }
.cell-livraisons { background-color: #FAF7FC !important; }
.cell-pose { background-color: #F6FAF6 !important; }

.border-right-thick { border-right: 2px solid #bdc3c7 !important; }

#projects-table .tabulator-row:hover .cell-clients { background-color: #EBE7E5 !important; }
#projects-table .tabulator-row:hover .cell-produits { background-color: #E1EDFA !important; }
#projects-table .tabulator-row:hover .cell-mesures { background-color: #FEEADD !important; }
#projects-table .tabulator-row:hover .cell-livraisons { background-color: #EDE1F5 !important; }
#projects-table .tabulator-row:hover .cell-pose { background-color: #E4F2E4 !important; }

#projects-table .tabulator-row.tabulator-selected { background-color: #d7ccc8 !important; box-shadow: inset 5px 0 0 #5d4037 !important; border-left: none !important; font-weight: bold; color: #3e2723 !important; }
#projects-table .tabulator-row { border-bottom: 1px solid #f0f0f0; }

.status-check { color: #27ae60; font-size: 1.3em; }

.tabulator-title-vert { writing-mode: vertical-rl; transform: rotate(180deg); height: 180px; white-space: pre-wrap; font-weight: bold; font-size: 0.9em; line-height: 1.2; text-align: left; display: inline-block; padding-bottom: 5px; color: black; }
.tabulator-title-horiz { height: 180px; display: flex; align-items: flex-end; justify-content: center; text-align: center; white-space: pre-wrap; font-weight: bold; font-size: 0.9em; line-height: 1.2; padding-bottom: 5px; color: black; box-sizing: border-box; }

/* ========================================================================= */
/* --- MODULE SETTINGS --- */
/* ========================================================================= */

.settings-header { margin-bottom: 30px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
.settings-grid-spaced { margin-bottom: 30px; }
.settings-group-title { font-weight: bold; color: #34495e; }

.settings-card { background: white; padding: 40px 20px; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s ease; cursor: pointer; border: 2px solid transparent; }
.settings-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-color: #3498db; }
.settings-card i { font-size: 3.5em; margin-bottom: 20px; transition: 0.3s; }
.settings-card:hover i { transform: scale(1.1); }
.settings-card h3 { margin: 0 0 10px 0; color: #2c3e50; font-size: 1.4em; }
.settings-card p { color: #7f8c8d; font-size: 0.95em; margin: 0; }

.settings-section { display: none; background: white; padding: 30px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.btn-back-settings { background: #95a5a6; color: white; margin-bottom: 25px; border-radius: 8px; font-weight: bold; }
.btn-back-settings:hover { background: #7f8c8d; }

.company-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.logo-preview-box { border: 2px dashed #bdc3c7; border-radius: 8px; height: 150px; display: flex; align-items: center; justify-content: center; background: #f9fbfd; overflow: hidden; position: relative; cursor: pointer; }
.logo-preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview-box span { color: #95a5a6; font-weight: bold; }

.user-form-title { margin-top: 0; color: #3498db; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.avatar-label { font-size: 0.9em; color: #7f8c8d; }
.avatar-preview-box { width: 80px; height: 80px; border-radius: 50%; background: #f1f5f9; margin: 10px auto; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px dashed #cbd5e1; transition: 0.2s; }
.avatar-selected { border-style: solid !important; border-color: #3b82f6 !important; }
.avatar-editing { border-style: solid !important; border-color: #f39c12 !important; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-small-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.avatar-small-placeholder { width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; margin: 0 auto; color: #94a3b8; }
.pwd-hint { color: #e67e22; margin-top: 5px; }

.import-box { padding: 20px; border: 2px dashed #ccc; border-radius: 10px; text-align: center; background: #fafafa; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.import-box h3 { margin-top: 0; margin-bottom: 5px; width: 100%; }
.import-box input[type="file"] { margin: 15px 0; max-width: 100%; font-size: 0.85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-box .btn { margin-top: auto; width: 100%; border: none; }
.status-msg { margin-top: 10px; font-weight: bold; font-size: 0.9em; min-height: 20px; word-break: break-word; width: 100%; }

.text-navy { color: #34495e !important; }
.text-blue { color: #3498db; }
.text-teal { color: #1abc9c; }
.text-green { color: #27ae60; }
.text-purple { color: #8e44ad; }
.text-indigo { color: #3f51b5; }
.text-brown { color: #795548; }
.text-gray-light { color: #95a5a6; }
.text-orange { color: #e67e22 !important; }
.text-archive-gray { color: #666b6b !important; }

.border-blue { border-color: #3498db !important; }
.border-teal { border-color: #1abc9c !important; }
.border-green { border-color: #27ae60 !important; }
.border-purple { border-color: #8e44ad !important; }
.border-indigo { border-color: #3f51b5 !important; }
.border-brown { border-color: #795548 !important; }
.border-gray-light { border-color: #95a5a6 !important; }
.border-orange { border-color: #e67e22 !important; }
.border-archive-gray { border-color: #666b6b !important; }

.btn-import-solid { border-radius: 4px; padding: 10px 15px; color: #ffffff !important; border: none; font-weight: bold; transition: 0.2s; width: 100%; margin-top: auto; }
.btn-import-solid:disabled { opacity: 1 !important; box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.2) !important; cursor: not-allowed; }

.bg-blue { background-color: #3498db !important; }
.bg-blue:hover { background-color: #2980b9 !important; }
.bg-teal { background-color: #1abc9c !important; }
.bg-teal:hover { background-color: #16a085 !important; }
.bg-green { background-color: #27ae60 !important; }
.bg-green:hover { background-color: #1e8449 !important; }
.bg-purple { background-color: #8e44ad !important; }
.bg-purple:hover { background-color: #7d3c98 !important; }
.bg-indigo { background-color: #3f51b5 !important; }
.bg-indigo:hover { background-color: #303f9f !important; }
.bg-brown { background-color: #795548 !important; }
.bg-brown:hover { background-color: #5d4037 !important; }
.bg-orange { background-color: #e67e22 !important; }
.bg-orange:hover { background-color: #d35400 !important; }
.bg-archive-gray { background-color: #666b6b !important; }
.bg-archive-gray:hover { background-color: #555959 !important; }

.action-icon-orange { color: #f39c12; margin-right: 5px; }
.action-icon-red { color: #e74c3c; }

.hr-separator { border: 0; border-top: 1px solid #eee; margin-bottom: 25px; }
.settings-form-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.input-large { font-weight: bold; font-size: 1.1em; }
.form-label-strong { display: block; margin-bottom: 8px; font-weight: bold; color: #2c3e50; }
.logo-placeholder-icon { font-size: 2em; display: block; margin-bottom: 10px; }
.logo-hint { font-size: 0.8em; color: #7f8c8d; text-align: center; margin-top: 10px; }
.form-actions-right { margin-top: 30px; text-align: right; }
.btn-large { padding: 12px 30px; font-size: 1.1em; }

.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.backup-card-warning { background: #fff3cd; border: 2px solid #ffeeba; padding: 25px; border-radius: 10px; display: flex; flex-direction: column; justify-content: space-between; }
.backup-card-success { background: #e8f8f5; border: 2px solid #c3e6cb; padding: 25px; border-radius: 10px; display: flex; flex-direction: column; justify-content: space-between; }
.text-warning-dark { color: #856404; }
.text-success-dark { color: #155724; }
.backup-card-title { margin-top: 0; }
.backup-card-desc { font-size: 0.95em; margin-bottom: 20px; }

.btn-orange-large { background-color: #e67e22; color: white; width: 100%; font-size: 1.1em; padding: 15px; font-weight: bold; border: none; border-radius: 6px; cursor: pointer; transition: 0.2s; }
.btn-orange-large:hover { background-color: #d35400; }
.btn-green-large { background-color: #27ae60; color: white; width: 100%; font-size: 1.1em; padding: 15px; font-weight: bold; border: none; border-radius: 6px; cursor: pointer; transition: 0.2s; }
.btn-green-large:hover { background-color: #1e8449; }

.protocol-container { margin-top: 35px; background: #fcfcfc; border: 1px solid #ddd; border-radius: 10px; padding: 30px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.02); }
.protocol-title-blue { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-top: 0; }
.protocol-title-red { color: #2c3e50; border-bottom: 2px solid #e74c3c; padding-bottom: 10px; margin-top: 40px; }
.protocol-list { color: #444; line-height: 1.8; padding-left: 20px; font-size: 0.95em; margin-bottom: 0; }
.protocol-hint { color: #7f8c8d; font-size: 0.95em; font-style: italic; }

/* ========================================================================= */
/* --- MODALES CENTRALES (OFFRES & AUTRES) --- */
/* ========================================================================= */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5); z-index: 2000; 
    display: flex; justify-content: center; align-items: center; 
}
.modal-content { 
    background: white; width: 90%; max-width: 1200px; height: 90vh; 
    border-radius: 8px; display: flex; flex-direction: column; 
    overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}
.modal-header { 
    padding: 15px 20px; border-bottom: 1px solid #ddd; 
    display: flex; justify-content: space-between; align-items: center; 
    background: #f8f9fa; 
}
.modal-header h2 { margin: 0; font-size: 1.2rem; color: #1abc9c; }
.btn-close-modal { 
    background: none; border: none; font-size: 1.5rem; 
    cursor: pointer; color: #666; transition: 0.2s; 
}
.btn-close-modal:hover { color: #e74c3c; }
.modal-body { padding: 20px; overflow-y: auto; flex-grow: 1; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #ddd; background: #f8f9fa; text-align: right; display: flex; justify-content: space-between; align-items: center; }

/* -- Sections Rétractables (Informations) -- */
.offer-section {
    border-radius: 8px; margin-bottom: 20px; border: 1px solid #e2e8f0;
    background: white; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.offer-section-header {
    padding: 12px 20px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; transition: background 0.2s;
}
.offer-section-header h4 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.btn-toggle-section {
    background: none; border: none; cursor: pointer; font-size: 1.1rem; transition: transform 0.3s ease;
    display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
}
.offer-section.collapsed .btn-toggle-section { transform: rotate(-180deg); }
.offer-section-body { padding: 20px; border-top: 1px solid #e2e8f0; }
.offer-section.collapsed .offer-section-body { display: none; }

.offer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; font-size: 0.95rem; align-items: center; }
.offer-grid label { display: block; margin-bottom: 6px; font-weight: 600; color: #34495e; font-size: 0.85rem; }
.offer-grid input { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.95rem; transition: all 0.2s; background: white; color: #2c3e50; }
.offer-grid input.input-readonly { background-color: #f1f5f9; color: #64748b; font-weight: bold; cursor: not-allowed; border-color: #cbd5e1; }

.offer-grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 15px; font-size: 0.95rem; align-items: center; }
.offer-grid-12 label { display: block; margin-bottom: 6px; font-weight: 600; color: #34495e; font-size: 0.85rem; }
.offer-grid-12 input, .offer-grid-12 select { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.95rem; transition: all 0.2s; background: white; color: #2c3e50; }
.offer-grid-12 input.input-readonly { background-color: #f1f5f9; color: #64748b; font-weight: bold; cursor: not-allowed; border-color: #cbd5e1; }

/* Thèmes Modales (Bleu, Teal) */
.theme-blue { border-color: rgba(52, 152, 219, 0.4); }
.theme-blue .offer-section-header { background: rgba(52, 152, 219, 0.1); color: #2980b9; }
.theme-blue .offer-section-header:hover { background: rgba(52, 152, 219, 0.15); }
.theme-blue .btn-toggle-section { color: #2980b9; }
.theme-blue .btn-toggle-section:hover { background: rgba(52, 152, 219, 0.2); }
.theme-blue .offer-section-body { background: rgba(52, 152, 219, 0.03); }

.theme-teal { border-color: rgba(26, 188, 156, 0.4); }
.theme-teal .offer-section-header { background: rgba(26, 188, 156, 0.1); color: #16a085; }
.theme-teal .offer-section-header:hover { background: rgba(26, 188, 156, 0.15); }
.theme-teal .btn-toggle-section { color: #16a085; }
.theme-teal .btn-toggle-section:hover { background: rgba(26, 188, 156, 0.2); }
.theme-teal .offer-section-body { background: rgba(26, 188, 156, 0.03); }
.theme-teal .offer-grid input:focus, .theme-teal .offer-grid-12 input:focus { border-color: #1abc9c; outline: none; box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2); }

.theme-indigo { border-color: rgba(63, 81, 181, 0.4); }
.theme-indigo .offer-section-header { background: rgba(63, 81, 181, 0.1); color: #303f9f; }
.theme-indigo .offer-section-header:hover { background: rgba(63, 81, 181, 0.15); }
.theme-indigo .btn-toggle-section { color: #303f9f; }
.theme-indigo .btn-toggle-section:hover { background: rgba(63, 81, 181, 0.2); }
.theme-indigo .offer-section-body { background: rgba(63, 81, 181, 0.03); }
.theme-indigo .offer-grid input:focus, .theme-indigo .offer-grid-12 input:focus { border-color: #3f51b5; outline: none; box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2); }

.theme-gray { border-color: rgba(127, 140, 141, 0.4); }
.theme-gray .offer-section-header { background: rgba(127, 140, 141, 0.1); color: #2c3e50; }
.theme-gray .offer-section-header:hover { background: rgba(127, 140, 141, 0.15); }
.theme-gray .btn-toggle-section { color: #2c3e50; }
.theme-gray .btn-toggle-section:hover { background: rgba(127, 140, 141, 0.2); }
.theme-gray .offer-section-body { background: rgba(127, 140, 141, 0.03); }
.theme-gray .offer-grid input:focus, .theme-gray .offer-grid-12 input:focus { border-color: #7f8c8d; outline: none; box-shadow: 0 0 0 3px rgba(127, 140, 141, 0.2); }

/* ========================================================================= */
/* --- MODALES & CREATION D'OFFRE (NOUVEAU DESIGN UI PREMIUM) --- */
/* ========================================================================= */

.premium-modal {
    width: 100vw; height: 100vh; max-width: 100vw; 
    border-radius: 0; margin: 0;
    background-color: #f8fafc;
    display: flex; flex-direction: column;
}

.modal-header-premium {
    background: #1e293b; color: white;
    padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}
.modal-header-premium h2 { margin: 0; font-size: 1.4rem; color: #f8fafc; display: flex; align-items: center; gap: 10px;}
.btn-close-modal-premium {
    background: rgba(255,255,255,0.1); border: none; font-size: 1.2rem;
    cursor: pointer; color: white; width: 36px; height: 36px; border-radius: 50%;
    transition: 0.2s; display: flex; align-items: center; justify-content: center;
}
.btn-close-modal-premium:hover { background: #ef4444; }

.modal-body-premium {
    flex-grow: 1; overflow-y: auto;
    padding: 30px;
}
.offer-container-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 20px;
}

/* Grille Top */
.offer-top-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 1000px) {
    .offer-top-grid { grid-template-columns: 1fr; }
}

/* Carte Client Info */
.client-card-body {
    display: flex; flex-direction: column; gap: 12px;
}
.client-name-large { font-size: 1.3rem; font-weight: bold; color: #0f172a; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; margin-bottom: 5px;}
.client-info-row { display: flex; align-items: center; gap: 10px; color: #475569; font-size: 0.95rem; }
.client-info-row i { color: #94a3b8; width: 20px; text-align: center;}

/* Inputs spécifiques de la nouvelle offre */
.input-disabled { background-color: #f1f5f9 !important; border-style: dashed; }

/* Empty State Articles */
.empty-state-box {
    text-align: center; padding: 50px 20px; background: #f8fafc; 
    border: 2px dashed #cbd5e1; border-radius: 8px; cursor: pointer; transition: 0.3s;
}
.empty-state-box:hover { background: #f1f5f9; border-color: #94a3b8; }
.empty-state-box i { font-size: 3.5rem; color: #cbd5e1; margin-bottom: 15px; }
.empty-state-box h3 { color: #475569; margin-bottom: 8px; font-size: 1.2rem;}
.empty-state-box p { color: #64748b; font-size: 0.95rem;}

/* Structure des blocs d'articles existants */
.offer-block-wrapper { 
    margin-bottom: 25px; 
    border: 1px solid #e2e8f0; 
    border-radius: 10px; 
    overflow: hidden; 
    background: white;
    border-left: 4px solid #3f51b5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.offer-block-wrapper.is-variante {
    border-left-color: #f97316;
    background: #fcfdfd;
}
.block-header {
    background: #f8fafc; 
    padding: 14px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #e2e8f0;
}
.block-header h4 { 
    margin: 0; 
    color: #0f172a; 
    font-size: 1.1em; 
    font-weight: 700;
    display: flex;
    align-items: center;
}
.block-position-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #e0e7ff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 12px;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.1);
}
.offer-block-wrapper.is-variante .block-position-letter {
    background: #ffedd5;
    color: #ea580c;
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.1);
}
.block-article-ref {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 600;
    margin-right: 8px;
}
.block-article-nom {
    font-weight: 700;
    color: #0f172a;
}
.offer-block-wrapper.is-variante .block-article-nom {
    text-decoration: line-through;
    color: #64748b;
}

/* Variante Badge/Pill Checkbox */
.block-variante-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.block-variante-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.block-variante-pill input {
    display: none;
}
.block-variante-pill.active {
    background: #fff7ed;
    border-color: #fdba74;
    color: #ea580c;
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.05);
}

/* Actions Header */
.block-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.btn-block-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.btn-block-action:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #f5f3ff;
}
.btn-block-action.btn-delete-block:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* Tabulator Override dans le block de chiffrage */
.custom-tabulator-block { 
    border: none !important; 
}
.custom-tabulator-block .tabulator-header { 
    background: #f8fafc !important; 
    color: #475569 !important; 
    border-bottom: 2px solid #e2e8f0 !important;
    font-weight: 700;
    font-size: 0.85rem;
}
.custom-tabulator-block .tabulator-header .tabulator-col {
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
}
.custom-tabulator-block .tabulator-row { 
    border-bottom: 1px solid #e2e8f0 !important; 
    background-color: #ffffff !important;
    font-size: 0.9rem;
    color: #334155;
    transition: background-color 0.15s ease;
}
.custom-tabulator-block .tabulator-row:nth-child(even) {
    background-color: #fcfdfe !important;
}
.custom-tabulator-block .tabulator-row:hover {
    background-color: #f1f5f9 !important;
}
.custom-tabulator-block .tabulator-cell {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-right: 1px solid #e2e8f0 !important;
}
.custom-tabulator-block .tabulator-row .tabulator-cell:last-child {
    border-right: none !important;
}
.custom-tabulator-block .tabulator-header .tabulator-col:last-child {
    border-right: none !important;
}
.offer-block-wrapper.is-variante .custom-tabulator-block .tabulator-row {
    color: #94a3b8;
}

/* Sticky Footer (Totaux) */
.modal-footer-sticky {
    background: white; border-top: 1px solid #e2e8f0; padding: 20px 30px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.02);
}
.footer-rabais-box {
    display: flex; align-items: center; gap: 10px; background: #f8fafc; padding: 15px 20px; border-radius: 8px; border: 1px solid #e2e8f0;
}
.footer-rabais-box label { font-weight: bold; color: #475569;}
.footer-rabais-box input { width: 80px; text-align: center; padding: 8px; border: 1px solid #cbd5e1; border-radius: 4px; font-weight: bold; font-size: 1.1rem; color: #0f172a;}

.footer-totals-box {
    text-align: right; min-width: 300px;
}
.total-line { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 1.05rem; }
.total-line span:first-child { text-align: right; flex-grow: 1; padding-right: 20px;}
.total-final { font-size: 1.5rem; font-weight: bold; color: #0f172a; border-top: 2px solid #cbd5e1; padding-top: 8px; margin-top: 8px;}

.footer-actions-box { display: flex; gap: 15px; }

/* Sub-Modal (Catalogue Config) */
.sub-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15,23,42,0.6); z-index: 2050; 
    display: flex; justify-content: center; align-items: center;
}
.sub-modal-content {
    background: white; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); display: flex; flex-direction: column;
}
.sub-modal-header {
    padding: 18px 25px; background: #3b82f6; color: white;
    display: flex; justify-content: space-between; align-items: center; border-radius: 12px 12px 0 0;
}
.sub-modal-body { padding: 25px; display: flex; flex-direction: column; gap: 20px;}
.sub-modal-footer { padding: 20px 25px; background: #f8fafc; text-align: right; border-top: 1px solid #e2e8f0; border-radius: 0 0 12px 12px;}

.config-step-card { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.step-title { font-size: 1.15rem; color: #1e293b; margin-top: 0; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px;}
.step-number { background: #3b82f6; color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.9rem;}

.selected-article-banner {
    padding: 12px 18px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 15px;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.selected-article-banner.active {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #22c55e;
    color: #166534;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.05);
}

.catalog-filters { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; align-items: center;}

/* NOUVEAU : Design Premium Translucide pour les Filtres */
.cat-type-filter { 
    padding: 8px 16px; border: 1px solid #cbd5e1; background: white; color: #475569; 
    border-radius: 20px; cursor: pointer; font-weight: bold; transition: 0.2s; 
}
/* Filtre : Tous (Bleu) */
.cat-type-filter[data-type="all"] { background-color: rgba(52, 152, 219, 0.05); color: #2980b9; border-color: rgba(52, 152, 219, 0.3); }
.cat-type-filter[data-type="all"]:hover, .cat-type-filter[data-type="all"].active { background-color: rgba(52, 152, 219, 0.2); border-color: #2980b9; }

/* Filtre : Sur Mesure (Violet/Indigo) */
.cat-type-filter[data-type="sur-mesure"] { background-color: rgba(155, 89, 182, 0.05); color: #8e44ad; border-color: rgba(155, 89, 182, 0.3); }
.cat-type-filter[data-type="sur-mesure"]:hover, .cat-type-filter[data-type="sur-mesure"].active { background-color: rgba(155, 89, 182, 0.2); border-color: #8e44ad; }

/* Filtre : Pièce détachée (Vert) */
.cat-type-filter[data-type="piece"] { background-color: rgba(39, 174, 96, 0.05); color: #27ae60; border-color: rgba(39, 174, 96, 0.3); }
.cat-type-filter[data-type="piece"]:hover, .cat-type-filter[data-type="piece"].active { background-color: rgba(39, 174, 96, 0.2); border-color: #27ae60; }

/* Filtre : Service (Orange) */
.cat-type-filter[data-type="service"] { background-color: rgba(243, 156, 18, 0.05); color: #d35400; border-color: rgba(243, 156, 18, 0.3); }
.cat-type-filter[data-type="service"]:hover, .cat-type-filter[data-type="service"].active { background-color: rgba(243, 156, 18, 0.2); border-color: #d35400; }

.search-box { position: relative; flex-grow: 1; min-width: 250px;}
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search-box input { width: 100%; padding: 10px 15px 10px 40px; border: 1px solid #cbd5e1; border-radius: 20px; outline: none; transition: 0.2s;}
.search-box input:focus { border-color: #3b82f6; }

.catalog-list-container { max-height: 250px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 6px; background: white; }
.catalog-list-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.catalog-list-item:hover {
    transform: translateY(-2px);
    border-color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.08), 0 2px 4px -1px rgba(79, 70, 229, 0.04);
    background: #fafbfe;
}
.catalog-list-item.selected {
    background: #eef2ff;
    border: 2px solid #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    padding: 15px;
}
.item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; color: #0f172a; font-size: 1.05rem;}
.item-meta { font-size: 0.85rem; color: #64748b; margin-bottom: 5px; display: flex; gap: 15px;}
.item-desc { font-size: 0.85rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Options Globale et Lignes */
.options-flex-grid { display: flex; gap: 15px; flex-wrap: wrap; }
.option-pill { display: flex; align-items: center; background: white; border: 1px solid #cbd5e1; border-radius: 20px; padding: 4px 12px; font-size: 0.9rem;}
.opt-label { cursor: pointer; display: flex; align-items: center; gap: 8px; margin: 0; color: #1e293b;}
.opt-nc { border-left: 1px solid #e2e8f0; margin-left: 10px; padding-left: 10px; display: flex; align-items: center; color: #ea580c; font-size: 0.85rem;}

.table-header-mock { font-weight: bold; color: #475569; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; margin-bottom: 15px; font-size: 0.9rem;}
.variant-row-wrapper { border-bottom: 1px dashed #cbd5e1; padding-bottom: 15px; margin-bottom: 15px; }
.variant-row-inner { align-items: center; }
.input-small { width: 50px; text-align: center; }
.input-center { text-align: center; }
.input-price { text-align: right; font-weight: bold; color: #059669; font-size: 1.05rem; background: #f0fdf4 !important; border-color: #86efac !important;}
.error-price { color: #dc2626 !important; background: #fef2f2 !important; border-color: #fca5a5 !important; font-size: 0.9rem;}
.select-standard { padding: 6px 8px !important; }
.nc-label { color: #ea580c; font-size: 0.8rem; cursor: pointer; margin: 0;}
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-5 { gap: 5px; }
.custom-checkbox { transform: scale(1.2); cursor: pointer; }

.lines-actions-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 15px;}
.selection-actions { display: flex; gap: 10px; }
.selection-options-panel { background: #f8fafc; border: 1px solid #cbd5e1; padding: 20px; border-radius: 8px; margin-top: 15px; }
.strong-label { display: block; font-weight: bold; color: #1e293b; margin-bottom: 10px; }

/* ========================================================================= */
/* --- ECRAN DE CONNEXION (LOGIN) --- */
/* ========================================================================= */
.login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; /* Par-dessus tout le reste du site */
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: #0f172a;
}

/* Côté gauche : Panel d'inspiration et de motivation */
.login-inspiration-side {
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Background grid styling for left panel */
.login-inspiration-side::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.8;
}

.inspiration-content {
    max-width: 540px;
    z-index: 2;
    color: white;
    animation: slideInLeft 0.5s ease-out;
}

/* EZ+ Inline stylized brand logo styling */
.ezplus-logo-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.ezplus-logo-inline svg {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4));
}

.ezplus-logo-inline .logo-text {
    font-size: 2.1rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.04em;
    line-height: 1;
}

.ezplus-logo-inline .text-blue-accent {
    color: #3b82f6;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.inspiration-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.inspiration-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 16px 0;
    color: #ffffff;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.inspiration-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0 0 40px 0;
}

.inspiration-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-quote-icon {
    font-size: 1.8rem;
    color: rgba(59, 130, 246, 0.35);
    position: absolute;
    top: 20px;
    left: 24px;
}

.card-quote {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 20px 0;
    padding-left: 36px;
    font-style: italic;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 36px;
}

.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.card-author strong {
    display: block;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
}

.card-author span {
    color: #64748b;
    font-size: 0.8rem;
}

/* Côté droit : Formulaire de connexion */
.login-form-side {
    width: 40%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    position: relative;
    z-index: 1;
    padding: 40px;
    box-sizing: border-box;
}

/* Cercles lumineux d'arrière-plan uniquement pour version mobile si la partie gauche disparaît */
.login-overlay::before,
.login-overlay::after {
    display: none;
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.45;
}

.login-overlay::before {
    width: 300px;
    height: 300px;
    background: #bfdbfe;
    top: -100px;
    left: -100px;
}

.login-overlay::after {
    width: 350px;
    height: 350px;
    background: #dbeafe;
    bottom: -100px;
    right: -100px;
}

.login-box {
    background: #ffffff;
    width: 100%; max-width: 400px;
    padding: 45px 40px; border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.02), 0 0 0 1px rgba(15, 23, 42, 0.04);
    z-index: 1;
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.login-logo { text-align: center; margin-bottom: 28px; }

/* Skeletal/SWR Loading Logo Placeholder style to prevent standard raw image jump */
.login-logo img {
    animation: fadeInLogo 0.3s ease-out;
}

@keyframes fadeInLogo {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.login-logo h2 { 
    margin: 10px 0 6px 0; 
    color: #0f172a; 
    font-size: 1.45rem; 
    font-weight: 600;
    letter-spacing: -0.015em;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.login-logo p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.login-box .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease-in-out;
    outline: none;
    box-sizing: border-box;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login-box input::placeholder {
    color: #94a3b8;
}

/* Bouton premium dynamique avec espacement augmenté pour ne plus toucher le mot de passe */
.login-box button[type="submit"] {
    width: 100%;
    padding: 13px;
    margin-top: 30px; /* Espace adéquat avec le mot de passe */
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.login-box button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.login-box button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.login-error-msg {
    background: #fef2f2; color: #dc2626; padding: 12px 14px;
    border-radius: 8px; border: 1px solid #fca5a5;
    margin-top: 20px; font-size: 0.88em; text-align: center; font-weight: 600;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.05);
}

/* Animation pour le message d'erreur */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.login-error-msg.shake {
    animation: shake 0.4s ease-in-out;
}

/* Adaptabilité Mobile & Tablettes */
@media (max-width: 1024px) {
    .login-inspiration-side {
        display: none;
    }
    .login-form-side {
        width: 100%;
        background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%);
    }
    .login-overlay::before,
    .login-overlay::after {
        display: block;
    }
}

/* ========================================================================= */
/* --- MODULE SETTINGS - TABLES --- */
/* ========================================================================= */

/* Utilisateurs */
#users-table-container .tabulator-header,
#users-table-container .tabulator-header .tabulator-col {
    background-color: #3f51b5 !important;
    color: white !important;
    border-bottom: none !important;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
}

/* Logs */
#logs-table-container .tabulator-header,
#logs-table-container .tabulator-header .tabulator-col {
    background-color: #34495e !important;
    color: white !important;
    border-bottom: none !important;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
}

/* Commentaires */
#comments-table-container .tabulator-header,
#comments-table-container .tabulator-header .tabulator-col {
    background-color: #e67e22 !important;
    color: white !important;
    border-bottom: none !important;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
}

/* Archives */
#archives-table-container .tabulator-header,
#archives-table-container .tabulator-header .tabulator-col {
    background-color: #666b6b !important;
    color: white !important;
    border-bottom: none !important;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
}

/* ========================================================================= */
/* --- GLOBAL AUTOFILL BYPASS --- */
/* ========================================================================= */
/* Désactive l'ombrage bleu/jaune et la présélection de couleur imposée par les navigateurs (Chrome/Safari) lors du remplissage automatique */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    transition: background-color 500000s ease-in-out 0s;
    -webkit-text-fill-color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
}

/* --- CORRECTIF DE CURSEUR POUR LE TABLEAU DE BORD (DRAG & DROP) --- */
/* Empêche le curseur de glissement (main blanche/transparente 'grab') de se propager aux cellules, textes et tableaux internes */
.card * {
    cursor: default;
}
.card button, 
.card a, 
.card select, 
.card option,
.card [onclick],
.card .btn,
.card .settings-card,
.card .logo-preview-box,
.card .avatar-preview-box,
.card .empty-state-box,
.card .catalog-list-item,
.card .opt-label,
.card .nc-label,
.card .btn-quick,
.card .btn-panel-action,
.card .btn-action,
.card .btn-new,
.card .btn-edit,
.card .btn-delete,
.card .btn-columns,
.card .side-panel-close {
    cursor: pointer;
}
.card input,
.card textarea {
    cursor: text;
}
.card input:disabled,
.card textarea:disabled,
.card select:disabled,
.card .input-readonly,
.card .btn:disabled {
    cursor: not-allowed;
}
/* Maintient un curseur de glissement premium Noir sur la poignée uniquement */
.drag-handle {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 4a1.5 1.5 0 0 0-1.5 1.5v5.5a.5.5 0 0 1-1 0V6a1.5 1.5 0 0 0-3 0v8a6 6 0 0 0 12 0v-4.5a1.5 1.5 0 0 0-3 0v2.5a.5.5 0 0 1-1 0v-6A1.5 1.5 0 0 0 10 4z' fill='%231e293b' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") 8 4, move !important;
}
.drag-handle:active {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6a1.5 1.5 0 0 0-1.5 1.5v3.5a.5.5 0 0 1-1 0v-1a1.5 1.5 0 0 0-3 0v5a6 6 0 0 0 12 0v-2.5a1.5 1.5 0 0 0-3 0v1a.5.5 0 0 1-1 0v-4a1.5 1.5 0 0 0-1.5-1.5z' fill='%231e293b' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") 8 6, move !important;
}

/* --- AMÉLIORATIONS PREMIUM DU GLISSER-DÉPOSER --- */
/* La poignée est invisible par défaut pour un rendu épuré et minimaliste */
.card .drag-handle {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}
/* Elle apparaît en douceur au survol de sa carte */
.card:hover .drag-handle {
    opacity: 1;
    transform: scale(1);
    color: #cbd5e1;
}
/* S'illumine et s'agrandit au survol de la poignée elle-même */
.card .drag-handle:hover {
    color: #3498db !important;
    transform: scale(1.2) !important;
}
/* Style premium de la zone d'atterrissage (Ghost) pendant le déplacement */
.sortable-ghost {
    opacity: 0.35 !important;
    background-color: #f8fafc !important;
    border: 2px dashed #3498db !important;
    box-shadow: none !important;
}
/* Style premium du bloc saisi (Chosen) qui lévite */
.sortable-chosen {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    transform: scale(1.02);
    z-index: 9999 !important;
}

/* ========================================================================= */
/* --- ACCORDÉONS MÉMOS SAUVEGARDE & RESTAURATION --- */
/* ========================================================================= */
.memos-container {
    margin-top: 35px;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.memos-section-title {
    font-size: 1.35rem;
    color: #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.memos-section-title i {
    color: #3b82f6;
    background: #eff6ff;
    padding: 10px;
    border-radius: 8px;
    font-size: 1.15rem;
}

.memo-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.memo-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.memo-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.memo-header {
    padding: 18px 24px;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.memo-header:hover {
    background-color: #f8fafc;
}

.memo-header h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.memo-header h4 i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.memo-icon-toggle {
    font-size: 0.95rem;
    color: #64748b;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.memo-item.active {
    border-color: #3b82f6;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.08);
}

.memo-item.active .memo-header {
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.memo-item.active .memo-header h4 {
    color: #1d4ed8;
}

.memo-item.active .memo-icon-toggle {
    transform: rotate(180deg);
    color: #3b82f6;
}

.memo-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.memo-content-inner {
    padding: 24px 30px;
    color: #475569;
    line-height: 1.65;
    font-size: 0.95rem;
}

/* Styles internes des guides */
.memo-intro {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #334155;
}

.memo-step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.memo-step-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.memo-step-number {
    background: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: 1px solid #dbeafe;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.05);
}

.memo-step-body {
    flex-grow: 1;
}

.memo-step-body strong {
    color: #1e293b;
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.memo-step-body em {
    color: #64748b;
    font-style: italic;
    font-size: 0.9rem;
}

.memo-alert {
    background: #fffbeb;
    border-left: 4px solid #d97706;
    color: #92400e;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 22px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.92rem;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.02);
}

.memo-alert i {
    font-size: 1.1rem;
    margin-top: 2px;
    color: #d97706;
}

.memo-alert-info {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #14532d;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 22px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.92rem;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.02);
}

.memo-alert-info i {
    font-size: 1.1rem;
    margin-top: 2px;
    color: #16a34a;
}

.memo-code-block {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 4px 8px;
    border-radius: 5px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.88em;
    user-select: all;
    display: inline-block;
    font-weight: 600;
}

.memo-sub-section {
    margin-top: 25px;
    border-top: 1px solid #f1f5f9;
    padding-top: 25px;
}

.memo-sub-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.memo-sub-title i {
    color: #10b981;
}

.memo-sub-title-orange i {
    color: #f97316;
}

/* ========================================================================= */
/* --- CONFIGURATION DU RAPPEL SAUVEGARDE SSD --- */
/* ========================================================================= */
.reminder-config-card {
    margin-top: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.reminder-card-title {
    font-size: 1.15rem;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.reminder-card-title i {
    color: #2563eb;
    background: #eff6ff;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.reminder-card-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
}

.reminder-form-row {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.reminder-toggle-group {
    display: flex;
    align-items: center;
}

.reminder-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.reminder-switch-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.reminder-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #475569;
}

.reminder-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.reminder-select:focus {
    border-color: #3b82f6;
}

.reminder-time-input {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.reminder-time-input:focus {
    border-color: #3b82f6;
}

/* ========================================================================= */
/* --- SANTÉ DU SYSTÈME & DIAGNOSTICS --- */
/* ========================================================================= */
.health-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.health-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .health-row {
        grid-template-columns: 1fr;
    }
}

.health-col-card {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 16px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.health-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.health-section-title i {
    font-size: 0.95rem;
}

.d-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.health-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-list li {
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.health-list li strong {
    color: #475569;
}

.text-sm-gray {
    font-size: 0.8rem;
    color: #64748b;
    font-family: monospace;
    max-width: 60%;
    text-align: right;
}

.health-console-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.health-console-card .health-section-title {
    color: #f8fafc;
    border-bottom-color: #1e293b;
}

.health-console-logs-box {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 12px;
    min-height: 120px;
    max-height: 240px;
    overflow-y: auto;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.console-empty-msg {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    height: 100%;
    margin-top: 30px;
    justify-content: center;
    font-size: 0.9rem;
}

.console-log-line {
    padding: 2px 4px;
    border-radius: 3px;
    word-break: break-all;
    line-height: 1.4;
}

.console-log-line.error-line {
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #ef4444;
    padding-left: 8px;
}

.health-actions-row {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* --- LOGIN PAGE NAS STATUS INDICATOR --- */
.login-nas-status {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    background: rgba(15, 23, 42, 0.7);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    pointer-events: none;
}

.nas-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.nas-dot.searching {
    background-color: #f1c40f;
    box-shadow: 0 0 8px #f1c40f;
    animation: pulse-orange 1.5s infinite ease-in-out;
}

.nas-dot.connected {
    background-color: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
}

.nas-dot.disconnected {
    background-color: #e74c3c;
    box-shadow: 0 0 8px #e74c3c;
    animation: pulse-red 1.5s infinite ease-in-out;
}

@keyframes pulse-orange {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

@keyframes pulse-red {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* ========================================================================= */
/* --- FORMULAIRE D'ARTICLE PREMIUM --- */
/* ========================================================================= */

.premium-form-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.premium-form-section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

/* Classes génériques de couleur pour les bordures gauches des sections premium */
.premium-border-blue { border-left: 4px solid #3498db !important; }
.premium-border-green { border-left: 4px solid #27ae60 !important; }
.premium-border-orange { border-left: 4px solid #e67e22 !important; }
.premium-border-orange-dark { border-left: 4px solid #f39c12 !important; }
.premium-border-purple { border-left: 4px solid #9b59b6 !important; }
.premium-border-violet { border-left: 4px solid #8e44ad !important; }
.premium-border-indigo { border-left: 4px solid #3f51b5 !important; }
.premium-border-brown { border-left: 4px solid #795548 !important; }
.premium-border-gray { border-left: 4px solid #7f8c8d !important; }
.premium-border-dark { border-left: 4px solid #34495e !important; }
.premium-border-teal { border-left: 4px solid #1abc9c !important; }

/* Thèmes de couleur génériques pour les titres de sections, wrappers d'icônes et focus inputs */
.theme-blue .premium-section-title, .theme-blue.premium-section-title { color: #3498db !important; }
.theme-blue .premium-title-icon-wrapper, .theme-blue.premium-title-icon-wrapper { background: rgba(52, 152, 219, 0.1) !important; color: #3498db !important; }
.theme-blue .premium-input-group .premium-input:focus,
.theme-blue .premium-input-group .premium-select:focus,
.theme-blue .premium-input-group .premium-textarea:focus { border-color: #3498db !important; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important; }

.theme-green .premium-section-title, .theme-green.premium-section-title { color: #27ae60 !important; }
.theme-green .premium-title-icon-wrapper, .theme-green.premium-title-icon-wrapper { background: rgba(39, 174, 96, 0.1) !important; color: #27ae60 !important; }
.theme-green .premium-input-group .premium-input:focus,
.theme-green .premium-input-group .premium-select:focus,
.theme-green .premium-input-group .premium-textarea:focus { border-color: #27ae60 !important; box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15) !important; }

.theme-orange .premium-section-title, .theme-orange.premium-section-title { color: #e67e22 !important; }
.theme-orange .premium-title-icon-wrapper, .theme-orange.premium-title-icon-wrapper { background: rgba(230, 126, 34, 0.1) !important; color: #e67e22 !important; }
.theme-orange .premium-input-group .premium-input:focus,
.theme-orange .premium-input-group .premium-select:focus,
.theme-orange .premium-input-group .premium-textarea:focus { border-color: #e67e22 !important; box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15) !important; }

.theme-orange-dark .premium-section-title, .theme-orange-dark.premium-section-title { color: #f39c12 !important; }
.theme-orange-dark .premium-title-icon-wrapper, .theme-orange-dark.premium-title-icon-wrapper { background: rgba(243, 156, 18, 0.1) !important; color: #f39c12 !important; }
.theme-orange-dark .premium-input-group .premium-input:focus,
.theme-orange-dark .premium-input-group .premium-select:focus,
.theme-orange-dark .premium-input-group .premium-textarea:focus { border-color: #f39c12 !important; box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15) !important; }

.theme-purple .premium-section-title, .theme-purple.premium-section-title { color: #9b59b6 !important; }
.theme-purple .premium-title-icon-wrapper, .theme-purple.premium-title-icon-wrapper { background: rgba(155, 89, 182, 0.1) !important; color: #9b59b6 !important; }
.theme-purple .premium-input-group .premium-input:focus,
.theme-purple .premium-input-group .premium-select:focus,
.theme-purple .premium-input-group .premium-textarea:focus { border-color: #9b59b6 !important; box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.15) !important; }

.theme-violet .premium-section-title, .theme-violet.premium-section-title { color: #8e44ad !important; }
.theme-violet .premium-title-icon-wrapper, .theme-violet.premium-title-icon-wrapper { background: rgba(142, 68, 173, 0.1) !important; color: #8e44ad !important; }
.theme-violet .premium-input-group .premium-input:focus,
.theme-violet .premium-input-group .premium-select:focus,
.theme-violet .premium-input-group .premium-textarea:focus { border-color: #8e44ad !important; box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.15) !important; }

.theme-indigo .premium-section-title, .theme-indigo.premium-section-title { color: #3f51b5 !important; }
.theme-indigo .premium-title-icon-wrapper, .theme-indigo.premium-title-icon-wrapper { background: rgba(63, 81, 181, 0.1) !important; color: #3f51b5 !important; }
.theme-indigo .premium-input-group .premium-input:focus,
.theme-indigo .premium-input-group .premium-select:focus,
.theme-indigo .premium-input-group .premium-textarea:focus { border-color: #3f51b5 !important; box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15) !important; }

.theme-brown .premium-section-title, .theme-brown.premium-section-title { color: #795548 !important; }
.theme-brown .premium-title-icon-wrapper, .theme-brown.premium-title-icon-wrapper { background: rgba(121, 85, 72, 0.1) !important; color: #795548 !important; }
.theme-brown .premium-input-group .premium-input:focus,
.theme-brown .premium-input-group .premium-select:focus,
.theme-brown .premium-input-group .premium-textarea:focus { border-color: #795548 !important; box-shadow: 0 0 0 3px rgba(121, 85, 72, 0.15) !important; }

.theme-gray .premium-section-title, .theme-gray.premium-section-title { color: #7f8c8d !important; }
.theme-gray .premium-title-icon-wrapper, .theme-gray.premium-title-icon-wrapper { background: rgba(127, 140, 141, 0.1) !important; color: #7f8c8d !important; }
.theme-gray .premium-input-group .premium-input:focus,
.theme-gray .premium-input-group .premium-select:focus,
.theme-gray .premium-input-group .premium-textarea:focus { border-color: #7f8c8d !important; box-shadow: 0 0 0 3px rgba(127, 140, 141, 0.15) !important; }

.theme-dark .premium-section-title, .theme-dark.premium-section-title { color: #34495e !important; }
.theme-dark .premium-title-icon-wrapper, .theme-dark.premium-title-icon-wrapper { background: rgba(52, 73, 94, 0.1) !important; color: #34495e !important; }
.theme-dark .premium-input-group .premium-input:focus,
.theme-dark .premium-input-group .premium-select:focus,
.theme-dark .premium-input-group .premium-textarea:focus { border-color: #34495e !important; box-shadow: 0 0 0 3px rgba(52, 73, 94, 0.15) !important; }

.theme-teal .premium-section-title, .theme-teal.premium-section-title { color: #1abc9c !important; }
.theme-teal .premium-title-icon-wrapper, .theme-teal.premium-title-icon-wrapper { background: rgba(26, 188, 156, 0.1) !important; color: #1abc9c !important; }
.theme-teal .premium-input-group .premium-input:focus,
.theme-teal .premium-input-group .premium-select:focus,
.theme-teal .premium-input-group .premium-textarea:focus { border-color: #1abc9c !important; box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.15) !important; }

.premium-form-section.section-classification {
    border-left: 4px solid #3f51b5;
}

.premium-form-section.section-fournisseur {
    border-left: 4px solid #9b59b6;
}

.premium-form-section.section-tarification {
    border-left: 4px solid #27ae60;
}

.premium-section-title {
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-classification .premium-section-title {
    color: #3f51b5;
}

.section-fournisseur .premium-section-title {
    color: #9b59b6;
}

.section-tarification .premium-section-title {
    color: #27ae60;
}

.premium-title-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.section-classification .premium-title-icon-wrapper {
    background: rgba(63, 81, 181, 0.1);
    color: #3f51b5;
}

.section-fournisseur .premium-title-icon-wrapper {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.section-tarification .premium-title-icon-wrapper {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.premium-field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
}

.premium-char-counter {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: normal;
}

.premium-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.premium-input-group i.field-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 5;
}

.premium-input-group .premium-input,
.premium-input-group .premium-select,
.premium-input-group .premium-textarea {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease-in-out;
}

.premium-input-group .premium-input.input-readonly {
    background-color: #f8fafc;
    color: #64748b;
    border-style: dashed;
    font-weight: 600;
    cursor: not-allowed;
}

.premium-input-group .premium-input:focus,
.premium-input-group .premium-select:focus,
.premium-input-group .premium-textarea:focus {
    outline: none;
}

.section-classification .premium-input-group .premium-input:focus,
.section-classification .premium-input-group .premium-select:focus,
.section-classification .premium-input-group .premium-textarea:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

.section-fournisseur .premium-input-group .premium-input:focus,
.section-fournisseur .premium-input-group .premium-select:focus,
.section-fournisseur .premium-input-group .premium-textarea:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.15);
}

.section-tarification .premium-input-group .premium-input:focus,
.section-tarification .premium-input-group .premium-select:focus,
.section-tarification .premium-input-group .premium-textarea:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.premium-input-group .premium-input:focus ~ i.field-icon,
.premium-input-group .premium-select:focus ~ i.field-icon,
.premium-input-group .premium-textarea:focus ~ i.field-icon {
    color: currentColor;
}

/* Suffixe à droite */
.premium-input-group.has-suffix .premium-input {
    padding-right: 52px;
}

.premium-input-suffix {
    position: absolute;
    right: 10px;
    font-weight: bold;
    color: #64748b;
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    pointer-events: none;
    user-select: none;
    z-index: 5;
}

/* Custom Select Dropdown wrapper with FontAwesome chevron */
.premium-select-wrapper {
    position: relative;
    width: 100%;
}

.premium-select-wrapper select.premium-select {
    padding-right: 32px !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.premium-select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 0.75rem;
    transition: color 0.2s;
    z-index: 5;
}

.premium-select-wrapper:hover::after {
    color: #64748b;
}

.premium-select-wrapper input.premium-input {
    padding-right: 32px !important;
}

.premium-select-wrapper input.premium-input::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Custom Premium Combobox Dropdown */
.premium-combobox-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 4px 0;
}

.combobox-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1e293b;
    transition: background 0.15s, color 0.15s;
}

.combobox-option:hover,
.combobox-option.highlighted {
    background: #3f51b5;
    color: #ffffff;
}

.combobox-no-result {
    padding: 10px 14px;
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
    cursor: default;
}

.premium-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========================================================================= */
/* --- REORGANISATION SPLIT-SCREEN CONFIGURATEUR D'ARTICLE --- */
/* ========================================================================= */

/* Configuration de la modale en colonnes */
#catalog-sub-modal .sub-modal-body {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    height: calc(90vh - 140px) !important;
    overflow: hidden !important;
    padding: 20px !important;
    background: #f1f5f9;
}

#catalog-sub-modal .config-step-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Bordures d'accent des colonnes */
#catalog-sub-modal .config-step-card:first-child {
    flex: 0 0 38%;
    border-left: 4px solid #3f51b5;
}

#catalog-sub-modal .config-step-card:last-child {
    flex: 0 0 60%;
    border-left: 4px solid #10b981;
}

/* Titres d'étape */
#catalog-sub-modal .step-title {
    flex-shrink: 0;
    font-size: 1.15rem;
    color: #1e293b;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

#catalog-sub-modal .step-number {
    background: linear-gradient(135deg, #3f51b5, #5c6bc0);
    color: white;
    box-shadow: 0 2px 4px rgba(63, 81, 181, 0.2);
}

#catalog-sub-modal .config-step-card:last-child .step-number {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Zone de recherche */
#catalog-sub-modal .search-box {
    position: relative;
    flex-grow: 1;
}

#catalog-sub-modal .search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#catalog-sub-modal .search-box input:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

#cat-article-list.catalog-list-container {
    flex-grow: 1;
    overflow-y: auto;
    max-height: none !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    margin-bottom: 15px;
    padding: 5px;
}

/* Options globales */
#cat-global-options-container.global-options-box {
    flex-shrink: 0;
    margin-top: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
}

/* Colonne de droite : Liste des lignes de configuration */
#cat-lines-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 15px;
}

.table-header-mock {
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variant-row-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.variant-row-wrapper:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    border-color: #cbd5e1;
}

.lines-actions-bar {
    flex-shrink: 0;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

/* Boutons premium sous-modale */
#catalog-sub-modal .btn-rounded {
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

/* Inputs de tableau compacts */
.submodal-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s;
    text-align: center;
    background: #ffffff;
}

.submodal-input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.submodal-select {
    width: 100%;
    padding: 8px 24px 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.2s;
    cursor: pointer;
}

.submodal-select:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* --- COLLAPSIBLE CATALOG PANELS & FLOATING ARROW TOGGLE --- */
.catalog-pane-separator {
    width: 6px;
    background: #f1f5f9;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    user-select: none;
    z-index: 100;
}

.catalog-pane-separator:hover {
    background: #cbd5e1;
    border-color: #94a3b8;
}

.catalog-toggle-arrow-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
}

.catalog-pane-separator:hover .catalog-toggle-arrow-btn {
    border-color: #3f51b5;
    color: #3f51b5;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translate(-50%, -50%) scale(1.15);
}

.catalog-toggle-arrow-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

/* ========================================================================= */
/* --- REFONTE PREMIUM DE L'EDITEUR D'OFFRE --- */
/* ========================================================================= */

.editor-header-actions {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.02);
}

.editor-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-header-title h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-header-title h1 i {
    color: #3f51b5;
    background: #e0e7ff;
    padding: 8px;
    border-radius: 8px;
    font-size: 1.1rem;
}

.editor-header-title .version-badge {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.editor-actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.editor-layout-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    padding: 24px 30px;
    max-width: 1650px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .editor-layout-container {
        grid-template-columns: 1fr;
    }
}

.editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.editor-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Style Carte Client dans la Sidebar */
.sidebar-client-card {
    background: #ffffff;
    border-left: 4px solid #3f51b5;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.sidebar-client-card .client-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.sidebar-client-card .client-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #334155;
}

.sidebar-client-card .client-info-item i {
    color: #64748b;
    width: 16px;
    margin-top: 3px;
    text-align: center;
}

.sidebar-client-card .client-info-item strong {
    color: #0f172a;
}

/* Style Totaux Financiers Premium */
.financial-totals-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    border-top: 4px solid #3f51b5;
    padding: 24px;
    margin-top: 10px;
}

.financial-totals-card .totals-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .financial-totals-card .totals-layout {
        flex-direction: column;
        align-items: stretch;
    }
}

.financial-totals-card .discount-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.financial-totals-card .discount-box label {
    font-weight: 700;
    color: #475569;
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.financial-totals-card .discount-box input {
    width: 70px;
    text-align: center;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
    background: #ffffff;
}

.financial-totals-card .totals-table {
    min-width: 320px;
}

.financial-totals-card .total-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #64748b;
}

.financial-totals-card .total-row-item.highlight {
    font-weight: 600;
    color: #0f172a;
}

.financial-totals-card .total-row-item.discount-row {
    color: #ef4444;
}

.financial-totals-card .total-row-item .val-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.financial-totals-card .total-row-item .val-wrapper input {
    width: 105px;
    text-align: right;
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    background: #ffffff;
}

.financial-totals-card .total-row-item .val-wrapper input:focus {
    border-color: #3f51b5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

.financial-totals-card .total-row-item.final-row {
    border-top: 2px solid #cbd5e1;
    padding-top: 12px;
    margin-top: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
}

.financial-totals-card .total-row-item.final-row .val-wrapper input {
    width: 135px;
    font-size: 1.2rem;
    padding: 6px 10px;
    color: #0f172a;
    background: #f8fafc;
}

/* ========================================================================= */
/* --- REFONTE MAJEURE & AMÉLIORATION DU DESIGN DE L'ÉDITEUR D'OFFRE --- */
/* ========================================================================= */

/* 1. Global Reset & Typography pour l'éditeur */
#app-content {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Scrollbars personnalisés */
#app-content::-webkit-scrollbar,
.catalog-list-container::-webkit-scrollbar,
#cat-lines-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
#app-content::-webkit-scrollbar-track,
.catalog-list-container::-webkit-scrollbar-track,
#cat-lines-container::-webkit-scrollbar-track {
    background: #f8fafc;
}
#app-content::-webkit-scrollbar-thumb,
.catalog-list-container::-webkit-scrollbar-thumb,
#cat-lines-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

/* 2. Header Actions Moderne et Translucide (Effet Glassmorphism) */
.editor-header-actions {
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(248,250,252,0.95)) !important;
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    border-left: 3px solid #4f46e5 !important;
    box-shadow: 0 4px 24px -6px rgba(79, 70, 229, 0.06), 0 1px 3px rgba(0,0,0,0.03) !important;
    margin: -30px -30px 24px -30px;
    padding: 18px 28px;
}

.editor-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.editor-header-title h1 {
    font-weight: 800 !important;
    background: linear-gradient(135deg, #1e293b, #4f46e5) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 1.45rem !important;
    letter-spacing: -0.5px;
}

.editor-header-title h1 i {
    color: #4f46e5 !important;
    -webkit-text-fill-color: #4f46e5 !important;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important;
    -webkit-background-clip: padding-box !important;
    background-clip: padding-box !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.15);
    padding: 9px !important;
    border-radius: 10px !important;
    font-size: 1.1rem !important;
}

.editor-header-title #header-offer-number-badge {
    color: #4f46e5 !important;
    background: rgba(238, 242, 255, 0.8) !important;
    border: 1px dashed rgba(79, 70, 229, 0.35);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(4px);
    padding: 4px 10px !important;
    border-radius: 6px !important;
}

.editor-header-title .version-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Boutons premium */
.btn-indigo {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%) !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.btn-indigo:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
    background: linear-gradient(135deg, #4338ca, #3730a3) !important;
}
.btn-indigo:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2) !important;
}

.editor-actions-group button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px !important;
}
.editor-actions-group button:hover {
    transform: translateY(-1px);
}
.editor-actions-group button:active {
    transform: translateY(0);
}

/* 3. Client & Project Sidebar */
.sidebar-client-card {
    border-left: 4px solid #4f46e5 !important;
    border-radius: 12px !important;
    background: #ffffff;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-client-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-client-card .client-title {
    border-bottom: 1px solid #f1f5f9 !important;
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
    padding-bottom: 12px;
}

.sidebar-client-card .client-info-item {
    font-size: 0.88rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.sidebar-client-card .client-info-item:hover {
    color: #1e293b;
}

.sidebar-client-card .client-info-item i {
    color: #6366f1;
    background: #eef2ff;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e7ff;
    font-size: 0.78rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sidebar-client-card .client-info-item:hover i {
    background: #e0e7ff;
    color: #4f46e5;
    transform: scale(1.05);
}

/* Section Rétractable Modernisée */
.offer-section {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.01) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.offer-section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03) !important;
}

.offer-section-header {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 16px 20px !important;
}

.offer-section-header h4 {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: -0.2px;
}

.offer-section-body {
    background: #ffffff !important;
    padding: 20px !important;
}

.theme-teal {
    border-top: 4px solid #14b8a6 !important;
}
.theme-teal .offer-section-header h4 {
    color: #0d9488 !important;
}
.theme-teal .offer-section-header h4 i {
    color: #14b8a6;
}

.theme-indigo {
    border-top: 4px solid #4f46e5 !important;
}
.theme-indigo .offer-section-header h4 {
    color: #4338ca !important;
}
.theme-indigo .offer-section-header h4 i {
    color: #4f46e5;
}

.theme-gray {
    border-top: 4px solid #64748b !important;
}
.theme-gray .offer-section-header h4 {
    color: #475569 !important;
}
.theme-gray .offer-section-header h4 i {
    color: #64748b;
}

/* Inputs élégants */
.offer-grid-12 label {
    font-weight: 700;
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.offer-grid-12 input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 0.9rem;
    color: #0f172a;
    transition: all 0.2s ease-in-out;
}

.offer-grid-12 input:focus {
    border-color: #4f46e5 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.offer-grid-12 input.input-readonly {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
    border-style: solid !important;
}

/* Empty State modernisé */
.empty-state-box {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.empty-state-box:hover {
    border-color: #4f46e5;
    background: #fafbfe;
    transform: scale(0.99);
}

.empty-state-box i {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}
.empty-state-box:hover i {
    color: #4f46e5;
    transform: translateY(-3px);
}

.empty-state-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-state-box p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

/* 4. Blocs d'offres / Sections configurées */
.offer-block-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.35s ease-out;
}

.offer-block-wrapper:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.06), 0 4px 10px -3px rgba(0, 0, 0, 0.03) !important;
    border-color: #c7d2fe;
}

.offer-block-wrapper.is-variante {
    border-left: 4px solid #f97316;
    background: linear-gradient(135deg, #fffcf9, #fff7ed);
}

.offer-block-wrapper .block-header {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.offer-block-wrapper .block-header:hover {
    background: linear-gradient(180deg, #f1f5f9, #e8ecf1);
}

.block-position-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    margin-right: 10px;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    transition: transform 0.2s ease;
}

.offer-block-wrapper:hover .block-position-letter {
    transform: scale(1.05);
}

.is-variante .block-position-letter {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.block-article-ref {
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 8px;
}

.block-article-nom {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Variante toggle pill */
.block-variante-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.block-variante-pill input {
    display: none;
}

.block-variante-pill:hover {
    border-color: #f97316;
    color: #f97316;
    background: #fffaf0;
}

.block-variante-pill.active {
    background: #fff3e0;
    border-color: #f97316;
    color: #ea580c;
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.15);
}

.block-header-actions {
    display: flex;
    gap: 8px;
}

.btn-block-action {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-block-action:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.btn-duplicate-block:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #eef2ff;
}

.btn-edit-block:hover {
    color: #10b981;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.btn-delete-block:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fff1f2;
}

/* Tabulator styling dans l'éditeur */
.custom-tabulator-block.tabulator {
    border: none !important;
    background: #ffffff;
    border-radius: 0 0 12px 12px !important;
    overflow: hidden;
}

.custom-tabulator-block .tabulator-header {
    background-color: #f8fafc !important;
    border-bottom: 2px solid #eef2ff !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
}

.custom-tabulator-block .tabulator-header .tabulator-col {
    background: #f8fafc !important;
    border-right: 1px solid #eef2ff !important;
}

.custom-tabulator-block .tabulator-col-resize-handle:hover {
    cursor: col-resize !important;
}

.custom-tabulator-block .tabulator-row {
    border-bottom: 1px solid #f1f5f9 !important;
    min-height: 40px;
    transition: background-color 0.15s ease;
}

.custom-tabulator-block .tabulator-row:hover {
    background-color: #faf8ff !important;
}

.custom-tabulator-block .tabulator-cell {
    padding: 10px 8px !important;
    font-size: 0.88rem !important;
    color: #334155;
    border-right: 1px solid #f8fafc !important;
}

/* 5. Remarques et conditions en colonnes */
.remarks-conditions-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 900px) {
    .remarks-conditions-grid {
        grid-template-columns: 1fr 1.2fr !important;
    }
}

.premium-textarea {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.88rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
}
.premium-textarea:focus {
    border-color: #4f46e5 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.select-standard {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #475569;
    font-weight: 600;
}

.select-standard:focus {
    border-color: #4f46e5;
    outline: none;
}

/* 6. Checkout Totaux Card */
.financial-totals-card {
    border-top: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ffffff 0%, #faf8ff 100%);
    box-shadow: 0 4px 20px -4px rgba(79, 70, 229, 0.08), 0 2px 6px -2px rgba(0,0,0,0.03) !important;
    padding: 24px;
    border: 1px solid #e0e7ff !important;
    position: relative;
    overflow: hidden;
}

.financial-totals-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #4f46e5);
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.financial-totals-card .discount-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 15px 20px !important;
}

.financial-totals-card .discount-box label {
    font-weight: 700 !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
}

.financial-totals-card .discount-box input {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    transition: all 0.2s;
    font-weight: 800 !important;
}
.financial-totals-card .discount-box input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
    outline: none;
}

.financial-totals-card .total-row-item {
    font-size: 0.92rem !important;
    color: #475569 !important;
    margin-bottom: 10px !important;
}

.financial-totals-card .total-row-item .val-wrapper input {
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    font-variant-numeric: tabular-nums;
}

.financial-totals-card .total-row-item.highlight {
    font-weight: 700 !important;
    color: #0f172a !important;
    font-size: 0.98rem !important;
}

.financial-totals-card .total-row-item.final-row {
    border-top: 2px solid #e0e7ff !important;
    padding-top: 20px !important;
    margin-top: 20px !important;
    font-size: 1.35rem !important;
    color: #0f172a !important;
}

.financial-totals-card .total-row-item.final-row .val-wrapper input {
    font-size: 1.35rem !important;
    padding: 8px 14px !important;
    color: #4f46e5 !important;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff) !important;
    border: 1.5px solid #c7d2fe !important;
    border-radius: 8px !important;
    width: 150px !important;
    text-shadow: 0 1px 2px rgba(79, 70, 229, 0.05);
    font-variant-numeric: tabular-nums;
}

/* 7. Configuration Sub-Modal Premium Design */
#catalog-sub-modal .sub-modal-overlay {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(4px);
}

#catalog-sub-modal .sub-modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05) !important;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#catalog-sub-modal .sub-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    padding: 18px 24px !important;
}

#catalog-sub-modal .sub-modal-header h3 {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    letter-spacing: -0.2px;
}

#catalog-sub-modal .sub-modal-header h3 i {
    background: rgba(255,255,255,0.1);
    padding: 6px;
    border-radius: 6px;
    font-size: 0.9rem;
}

#catalog-sub-modal .config-step-card {
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;
    border: 1px solid #e2e8f0 !important;
}

/* Titres étapes en-tête */
#catalog-sub-modal .step-title {
    color: #0f172a !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

#catalog-sub-modal .step-number {
    width: 26px !important;
    height: 26px !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Options applicables */
#cat-global-options-container.global-options-box {
    background: #fafbfe !important;
    border: 1px solid #e0e7ff !important;
    border-radius: 8px !important;
    padding: 16px !important;
}

#cat-global-options-container label.strong-label {
    font-size: 0.8rem !important;
    font-weight: 700;
    color: #4338ca !important;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

/* Catalog Pills */
.cat-type-filter {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

.cat-type-filter.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Cards articles catalogue */
.catalog-list-item {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 14px 16px !important;
    margin-bottom: 8px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}

.catalog-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0,0,0,0.06) !important;
    border-color: #cbd5e1 !important;
}

.catalog-list-item .item-header strong {
    font-weight: 700 !important;
    font-size: 0.93rem !important;
    color: #1e293b;
}

.catalog-list-item.type-sur-mesure { border-left: 4px solid #8e44ad !important; }
.catalog-list-item.type-piece { border-left: 4px solid #22c55e !important; }
.catalog-list-item.type-service { border-left: 4px solid #f59e0b !important; }

.catalog-list-item.selected {
    transform: none;
}
.catalog-list-item.selected.type-sur-mesure { background: linear-gradient(135deg, #faf5ff, #f3e8ff); border: 2px solid #8e44ad !important; box-shadow: 0 2px 8px rgba(142,68,173,0.1) !important; }
.catalog-list-item.selected.type-piece { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 2px solid #22c55e !important; box-shadow: 0 2px 8px rgba(34,197,94,0.1) !important; }
.catalog-list-item.selected.type-service { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 2px solid #f59e0b !important; box-shadow: 0 2px 8px rgba(245,158,11,0.1) !important; }

.catalog-list-item .item-desc {
    color: #64748b !important;
    font-size: 0.82rem !important;
    line-height: 1.4;
}

/* Option pills */
.option-pill {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
    transition: all 0.2s ease;
}

.option-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc !important;
}

.option-pill input[type="checkbox"] {
    transform: scale(1.05);
}

/* Variant Row Configuration grid */
.variant-row-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    margin-bottom: 8px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.variant-row-wrapper:hover {
    border-color: #c7d2fe !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.04) !important;
    background: #faf8ff !important;
}

.variant-row-wrapper .var-row-number {
    font-weight: 800;
    color: #94a3b8;
    font-size: 0.75rem;
    min-width: 20px;
}

/* ───────────────────────────────────────────────────────── */
/* FORMULAIRES DE CONFIGURATION (SOUS-MODALES DE L'ÉDITEUR)    */
/* Surcharges forcées (!important) pour écraser les styles     */
/* génériques de formulaire de l'ERP dans l'éditeur d'offres.  */
/* ───────────────────────────────────────────────────────── */

.submodal-input {
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 7px 10px !important;
    font-size: 0.85rem !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
    background: #ffffff !important;
}

.submodal-input::placeholder {
    color: #cbd5e1 !important;
    font-weight: 400;
}

.submodal-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
    outline: none !important;
}

.submodal-select {
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 7px 28px 7px 10px !important;
    font-size: 0.85rem !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.submodal-select:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
    outline: none !important;
}

.input-price.submodal-input {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #059669 !important;
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.error-price.submodal-input {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
}

/* Badge options sur ligne */
.opts-count {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    cursor: pointer;
    min-width: 20px;
    text-align: center;
}

/* Pastilles options du panneau */
.selection-options-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.selection-options-panel .strong-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 12px;
    display: block;
}

/* Séparateur Flottant Interactif */
.catalog-pane-separator {
    background: #e2e8f0 !important;
    border: none !important;
    width: 8px !important;
    border-radius: 4px;
}
.catalog-pane-separator:hover {
    background: #cbd5e1 !important;
}
.catalog-toggle-arrow-btn {
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}
.catalog-pane-separator:hover .catalog-toggle-arrow-btn {
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
}

/* Client Selector Table */
#co-clients-selector-table {
    border: none !important;
    background: transparent !important;
}

#co-clients-selector-table .tabulator-header {
    background-color: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
}

#co-clients-selector-table .tabulator-row {
    border-bottom: 1px solid #f1f5f9 !important;
    background-color: #ffffff !important;
    transition: all 0.15s ease;
    cursor: pointer;
}

#co-clients-selector-table .tabulator-row:hover {
    background-color: #f1f5f9 !important;
}

#co-clients-selector-table .tabulator-cell {
    padding: 12px 10px !important;
    font-size: 0.92rem !important;
}

/* Badges Client type */
.badge-purple {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}
.badge-green {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-orange {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

/* 8. Modern Checkout and Billing Mode Styles */
.financial-totals-card .totals-left-side {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 290px !important;
    max-width: 420px !important;
}

.financial-totals-card .discount-box {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 12px 18px !important;
}

.financial-totals-card .discount-box input {
    width: 80px !important;
    text-align: center !important;
    padding: 8px 10px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.financial-totals-card .billing-mode-box {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 12px 18px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.financial-totals-card .billing-mode-box:hover {
    border-color: #cbd5e1 !important;
    background: #f1f5f9 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
}

.billing-mode-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.billing-mode-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.billing-mode-desc {
    font-size: 0.72rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}

/* Custom Premium Toggle Switch */
.switch-container {
    position: relative !important;
    display: inline-block !important;
    width: 44px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
}

.switch-container input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.switch-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #cbd5e1 !important;
    transition: .25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 24px !important;
}

.switch-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 18px !important;
    width: 18px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: white !important;
    transition: .25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15) !important;
}

.switch-container input:checked + .switch-slider {
    background-color: #4f46e5 !important;
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(20px) !important;
}

.switch-container input:disabled + .switch-slider {
    background-color: #f1f5f9 !important;
    cursor: not-allowed !important;
}

.switch-container input:disabled + .switch-slider:before {
    background-color: #94a3b8 !important;
}

.financial-totals-card input:disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
}

/* 9. Drag-and-Drop Sortable styles */
/* Sortable JS styles */
.sortable-ghost {
    opacity: 0.35 !important;
    background: #eef2ff !important;
    border: 2px dashed #4f46e5 !important;
}

.sortable-chosen {
    box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05) !important;
    transform: scale(1.008) !important;
}

.block-header {
    cursor: pointer !important;
}

.block-header:active {
    cursor: pointer !important;
}

/* Styles pour les Boutons Utilitaires Compacts */
.btn-utility {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.9rem;
}

.btn-utility:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
}

.btn-utility:active {
    transform: translateY(0);
}

/* Surcharge Tabulator pour l'affichage de la ligne de total de l'offre */
.tabulator-cell-total {
    color: #0f172a;
}

/* =====================================================
   10. FINITIONS GLOBALES — Modernisation Éditeur
   ===================================================== */

/* Scrollbars raffinées dans la modale et les listes */
#catalog-sub-modal ::-webkit-scrollbar,
.offer-section-body ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
#catalog-sub-modal ::-webkit-scrollbar-track,
.offer-section-body ::-webkit-scrollbar-track {
    background: transparent;
}
#catalog-sub-modal ::-webkit-scrollbar-thumb,
.offer-section-body ::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}
#catalog-sub-modal ::-webkit-scrollbar-thumb:hover,
.offer-section-body ::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Bannière article sélectionné — modernisée */
.selected-article-banner.active {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
    border: 1px solid #a7f3d0 !important;
    border-left: 4px solid #10b981 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    color: #065f46 !important;
    font-size: 0.88rem;
    animation: fadeInUp 0.3s ease-out;
}

.selected-article-banner.active i {
    color: #10b981 !important;
}

/* Search box améliorée */
#catalog-sub-modal .search-box input {
    border-radius: 10px !important;
    padding: 11px 16px 11px 42px !important;
    border: 1.5px solid #e2e8f0 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.9rem !important;
}

#catalog-sub-modal .search-box input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08), 0 2px 8px rgba(79, 70, 229, 0.06) !important;
    outline: none !important;
}

#catalog-sub-modal .search-box i {
    color: #94a3b8 !important;
    transition: color 0.2s ease;
}

#catalog-sub-modal .search-box input:focus + i,
#catalog-sub-modal .search-box:focus-within i {
    color: #4f46e5 !important;
}

/* Footer modale premium */
#catalog-sub-modal .sub-modal-footer {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9) !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 16px 24px !important;
    border-radius: 0 0 16px 16px !important;
}

#catalog-sub-modal .btn-cancel {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#catalog-sub-modal .btn-cancel:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

#catalog-sub-modal .btn-indigo {
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
}

/* Bouton Ajouter une ligne */
#btn-add-variant-row.btn-rounded {
    border: 1.5px dashed #c7d2fe !important;
    background: #faf8ff !important;
    color: #4f46e5 !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

#btn-add-variant-row.btn-rounded:hover {
    background: #eef2ff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08) !important;
    transform: translateY(-1px);
}

/* Section couleurs premium */
#cat-colors-section {
    background: #faf8ff !important;
    border: 1px solid #e0e7ff !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
}

#cat-colors-section .strong-label {
    color: #4338ca !important;
    font-size: 0.82rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px;
}

/* Description personnalisée */
#cat-custom-desc-container textarea {
    border-radius: 8px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 10px 14px !important;
    transition: all 0.2s ease !important;
}

#cat-custom-desc-container textarea:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
    outline: none !important;
}

/* Badge de type sur block-header */
.block-type-badge {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Transitions globales pour tous les éléments interactifs */
button, .btn, select, a {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════ */
/* MODULES SECONDAIRES - AJUSTEMENTS CSS CENTRALISÉS          */
/* ═══════════════════════════════════════════════════════════ */

.btn-panel-action { 
    transition: all 0.2s ease-in-out !important; 
}
.btn-panel-action:hover { 
    background: rgba(255,255,255,0.35) !important; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.version-card {
    transition: all 0.2s ease;
}
.version-card:hover {
    border-color: var(--tchat-color) !important;
    background-color: var(--tchat-bg-soft) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
#btn-edit-product-view { 
    transition: all 0.2s ease-in-out !important; 
}
#btn-edit-product-view:hover { 
    background: rgba(255,255,255,0.35) !important; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
#btn-run-export:disabled,
#btn-run-export-products:disabled {
    background-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
}

/* --- EXTRA EXCEL MIGRATION STYLES --- */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-top-width: 4px;
    border-top-style: solid;
}
.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}
#migration-progress-container {
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.06);
    border: 1px solid #cbd5e1;
}
#migration-progress-bar {
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Document Themes for Editor */
.theme-green {
    border-top: 4px solid #27ae60 !important;
}
.theme-green .offer-section-header h4 {
    color: #1e8449 !important;
}
.theme-green .offer-section-header h4 i {
    color: #27ae60;
}

.theme-violet {
    border-top: 4px solid #8e44ad !important;
}
.theme-violet .offer-section-header h4 {
    color: #732d91 !important;
}
.theme-violet .offer-section-header h4 i {
    color: #8e44ad;
}

.theme-purple {
    border-top: 4px solid #9b59b6 !important;
}
.theme-purple .offer-section-header h4 {
    color: #8e44ad !important;
}
.theme-purple .offer-section-header h4 i {
    color: #9b59b6;
}

.theme-teal {
    border-top: 4px solid #1abc9c !important;
}
.theme-teal .offer-section-header h4 {
    color: #16a085 !important;
}
.theme-teal .offer-section-header h4 i {
    color: #1abc9c;
}

.btn-teal {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 50%, #117864 100%) !important;
    box-shadow: 0 4px 14px rgba(26, 188, 156, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.btn-teal:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
    background: linear-gradient(135deg, #16a085, #117864) !important;
}
.btn-teal:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 188, 156, 0.2) !important;
}

.btn-green {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 50%, #196f3d 100%) !important;
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.btn-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
    background: linear-gradient(135deg, #1e8449, #196f3d) !important;
}
.btn-green:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2) !important;
}

.btn-violet {
    background: linear-gradient(135deg, #8e44ad 0%, #732d91 50%, #5b2c70 100%) !important;
    box-shadow: 0 4px 14px rgba(142, 68, 173, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.btn-violet:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
    background: linear-gradient(135deg, #732d91, #5b2c70) !important;
}
.btn-violet:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(142, 68, 173, 0.2) !important;
}

.btn-purple {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 50%, #732d91 100%) !important;
    box-shadow: 0 4px 14px rgba(155, 89, 182, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.btn-purple:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(155, 89, 182, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
    background: linear-gradient(135deg, #8e44ad, #732d91) !important;
}
.btn-purple:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(155, 89, 182, 0.2) !important;
}

/* ========================================================================= */
/* --- THEMATISATION COMPLETE DE L'EDITEUR (OFFRES, COMMANDES, FACTURES) --- */
/* ========================================================================= */

/* 1. Theme Offres (Teal: #1abc9c) */
.editor-theme-offre .editor-header-actions {
    border-left-color: #1abc9c !important;
}
.editor-theme-offre .editor-header-title h1 {
    background: linear-gradient(135deg, #1e293b, #1abc9c) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
.editor-theme-offre .editor-header-title h1 i {
    color: #1abc9c !important;
    -webkit-text-fill-color: #1abc9c !important;
    background: linear-gradient(135deg, #e0f9f4, #c7f3eb) !important;
    box-shadow: 0 3px 10px rgba(26, 188, 156, 0.15) !important;
}
.editor-theme-offre .editor-header-title #header-offer-number-badge {
    color: #16a085 !important;
    background: rgba(224, 249, 244, 0.8) !important;
    border-color: rgba(26, 188, 156, 0.35) !important;
}
.editor-theme-offre .offer-grid-12 input:focus,
.editor-theme-offre .financial-totals-card .discount-box input:focus,
.editor-theme-offre .submodal-input:focus {
    border-color: #1abc9c !important;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2) !important;
}
.editor-theme-offre .btn-indigo {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 50%, #117864 100%) !important;
    box-shadow: 0 4px 14px rgba(26, 188, 156, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}
.editor-theme-offre .btn-indigo:hover {
    background: linear-gradient(135deg, #16a085, #117864) !important;
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.editor-theme-offre #btn-submit-client-edit {
    background: linear-gradient(135deg, #1abc9c, #16a085) !important;
}
.editor-theme-offre #client-edit-modal .sub-modal-header {
    background: linear-gradient(135deg, #16a085, #1abc9c) !important;
}

/* 2. Theme Commandes (Green: #27ae60) */
.editor-theme-commande .editor-header-actions {
    border-left-color: #27ae60 !important;
}
.editor-theme-commande .editor-header-title h1 {
    background: linear-gradient(135deg, #1e293b, #27ae60) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
.editor-theme-commande .editor-header-title h1 i {
    color: #27ae60 !important;
    -webkit-text-fill-color: #27ae60 !important;
    background: linear-gradient(135deg, #eafaf1, #d4efdf) !important;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.15) !important;
}
.editor-theme-commande .editor-header-title #header-offer-number-badge {
    color: #1e8449 !important;
    background: rgba(234, 250, 241, 0.8) !important;
    border-color: rgba(39, 174, 96, 0.35) !important;
}
.editor-theme-commande .offer-grid-12 input:focus,
.editor-theme-commande .financial-totals-card .discount-box input:focus,
.editor-theme-commande .submodal-input:focus {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2) !important;
}
.editor-theme-commande .btn-indigo {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 50%, #196f3d 100%) !important;
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}
.editor-theme-commande .btn-indigo:hover {
    background: linear-gradient(135deg, #1e8449, #196f3d) !important;
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.editor-theme-commande #btn-submit-client-edit {
    background: linear-gradient(135deg, #27ae60, #1e8449) !important;
}
.editor-theme-commande #client-edit-modal .sub-modal-header {
    background: linear-gradient(135deg, #1e8449, #27ae60) !important;
}

/* 3. Theme Factures (Violet: #8e44ad) */
.editor-theme-facture .editor-header-actions {
    border-left-color: #8e44ad !important;
}
.editor-theme-facture .editor-header-title h1 {
    background: linear-gradient(135deg, #1e293b, #8e44ad) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
.editor-theme-facture .editor-header-title h1 i {
    color: #8e44ad !important;
    -webkit-text-fill-color: #8e44ad !important;
    background: linear-gradient(135deg, #f5eef8, #ebdef0) !important;
    box-shadow: 0 3px 10px rgba(142, 68, 173, 0.15) !important;
}
.editor-theme-facture .editor-header-title #header-offer-number-badge {
    color: #732d91 !important;
    background: rgba(245, 238, 248, 0.8) !important;
    border-color: rgba(142, 68, 173, 0.35) !important;
}
.editor-theme-facture .offer-grid-12 input:focus,
.editor-theme-facture .financial-totals-card .discount-box input:focus,
.editor-theme-facture .submodal-input:focus {
    border-color: #8e44ad !important;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2) !important;
}
.editor-theme-facture .btn-indigo {
    background: linear-gradient(135deg, #8e44ad 0%, #732d91 50%, #5b2c70 100%) !important;
    box-shadow: 0 4px 14px rgba(142, 68, 173, 0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}
.editor-theme-facture .btn-indigo:hover {
    background: linear-gradient(135deg, #732d91, #5b2c70) !important;
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.editor-theme-facture #btn-submit-client-edit {
    background: linear-gradient(135deg, #8e44ad, #732d91) !important;
}
.editor-theme-facture #client-edit-modal .sub-modal-header {
    background: linear-gradient(135deg, #732d91, #8e44ad) !important;
}

/* Onglets de Migration dans les Paramètres */
.btn-settings-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-settings-tab:hover {
    color: #27ae60;
}
.btn-settings-tab.active {
    border-bottom: 3px solid #27ae60;
    color: #27ae60;
}

.tab-badge {
    background-color: #e67e22 !important;
    padding: 2px 8px !important;
    font-size: 0.75rem !important;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-block;
}

/* ========================================================================= */
/* --- MODALE DE PROFIL PERSONNEL (SELF-PROFILE-OVERLAY) --- */
/* ========================================================================= */
#self-profile-overlay {
    backdrop-filter: blur(8px) !important;
    background: rgba(15, 23, 42, 0.65) !important; /* Arrière-plan sombre et moderne */
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.self-profile-box {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: #ffffff !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border-radius: 16px !important;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#self-avatar-preview-box {
    position: relative;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    background: #f1f5f9 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#self-avatar-preview-box::after {
    content: "\f030"; /* Camera icon in Font Awesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    font-size: 1.25rem;
}

#self-avatar-preview-box:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(52, 152, 219, 0.5) !important;
    border-color: #3498db !important;
}

#self-avatar-preview-box:hover::after {
    opacity: 1;
}

/* Style des inputs et boutons dans la modale profil */
#self-profile-overlay input[type="password"] {
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1 !important;
}

#self-profile-overlay input[type="password"]:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
    outline: none;
}

#self-profile-overlay .btn-indigo {
    background: linear-gradient(135deg, #2c3e50 0%, #1e293b 100%) !important;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2) !important;
    transition: all 0.25s ease !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

#self-profile-overlay .btn-indigo:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3) !important;
    transform: translateY(-1px);
}

#self-profile-overlay .btn-cancel {
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}



