/* ========================================================
   FEUILLE DE STYLE PRINCIPALE EAU APP
   Mode Sombre & Mode Clair • RTL Arabe • Impression Factures
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Tajawal:wght@400;500;700;900&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-ar: 'Tajawal', 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--font-sans);
    transition: background-color 0.25s ease, color 0.25s ease;
}

[dir="rtl"] body {
    font-family: var(--font-ar);
}

/* =========================================================
   MODE CLAIR (LIGHT THEME)
   ========================================================= */
body.light-theme {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

body.light-theme header {
    background-color: #ffffff !important;
    border-bottom-color: #e2e8f0 !important;
}

body.light-theme header h1,
body.light-theme header span.text-white {
    color: #0f172a !important;
}

body.light-theme .neon-card,
body.light-theme .bg-slate-900,
body.light-theme .login-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

body.light-theme .bg-slate-900\/60,
body.light-theme .bg-slate-900\/80,
body.light-theme .bg-slate-800,
body.light-theme .bg-slate-800\/80,
body.light-theme .bg-slate-800\/60 {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

body.light-theme tr:hover {
    background-color: #f8fafc !important;
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .text-slate-300,
body.light-theme .text-slate-400 {
    color: #475569 !important;
}

body.light-theme .text-white {
    color: #0f172a !important;
}

/* =========================================================
   SUPPORT ARABE & RTL (RIGHT TO LEFT)
   ========================================================= */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .space-x-2 > :not([hidden]) ~ :not([hidden]),
[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]),
[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* =========================================================
   STYLES D'IMPRESSION (REÇUS DE CAISSE ET FACTURES D'EAU)
   ========================================================= */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    header, nav, button, .no-print {
        display: none !important;
    }
    #printReceiptArea {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 10px;
    }
}
