.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}
/* Variables CSS - Palette Fintech Moderne */
:root {
    --bg-color: #fcfcfd;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --primary-btn: #0f172a;
    --primary-btn-hover: #334155;
    --accent-blue: #6366f1;
    --accent-blue-bg: #e0e7ff;
    --accent-green: #10b981;
    --accent-green-bg: #d1fae5;
    --accent-purple: #a855f7;
    --accent-purple-bg: #f3e8ff;
    --accent-orange: #f59e0b;
    --accent-orange-bg: #fef3c7;
    --accent-rose: #f43f5e;
    --accent-rose-bg: #ffe4e6;
    --accent-teal: #0ea5e9;
    --accent-teal-bg: #e0f2fe;
    --accent-yellow: #d97706;
    --accent-yellow-bg: #fef9c3;
    --accent-cyan: #0891b2;
    --accent-cyan-bg: #cffafe;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px -10px rgba(99,102,241,0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: sticky;
    top: 0;
    background: rgba(252,252,253,0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.02);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
}

/* Navigation desktop */
nav {
    display: flex;
    gap: 32px;
}
nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
nav a:hover, nav a.active { color: var(--text-main); }

/* --- CORRECTIF #4 : Menu burger mobile --- */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
}
.burger-btn span {
    display: block;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}
/* Animation burger -> croix */
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile déroulant */
.mobile-nav {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    width: 100%;
    background: rgba(252,252,253,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 5%;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 10px;
    transition: background 0.2s;
}
.mobile-nav a:hover { background: var(--accent-blue-bg); color: var(--accent-blue); }

/* --- HERO --- */
.hero-wrapper {
    position: relative;
    overflow: hidden;
    padding: 50px 20px 80px;
}
.hero-wrapper::before, .hero-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
}
.hero-wrapper::before {
    width: 400px; height: 400px;
    background: var(--accent-blue-bg);
    top: -100px; left: -100px;
}
.hero-wrapper::after {
    width: 300px; height: 300px;
    background: var(--accent-purple-bg);
    bottom: -50px; right: 10%;
}

.hero { text-align: center; max-width: 900px; margin: 0 auto; }



.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
}
.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}
/* --- SEARCH BAR --- */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 32px auto 0;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

#tool-search {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    outline: none;
}

#tool-search:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

#tool-search::placeholder {
    color: var(--text-muted);
}

/* Classe utilitaire pour masquer les cartes lors de la recherche */
.hidden-card {
    display: none !important;
}
/* --- GRID D'OUTILS --- */
.tools-section { padding: 0 5%; max-width: 1200px; margin: 0 auto 120px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: none; /* L'effet sera instantané */
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99,102,241,0.3);
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: none;
}
.card:hover::before { opacity: 1; }

.icon-wrapper {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 28px;
}
/* Évite le layout shift pendant le chargement des icônes */
.icon-wrapper i {
display: block;
min-width: 28px;
min-height: 28px;
}
/* Fondu d'apparition quand les icônes chargent */
i[class*="ph-"] {
animation: iconFade 0.1s ease;
}
@keyframes iconFade {
from { opacity: 0; }
to   { opacity: 1; }
}


.theme-blue   .icon-wrapper { background-color: var(--accent-blue-bg);   color: var(--accent-blue); }
.theme-purple .icon-wrapper { background-color: var(--accent-purple-bg); color: var(--accent-purple); }
.theme-green  .icon-wrapper { background-color: var(--accent-green-bg);  color: var(--accent-green); }
.theme-orange .icon-wrapper { background-color: var(--accent-orange-bg); color: var(--accent-orange); }
.theme-rose   .icon-wrapper { background-color: var(--accent-rose-bg);   color: var(--accent-rose); }
.theme-teal   .icon-wrapper { background-color: var(--accent-teal-bg);   color: var(--accent-teal); }
.theme-yellow .icon-wrapper { background-color: #fef9c3; color: #d97706; }
.theme-cyan   .icon-wrapper { background-color: #cffafe; color: #0891b2; }
.theme-red    .icon-wrapper { background-color: #fee2e2; color: #dc2626; }

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 32px;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    background-color: var(--bg-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: none;
}
.card:hover .btn {
    background-color: var(--text-main);
    color: #ffffff;
    border-color: var(--text-main);
}

/* --- SEO Article --- */
.seo-article { max-width: 800px; margin: 0 auto 120px; padding: 0 24px; }
.seo-article h2 { font-size: 2.2rem; letter-spacing: -0.03em; margin-bottom: 32px; line-height: 1.2; }
.seo-article h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 48px 0 20px; }
.seo-article h4 { font-size: 1.15rem; font-weight: 600; margin: 32px 0 12px; }
.seo-article p  { margin-bottom: 24px; line-height: 1.8; font-size: 1.05rem; color: var(--text-muted); }
.seo-conclusion {
    margin-top: 48px; padding-top: 32px;
    border-top: 1px solid var(--border-color);
    font-weight: 600; font-size: 1.15rem;
    color: var(--text-main); text-align: center;
}

/* --- FOOTER --- */
footer {
    text-align: center; padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 0.9rem;
}
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-link:hover { color: var(--text-main); text-decoration: underline; }

/* ==========================================
   AUTH — Header
   ========================================== */
.auth-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-auth-header {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    min-width: fit-content;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}
.btn-auth-header:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: 100px;
    transition: background 0.2s;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main);
}
.user-profile-btn:hover { background-color: var(--border-color); }

.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    /* CORRECTIF #7 : fond de secours visible si image cassée */
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}

.dropdown-menu {
    position: absolute;
    top: 120%; right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 8px;
    min-width: 200px;
    display: none;
    flex-direction: column;
    z-index: 200;
}
.dropdown-menu.show { display: flex; }

.dropdown-item {
    background: none;
    border: none;
    text-align: left;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: background 0.2s;
    font-family: inherit;
}
.dropdown-item:hover { background-color: var(--accent-rose-bg); color: var(--accent-rose); }

/* ==========================================
   MODALES
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(15,23,42,0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.show { display: flex; opacity: 1; }

.modal-box {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-hover);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: 0 16px;
}
.modal-overlay.show .modal-box { transform: translateY(0); }

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none; border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-main); }

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

/* Formulaire */
.form-group { margin-bottom: 16px; }

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent-blue); }

.btn-full {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, background-color 0.2s;
}
.btn-primary { background-color: var(--primary-btn); color: white; margin-top: 8px; }
.btn-primary:hover:not(:disabled) { background-color: var(--primary-btn-hover); }

/* CORRECTIF #9 : état chargement du bouton */
.btn-primary:disabled, .btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
.divider:not(:empty)::before { margin-right: .25em; }
.divider:not(:empty)::after  { margin-left: .25em; }

.btn-google {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}
.btn-google:hover:not(:disabled) { background-color: #f8fafc; }
.google-icon { width: 20px; height: 20px; }

/* Modal déconnexion */
.modal-text { text-align: center; color: var(--text-muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; }
.btn-cancel { background-color: #f1f5f9; color: var(--text-main); border: 1px solid transparent; }
.btn-cancel:hover { background-color: #e2e8f0; }
.btn-danger { background-color: var(--accent-rose); color: white; border: 1px solid transparent; }
.btn-danger:hover { background-color: #e11d48; }

/* Erreur auth */
.auth-error {
    color: var(--accent-rose);
    font-size: 0.85rem;
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* Utilitaires */
.d-none { display: none !important; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    nav { display: none; }
    .burger-btn { display: flex; }
    .hero-wrapper { padding: 60px 20px 40px; }
    .hero h1 { font-size: 2.2rem; }
}
/* =========================================
   CSS SPÉCIFIQUE : SPAGHETTI OPTIMIZER (WMS)
   ========================================= */

.app-container { display: flex; flex: 1; overflow: hidden; }

/* Sidebar Sombre */
.sidebar { 
    width: 420px; background-color: #1e293b; border-right: 1px solid var(--border-color); 
    display: flex; flex-direction: column; padding: 20px; overflow-y: auto; gap: 12px; 
    z-index: 20; color: #f8fafc; 
}
.brand { font-size: 1.2rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }

.sidebar .form-group { background: rgba(0,0,0,0.2); padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 0; }
.sidebar .form-group label { color: #94a3b8; font-size: 0.75rem; text-transform: uppercase; }

/* Inputs Sidebar */
.sidebar input[type="number"], .sidebar input[type="text"], .sidebar textarea { 
    width: 100%; background-color: #0f172a; border: 1px solid var(--border-color); color: white; 
    padding: 8px; border-radius: 6px; font-size: 0.85rem; outline: none; 
}
.sidebar input:focus, .sidebar textarea:focus { border-color: var(--accent-blue); }
.sidebar textarea { height: 100px; resize: vertical; font-family: monospace; font-size: 0.75rem; border-left: 3px solid var(--accent-blue); }

/* Boutons Outlines dans la sidebar (pour être visible sur fond sombre) */
.sidebar .btn-outline { color: white; border-color: #334155; }

.flex-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 0.85rem; }

/* Contenu Principal & Canvas */
.main-content { flex: 1; display: flex; flex-direction: column; background-color: #f1f5f9; position: relative; }
.dashboard-container { display: flex; flex-direction: column; background: white; border-bottom: 1px solid var(--border-color); z-index: 10; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.dashboard-panel { display: flex; width: 100%; }
.panel-half { flex: 1; padding: 15px 20px; border-right: 1px solid var(--border-color); }
.panel-half:last-child { border-right: none; background-color: #f0fdf4; }

.panel-title { font-size: 0.85rem; font-weight: 800; text-transform: uppercase; color: var(--text-main); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi-card { background: white; border-radius: 6px; padding: 10px; border: 1px solid var(--border-color); display: flex; flex-direction: column; justify-content: center;}
.kpi-card.highlight { border-color: var(--accent-green); box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1); }
.kpi-card.main-roi { grid-column: span 3; background: #0f172a; color: white; border: none; align-items: center; padding: 12px;}
.kpi-card.main-roi .kpi-title { color: #94a3b8; }
.kpi-card.main-roi .kpi-value { color: var(--accent-green); font-size: 1.4rem; }

.kpi-title { font-size: 0.65rem; color: #64748b; text-transform: uppercase; font-weight: 800; margin-bottom: 4px; }
.kpi-value { font-size: 1.1rem; font-weight: 800; color: var(--text-main); }
.kpi-value.money { color: var(--accent-rose); }
.kpi-value.good { color: var(--accent-green); }

.canvas-container { flex: 1; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; padding: 20px; }
canvas { background-color: white; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 4px solid #0f172a; cursor: grab; }
canvas:active { cursor: grabbing; }

.view-toggle { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1e293b; padding: 5px; border-radius: 30px; display: flex; gap: 5px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.view-toggle button { width: auto; padding: 8px 20px; border-radius: 20px; background: transparent; color: #94a3b8; border: none; font-weight: 700; cursor: pointer; transition: 0.3s; }
.view-toggle button.active { background: var(--accent-blue); color: white; }
/* =========================================
   CSS SPÉCIFIQUE : RELANCE D'IMPAYÉS
   ========================================= */

/* En-tête de la page Outil */
.page-header { text-align: center; padding: 60px 20px 20px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.page-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Conteneur Écran Divisé (Split Screen) */
.split-container { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 1300px; margin: 40px auto; padding: 0 5%; align-items: start; }

/* Checkbox personnalisée (Pénalités) */
.checkbox-group { display: flex; align-items: flex-start; gap: 12px; background: var(--accent-blue-bg); padding: 16px; border-radius: 8px; border: 1px solid rgba(99,102,241,0.2); }
.checkbox-group input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent-blue); }
.checkbox-group label { font-size: 0.9rem; line-height: 1.4; color: var(--text-main); margin-bottom: 0; font-weight: 500; }
.checkbox-group label span { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-top: 4px; }

/* Aperçu de l'e-mail */
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.preview-title { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.preview-title i { color: var(--accent-blue); font-size: 1.4rem; }

.email-subject { font-weight: 600; margin-bottom: 24px; padding: 12px 16px; background: var(--bg-color); border-radius: 8px; font-size: 0.95rem; }
.email-body { font-size: 0.95rem; line-height: 1.7; color: #334155; white-space: pre-wrap; min-height: 250px; }

/* Historique des relances (Tableau) */
.history-section { max-width: 1300px; margin: 60px auto 80px; padding: 0 5%; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.history-title { font-size: 1.5rem; font-weight: 700; }

.history-table-container { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow-x: auto; box-shadow: var(--shadow-sm); }
.history-table-container table { width: 100%; border-collapse: collapse; text-align: left; }
.history-table-container th { background: var(--bg-color); padding: 16px 24px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.history-table-container td { padding: 16px 24px; font-size: 0.95rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.history-table-container tr:last-child td { border-bottom: none; }

.auth-prompt { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.auth-prompt i { font-size: 32px; color: var(--border-color); margin-bottom: 16px; }

/* Badges Niveaux de relance */
.badge-level { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 0.8rem; font-weight: 600; }
.level-1 { background: var(--accent-blue-bg); color: var(--accent-blue); }
.level-2 { background: var(--accent-orange-bg); color: var(--accent-orange); }
.level-3 { background: var(--accent-rose-bg); color: var(--accent-rose); }

/* Responsive Outil */
@media (max-width: 900px) {
    .split-container { grid-template-columns: 1fr; }
    .card.form-panel, .card.preview-panel { padding: 24px; }
}
/* =========================================
   CSS SPÉCIFIQUE : MINI-CRM KANBAN
   ========================================= */
.crm-container { padding: 40px 5%; max-width: 1400px; margin: 0 auto; min-height: 70vh; }
.crm-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 32px; }
.crm-title h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.crm-title p { color: var(--text-muted); font-size: 1rem; }

.cloud-banner { background-color: var(--accent-teal-bg); color: var(--text-main); padding: 12px 24px; border-radius: var(--radius-md); display: flex; align-items: center; gap: 12px; font-weight: 500; border: 1px solid var(--accent-teal); margin-bottom: 24px; font-size: 0.95rem; }

.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; }
.kpi-card { padding: 16px 24px; min-width: 200px; flex: 1; }
.kpi-card h3 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.kpi-card .amount { font-size: 1.75rem; font-weight: 800; color: var(--text-main); }
.amount.won { color: var(--accent-green); }

.header-actions { display: flex; gap: 12px; }

/* Grille Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; overflow-x: auto; padding-bottom: 24px; }
.kanban-col { background-color: rgba(241, 245, 249, 0.5); border-radius: var(--radius-md); border: 1px solid var(--border-color); display: flex; flex-direction: column; height: 100%; min-width: 280px; }
.kanban-col-header { padding: 16px; border-bottom: 1px solid var(--border-color); font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.badge-count { background-color: var(--card-bg); font-size: 0.8rem; padding: 2px 8px; border-radius: 100px; border: 1px solid var(--border-color); color: var(--text-muted); }

.col-contact .kanban-col-header { border-top: 4px solid var(--accent-blue); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.col-quote .kanban-col-header { border-top: 4px solid var(--accent-teal); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.col-nego .kanban-col-header { border-top: 4px solid var(--accent-orange); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.col-won .kanban-col-header { border-top: 4px solid var(--accent-green); border-radius: var(--radius-md) var(--radius-md) 0 0; }

.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 150px; }

/* Cartes de Prospects (Accordéon) */
.prospect-card { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.prospect-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card-summary { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.card-summary-left { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.card-title { font-weight: 700; font-size: 1rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-amount { font-weight: 700; color: var(--accent-blue); font-size: 0.9rem; }

.card-summary-right { display: flex; align-items: center; gap: 8px; }
.alert-icon { color: var(--accent-rose); font-size: 1.2rem; display: none; }
.btn-expand { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: transform 0.3s ease; display: flex; }
.prospect-card.expanded .btn-expand { transform: rotate(180deg); color: var(--text-main); }

.card-details { display: none; padding: 0 16px 16px; border-top: 1px solid var(--border-color); margin-top: 8px; padding-top: 16px; }
.prospect-card.expanded .card-details { display: block; }

.card-service { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; font-weight: 500; }
.card-contact { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.card-contact span { display: flex; align-items: center; gap: 6px; }

.card-dates { background: var(--bg-color); padding: 8px; border-radius: 8px; font-size: 0.8rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; border: 1px solid var(--border-color); }
.card-dates span { display: flex; justify-content: space-between; }
.date-alert { color: var(--accent-rose); font-weight: 600; }

.card-notes { font-size: 0.8rem; color: var(--text-muted); background: #f8fafc; padding: 8px; border-radius: 6px; margin-bottom: 16px; font-style: italic; }

/* Boutons intra-carte */
.integration-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.btn-doc { flex: 1; padding: 8px; border: 1px solid var(--border-color); background: var(--card-bg); border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; color: var(--text-main); text-decoration: none; display: flex; justify-content: center; align-items: center; gap: 6px; }
.btn-doc:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: var(--accent-blue-bg); }

.card-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 12px; }
.btn-move, .btn-delete, .btn-edit { background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; transition: background 0.2s; color: var(--text-muted); }
.btn-move:hover { background-color: var(--accent-blue-bg); color: var(--accent-blue); }
.btn-delete:hover { background-color: var(--accent-rose-bg); color: var(--accent-rose); }
.btn-edit:hover { background-color: var(--accent-orange-bg); color: var(--accent-orange); }
.btn-move:disabled { opacity: 0.3; cursor: not-allowed; }

/* Responsive Mini-CRM */
@media (max-width: 1024px) { 
    .kanban-board { grid-template-columns: repeat(4, 280px); } 
}
@media (max-width: 768px) { 
    .kpi-row { flex-direction: column; } 
    .crm-header { flex-direction: column; align-items: flex-start; } 
}
/* =========================================
   CSS SPÉCIFIQUE : CONVERTISSEUR BRUT-NET
   ========================================= */

/* Variables locales du convertisseur */
:root {
    --net-color: #10b981;
    --net-light: #ecfdf5;
    --net-apres: #059669;
    --c-patronales: #ef4444;
    --c-salariales: #f97316;
    --c-impots: #eab308;
    --primary-light: #eff6ff;
}

.app-layout { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 992px) { .app-layout { flex-direction: row; align-items: flex-start; } }
.panel-main { flex: 1; }
.panel-params { flex: 0 0 340px; }


/* Grille Magique*/
.magic-grid { 
    display: grid; 
    /* On augmente la largeur des colonnes de 1fr à 1.2fr pour laisser de la place aux chiffres */
    grid-template-columns: 90px 1.2fr 1.2fr; 
    gap: 1rem; 
    align-items: center; 
}

/* On s'assure que les inputs ne débordent jamais de leur encadrement */
.input-wrapper input {
    width: 100%;
    box-sizing: border-box; /* Force l'input à rester dans le cadre */
    font-size: 1.25rem;
    font-weight: 600;
    padding-right: 2.2rem; /* Espace pour le symbole € */
    text-align: right;
}

/* Ajustement pour les petits écrans (Mobile) */
@media (max-width: 600px) { 
    .magic-grid { 
        grid-template-columns: 1fr; 
        gap: 0.5rem; 
    } 
}

.grid-header { font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; text-align: center; padding: 0.5rem; border-radius: 8px; }
.bg-brut { background: var(--primary-light); color: var(--accent-blue); }
.bg-net { background: var(--net-light); color: var(--net-color); }
.grid-label { font-weight: 600; color: var(--text-muted); font-size: 0.95rem; }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input { font-size: 1.25rem; font-weight: 600; padding-right: 2.5rem; text-align: right; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.col-brut input { color: var(--accent-blue); border-color: rgba(99, 102, 241, 0.3); }
.col-brut input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.col-net input { color: var(--net-color); border-color: rgba(16, 185, 129, 0.3); }
.col-net input:focus { border-color: var(--net-color); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.input-suffix { position: absolute; right: 1rem; color: var(--text-muted); font-weight: 500; pointer-events: none; }

/* Actions SMIC */
.smic-action { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
#smic-variation { font-weight: 600; font-size: 0.9rem; }

/* Cartes de résultats */
.results-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.res-card { padding: 1.5rem; border-radius: 12px; text-align: center; border: 1px solid var(--border-color); display: flex; flex-direction: column; justify-content: center; transition: transform 0.1s ease-in-out;}
.res-card.highlight { background: var(--text-main); color: white; border: none; box-shadow: var(--shadow-sm); }
.res-label { font-size: 0.85rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.res-card:not(.highlight) .res-label { color: var(--text-muted); }
.res-card.highlight .res-label { color: #cbd5e1; }
.res-val { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.res-sub { font-size: 0.85rem; margin-top: 0.25rem; opacity: 0.8; }
.fiscal-note { font-size: 0.7rem; color: #94a3b8; margin-top: 0.5rem; font-style: italic; }

/* Input Magique "Dans la poche" */
.poche-input-wrapper { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0.5rem 0; }
.poche-input-wrapper input {
    background: transparent; border: none; border-bottom: 2px dashed rgba(16, 185, 129, 0.5);
    color: var(--net-color); font-size: 2.2rem; font-weight: 700; 
    width: 100%; max-width: 220px; 
    text-align: center; font-family: inherit; transition: 0.2s; outline: none; padding: 0;
}
.poche-input-wrapper input:focus { border-bottom-color: var(--net-color); background: rgba(255,255,255,0.05); border-radius: 8px 8px 0 0; }
.poche-input-wrapper span { font-size: 1.2rem; font-weight: 600; color: var(--net-color); }
.res-card.highlight .poche-input-wrapper input::placeholder { color: rgba(16, 185, 129, 0.3); }

/* Paramètres supplémentaires */
.toggle-group { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.toggle-btn { flex: 1; padding: 0.4rem; text-align: center; background: #f1f5f9; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.85rem; cursor: pointer; color: var(--text-muted); font-weight: 600; transition: 0.2s; }
.toggle-btn.active { background: var(--text-main); color: white; border-color: var(--text-main); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.auto-check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; cursor: pointer; color: var(--text-muted); }

.highlight-box { background: rgba(99, 102, 241, 0.1); border: 1px solid var(--accent-blue); padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; }

/* Menu Accordéon (Extras) */
details.extras-panel { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.5rem 1rem; margin-bottom: 1.5rem; }
summary.extras-summary { font-weight: 600; font-size: 0.85rem; color: var(--text-main); cursor: pointer; padding: 0.5rem 0; outline: none; }
.extras-content { padding-top: 1rem; border-top: 1px solid var(--border-color); margin-top: 0.5rem; }
.extras-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.extras-grid label { font-size: 0.75rem; }
.extras-grid input { padding: 0.5rem; font-size: 0.9rem; }

/* Affichage Cascade (Waterfall) */
.waterfall-container { padding-top: 2rem; border-top: 1px solid var(--border-color); }
.bar-container { display: flex; height: 36px; border-radius: 18px; overflow: hidden; background: var(--bg-color); }
.bar-segment { height: 100%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.85rem; transition: width 0.4s ease; }
.legend { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.25rem; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.legend-color { width: 12px; height: 12px; border-radius: 4px; }

/* Mise en page pour Impression/Export PDF */
.print-header { display: none; }
@media print {
    @page { margin-top: 0; margin-bottom: 0; }
    body { padding-top: 1.5cm; padding-bottom: 1.5cm; background: white; padding-left: 0; padding-right: 0; color: black; font-size: 12pt; }
    .container { max-width: 100%; margin: 0; }
    .card { box-shadow: none; border: none; padding: 0; }
    .no-print, .seo-article { display: none !important; }
    .input-wrapper::after { content: attr(data-val) " €"; font-weight: bold; font-size: 1.2rem; display: block; width: 100%; text-align: right; }
    .input-wrapper input, .input-suffix { display: none; }
    .col-brut::after { color: #2563eb; } .col-net::after { color: #059669; }
    .app-layout { flex-direction: column; gap: 1rem; }
    .print-header { display: block; text-align: center; margin-bottom: 2rem; border-bottom: 2px solid #e2e8f0; padding-bottom: 1rem; }
    .res-card.highlight { background: white !important; color: black !important; border: 2px solid #0f172a !important; }
    .res-card.highlight .res-label, .res-card.highlight .res-sub { color: #334155 !important; }
    .res-val { color: black !important; }
    .poche-input-wrapper input { color: black !important; border: none; }
    
    .panel-params { display: block; border-top: 1px solid #ccc; padding-top: 1rem; margin-top: 2rem; width: 100%; }
    .form-group { display: inline-block; width: 30%; vertical-align: top; margin-bottom: 0; }
    .form-group select, .form-group input, .form-group .toggle-group { display: none; }
    .form-group::after { content: attr(data-print-val); display: block; font-weight: bold; font-size: 1.1rem; }
    .waterfall-container { margin-top: 3rem; page-break-inside: avoid; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
/* Correction de l'affichage du logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    color: var(--text-main);
}

.logo-img {
    height: 32px; /* Ajuste la hauteur selon ton image */
    width: auto;
    display: block;
    object-fit: contain;
}
/* Correction de la largeur des champs de texte */
.form-control, .form-input {
    width: 100%; /* Force le champ à prendre toute la largeur de la modale */
    display: block;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box; /* Très important pour que le padding ne fasse pas déborder le champ */
}

/* S'assurer que les groupes de formulaires ne bloquent pas la largeur */
.form-group {
    width: 100%;
    margin-bottom: 20px;
}
/* =========================================
   CSS SPÉCIFIQUE : GÉNÉRATEUR DE DEVIS / FACTURES
   ========================================= */

/* Barre d'outils et layout général */
.invoice-toolbar { 
    max-width: 1000px; margin: 0 auto 24px; display: flex; 
    justify-content: space-between; align-items: center; padding: 20px 20px 0; 
}
.invoice-toolbar h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.invoice-toolbar h1 span { color: var(--accent-green); }

/* Conteneur principal A4 */
.invoice-wrapper { 
    width: 210mm; min-height: 297mm; margin: 0 auto 60px; 
    background: white; box-shadow: var(--shadow-hover); padding: 40px; 
    color: #1e293b; position: relative; display: flex; flex-direction: column;
}

/* En-tête du devis (Logo + Infos entreprise + Méta) */
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 32px; margin-top: 8px; }

.inv-company-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.inv-logo-box { 
    width: 160px; height: 80px; border: 1px dashed var(--border-color); 
    background: var(--bg-color); display: flex; align-items: center; 
    justify-content: center; position: relative; margin-bottom: 16px; border-radius: 4px; 
}
.inv-logo-box.hide-logo-placeholder { border: none; background: transparent; height: auto; margin-bottom: 0; }
.inv-logo-box input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inv-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inv-logo-text { font-size: 0.6rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }

.inv-company-name { font-size: 1.25rem; font-weight: 900; color: #0f172a; border: none; background: transparent; outline: none; padding: 0; margin-bottom: 4px; }
.inv-company-details { font-size: 0.75rem; color: #64748b; border: none; background: transparent; outline: none; padding: 0; }

.inv-meta { width: 256px; text-align: right; }
.inv-meta h2 { font-size: 3rem; font-weight: 900; color: #0f172a; text-transform: uppercase; letter-spacing: -0.05em; margin-bottom: 16px; line-height: 1; }
.inv-meta-box { background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #f1f5f9; text-align: left; font-size: 0.75rem; display: flex; flex-direction: column; gap: 4px; }
.inv-meta-row { display: flex; justify-content: space-between; align-items: center; }
.inv-meta-row input { width: 100px; text-align: right; border: none; background: transparent; outline: none; font-family: inherit; }
.inv-meta-row.bold { font-weight: 600; }

/* Bloc Destinataire (Client) */
.inv-client { 
    background: rgba(16, 185, 129, 0.05); padding: 20px; border-radius: 8px; 
    border-left: 4px solid var(--accent-green); margin-bottom: 32px; text-align: left;
}
.inv-client-title { font-size: 0.6rem; font-weight: 900; color: #047857; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.inv-client-name { font-size: 1.1rem; font-weight: 700; width: 100%; border: none; background: transparent; outline: none; margin-bottom: 4px; color: #0f172a; padding: 0; }
.inv-client-address { font-size: 0.75rem; width: 100%; border: none; background: transparent; outline: none; resize: none; color: #475569; padding: 0; }

/* Tableau des prestations */
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.inv-table th { background: var(--accent-green); color: white; font-size: 0.65rem; text-transform: uppercase; font-weight: 700; padding: 12px; text-align: left; }
.inv-table th.center { text-align: center; }
.inv-table th.right { text-align: right; }
.inv-table th:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.inv-table th:nth-last-child(2) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }

.inv-table td { padding: 4px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.inv-table td.center { text-align: center; }
.inv-table td.right { text-align: right; }

.table-input { width: 100%; border: none; background: transparent; outline: none; font-size: 0.8rem; padding: 6px; transition: 0.2s; border-radius: 4px; }
.table-input:focus { border: 1px solid var(--accent-green); }
.table-input.center { text-align: center; }
.table-input.right { text-align: right; }

.row-total { font-weight: 700; font-size: 0.8rem; padding: 12px; }
.btn-remove-row { color: #cbd5e1; background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px; }
.btn-remove-row:hover { color: var(--accent-rose); }
.btn-add-row { 
    color: var(--accent-green); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; 
    background: var(--accent-green-bg); border: 1px solid rgba(16, 185, 129, 0.2); 
    padding: 6px 12px; border-radius: 100px; cursor: pointer; transition: 0.2s; margin-top: 16px;
}
.btn-add-row:hover { background: rgba(16, 185, 129, 0.2); }

/* Pied de page du devis (Notes & Totaux) */
.inv-bottom { display: flex; justify-content: space-between; gap: 40px; margin-top: 32px; border-top: 1px solid #e2e8f0; padding-top: 24px; }
.inv-notes-section { flex: 1; }
.inv-notes-title { font-size: 0.6rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.inv-notes { width: 100%; font-size: 0.7rem; background: #f8fafc; border: none; outline: none; padding: 12px; border-radius: 8px; color: #475569; font-style: italic; resize: none; }
.tva-mention { margin-top: 12px; padding: 8px; background: #f1f5f9; color: #64748b; font-size: 0.65rem; border-radius: 4px; display: none; }
.tva-mention.show { display: block; }

.inv-totals-section { width: 280px; }
.inv-total-row { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 8px; color: #334155; }
.inv-total-row .val { font-weight: 700; }
.inv-total-ttc { 
    display: flex; justify-content: space-between; align-items: center; 
    background: var(--accent-green); color: white; padding: 12px; 
    border-radius: 6px; margin-top: 8px; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2); 
}
.inv-total-ttc .lbl { font-size: 0.85rem; text-transform: uppercase; font-weight: 600; opacity: 0.9; }
.inv-total-ttc .val { font-size: 1.25rem; font-weight: 900; }

.inv-signature { margin-top: 24px; border: 1px solid rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.05); padding: 16px; border-radius: 8px; text-align: center; }
.inv-sig-title { font-size: 0.6rem; font-weight: 900; color: #065f46; text-transform: uppercase; margin-bottom: 32px; }
.inv-sig-line { border-bottom: 1px dashed rgba(16, 185, 129, 0.4); margin-bottom: 4px; }
.inv-sig-lbl { font-size: 0.5rem; color: #059669; text-transform: uppercase; }

.inv-footer-text { margin-top: auto; padding-top: 24px; text-align: center; font-size: 0.5rem; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.2em; }

/* Styles d'impression stricts pour html2pdf */
@media print {
    .no-print { display: none !important; }
    body { background: white; margin: 0; padding: 0; }
    .invoice-wrapper { box-shadow: none; border: none; margin: 0; padding: 0; width: 100%; min-height: auto; }
    .inv-client, .inv-table th, .inv-total-ttc, .inv-signature { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .table-input { border: none !important; background: transparent !important; }
}
/* =========================================
   CSS GLOBAL : EN-TÊTE STANDARD (HEADER)
   ========================================= */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left, .header-right { flex: 1; }
.header-center { flex: 1; display: flex; justify-content: center; }
.header-right { display: flex; justify-content: flex-end; }
.header-back-link {
    text-decoration: none;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--accent-blue-bg);
    padding: 6px 12px;
    border-radius: 100px;
    white-space: nowrap;
    transition: 0.2s;
}
.header-back-link:hover { filter: brightness(0.9); }

/* Barre d'outils des générateurs */
.tool-toolbar { 
    max-width: 1000px; margin: 20px auto; display: flex; 
    justify-content: space-between; align-items: center; padding: 0 20px; 
}
.tool-toolbar h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin: 0; white-space: nowrap; }
.tool-toolbar .text-emerald { color: var(--accent-green); }

/* =========================================
   CSS SPÉCIFIQUE : GÉNÉRATEUR DE DEVIS / FACTURE (A4)
   ========================================= */
.inv-document { 
    width: 210mm; min-height: 297mm; margin: 0 auto 60px; 
    background: white; box-shadow: var(--shadow-hover); padding: 40px; 
    color: #1e293b; display: flex; flex-direction: column;
}

/* Haut de facture */
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 32px; }
.inv-company-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.inv-logo-box { 
    width: 160px; height: 80px; border: 1px dashed var(--border-color); 
    background: var(--bg-color); display: flex; align-items: center; 
    justify-content: center; position: relative; margin-bottom: 16px; border-radius: 4px; 
}
.inv-logo-box.hide-logo-placeholder { border: none; background: transparent; height: auto; margin-bottom: 0; }
.inv-logo-box input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inv-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inv-logo-text { font-size: 0.6rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }

.inv-company-name { font-size: 1.25rem; font-weight: 900; color: #0f172a; border: none; background: transparent; outline: none; padding: 0; margin-bottom: 4px; width: 100%; }
.inv-company-details { font-size: 0.75rem; color: #64748b; border: none; background: transparent; outline: none; padding: 0; width: 100%; }

/* Bloc Numéro Devis */
.inv-meta { width: 256px; text-align: right; }
.inv-meta h2 { font-size: 3rem; font-weight: 900; color: #0f172a; text-transform: uppercase; letter-spacing: -0.05em; margin-bottom: 16px; line-height: 1; }
.inv-meta-box { background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #f1f5f9; text-align: left; font-size: 0.75rem; display: flex; flex-direction: column; gap: 4px; }
.inv-meta-row { display: flex; justify-content: space-between; align-items: center; }
.inv-meta-row input { width: 100px; text-align: right; border: none; background: transparent; outline: none; font-family: inherit; }
.inv-meta-row.bold { font-weight: 600; }

/* Bloc Destinataire */
.inv-client { 
    background: rgba(16, 185, 129, 0.05); padding: 20px; border-radius: 8px; 
    border-left: 4px solid var(--accent-green); margin-bottom: 32px; text-align: left;
}
.inv-client-title { font-size: 0.6rem; font-weight: 900; color: #047857; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.inv-client-name { font-size: 1.1rem; font-weight: 700; width: 100%; border: none; background: transparent; outline: none; margin-bottom: 4px; color: #0f172a; padding: 0; }
.inv-client-address { font-size: 0.75rem; width: 100%; border: none; background: transparent; outline: none; resize: none; color: #475569; padding: 0; }

/* Tableau */
.inv-table-wrapper { flex-grow: 1; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.inv-table th { background: var(--accent-green); color: white; font-size: 0.65rem; text-transform: uppercase; font-weight: 700; padding: 12px; }
.inv-table th.left { text-align: left; }
.inv-table th.center { text-align: center; }
.inv-table th.right { text-align: right; }
.inv-table th:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.inv-table th:nth-last-child(2) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }

.inv-row td { padding: 4px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.inv-row td.center { text-align: center; }
.inv-row td.right { text-align: right; }

.table-input { width: 100%; border: none; background: transparent; outline: none; font-size: 0.8rem; padding: 6px; transition: 0.2s; border-radius: 4px; color: inherit; }
.table-input:focus { border: 1px solid var(--accent-green); }
.table-input.center { text-align: center; }
.table-input.right { text-align: right; }
.table-input.bold { font-weight: 500; }

.row-total { font-size: 0.8rem; padding: 12px; }
.row-total.bold { font-weight: 700; }
.btn-remove-row { color: #cbd5e1; background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px; }
.btn-remove-row:hover { color: var(--accent-rose); }
.btn-add-row { 
    color: var(--accent-green); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; 
    background: var(--accent-green-bg); border: 1px solid rgba(16, 185, 129, 0.2); 
    padding: 6px 12px; border-radius: 100px; cursor: pointer; transition: 0.2s; margin-top: 8px;
}
.btn-add-row:hover { background: rgba(16, 185, 129, 0.2); }

/* Footer du devis */
.inv-bottom { display: flex; justify-content: space-between; gap: 40px; margin-top: 32px; border-top: 1px solid #e2e8f0; padding-top: 24px; }
.inv-notes-section { flex: 1; }
.inv-notes-title { font-size: 0.6rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.inv-notes { width: 100%; font-size: 0.7rem; background: #f8fafc; border: none; outline: none; padding: 12px; border-radius: 8px; color: #475569; font-style: italic; resize: none; }
.tva-mention { margin-top: 12px; padding: 8px; background: #f1f5f9; color: #64748b; font-size: 0.65rem; border-radius: 4px; }

.inv-totals-section { width: 280px; }
.inv-total-row { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 8px; color: #334155; }
.inv-total-row .val { font-weight: 700; }
.inv-total-ttc { 
    display: flex; justify-content: space-between; align-items: center; 
    background: var(--accent-green); color: white; padding: 12px; 
    border-radius: 6px; margin-top: 8px; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2); 
}
.inv-total-ttc .lbl { font-size: 0.85rem; text-transform: uppercase; font-weight: 600; opacity: 0.9; }
.inv-total-ttc .val { font-size: 1.25rem; font-weight: 900; }

.inv-signature { margin-top: 24px; border: 1px solid rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.05); padding: 16px; border-radius: 8px; text-align: center; }
.inv-sig-title { font-size: 0.6rem; font-weight: 900; color: #065f46; text-transform: uppercase; margin-bottom: 32px; }
.inv-sig-line { border-bottom: 1px dashed rgba(16, 185, 129, 0.4); margin-bottom: 4px; }
.inv-sig-lbl { font-size: 0.5rem; color: #059669; text-transform: uppercase; }

.inv-footer-text { margin-top: auto; padding-top: 24px; text-align: center; font-size: 0.5rem; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.2em; }

/* Styles d'impression stricts pour html2pdf */
@media print {
    .no-print { display: none !important; }
    body { background: white; margin: 0; padding: 0; }
    .inv-document { box-shadow: none; border: none; margin: 0; padding: 0; width: 100%; min-height: auto; }
    .inv-client, .inv-table th, .inv-total-ttc, .inv-signature { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .table-input, .inv-company-name, .inv-company-details, .inv-client-name, .inv-client-address { border: none !important; background: transparent !important; }
}

@media (max-width: 900px) {
    .tool-toolbar { flex-direction: column; gap: 16px; text-align: center; }
}
/* Réduction de la largeur du bouton noir Télécharger le PDF */
.tool-toolbar .btn-primary {
    width: auto;             /* Empêche de prendre 100% de la largeur */
    min-width: 180px;        /* Largeur minimale pour que le texte reste lisible */
    padding: 8px 20px;       /* Réduit l'épaisseur et l'étalement */
    display: inline-flex;    /* Aligne l'icône et le texte */
    justify-content: center;
    margin-left: auto;       /* Le pousse bien à droite si nécessaire */
}
/* =========================================
   CSS SPÉCIFIQUE : GÉNÉRATEUR DE FACTURES
   ========================================= */

.facture-container {
    max-width: 1400px;
    margin: 20px auto 80px auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* --- Section Éditeur (Gauche) --- */
.form-panel h2.form-section-title {
    margin-bottom: 20px;
    color: var(--primary-btn);
    font-size: 1.4rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 30px;
}
.form-panel h2.form-section-title:first-child { margin-top: 0; }

.items-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.items-table th { text-align: left; font-size: 0.8rem; color: var(--text-muted); padding-bottom: 8px; }
.item-row td { padding: 5px 5px 5px 0; }

/* Style des inputs créés dynamiquement en JS */
.item-desc, .item-qty, .item-price, .item-vat {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
    background: var(--bg-color);
}
.item-desc:focus, .item-qty:focus, .item-price:focus, .item-vat:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* --- Section Prévisualisation (Droite) --- */
.preview-wrapper { position: sticky; top: 80px; }

#invoice-preview {
    background: white;
    padding: 40px;
    box-shadow: var(--shadow-hover);
    min-height: 842px; /* Ratio A4 */
    color: #000;
    font-size: 13px;
    line-height: 1.4;
    border-radius: var(--radius-lg);
}

/* Layout strict pour le PDF (anti-conflit) */
#invoice-preview .inv-header { display: flex; justify-content: space-between; margin-bottom: 30px; border-bottom: 2px solid var(--accent-blue); padding-bottom: 20px; }
#invoice-preview .inv-title { font-size: 2rem; color: var(--accent-blue); font-weight: bold; letter-spacing: 1px; }
#invoice-preview .inv-addresses { display: flex; justify-content: space-between; margin-bottom: 30px; }
#invoice-preview .inv-box { width: 45%; }
#invoice-preview .inv-box h3 { font-size: 0.9rem; color: #777; text-transform: uppercase; margin-bottom: 5px; border-bottom: 1px solid #eee; padding-bottom: 4px; }
#invoice-preview .inv-meta { display: flex; justify-content: space-between; background: #f8fafc; padding: 15px; margin-bottom: 20px; border-radius: 8px; border: 1px solid var(--border-color); }
#invoice-preview .inv-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
#invoice-preview .inv-table th { background: var(--accent-blue); color: white; text-align: left; padding: 10px; font-size: 0.9rem; }
#invoice-preview .inv-table td { padding: 10px; border-bottom: 1px solid #eee; }
#invoice-preview .inv-totals { width: 45%; float: right; border-collapse: collapse; }
#invoice-preview .inv-totals td { padding: 8px; text-align: right; }
#invoice-preview .total-ttc { font-weight: bold; font-size: 1.1rem; color: var(--accent-blue); border-top: 2px solid var(--accent-blue); }

/* --- CSS Anti-Guillotine pour le PDF --- */
#invoice-preview .inv-table tr, 
#invoice-preview .clearfix { 
    page-break-inside: avoid !important; 
    break-inside: avoid !important; 
}
#invoice-preview .clearfix::after { content: ""; clear: both; display: table; }

#invoice-preview #legal-mention-tva { margin-top: 40px; font-style: italic; font-size: 11px; color: #444; display: none; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .facture-container { grid-template-columns: 1fr; }
    .preview-wrapper { position: static; }
}

@media (max-width: 600px) {
    #invoice-preview .inv-addresses { flex-direction: column; gap: 20px; }
    #invoice-preview .inv-box { width: 100%; }
}
/* =========================================
   CSS SPÉCIFIQUE : GÉNÉRATEUR DE FACTURES (ET FORMULAIRE COMPACT)
   ========================================= */

.facture-container {
    max-width: 1400px;
    margin: 20px auto 80px auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* --- Formulaire Raccourci (Compact Form) --- */
.compact-form { padding: 24px; }
.compact-form .form-section-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    font-weight: 700;
}
.compact-form .form-section-title:first-child { margin-top: 0; }

.compact-form .form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.compact-form .form-group { flex: 1; margin-bottom: 0; }
.compact-form label { display: none; } /* On cache les labels pour gagner de la place, on se fie aux placeholders */

.form-control-sm {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    transition: 0.2s;
    background: var(--bg-color);
}
.form-control-sm:focus { border-color: var(--accent-blue); background: white; }

.items-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.items-table th { text-align: left; font-size: 0.75rem; color: var(--text-muted); padding-bottom: 6px; text-transform: uppercase; }
.items-table td { padding: 4px 4px 4px 0; }

/* Les inputs dynamiques doivent aussi être compacts */
.item-desc, .item-qty, .item-price, .item-vat {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: 0.2s;
    font-family: inherit;
    background: var(--bg-color);
}
.item-desc:focus, .item-qty:focus, .item-price:focus, .item-vat:focus { border-color: var(--accent-blue); background: white; outline: none; }

/* --- Section Prévisualisation (Droite) --- */
.preview-wrapper { position: sticky; top: 80px; }

#invoice-preview {
    background: white;
    padding: 40px;
    box-shadow: var(--shadow-hover);
    min-height: 842px; /* Ratio A4 */
    color: #000;
    font-size: 13px;
    line-height: 1.4;
    border-radius: var(--radius-lg);
}

/* Layout strict pour le PDF (scopé pour éviter les conflits) */
#invoice-preview .inv-header { display: flex; justify-content: space-between; margin-bottom: 30px; border-bottom: 2px solid var(--accent-blue); padding-bottom: 20px; }
#invoice-preview .inv-title { font-size: 2rem; color: var(--accent-blue); font-weight: bold; letter-spacing: 1px; }
#invoice-preview .inv-addresses { display: flex; justify-content: space-between; margin-bottom: 30px; }
#invoice-preview .inv-box { width: 45%; }
#invoice-preview .inv-box h3 { font-size: 0.9rem; color: #777; text-transform: uppercase; margin-bottom: 5px; border-bottom: 1px solid #eee; padding-bottom: 4px; }
#invoice-preview .inv-meta { display: flex; justify-content: space-between; background: #f8fafc; padding: 15px; margin-bottom: 20px; border-radius: 8px; border: 1px solid var(--border-color); }
#invoice-preview .inv-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
#invoice-preview .inv-table th { background: var(--accent-blue); color: white; text-align: left; padding: 10px; font-size: 0.9rem; }
#invoice-preview .inv-table td { padding: 10px; border-bottom: 1px solid #eee; }
#invoice-preview .inv-totals { width: 45%; float: right; border-collapse: collapse; }
#invoice-preview .inv-totals td { padding: 8px; text-align: right; }
#invoice-preview .total-ttc { font-weight: bold; font-size: 1.1rem; color: var(--accent-blue); border-top: 2px solid var(--accent-blue); }

/* --- CSS Anti-Guillotine pour le PDF --- */
#invoice-preview .inv-table tr, 
#invoice-preview .clearfix { 
    page-break-inside: avoid !important; 
    break-inside: avoid !important; 
}
#invoice-preview .clearfix::after { content: ""; clear: both; display: table; }

#invoice-preview #legal-mention-tva { margin-top: 40px; font-style: italic; font-size: 11px; color: #444; display: none; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .facture-container { grid-template-columns: 1fr; }
    .preview-wrapper { position: static; }
}

@media (max-width: 600px) {
    .compact-form .form-row { flex-direction: column; gap: 8px; }
    #invoice-preview .inv-addresses { flex-direction: column; gap: 20px; }
    #invoice-preview .inv-box { width: 100%; }
}
/* Adaptation du bouton de connexion à la taille du texte */
.btn-auth-header, #btn-login-header {
    width: auto !important;      /* Empêche le bouton de s'étirer sur toute la largeur */
    min-width: fit-content;     /* Force l'entourage à coller au texte */
    padding: 6px 16px;          /* Réduit l'espace (Haut/Bas 6px, Gauche/Droite 16px) */
    display: inline-flex;       /* Aligne l'icône et le texte proprement */
    align-items: center;
    justify-content: center;
    white-space: nowrap;        /* Empêche le texte de revenir à la ligne */
    font-size: 0.85rem;         /* Rend l'ensemble un peu plus discret */
}
/* =========================================
   CSS SPÉCIFIQUE : LIVRE DE COMPTABILITÉ
   ========================================= */

/* Top Actions & Toggles */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px;}
.toggles-group { display: flex; gap: 15px; flex-wrap: wrap; }
.toggle-container { background: var(--card-bg); padding: 10px 15px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; font-weight: 500;}
.toggle-container select { padding: 8px; border: 1px solid var(--border-color); border-radius: 4px; font-weight: 600; color: var(--accent-blue); background: var(--accent-blue-bg); width: auto; cursor: pointer; outline: none;}
.checkbox-wrapper { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox-wrapper input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent-blue); }

/* Summary Banner */
.summary-banner { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.summary-card { flex: 1; min-width: 180px; padding: 20px; text-align: center; border: 2px solid transparent; display: flex; flex-direction: column; justify-content: center; }

.summary-card.green { background-color: var(--accent-green-bg); border-color: var(--accent-green); }
.summary-card.green h2 { color: #064e3b; }
.summary-card.green span { color: #065f46; }

.summary-card.red { background-color: var(--accent-rose-bg); border-color: var(--accent-rose); }
.summary-card.red h2 { color: #881337; }
.summary-card.red span { color: #9f1239; }

.summary-card.blue { background-color: var(--accent-blue-bg); border-color: var(--accent-blue); }
.summary-card.blue h2 { color: #1e3a8a; }
.summary-card.blue span { color: #1d4ed8; }

.summary-card.purple { background-color: var(--accent-purple-bg); border-color: var(--accent-purple); }
.summary-card.purple h2 { color: #4c1d95; font-size: 1rem;}

.summary-card.orange { background-color: var(--accent-orange-bg); border-color: var(--accent-orange); }
.summary-card.orange h2 { color: #78350f; font-size: 1rem;}

.summary-card.teal { background-color: var(--accent-teal-bg); border-color: var(--accent-teal); }
.summary-card.teal h2 { color: #134e4a; font-size: 1rem;}

.summary-card h2 { font-size: 1.1rem; margin-bottom: 10px; }
.summary-card span { font-size: 1.8rem; font-weight: 700; }

/* Main Grid */
.grid-container { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 60px; }

.table-section { overflow-x: auto; padding: 20px; }
.table-section h3 { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 1.3rem; }

.compta-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.compta-table th { padding: 12px; text-align: left; font-weight: 600; font-size: 0.9rem; cursor: pointer; color: white; border: 1px solid rgba(255,255,255,0.2);}
.compta-table th:hover { opacity: 0.9; }

.recettes-section th { background-color: var(--accent-green); }
.depenses-section th { background-color: var(--accent-rose); }

.compta-table td { border-bottom: 1px solid var(--border-color); border-right: 1px solid var(--border-color); padding: 0; vertical-align: middle; }
.compta-table td:first-child { border-left: 1px solid var(--border-color); }

/* Inputs & Selects inside JS generated tables */
.input-wrapper { display: block; width: 100%; height: 100%; }
.compta-table input[type="text"], .compta-table select { width: 100%; padding: 12px; border: none; background: transparent; font-family: inherit; font-size: 0.9rem; color: inherit; outline: none; }
.compta-table input::placeholder { color: var(--text-muted); font-style: italic; opacity: 0.7; }
.compta-table select { cursor: pointer; }
.compta-table input[type="text"]:focus, .compta-table select:focus { background: var(--bg-color); }

.amount-input { text-align: right; font-weight: 600; color: var(--text-main); }
.vat-input { background-color: var(--bg-color); font-size: 0.85rem;} 
.ttc-auto-input { background-color: #e2e8f0; color: var(--text-muted); } 

.pcg-badge-container { padding: 8px; display: flex; justify-content: center; align-items: center; min-height: 40px;}
.pcg-badge { background-color: var(--bg-color); color: var(--text-muted); padding: 4px 8px; border-radius: 4px; font-weight: 600; font-size: 0.85rem; border: 1px solid var(--border-color); }

.print-value { display: none; padding: 12px; font-size: 0.9rem; }

/* Buttons override inside this tool if necessary */
.btn-export-all { background: #217346; color: white; border: none; }
.btn-export-all:hover { background: #1e6b40; }
.btn-delete { background: transparent; color: var(--accent-rose); font-size: 1.2rem; padding: 5px; cursor: pointer; border: none;}
.header-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.show-on-print { display: none; }

/* =========================================
   PRINT STYLES - BULLETPROOF COMPTA
   ========================================= */
@media print {
    @page { size: A4 landscape; margin: 1cm; }
    body { background: white; color: black; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .btn, .top-bar, th[data-col="actions"], td:last-child, .seo-article, .main-header { display: none !important; }
    .hide-on-print { display: none !important; }
    .show-on-print { display: flex !important; gap: 10px; margin-top: 15px; page-break-inside: avoid; }
    
    .summary-banner { margin-bottom: 20px; gap: 10px;}
    .summary-card { padding: 15px !important; box-shadow: none !important; }
    .print-compact { padding: 5px 10px !important; flex-direction: row !important; align-items: center; justify-content: space-between;}
    .print-compact h2 { margin-bottom: 0 !important; font-size: 0.9rem !important;}
    .print-compact span { font-size: 1.1rem !important; }

    .summary-card.green { background-color: #d1fae5 !important; border: 2px solid #10b981 !important; }
    .summary-card.red { background-color: #ffe4e6 !important; border: 2px solid #f43f5e !important; }
    .summary-card.blue { background-color: #dbeafe !important; border: 2px solid #3b82f6 !important; }
    .summary-card.purple { background-color: #ede9fe !important; border: 2px solid #8b5cf6 !important; }
    .summary-card.orange { background-color: #fef3c7 !important; border: 2px solid #f59e0b !important; }
    .summary-card.teal { background-color: #ccfbf1 !important; border: 2px solid #14b8a6 !important; }

    .grid-container { display: block; margin-bottom: 0; gap: 0;}
    .table-section { box-shadow: none !important; border: none !important; padding: 0 !important; margin-bottom: 30px !important; page-break-inside: avoid; }

    .compta-table { border-collapse: collapse !important; width: 100% !important; margin-bottom: 5px !important;}
    .compta-table th, .compta-table td { border: 1px solid #cbd5e1 !important; padding: 5px !important; font-size: 0.85rem;}
    
    .compta-table th { color: white !important; }
    #head-recettes th { background-color: #10b981 !important; }
    #head-depenses th { background-color: #f43f5e !important; }

    .compta-table input[type="text"], .compta-table select { display: none !important; }
    .print-value { display: block !important; padding: 2px !important;}
    
    .pcg-badge { background-color: transparent !important; border: none !important; padding: 0 !important; font-size: 0.85rem !important; }
}