/* ============================================
   DESIGN SYSTEM & VARIABLES
   ============================================ */

:root {
    /* Couleurs de base */
    --sidebar-bg: #0F172A;
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    --white-pure: #FFFFFF;
    
    /* Branding dynamiques (par défaut - vert Senior) */
    --role-primary: #059669;
    --role-primary-dark: #047857;
    --role-primary-light: #ECFDF5;
    --role-secondary: #10B981;
    --role-text: #064E3B;
    
    /* Branding fixes */
    --accent-green: #10B981;
    --accent-blue: #3B82F6;
    --rose-500: #F43F5E;
    --gold-premium: #D4AF37;
    --gold-primary: #D4AF37;
    
    /* Maman & Bébé */
    --maman-pink: #DB2777;
    --maman-pink-light: #FDF2F8;
    --maman-pink-dark: #BE185D;
    --pink-soft: #FDF2F8;
    --pink-text: #DB2777;
    --blue-baby: #EFF6FF;

    /* Arrondis */
    --radius-xl: 2.5rem;
    --radius-lg: 1.5rem;
}

/* Mode Maman - appliqué par JS sur body */
body.maman-mode {
    --role-primary: #E11D48;
    --role-primary-dark: #BE123C;
    --role-primary-light: #FFF1F2;
    --role-secondary: #F43F5E;
    --role-text: #881337;
}

/* ============================================
   GLOBAL & RESET
   ============================================ */

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f5f7fa;
    color: var(--slate-900);
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 450;
}

#app {
    height: 100vh;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.03) 0%, rgba(255,255,255,0) 80%);
}

/* Titres */
h1, h2, h3, h4, .font-black, .font-bold, .title, .brand-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0.85;
}

/* Texte courant */
p, span, li, .text-sm, .text-xs, .text-base, button, input, textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 450;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

/* Montants et chiffres */
.price, .amount, .stat-number, .money {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ============================================
   SCROLLBAR (CACHÉE MAIS FONCTIONNELLE)
   ============================================ */

*::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
* { scrollbar-width: none !important; -ms-overflow-style: none !important; }

body, html, main, .custom-scroll, #view-container, .overflow-y-auto {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar, html::-webkit-scrollbar, main::-webkit-scrollbar,
.custom-scroll::-webkit-scrollbar, #view-container::-webkit-scrollbar {
    display: none;
}

/* ============================================
   SIDEBAR DESKTOP
   ============================================ */

@media (min-width: 1024px) {
    #app:has(aside) { flex-direction: row; }
}

aside {
    width: 280px;
    height: 100%;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0F172A 0%, #1a1f2e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

#nav-desktop {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    scrollbar-width: none;
}

#nav-desktop::-webkit-scrollbar { display: none; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-400);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sidebar-link:hover { background: rgba(255, 255, 255, 0.05); color: white; }
.sidebar-link.active {
    background-color: var(--role-primary) !important;
    color: white !important;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
}

/* ============================================
   AUTHENTIFICATION
   ============================================ */

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    position: relative;
    z-index: 50;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 4rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.auth-card .app-input {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.auth-card .app-input:focus {
    background-color: #ffffff !important;
    border-color: var(--role-primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

#auth-card-content {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}

#auth-card-content::-webkit-scrollbar { display: none; }

/* ============================================
   ZONE DE CONTENU PRINCIPAL
   ============================================ */

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    z-index: 20;
    -webkit-overflow-scrolling: touch;
}

.form-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

/* ============================================
   NAVIGATION MOBILE
   ============================================ */

@media (max-width: 1023px) {
    aside { display: none !important; }
    main { padding-bottom: 100px; padding: 1.25rem; }
    
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px !important;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }
    
    footer .nav-btn i { font-size: 1.25rem !important; }
    footer .nav-btn span { font-size: 9px !important; }
    footer button.w-16.h-16 { width: 56px !important; height: 56px !important; margin-top: -28px !important; }
    
    header { height: 56px !important; padding: 0 1rem !important; }
    main { padding-bottom: 10px !important; }
    .pb-32, .pb-24, .pb-20 { padding-bottom: 20px !important; }
}

.nav-btn {
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn.active {
    color: var(--role-primary);
    transform: translateY(-4px);
}

.nav-btn.active i {
    filter: drop-shadow(0 10px 8px rgba(22, 163, 74, 0.2));
}

/* ============================================
   COMPOSANTS UI GÉNÉRAUX
   ============================================ */

.bento-card, .bg-white, .patient-card, .menu-tile,
.bg-white.rounded-2xl, .bg-white.rounded-3xl {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    border: 1px solid #f0f2f5 !important;
}

.bento-card {
    border-radius: 2rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.07);
    border-color: var(--role-primary);
}

/* Cartes patients */
.patient-card {
    border-radius: 1.25rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.patient-card:active { transform: scale(0.98); background-color: #FAFAFA; }

.patient-card.premium {
    border: 2px solid var(--gold-premium);
    background: linear-gradient(to bottom right, #ffffff, #fffdfa);
}

.patient-card-modern {
    background: white;
    border-radius: 1.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.patient-card-modern:active { background: #f8fafc; transform: scale(0.98); }

.patient-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #166534;
}

.patient-avatar.maman {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: #be185d;
}

/* Menu tiles */
.menu-tile {
    border-radius: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.12);
}

.menu-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--role-primary), #34D399, var(--role-primary));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.menu-tile:hover::before { opacity: 0.6; }
.menu-tile:active { transform: scale(0.96); background: #F8FAFC; }

.menu-tile i {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #F8FAFC;
}

.menu-tile .font-black { font-size: 0.8rem; letter-spacing: -0.01em; }
.menu-tile .text-slate-400 { font-size: 0.65rem; font-weight: 500; line-height: 1.4; }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1rem 0;
}

/* ============================================
   FORMULAIRES & INPUTS
   ============================================ */

.app-input {
    width: 100%;
    padding: 1.15rem 1.5rem;
    background: var(--slate-100);
    border: 1.5px solid transparent;
    border-radius: var(--radius-lg);
    outline: none;
    font-size: 16px !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.app-input:focus {
    background: white;
    border-color: var(--role-primary);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.08);
}

.status-pill {
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   BADGES
   ============================================ */

.badge-pink { background: #FDF2F8; color: #DB2777; border: 1px solid #FCE7F3; }
.badge-gold { background: #FFFBEB; color: #D4AF37; border: 1px solid #FDE68A; }
.badge-success { background: #ECFDF5; color: #10B981; border: 1px solid #D1FAE5; }

.bg-premium-gold { background-color: #D4AF37 !important; }
.text-premium-gold { color: #D4AF37 !important; }
.border-premium-gold { border-color: #D4AF37 !important; }

.bg-maman-pink { background-color: #FDF2F8 !important; }
.text-maman-pink { color: #DB2777 !important; }
.border-maman-pink { border-color: #DB2777 !important; }

/* Badges menu */
.menu-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    min-width: 26px;
    height: 26px;
    border-radius: 26px;
    background: #EF4444 !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
    border: 2px solid white;
    z-index: 100;
    font-family: monospace;
    animation: badgePop 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@media (max-width: 640px) {
    .menu-badge { top: -8px; right: -8px; min-width: 22px; height: 22px; font-size: 11px !important; padding: 0 6px; }
}

/* Badge patients */
.patient-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 24px;
    height: 24px;
    border-radius: 24px;
    background: #EF4444 !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    border: 2px solid white;
    z-index: 10;
    font-family: monospace;
}

/* Badge notification cloche */
#notification-badge {
    background: #EF4444 !important;
    color: white !important;
    font-weight: 900 !important;
    font-size: 10px !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 18px !important;
    border: 1.5px solid white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.badge-notification {
    background: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: badgePulse 0.5s ease;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   CHAT MODERNE STYLE WHATSAPP
   ============================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: #efeae2;
    position: relative;
}

.chat-header {
    background: #202c33;
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

.chat-header-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-header-back:hover { background: rgba(255,255,255,0.1); }

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--role-primary), var(--role-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 600; font-size: 16px; line-height: 1.2; }
.chat-header-status { font-size: 12px; opacity: 0.8; display: flex; align-items: center; gap: 4px; }
.chat-header-status.online { color: #25D366; }

.chat-header-actions { display: flex; gap: 8px; }
.chat-header-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-header-actions button:hover { background: rgba(255,255,255,0.1); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* Messages */
.message { display: flex; margin-bottom: 4px; animation: messageSlideIn 0.2s ease-out; }
.message.sent { justify-content: flex-end; }
.message.received { justify-content: flex-start; }

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bulles de message */
.chat-message-sent {
    background: var(--role-primary);
    color: white;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    padding: 10px 14px;
    max-width: 75%;
    word-wrap: break-word;
}

.chat-message-received {
    background: #F1F5F9;
    color: #1E293B;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 10px 14px;
    max-width: 75%;
    word-wrap: break-word;
}

.chat-time {
    font-size: 9px;
    color: #94A3B8;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-image { max-width: 250px; max-height: 250px; border-radius: 12px; cursor: pointer; margin-bottom: 4px; }

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-bottom: 8px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8696a0;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.typing-text { font-size: 12px; color: #667781; }

/* Zone de saisie chat */
.chat-input-area {
    background: #202c33;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    bottom: 0;
}

.chat-input-attach {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #aebac1;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-input-attach:hover { background: rgba(255,255,255,0.1); }

.chat-input-wrapper {
    flex: 1;
    background: #2a3942;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e9edef;
    font-size: 15px;
    padding: 10px 0;
}
.chat-input::placeholder { color: #8696a0; }

.chat-input-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chat-input-send:active { transform: scale(0.92); }

/* ============================================
   DASHBOARD MAMAN & BÉBÉ
   ============================================ */

.maman-dashboard-container {
    padding: 20px;
    background: linear-gradient(180deg, #FDF2F8 0%, #FFFFFF 100%);
    min-height: 100%;
}

.maman-header {
    background: linear-gradient(135deg, #DB2777 0%, #BE185D 100%);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.maman-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.maman-next-visit {
    background: white;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #FCE7F3;
}

.maman-metric-card {
    background: white;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #F1F5F9;
}

.maman-pack-card {
    background: white;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #F1F5F9;
    transition: all 0.2s;
}
.maman-pack-card:active { transform: scale(0.98); }

.maman-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    background: white;
    border-radius: 16px;
    border: 1px solid #FCE7F3;
    font-size: 10px;
    font-weight: 600;
    color: #64748B;
    transition: all 0.2s;
}
.maman-nav-btn:active { transform: scale(0.95); background: #FDF2F8; }

.maman-mood-tracker {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #FCE7F3;
}

.mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
}
.mood-btn:active div { transform: scale(0.92); transition: transform 0.05s ease; }

/* ============================================
   DASHBOARD CARD MODERNE
   ============================================ */

.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}
.dashboard-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.dashboard-card:active { transform: scale(0.98); }

.dashboard-card-stat {
    font-size: 32px;
    font-weight: 800;
    color: var(--role-primary);
    line-height: 1.2;
}

.dashboard-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748B;
}

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--role-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dashboard-card-icon i { font-size: 24px; color: var(--role-primary); }

/* ============================================
   BOUTONS
   ============================================ */

.btn-primary {
    background: var(--role-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover { background: var(--role-primary-dark); transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--role-primary);
    color: var(--role-primary);
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-outline:hover { background: var(--role-primary-light); }

.btn-transition { transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1); }
.btn-transition:active { transform: scale(0.96); }

.btn-maman { background-color: #DB2777 !important; color: white !important; }
.btn-maman:hover { background-color: #BE185D !important; }

button.bg-slate-900 { background-color: #1e293b !important; }
button.bg-slate-900:hover { background-color: #0f172a !important; }

/* ============================================
   HEADER & FOOTER
   ============================================ */

header {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eef2f6 !important;
}

.app-header {
    background: white;
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-title { font-size: 18px; font-weight: 700; color: #1E293B; }
.app-header-subtitle { font-size: 11px; color: var(--role-primary); font-weight: 600; }

/* ============================================
   MAPS & RADAR
   ============================================ */

#map {
    height: 100%;
    width: 100%;
    z-index: 10;
    background-color: #f8fafc;
}

.leaflet-container {
    border-radius: 2.5rem;
    font-family: inherit;
}

.leaflet-control-attribution,
.leaflet-control-zoom { display: none !important; }

/* ============================================
   ONBOARDING
   ============================================ */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.onboarding-slide {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
}
.onboarding-slide.active { display: flex; animation: slideInCustom 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

.onboarding-image-container {
    width: 100%;
    height: 45vh;
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 0 0 4rem 4rem;
}

.onboarding-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.onboarding-image-blur {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, white 100%);
}

.onboarding-dot {
    width: 6px;
    height: 6px;
    border-radius: 10px;
    background: #E2E8F0;
    transition: all 0.3s;
}
.onboarding-dot.active { width: 24px; background: var(--role-primary); }

/* ============================================
   ANIMATIONS GLOBALES
   ============================================ */

.animate-fadeIn { animation: fadeIn 0.2s ease-out forwards; }
.animate-slideIn {
    animation: slideIn 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
    opacity: 0;
}
.animate-page { animation: fadeInUp 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards; }
.animate-spin { animation: spin 0.8s linear infinite; }

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.card-animate { animation: cardAppear 0.3s ease-out forwards; }
@keyframes cardAppear {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.list-item-animate { animation: listItemSlide 0.2s ease-out forwards; }
@keyframes listItemSlide {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.btn-feedback, button:active, .nav-btn:active, .menu-tile:active, .patient-card:active {
    transition: transform 0.05s ease !important;
    transform: scale(0.97) !important;
}

.haptic-feedback { transition: transform 0.05s ease; }
.haptic-feedback:active { transform: scale(0.97); }

@media (max-width: 640px) {
    .animate-fadeIn, .animate-slideIn { animation-duration: 0.15s !important; }
    .bento-card:hover, .patient-card:hover { transform: none !important; }
}

/* ============================================
   LOADER
   ============================================ */

#initial-loader {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#initial-loader.hidden { display: none !important; }
#initial-loader.fade-out { opacity: 0; pointer-events: none; }

.loader-spinner {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: var(--role-primary);
    border-right-color: #a7f3d0;
    animation: spin 0.8s linear infinite;
}

#initial-loader.maman .loader-spinner {
    border-top-color: #DB2777;
    border-right-color: #fbcfe8;
}

.loader-ring-outer {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.2);
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.loader-dots { display: flex; gap: 6px; margin-top: 20px; }
.loader-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--role-primary);
    animation: bounce 0.6s ease-in-out infinite;
}
.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.3s; }

.loader-text-main {
    font-size: 8px;
    font-weight: 800;
    color: #CBD5E1;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 16px;
}

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}
.global-loader.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.global-loader .loader-text {
    margin-top: 1rem;
    font-size: 10px;
    font-weight: 800;
    color: #94A3B8;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

@keyframes ping {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-6px); opacity: 1; }
}

/* ============================================
   SKELETON LOADERS
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
    border-radius: 0.75rem;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text { height: 0.875rem; margin-bottom: 0.5rem; border-radius: 0.5rem; }
.skeleton-title { height: 1.5rem; width: 60%; margin-bottom: 1rem; }
.skeleton-card { padding: 1rem; background: white; border-radius: 1rem; border: 1px solid #F1F5F9; }
.skeleton-avatar { width: 3rem; height: 3rem; border-radius: 0.75rem; }
.skeleton-button { height: 2.5rem; width: 100%; border-radius: 0.75rem; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* ============================================
   TOASTS
   ============================================ */

.toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1E293B;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(30, 41, 59, 0.95);
    max-width: 90%;
}
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-notification.success { background: rgba(16, 185, 129, 0.95); }
.toast-notification.error { background: rgba(244, 63, 94, 0.95); }
.toast-notification.warning { background: rgba(245, 158, 11, 0.95); }
.toast-notification.info { background: rgba(59, 130, 246, 0.95); }

@media (max-width: 640px) {
    .toast-notification { bottom: 70px; padding: 0.625rem 1rem; font-size: 0.6875rem; white-space: normal; text-align: center; max-width: 85%; }
}

/* ============================================
   PULL TO REFRESH
   ============================================ */

#pull-to-refresh {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #f0fdf4;
    color: #10b981;
    padding: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    margin-bottom: 10px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}
#pull-to-refresh.active { transform: translateY(0); }

.refresh-indicator {
    background: #f0fdf4;
    color: #10b981;
    padding: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    margin-bottom: 10px;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MENU FLOTTANT (FAB)
   ============================================ */

.fab-container {
    position: fixed;
    bottom: 25px;
    left: 20px;
    z-index: 9999;
    transition: all 0.1s ease;
    cursor: grab;
}
.fab-container:active { cursor: grabbing; }

@media (min-width: 1024px) { .fab-container { display: none !important; } }
@media (max-width: 1023px) { .fab-container { display: block; } }

.fab-button {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--role-primary) 0%, var(--role-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid white;
}
.fab-button:active { transform: scale(0.95); }
.fab-button i { font-size: 24px; color: white; transition: transform 0.3s ease; }
.fab-button.active i { transform: rotate(45deg); }

.fab-menu {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 12px;
    background: white;
    padding: 12px 20px;
    border-radius: 60px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.fab-menu.open { opacity: 1; visibility: visible; left: 75px; pointer-events: auto; }
.fab-menu { pointer-events: none; }

.fab-menu-item {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.fab-menu-item:active { transform: scale(0.9); }

.fab-menu-item[data-view="home"] i { color: var(--role-primary); }
.fab-menu-item[data-view="visits"] i { color: #F59E0B; }
.fab-menu-item[data-view="feed"] i { color: #3B82F6; }
.fab-menu-item[data-view="profile"] i { color: #8B5CF6; }
.fab-menu-item[data-view="map"] i { color: #EF4444; }

.fab-menu-item.active {
    background: linear-gradient(135deg, var(--role-primary) 0%, var(--role-primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.fab-menu-item.active i { color: white !important; }

@media (max-width: 640px) {
    .fab-container { bottom: 20px; left: 15px; }
    .fab-button { width: 52px; height: 52px; }
    .fab-button i { font-size: 22px; }
    .fab-menu-item { width: 40px; height: 40px; }
    .fab-menu-item i { font-size: 18px; }
    .fab-menu { gap: 10px; padding: 10px 16px; left: 62px; }
    .fab-menu.open { left: 66px; }
}

@keyframes menuPopIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}
.fab-menu.open .fab-menu-item { animation: menuPopIn 0.25s cubic-bezier(0.34, 1.2, 0.64, 1) forwards; }

/* ============================================
   BRANDING TYPOGRAPHIQUE
   ============================================ */

.brand-container { display: inline-flex; align-items: baseline; gap: 0px; flex-wrap: wrap; }
.brand-sante-md, .brand-plus-md, .brand-service-md { font-size: 0.9rem; }
.brand-sante-sidebar, .brand-plus-sidebar, .brand-service-sidebar { font-size: 0.85rem; }

.brand-sante-md, .brand-sante-sidebar, .brand-sante-footer {
    font-weight: 800;
    color: var(--role-primary);
}
.brand-plus-md, .brand-plus-sidebar, .brand-plus-footer {
    color: #D4AF37;
    font-weight: 800;
}
.brand-service-md, .brand-service-sidebar, .brand-service-footer {
    color: #64748B;
    font-weight: 800;
}

/* ============================================
   BANNIÈRES
   ============================================ */

.premium-banner {
    background: linear-gradient(135deg, #D4AF37 0%, #FDE68A 50%, #D4AF37 100%);
    color: #0F172A;
}
.maman-banner {
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%);
    border: 1px solid #FBCFE8;
    color: #DB2777;
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.service-card { transition: all 0.2s ease; }
.service-card:active { transform: scale(0.98); }
.service-card[data-type="SENIOR"]:hover {
    border-color: #10B981;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}
.service-card[data-type="MAMAN"]:hover {
    border-color: #DB2777;
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%);
}

/* ============================================
   SWEETALERT OPTIMISÉ
   ============================================ */

.swal2-popup {
    border-radius: 1.25rem !important;
    padding: 1.25rem !important;
    width: 90% !important;
    max-width: 320px !important;
}
.swal2-title {
    font-size: 1.125rem !important;
    font-weight: 800 !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
}
.swal2-html-container {
    font-size: 0.75rem !important;
    padding: 0 !important;
    margin: 0 !important;
}
.swal2-confirm, .swal2-cancel {
    padding: 0.625rem 1rem !important;
    font-size: 0.6875rem !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
}
.swal2-actions { margin-top: 1rem !important; gap: 0.5rem !important; }

/* ============================================
   CORRECTIONS CHAT & MESSAGES
   ============================================ */

.message-content, .bg-slate-50.p-4.rounded-xl, .bg-white.rounded-2xl.p-5 {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}
.message-card, [class*="rounded-2xl"].bg-white {
    max-width: 100%;
    overflow-x: hidden;
}
.document-card { transition: all 0.2s ease; }
.document-card:hover { transform: translateY(-2px); }
.document-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.reply-thread { margin-left: 1.5rem; padding-left: 1rem; border-left: 3px solid #f59e0b; margin-top: 0.75rem; }
.message-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (max-width: 640px) {
    .reply-thread { margin-left: 0.75rem; padding-left: 0.75rem; }
    .message-item { padding: 0.75rem; }
    .text-sm { font-size: 0.75rem !important; }
}

.document-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border-radius: 0.75rem;
    font-size: 0.75rem;
}

.message-thread { position: relative; }
.message-thread .reply-item {
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 3px solid #fbbf24;
    position: relative;
}
.message-thread .reply-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 20px;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    border-radius: 50%;
}
@media (max-width: 640px) {
    .message-thread .reply-item { margin-left: 0.75rem; padding-left: 0.75rem; }
}

.replies-container { transition: all 0.2s ease; }
.replies-container button { cursor: pointer; }
.replies-container button:active { transform: scale(0.98); }

#care-feed-content { transition: opacity 0.15s ease; }
#care-feed-content.updating { opacity: 0.6; }

.border-l-3 { border-left-width: 3px; }

/* ============================================
   RESPONSIVE TYPOGRAPHIE & ESPACEMENTS
   ============================================ */

@media (max-width: 640px) {
    h1, .title-large, .font-black.text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.02em !important;
    }
    h2, .title-medium, .font-black.text-xl {
        font-size: 1rem !important;
        line-height: 1.35 !important;
    }
    p, .text-base { font-size: 0.8125rem !important; line-height: 1.45 !important; }
    label, .text-xs, .text-sm { font-size: 0.6875rem !important; letter-spacing: 0.02em !important; }
    
    .tracking-widest, .tracking-\[0\.2em\], .tracking-\[0\.3em\] { letter-spacing: 0.08em !important; }
    
    .space-y-8 { row-gap: 1.25rem !important; }
    .space-y-6 { row-gap: 1rem !important; }
    .space-y-4 { row-gap: 0.75rem !important; }
    .gap-4 { gap: 0.75rem !important; }
    .mb-8 { margin-bottom: 1.25rem !important; }
    .mb-6 { margin-bottom: 1rem !important; }
    .mb-4 { margin-bottom: 0.75rem !important; }
    
    .rounded-\[2rem\], .rounded-\[2\.5rem\], .rounded-\[3rem\] { border-radius: 1rem !important; }
    .rounded-\[1\.5rem\], .rounded-\[1\.8rem\] { border-radius: 0.75rem !important; }
    
    .bento-card, .patient-card, .menu-tile { padding: 1rem !important; }
    
    .app-input {
        padding: 0.875rem 1rem !important;
        border-radius: 0.75rem !important;
        font-size: 0.875rem !important;
        background-color: #F8FAFC !important;
        border: 1px solid #E2E8F0 !important;
    }
    .app-input:focus {
        background-color: #FFFFFF !important;
        border-color: var(--gold-premium) !important;
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    }
    
    button[type="submit"], .btn-primary, .bg-slate-900.py-5 {
        padding-top: 0.875rem !important;
        padding-bottom: 0.875rem !important;
        border-radius: 0.75rem !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.1em !important;
    }
    
    select.app-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
        background-position: right 1rem center;
        background-repeat: no-repeat;
        background-size: 1rem;
        appearance: none;
        -webkit-appearance: none;
    }
    
    .required:after { content: "*"; color: #F43F5E; margin-left: 0.25rem; }
    .menu-grid { gap: 0.75rem !important; }
    .menu-tile { padding: 0.875rem !important; min-height: auto !important; }
    .menu-tile i { font-size: 1.25rem !important; width: 2rem !important; height: 2rem !important; }
    .menu-tile .tile-label { font-size: 0.7rem !important; }
    .menu-tile .tile-desc { font-size: 0.6rem !important; }
    
    .auth-card { min-height: 75vh !important; max-height: 90vh !important; }
    #auth-card-content { padding-bottom: 20px; }
}

/* ============================================
   DIVERS
   ============================================ */

.glass-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(15px);
    z-index: 500;
    flex-shrink: 0;
}

.fa-spin { animation: spin 1s linear infinite; }

#emoji-picker-container { animation: fadeInUp 0.2s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#install-reminder {
    transform: translateY(100px);
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
#install-reminder.show { transform: translateY(0); }
.animate-slideUp { animation: slideUp 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) forwards; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(100px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Suppression des blobs flous */
.absolute.top-40.left-\[-5\%\], .absolute.bottom-\[-10\%\].right-\[-5\%\] { display: none !important; }

/* Ombres douces */
.shadow-sm, .shadow-md, .shadow-lg { --tw-shadow-color: rgba(0, 0, 0, 0.03); }









/* ============================================
   DYNAMISME GLOBAL - COULEURS VIVES
   ============================================ */

/* Boutons primaires */
.btn-primary, button[type="submit"], .bg-slate-900, 
.planning-list .bg-slate-800, 
.commandes-list .bg-slate-800 {
    background: var(--role-primary) !important;
    transition: all 0.2s ease;
}

.btn-primary:hover, button[type="submit"]:hover {
    background: var(--role-primary-dark) !important;
    transform: scale(1.02);
}

/* Focus des inputs */
input:focus, textarea:focus, select:focus {
    border-color: var(--role-primary) !important;
    box-shadow: 0 0 0 3px var(--role-primary-light) !important;
    outline: none;
}

/* Cartes avec hover coloré */
.bg-white.rounded-xl, .bg-white.rounded-2xl,
.patient-card, .visit-card, .commande-card, .planning-card {
    transition: all 0.2s ease;
    border: 1px solid #E2E8F0;
}

.bg-white.rounded-xl:hover, .bg-white.rounded-2xl:hover,
.patient-card:hover, .visit-card:hover, .commande-card:hover, .planning-card:hover {
    border-color: var(--role-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Badges colorés */
.badge-primary {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
}

/* Liens et textes colorés */
a, .text-link, .text-emerald-600, .text-pink-600 {
    color: var(--role-primary) !important;
}

/* Séparateurs colorés */
.border-t, .border-b, .border-l, .border-r {
    border-color: #E2E8F0;
}

/* En-têtes de section */
.section-header {
    border-left: 3px solid var(--role-primary);
    padding-left: 12px;
    margin-bottom: 16px;
}

/* Progress bars */
.progress-bar {
    background: var(--role-primary-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--role-primary);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Tags et filtres actifs */
.tag-active {
    background: var(--role-primary);
    color: white;
}

.tag-inactive {
    background: var(--role-primary-light);
    color: var(--role-primary);
}



/* Formulaires dynamiques */
.form-input:focus, .app-input:focus {
    border-color: var(--role-primary) !important;
    box-shadow: 0 0 0 3px var(--role-primary-light) !important;
}

select:focus {
    border-color: var(--role-primary) !important;
}

/* Checkboxes et radios */
input[type="checkbox"]:checked, input[type="radio"]:checked {
    accent-color: var(--role-primary);
}

/* Sliders */
input[type="range"] {
    accent-color: var(--role-primary);
}


/* ============================================
   CLASSES DYNAMIQUES - ÉTAPE 1
   ============================================ */

/* Badge dynamique */
.badge-dynamic {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Tag interactif */
.tag-dynamic {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-dynamic.active {
    background: var(--role-primary);
    color: white;
}

.tag-dynamic:active {
    transform: scale(0.95);
}

/* Carte avec effet hover */
.card-hover {
    transition: all 0.2s ease;
    border: 1px solid #E2E8F0;
}

.card-hover:hover {
    border-color: var(--role-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* En-tête de section */
.section-title {
    font-size: 14px;
    font-weight: 800;
    color: #1E293B;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--role-primary);
    font-size: 16px;
}


/* ============================================
   CARTES PATIENTS MODERNES
   ============================================ */

.patient-card-modern {
    background: white;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border: 1px solid #E2E8F0;
}

.patient-card-modern:active {
    transform: scale(0.98);
}

.patient-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.badge-dynamic {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}



/* ============================================
   EFFETS TACTILES POUR MOBILE
   ============================================ */

/* Animation au clic pour toutes les cartes */
.card-hover, .patient-card, .menu-tile, .visit-card, .commande-card, .planning-card {
    transition: all 0.15s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Effet au clic (mobile et desktop) */
.card-hover:active, .patient-card:active, .menu-tile:active, 
.visit-card:active, .commande-card:active, .planning-card:active {
    transform: scale(0.97);
    transition: transform 0.05s ease;
}

/* Pour desktop uniquement - effet hover */
@media (min-width: 768px) {
    .card-hover:hover, .patient-card:hover, .menu-tile:hover,
    .visit-card:hover, .commande-card:hover, .planning-card:hover {
        transform: translateY(-2px);
        border-color: var(--role-primary);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }
}

/* Animation d'apparition des cartes */
.card-appear {
    animation: cardSlideUp 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
    opacity: 0;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feedback visuel au clic (onde) */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}







/* ============================================
   ANIMATIONS D'APPARITION POUR LISTES
   ============================================ */

/* Animation d'entrée pour les éléments de liste */
.list-item {
    animation: fadeInScale 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
    opacity: 0;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation de chargement des cartes (décalées) */
.list-item-delay-1 { animation-delay: 0.05s; }
.list-item-delay-2 { animation-delay: 0.1s; }
.list-item-delay-3 { animation-delay: 0.15s; }
.list-item-delay-4 { animation-delay: 0.2s; }

/* Animation de transition entre les vues */
.view-transition {
    animation: viewFade 0.2s ease-out forwards;
}

@keyframes viewFade {
    0% {
        opacity: 0;
        transform: translateX(8px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de pulsation pour les éléments importants */
@keyframes softPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse-soft {
    animation: softPulse 1.5s ease-in-out infinite;
}



/* ============================================
   BOUTONS DYNAMIQUES
   ============================================ */

/* Bouton principal */
.btn-primary, 
button[type="submit"],
.bg-emerald-500, .bg-pink-500,
.bg-emerald-600, .bg-pink-600,
.bg-slate-800,
.w-full.bg-slate-900,
#send-btn,
.chat-input-send {
    background: var(--role-primary) !important;
    transition: all 0.2s ease;
}

.btn-primary:active, 
button[type="submit"]:active,
.bg-emerald-500:active, .bg-pink-500:active,
#send-btn:active,
.chat-input-send:active {
    transform: scale(0.96);
    background: var(--role-primary-dark) !important;
}

/* Bouton secondaire (outline) */
.btn-outline-secondary {
    background: transparent;
    border: 1.5px solid var(--role-primary);
    color: var(--role-primary);
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline-secondary:active {
    background: var(--role-primary-light);
    transform: scale(0.96);
}

/* Bouton danger */
.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-danger:active {
    transform: scale(0.96);
    background: #DC2626;
}

/* Bouton dans les cartes */
.card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--role-primary-light);
    color: var(--role-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.card-action-btn:active {
    transform: scale(0.92);
    background: var(--role-primary);
    color: white;
}


/* ============================================
   ONGLETS ET FILTRES DYNAMIQUES
   ============================================ */

/* Onglets actifs */
.tab-active {
    color: var(--role-primary) !important;
    border-bottom-color: var(--role-primary) !important;
}

.tab-inactive {
    color: #94A3B8 !important;
    border-bottom-color: transparent !important;
}

/* Filtres */
.filter-chip {
    background: var(--role-primary-light);
    color: var(--role-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-chip:active {
    transform: scale(0.95);
    background: var(--role-primary);
    color: white;
}

.filter-chip.active {
    background: var(--role-primary);
    color: white;
}

/* Badge de comptage sur les onglets */
.tab-badge {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 8px;
}

/* Indicateur de chargement coloré */
.loader-color {
    border-top-color: var(--role-primary) !important;
}


/* ============================================
   INDICATEURS DE CHARGEMENT DYNAMIQUES
   ============================================ */

/* Spinner principal */
.spinner-primary {
    width: 40px;
    height: 40px;
    border: 3px solid var(--role-primary-light);
    border-top-color: var(--role-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Spinner petit */
.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid var(--role-primary-light);
    border-top-color: var(--role-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Skeleton loader coloré */
.skeleton-color {
    background: linear-gradient(90deg, var(--role-primary-light) 25%, #E2E8F0 50%, var(--role-primary-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

/* Barre de progression */
.progress-bar-custom {
    background: var(--role-primary-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill-custom {
    background: var(--role-primary);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Skeleton texte */
.skeleton-text-custom {
    height: 14px;
    background: var(--role-primary-light);
    border-radius: 8px;
    margin-bottom: 8px;
}

.skeleton-text-custom:last-child {
    margin-bottom: 0;
}


/* ============================================
   TRANSITIONS ENTRE LES VUES
   ============================================ */

/* Container principal des vues */
#view-container {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Animation d'entrée d'une vue */
.view-enter {
    animation: viewEnter 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

@keyframes viewEnter {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de sortie d'une vue */
.view-exit {
    animation: viewExit 0.15s ease forwards;
}

@keyframes viewExit {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Pour les modales et popups */
.modal-enter {
    animation: modalEnter 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

@keyframes modalEnter {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pour les toasts et notifications */
.toast-enter {
    animation: toastEnter 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

@keyframes toastEnter {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ============================================
   BOUTONS DU FORMULAIRE D'INSCRIPTION
   ============================================ */

/* Bouton principal d'inscription */
.auth-card .next-btn,
.auth-card button[onclick*="nextAuthStep"],
.auth-card button[onclick*="submitRegistration"] {
    background: var(--role-primary) !important;
    color: white !important;
    border: none !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 0.2em !important;
    padding: 14px !important;
    border-radius: 1.25rem !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.auth-card .next-btn:active,
.auth-card button[onclick*="nextAuthStep"]:active,
.auth-card button[onclick*="submitRegistration"]:active {
    transform: scale(0.97) !important;
    background: var(--role-primary-dark) !important;
}

/* Bouton précédent */
.auth-card .prev-btn,
.auth-card button[onclick*="prevAuthStep"] {
    background: #F1F5F9 !important;
    color: #64748B !important;
    border: 1px solid #E2E8F0 !important;
    font-weight: 800 !important;
    font-size: 10px !important;
    letter-spacing: 0.2em !important;
    padding: 14px !important;
    border-radius: 1.25rem !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.auth-card .prev-btn:active,
.auth-card button[onclick*="prevAuthStep"]:active {
    transform: scale(0.97) !important;
    background: #E2E8F0 !important;
}

/* Bouton de connexion */
.auth-card #btn-login {
    background: var(--role-primary) !important;
    color: white !important;
    border: none !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 0.2em !important;
    padding: 14px !important;
    border-radius: 1.5rem !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.auth-card #btn-login:active {
    transform: scale(0.97) !important;
    background: var(--role-primary-dark) !important;
}



/* Menu latéral (drawer) */
#mobile-drawer {
    transition: visibility 0.3s ease;
}

#mobile-drawer.show {
    visibility: visible;
}

#mobile-drawer.show .absolute {
    transform: translateX(0);
}

#mobile-drawer .absolute {
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}



/* Bottom bar navigation */
.bottom-nav-btn.active {
    color: var(--role-primary);
}

.bottom-nav-btn.active i {
    transform: translateY(-2px);
}

.bottom-nav-btn {
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 30px;
}

.bottom-nav-btn:active {
    transform: scale(0.92);
}











/* ============================================
   THÈME AIDANT (OR + BEIGE + VERT FADÉ)
   ============================================ */

body.aidant-mode {
    --role-primary: #C9A84C;
    --role-primary-dark: #B8942E;
    --role-primary-light: #FEF9E6;
    --role-secondary: #D4AF37;
    --role-accent: #A3C9A8;
    --role-text: #4A5D4E;
    --role-bg-card: #FFFFFF;
    --role-bg-page: #F8F7F4;
    --role-border: #E8E2D4;
}

/* Boutons aidant */
body.aidant-mode .btn-primary,
body.aidant-mode button[type="submit"],
body.aidant-mode .bg-emerald-500,
body.aidant-mode .bg-emerald-600 {
    background: var(--role-primary) !important;
}
body.aidant-mode .btn-primary:hover,
body.aidant-mode button[type="submit"]:hover {
    background: var(--role-primary-dark) !important;
}

/* Badges aidant */
body.aidant-mode .badge-dynamic {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border: 1px solid var(--role-primary);
}

/* Messages aidant (chat) */
body.aidant-mode .chat-message-sent {
    background: var(--role-primary);
    color: white;
}
body.aidant-mode .chat-message-received {
    background: #F1F5F9;
    color: #1E293B;
    border-left: 3px solid var(--role-primary);
}

/* Cartes dashboard aidant */
body.aidant-mode .dashboard-card {
    border-left: 4px solid var(--role-primary);
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Section headers aidant */
body.aidant-mode .section-title {
    color: var(--role-primary);
    border-left: 3px solid var(--role-primary);
}

/* ============================================
   THÈME ADMIN (GRIS + OR + VERT FADÉ)
   ============================================ */

body.coordinateur-mode {
    --role-primary: #1E293B;
    --role-primary-dark: #0F172A;
    --role-primary-light: #E2E8F0;
    --role-secondary: #C9A84C;
    --role-accent: #A3C9A8;
    --role-text: #334155;
    --role-bg-card: #FFFFFF;
    --role-bg-page: #F1F5F9;
    --role-border: #CBD5E1;
}

/* Boutons admin */
body.coordinateur-mode .btn-primary,
body.coordinateur-mode button[type="submit"],
body.coordinateur-mode .bg-emerald-500,
body.coordinateur-mode .bg-emerald-600 {
    background: var(--role-primary) !important;
}
body.coordinateur-mode .btn-primary:hover,
body.coordinateur-mode button[type="submit"]:hover {
    background: var(--role-primary-dark) !important;
}

/* Boutons secondaires admin (or) */
body.coordinateur-mode .btn-secondary {
    background: var(--role-secondary);
    color: #1E293B;
}

/* Badges admin */
body.coordinateur-mode .badge-dynamic {
    background: var(--role-primary-light);
    color: var(--role-primary);
}

/* Messages admin (chat) */
body.coordinateur-mode .chat-message-sent {
    background: var(--role-primary);
    color: white;
}
body.coordinateur-mode .chat-message-received {
    background: white;
    color: #1E293B;
    border-left: 3px solid var(--role-secondary);
}

/* Cartes dashboard admin */
body.coordinateur-mode .dashboard-card {
    border-top: 4px solid var(--role-secondary);
    background: white;
    border-radius: 20px;
}












/* ============================================
   THÈME AIDANT (OR + BEIGE)
   ============================================ */

body.aidant-mode {
    --role-primary: #C9A84C;
    --role-primary-dark: #B8942E;
    --role-primary-light: #FEF9E6;
    --role-secondary: #D4AF37;
    --role-accent: #A3C9A8;
    --role-text: #4A5D4E;
}

/* Boutons */
body.aidant-mode .btn-primary,
body.aidant-mode button[type="submit"],
body.aidant-mode .bg-emerald-500,
body.aidant-mode .bg-emerald-600,
body.aidant-mode .next-btn,
body.aidant-mode #btn-login,
body.aidant-mode .chat-input-send {
    background: var(--role-primary) !important;
}
body.aidant-mode .btn-primary:hover,
body.aidant-mode button[type="submit"]:hover {
    background: var(--role-primary-dark) !important;
}

/* Liens et textes cliquables */
body.aidant-mode a:not(.no-style),
body.aidant-mode .text-link,
body.aidant-mode .sidebar-link.active {
    color: var(--role-primary) !important;
}

/* Bordures actives / focus */
body.aidant-mode input:focus,
body.aidant-mode textarea:focus,
body.aidant-mode select:focus {
    border-color: var(--role-primary) !important;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1) !important;
}

/* Badges */
body.aidant-mode .badge-dynamic,
body.aidant-mode .badge-notification {
    background: var(--role-primary-light);
    color: var(--role-primary);
    border: 1px solid var(--role-primary);
}

/* Indicateur online */
body.aidant-mode .online-dot {
    background: var(--role-primary);
}

/* Onglet actif */
body.aidant-mode .tab-active,
body.aidant-mode .nav-btn.active {
    color: var(--role-primary) !important;
    border-bottom-color: var(--role-primary) !important;
}

/* Messages chat - envoyés */
body.aidant-mode .chat-message-sent {
    background: var(--role-primary);
    color: white;
}

/* Messages chat - reçus */
body.aidant-mode .chat-message-received {
    border-left: 3px solid var(--role-primary);
}

/* Checkbox / radio checked */
body.aidant-mode input[type="checkbox"]:checked,
body.aidant-mode input[type="radio"]:checked {
    accent-color: var(--role-primary);
}

/* Toggle / switch actif */
body.aidant-mode .peer-checked {
    background-color: var(--role-primary) !important;
}

/* Pagination active */
body.aidant-mode .pagination .active {
    background: var(--role-primary);
    color: white;
}

/* Focus outline */
body.aidant-mode *:focus-visible {
    outline-color: var(--role-primary);
}

/* ============================================
   THÈME ADMIN (GRIS + OR)
   ============================================ */

body.coordinateur-mode {
    --role-primary: #1E293B;
    --role-primary-dark: #0F172A;
    --role-primary-light: #E2E8F0;
    --role-secondary: #C9A84C;
    --role-accent: #A3C9A8;
    --role-text: #334155;
}

/* Boutons */
body.coordinateur-mode .btn-primary,
body.coordinateur-mode button[type="submit"],
body.coordinateur-mode .bg-emerald-500,
body.coordinateur-mode .bg-emerald-600,
body.coordinateur-mode .next-btn,
body.coordinateur-mode #btn-login,
body.coordinateur-mode .chat-input-send {
    background: var(--role-primary) !important;
}
body.coordinateur-mode .btn-primary:hover,
body.coordinateur-mode button[type="submit"]:hover {
    background: var(--role-primary-dark) !important;
}

/* Boutons secondaires (or) */
body.coordinateur-mode .btn-secondary {
    background: var(--role-secondary);
    color: #1E293B;
}

/* Liens et textes cliquables - OR */
body.coordinateur-mode a:not(.no-style),
body.coordinateur-mode .text-link,
body.coordinateur-mode .sidebar-link.active {
    color: var(--role-secondary) !important;
}

/* Bordures actives / focus - OR */
body.coordinateur-mode input:focus,
body.coordinateur-mode textarea:focus,
body.coordinateur-mode select:focus {
    border-color: var(--role-secondary) !important;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1) !important;
}

/* Badges */
body.coordinateur-mode .badge-dynamic {
    background: var(--role-primary-light);
    color: var(--role-primary);
}

/* Indicateur online - OR */
body.coordinateur-mode .online-dot {
    background: var(--role-secondary);
}

/* Onglet actif - OR */
body.coordinateur-mode .tab-active,
body.coordinateur-mode .nav-btn.active {
    color: var(--role-secondary) !important;
    border-bottom-color: var(--role-secondary) !important;
}

/* Messages chat - envoyés (gris) */
body.coordinateur-mode .chat-message-sent {
    background: var(--role-primary);
    color: white;
}

/* Messages chat - reçus (bordure or) */
body.coordinateur-mode .chat-message-received {
    border-left: 3px solid var(--role-secondary);
}

/* Checkbox / radio checked - OR */
body.coordinateur-mode input[type="checkbox"]:checked,
body.coordinateur-mode input[type="radio"]:checked {
    accent-color: var(--role-secondary);
}

/* Toggle / switch actif - OR */
body.coordinateur-mode .peer-checked {
    background-color: var(--role-secondary) !important;
}

/* Pagination active - OR */
body.coordinateur-mode .pagination .active {
    background: var(--role-secondary);
    color: #1E293B;
}

/* Focus outline - OR */
body.coordinateur-mode *:focus-visible {
    outline-color: var(--role-secondary);
}

/* Header navigation active */
body.coordinateur-mode .sidebar-link.active {
    background: var(--role-secondary) !important;
    color: #1E293B !important;
}



/* ============================================
   CHAT PLEIN ÉCRAN - SUPPRESSION DES MARGES
   ============================================ */

/* Forcer le conteneur principal à être plein écran */
body:has(.chat-whatsapp-container) {
    overflow: hidden !important;
}

/* Cibler spécifiquement quand le chat est ouvert */
.chat-whatsapp-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #efeae2 !important;
}

/* Supprimer les marges du parent main quand le chat est ouvert */
body:has(.chat-whatsapp-container) main,
body:has(.chat-whatsapp-container) #main-content,
body:has(.chat-whatsapp-container) .main-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
}

/* Supprimer les marges du view-container */
body:has(.chat-whatsapp-container) #view-container {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Cacher le footer mobile quand le chat est ouvert */
body:has(.chat-whatsapp-container) footer,
body:has(.chat-whatsapp-container) .fab-container {
    display: none !important;
}

/* Cacher la sidebar et le header quand le chat est ouvert */
body:has(.chat-whatsapp-container) aside,
body:has(.chat-whatsapp-container) header {
    display: none !important;
}


/* ============================================
   CORRECTION DES BULLES DE MESSAGE - TEXTE NON COUPÉ
   ============================================ */

/* Messages envoyés (à droite) */
.chat-message-sent,
.chat-message-received {
    padding: 10px 14px !important;
    border-radius: 18px !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* Texte dans les bulles */
.chat-message-sent p,
.chat-message-received p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: inherit !important;
    overflow-wrap: break-word !important;
    white-space: pre-wrap !important;
}

/* Conteneur des messages */
.chat-whatsapp-messages {
    padding: 16px !important;
    gap: 6px !important;
}

/* Chaque ligne de message */
.message-item {
    max-width: 85% !important;
    margin-bottom: 4px !important;
}

/* Messages courts comme "cc" */
.chat-message-sent:has(p:only-child:empty),
.chat-message-sent:has(p:only-child:contains('cc')),
.chat-message-sent:has(p:only-child:contains('ok')) {
    min-width: 50px !important;
    width: auto !important;
    display: inline-block !important;
}

/* Forcer les messages à avoir une hauteur adaptée au contenu */
.chat-message-sent br,
.chat-message-received br {
    display: block !important;
    content: "" !important;
    margin: 4px 0 !important;
}


/* ============================================
   CORRECTION DÉFINITIVE DES BULLES DE MESSAGE
   ============================================ */

/* Reset complet pour les messages */
.chat-message-sent,
.chat-message-received {
    display: inline-block !important;
    padding: 8px 14px !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    min-height: 36px !important;
    height: auto !important;
    max-width: 75% !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
}

/* Forcer les paragraphes à bien s'afficher */
.chat-message-sent p,
.chat-message-received p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    display: block !important;
}

/* Supprimer les espaces supplémentaires */
.chat-message-sent br,
.chat-message-received br {
    display: none;
}

/* Alignement vertical correct */
.message-item {
    display: flex !important;
    margin-bottom: 6px !important;
}

.message.sent {
    justify-content: flex-end !important;
}

.message.received {
    justify-content: flex-start !important;
}

/* Container des messages */
.chat-whatsapp-messages {
    padding: 12px 16px !important;
}









/* ============================================
   CORRECTION FINALE - BULLES COMPACTES
   ============================================ */

/* Réduction des espaces dans les bulles */
.chat-message-sent,
.chat-message-received {
    padding: 6px 12px !important;
    margin: 2px 0 !important;
    line-height: 1.3 !important;
    font-size: 13px !important;
}

/* Supprimer les marges internes */
.chat-message-sent p,
.chat-message-received p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

/* Espacement entre les messages */
.message-item {
    margin-bottom: 4px !important;
}

/* Messages très courts (ex: "cc") */
.chat-message-sent:has(span:only-child:empty),
.chat-message-sent:has(span:only-child:contains('c')),
.chat-message-sent:has(span:only-child:contains('cc')),
.chat-message-received:has(span:only-child:contains('c')),
.chat-message-received:has(span:only-child:contains('cc')) {
    padding: 4px 10px !important;
    min-height: 28px !important;
}


/* STYLES PRIORITAIRES POUR LE CHAT */
.chat-message-sent {
    background: var(--role-primary) !important;
    color: white !important;
    border-radius: 18px !important;
    border-bottom-right-radius: 4px !important;
    padding: 6px 12px !important;
    display: inline-block !important;
    max-width: 75% !important;
    word-break: break-word !important;
}

.chat-message-sent span {
    color: white !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    display: inline !important;
}

.chat-message-received {
    background: white !important;
    color: #1E293B !important;
    border-radius: 18px !important;
    border-bottom-left-radius: 4px !important;
    padding: 6px 12px !important;
    display: inline-block !important;
    max-width: 75% !important;
    word-break: break-word !important;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05) !important;
}

.chat-message-received span {
    color: #1E293B !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    display: inline !important;
}

/* Alignement des messages */
.flex.justify-end {
    justify-content: flex-end !important;
}

.flex.items-start {
    justify-content: flex-start !important;
}



/* ============================================
   BARRE DE SÉLECTION DE VISIBILITÉ
   ============================================ */

.chat-visibility-bar {
    background: #202c33;
    padding: 8px 16px;
    border-bottom: 1px solid #2a3942;
    flex-shrink: 0;
}

.visibility-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

.visibility-btn:active {
    transform: scale(0.95);
}

/* Barre de sélection de visibilité */
.chat-visibility-bar {
    background: #202c33;
    padding: 8px 16px;
    border-bottom: 1px solid #2a3942;
    flex-shrink: 0;
}

.visibility-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

.visibility-btn:active {
    transform: scale(0.95);
}

/* Force l'affichage des émojis */
body, .maman-dashboard-container, .chat-whatsapp-messages {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

/* Style pour les icônes FontAwesome */
.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular {
    font-family: "Font Awesome 6 Free" !important;
}












/* ============================================
   THÈME COORDINATEUR (OR EN PREMIER PLAN)
   ============================================ */

body.coordinateur-mode {
    --role-primary: #D4AF37;
    --role-primary-dark: #B8942E;
    --role-primary-light: #FEF9E6;
}

/* ============================================
   1. PAGE D'ACCUEIL - BANNIÈRE & FONDS
   ============================================ */

/* Bannière de bienvenue (tout en haut) */
body.coordinateur-mode .bg-gradient-to-r,
body.coordinateur-mode [class*="bg-gradient-to-r"] {
    background: linear-gradient(135deg, #D4AF37 0%, #B8942E 100%) !important;
    color: #0F172A !important;
}

/* Fonds des blocs / cartes / bentos */
body.coordinateur-mode .bg-white,
body.coordinateur-mode .bg-white.rounded-xl,
body.coordinateur-mode .bg-white.rounded-2xl,
body.coordinateur-mode .dashboard-card,
body.coordinateur-mode .bento-card,
body.coordinateur-mode .patient-card-modern,
body.coordinateur-mode .menu-tile {
    background: white !important;
}

/* Fonds verts clairs → beige */
body.coordinateur-mode .bg-emerald-50,
body.coordinateur-mode .bg-green-50,
body.coordinateur-mode .bg-emerald-100,
body.coordinateur-mode [class*="bg-emerald-"]:not(.bg-emerald-500):not(.bg-emerald-600) {
    background: #FEF9E6 !important;
}

/* ============================================
   2. BLOC D'INFORMATION RAPIDE (carte info)
   ============================================ */

body.coordinateur-mode .bg-emerald-50.p-4.rounded-xl,
body.coordinateur-mode .bg-slate-50.p-4.rounded-xl {
    background: #FEF9E6 !important;
    border: 1px solid #D4AF37 !important;
}

body.coordinateur-mode .text-emerald-600,
body.coordinateur-mode .text-emerald-700,
body.coordinateur-mode .text-green-600 {
    color: #D4AF37 !important;
}

/* ============================================
   3. DASHBOARD - CARTES STATS
   ============================================ */

body.coordinateur-mode .dashboard-card {
    border-top: 3px solid #D4AF37 !important;
}

body.coordinateur-mode .dashboard-card-stat {
    color: #D4AF37 !important;
    font-size: 28px !important;
    font-weight: 800 !important;
}

body.coordinateur-mode .dashboard-card-icon {
    background: #FEF9E6 !important;
}

body.coordinateur-mode .dashboard-card-icon i {
    color: #D4AF37 !important;
}

/* ============================================
   4. JOURNAL (FEED) - CARTES DE MESSAGES
   ============================================ */

body.coordinateur-mode .message-card,
body.coordinateur-mode .bg-white.rounded-2xl.p-5 {
    background: white !important;
    border: 1px solid #E2E8F0 !important;
}

body.coordinateur-mode .chat-message-sent {
    background: #D4AF37 !important;
    color: #0F172A !important;
}

body.coordinateur-mode .chat-message-received {
    border-left: 3px solid #D4AF37 !important;
}

/* ============================================
   5. VISITES - CARTES
   ============================================ */

body.coordinateur-mode .visit-card,
body.coordinateur-mode .bg-white.rounded-2xl {
    background: white !important;
    border: 1px solid #E2E8F0 !important;
}

body.coordinateur-mode .status-pill.validated {
    background: #FEF9E6 !important;
    color: #D4AF37 !important;
    border: 1px solid #D4AF37 !important;
}

/* ============================================
   6. COMMANDES - CARTES
   ============================================ */

body.coordinateur-mode .commande-card,
body.coordinateur-mode .bg-white.rounded-2xl {
    background: white !important;
    border: 1px solid #E2E8F0 !important;
}

/* ============================================
   7. PLANNING - CARTES
   ============================================ */

body.coordinateur-mode .planning-card,
body.coordinateur-mode .bg-white.rounded-xl {
    background: white !important;
    border-left: 4px solid #D4AF37 !important;
}

/* ============================================
   8. BENTOS (grille d'accueil)
   ============================================ */

body.coordinateur-mode .bento-card {
    background: white !important;
    border: 1px solid #E2E8F0 !important;
    border-top: 3px solid #D4AF37 !important;
}

body.coordinateur-mode .bento-card i {
    color: #D4AF37 !important;
}

body.coordinateur-mode .bento-card:hover {
    border-top: 3px solid #E5C65C !important;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.12) !important;
}

/* ============================================
   9. BOUTONS PRINCIPAUX
   ============================================ */

body.coordinateur-mode .btn-primary,
body.coordinateur-mode button[type="submit"],
body.coordinateur-mode .next-btn,
body.coordinateur-mode #btn-login,
body.coordinateur-mode .chat-input-send {
    background: #D4AF37 !important;
    color: #0F172A !important;
}

body.coordinateur-mode .btn-primary:hover {
    background: #C9A84C !important;
}

/* ============================================
   10. SIDEBAR & NAVIGATION
   ============================================ */

body.coordinateur-mode .sidebar-link.active {
    background: #D4AF37 !important;
    color: #0F172A !important;
}

body.coordinateur-mode .nav-btn.active {
    color: #D4AF37 !important;
}

/* ============================================
   11. BADGES & TAGS
   ============================================ */

body.coordinateur-mode .badge-dynamic,
body.coordinateur-mode .badge-primary,
body.coordinateur-mode .status-pill {
    background: #FEF9E6 !important;
    color: #D4AF37 !important;
    border: 1px solid #D4AF37 !important;
}

body.coordinateur-mode #notification-badge,
body.coordinateur-mode .menu-badge {
    background: #D4AF37 !important;
    color: #0F172A !important;
}










/* ============================================
   THÈME AIDANT (OR DOUX EN PREMIER PLAN)
   ============================================ */

body.aidant-mode {
    --role-primary: #C9A84C;
    --role-primary-dark: #B8942E;
    --role-primary-light: #FEF9E6;
}

/* Bannière */
body.aidant-mode .bg-gradient-to-r {
    background: linear-gradient(135deg, #C9A84C 0%, #B8942E 100%) !important;
    color: #0F172A !important;
}

/* Fonds verts clairs */
body.aidant-mode .bg-emerald-50,
body.aidant-mode .bg-green-50 {
    background: #FEF9E6 !important;
}

/* Cartes stats */
body.aidant-mode .dashboard-card {
    border-top: 3px solid #C9A84C !important;
}

body.aidant-mode .dashboard-card-stat {
    color: #C9A84C !important;
}

body.aidant-mode .dashboard-card-icon {
    background: #FEF9E6 !important;
}

body.aidant-mode .dashboard-card-icon i {
    color: #C9A84C !important;
}

/* Chat */
body.aidant-mode .chat-message-sent {
    background: #C9A84C !important;
    color: #0F172A !important;
}

body.aidant-mode .chat-message-received {
    border-left: 3px solid #C9A84C !important;
}

/* Boutons */
body.aidant-mode .btn-primary,
body.aidant-mode button[type="submit"] {
    background: #C9A84C !important;
    color: #0F172A !important;
}

/* Badges */
body.aidant-mode .badge-dynamic {
    background: #FEF9E6 !important;
    color: #C9A84C !important;
    border: 1px solid #C9A84C !important;
}

/* Sidebar */
body.aidant-mode .sidebar-link.active {
    background: #C9A84C !important;
    color: #0F172A !important;
}

/* Navigation */
body.aidant-mode .nav-btn.active {
    color: #C9A84C !important;
}

/* Planning */
body.aidant-mode .planning-card {
    border-left: 4px solid #C9A84C !important;
}



/* ============================================
   THÈME MAMAN (ROSE ÉLÉGANT - SANS SURCHARGE)
   ============================================ */

body.maman-mode {
    --role-primary: #E11D48;
    --role-primary-dark: #BE123C;
    --role-primary-light: #FFF1F2;
    --role-secondary: #F43F5E;
    --role-text: #881337;
}

/* ============================================
   1. BOUTONS (rose vif)
   ============================================ */

body.maman-mode .btn-primary,
body.maman-mode button[type="submit"],
body.maman-mode .next-btn,
body.maman-mode #btn-login,
body.maman-mode .chat-input-send,
body.maman-mode .bg-emerald-500,
body.maman-mode .bg-emerald-600 {
    background: #E11D48 !important;
    color: white !important;
}

body.maman-mode .btn-primary:hover {
    background: #BE123C !important;
}

/* ============================================
   2. STATISTIQUES (chiffres en rose)
   ============================================ */

body.maman-mode .dashboard-card-stat,
body.maman-mode .stat-number {
    color: #E11D48 !important;
}

/* ============================================
   3. BANNIÈRE DASHBOARD MAMAN (dégradé rose)
   ============================================ */

body.maman-mode .maman-header {
    background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%) !important;
}

/* ============================================
   4. CARTES MÉTRIQUES (bordure rose subtile)
   ============================================ */

body.maman-mode .maman-metric-card {
    border-top: 3px solid #E11D48 !important;
    background: white !important;
}

body.maman-mode .maman-metric-card i {
    color: #E11D48 !important;
}

/* ============================================
   5. BADGES (rose sur fond clair)
   ============================================ */

body.maman-mode .badge-dynamic,
body.maman-mode .badge-primary {
    background: #FFF1F2 !important;
    color: #E11D48 !important;
    border: 1px solid #FCE7F3 !important;
}

/* ============================================
   6. PROCHAINE VISITE (carte avec accent rose)
   ============================================ */

body.maman-mode .maman-next-visit {
    border-left: 4px solid #E11D48 !important;
}

body.maman-mode .maman-next-visit .text-pink-600 {
    color: #E11D48 !important;
}

/* ============================================
   7. PACKS (bordure rose sur le populaire)
   ============================================ */

body.maman-mode .maman-pack-card {
    border: 1px solid #FCE7F3 !important;
}

body.maman-mode .maman-pack-card.border-pink-200 {
    border-color: #F43F5E !important;
    background: #FFF1F2 !important;
}

/* ============================================
   8. NAVIGATION RAPIDE (icônes roses)
   ============================================ */

body.maman-mode .maman-nav-btn i {
    color: #E11D48 !important;
}

body.maman-mode .maman-nav-btn:active {
    background: #FFF1F2 !important;
}

/* ============================================
   9. CHAT MAMAN (messages envoyés roses)
   ============================================ */

body.maman-mode .chat-message-sent {
    background: #E11D48 !important;
    color: white !important;
}

body.maman-mode .chat-message-received {
    border-left: 3px solid #E11D48 !important;
}

/* ============================================
   10. SIDEBAR ACTIF (rose)
   ============================================ */

body.maman-mode .sidebar-link.active {
    background: #E11D48 !important;
    color: white !important;
}

body.maman-mode .nav-btn.active {
    color: #E11D48 !important;
}

/* ============================================
   11. PROGRESS BAR (rose)
   ============================================ */

body.maman-mode .progress-bar-fill {
    background: #E11D48 !important;
}

/* ============================================
   12. CHECKBOX & RADIO (rose)
   ============================================ */

body.maman-mode input[type="checkbox"]:checked,
body.maman-mode input[type="radio"]:checked {
    accent-color: #E11D48 !important;
}






/* Bouton installer dans le drawer */
.install-drawer-btn {
    transition: all 0.2s ease;
}

.install-drawer-btn:active {
    transform: scale(0.98);
}

/* Pour le thème Maman */
body.maman-mode .install-drawer-btn {
    background: #FFF1F2 !important;
    color: #E11D48 !important;
}

/* Pour le thème Senior */
body.senior-mode .install-drawer-btn {
    background: #ECFDF5 !important;
    color: #059669 !important;
}

/* Pour le thème Coordinateur (or) */
body.coordinateur-mode .install-drawer-btn {
    background: #FEF9E6 !important;
    color: #D4AF37 !important;
}

/* Pour le thème Aidant */
body.aidant-mode .install-drawer-btn {
    background: #FEF9E6 !important;
    color: #C9A84C !important;
}









/* Correction Font Awesome local */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    src: url('/assets/fontawesome/webfonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fontawesome/webfonts/fa-regular-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fontawesome/webfonts/fa-brands-400.woff2') format('woff2');
}

.fa, .fas, .fa-solid {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.far, .fa-regular {
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
}

.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}


/* Forcer l'affichage des icônes immédiatement */
i, .fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Éviter le flash d'icônes cassées */
body:not(.fontawesome-loaded) i[class*="fa-"] {
    visibility: hidden;
}









/* Fallback pour les icônes cassées - remplacement par des équivalents solides */
.fa-folder-open:before,
.fa-folder:before {
    content: "\f07b" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-file-alt:before,
.fa-file-lines:before {
    content: "\f15c" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-chart-line:before {
    content: "\f201" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-calendar-check:before {
    content: "\f274" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-box:before {
    content: "\f466" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-receipt:before {
    content: "\f543" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-ticket:before {
    content: "\f3ff" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-user-circle:before {
    content: "\f2bd" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-chart-pie:before {
    content: "\f200" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-users:before {
    content: "\f0c0" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-location-dot:before {
    content: "\f3c5" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-newspaper:before {
    content: "\f1ea" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-calendar-days:before {
    content: "\f073" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-user-nurse:before {
    content: "\f82f" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}



/* Forcer le chargement des polices pour les icônes solides */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    src: url('/assets/fontawesome/webfonts/fa-solid-900.woff2') format('woff2');
    font-display: block;
}

/* S'assurer que les icônes solides utilisent la bonne police */
.fa-solid, .fas, .fa-chart-line, .fa-seedling, .fa-crown {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}


/* CORRECTION FORCÉE FONT AWESOME */
.fa,
.fas,
.far,
.fal,
.fad,
.fab,
.fa-solid,
.fa-regular,
.fa-brands,
.fa-chart-line,
.fa-seedling,
.fa-crown,
.fa-chart-simple,
.fa-arrow-trend-up {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

.fa-regular,
.far {
    font-weight: 400 !important;
}

.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Forcer l'affichage des icônes spécifiques */
.fa-chart-line:before {
    content: "\f201" !important;
}

.fa-seedling:before {
    content: "\f4d8" !important;
}

.fa-crown:before {
    content: "\f521" !important;
}


/* SOLUTION DÉFINITIVE POUR LES ICÔNES CASSÉES */
.fa-chart-line:before {
    content: "\f201" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-seedling:before {
    content: "\f4d8" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-crown:before {
    content: "\f521" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-chart-simple:before {
    content: "\f201" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-arrow-trend-up:before {
    content: "\f201" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-box:before {
    content: "\f466" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-calendar-check:before {
    content: "\f274" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-newspaper:before {
    content: "\f1ea" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    display: inline-block !important;
}

.fa-location-dot:before {
    content: "\f3c5" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-receipt:before {
    content: "\f543" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    display: inline-block !important;
}

.fa-ticket:before {
    content: "\f3ff" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-user-circle:before {
    content: "\f2bd" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    display: inline-block !important;
}

.fa-user-nurse:before {
    content: "\f82f" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-chart-pie:before {
    content: "\f200" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-users:before {
    content: "\f0c0" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}







/* CORRECTION DÉFINITIVE POUR TOUTES LES ICÔNES MANQUANTES */

/* Icône Facture dans le menu */
.fa-receipt:before {
    content: "\f543" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Icône Dossier / Badge Confort */
.fa-chart-line:before {
    content: "\f201" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Badge Essentiel / Régulier */
.fa-seedling:before {
    content: "\f4d8" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Badge Sérénité / Premium */
.fa-crown:before {
    content: "\f521" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Abonnement */
.fa-ticket:before {
    content: "\f3ff" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Journal / Feed */
.fa-newspaper:before {
    content: "\f1ea" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Icône Visites */
.fa-calendar-check:before {
    content: "\f274" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Commandes */
.fa-box:before {
    content: "\f466" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Planning */
.fa-calendar-days:before {
    content: "\f073" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Icône Localisation */
.fa-location-dot:before {
    content: "\f3c5" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Profil */
.fa-user-circle:before {
    content: "\f2bd" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Icône Dashboard */
.fa-chart-pie:before {
    content: "\f200" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Aidants */
.fa-user-nurse:before {
    content: "\f82f" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône RH */
.fa-users:before {
    content: "\f0c0" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Icône Dossier (dans la liste des patients) */
.fa-folder-open:before {
    content: "\f07c" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}



/* 1. Icône de la tuile FACTURE dans la page d'accueil (bento) */
.fa-receipt:before {
    content: "\f543" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* 2. Icône du badge CONFORT dans les dossiers patients */
.fa-chart-line:before {
    content: "\f201" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* 2b. Icône du badge ESSENTIEL / REGULIER */
.fa-seedling:before {
    content: "\f4d8" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* 2c. Icône du badge SERENITE / PREMIUM */
.fa-crown:before {
    content: "\f521" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}


/* Supprimer les bordures noires sur les images de login */
#auth-logo-img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}



/* Onboarding - Couleurs du thème */
.onboarding-dot.active {
    background: var(--role-primary, #10B981) !important;
    width: 24px !important;
}

.onboarding-dot {
    background: #E2E8F0 !important;
    transition: all 0.3s ease;
}

/* Bouton de l'onboarding */
.onboarding-next-btn {
    background: var(--role-primary, #10B981) !important;
    color: white !important;
}

.onboarding-next-btn:hover {
    background: var(--role-primary-dark, #047857) !important;
    transform: scale(1.02);
}

.onboarding-skip-btn {
    color: var(--role-primary, #10B981) !important;
}

.onboarding-skip-btn:hover {
    color: var(--role-primary-dark, #047857) !important;
}
