:root { --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom); --safe-left: env(safe-area-inset-left); --safe-right: env(safe-area-inset-right); }

/* Theme Sombre par defaut */
[data-theme="dark"] { 
    --bg-primary: #191919; 
    --bg-secondary: #202020; 
    --bg-card: #252525; 
    --bg-elevated: #2f2f2f; 
    --bg-input: #2a2a2a; 
    --text-primary: #ebebeb; 
    --text-secondary: #9b9b9b; 
    --text-muted: #6b6b6b; 
    --border: rgba(255, 255, 255, 0.08); 
    --border-hover: rgba(255, 255, 255, 0.16); 
    --accent: #ebebeb; 
    --accent-contrast: #191919;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4); 
    --header-bg: rgba(25, 25, 25, 0.95);
    --notion-gray: rgba(151, 151, 151, 0.4);
    --notion-brown: rgba(186, 133, 111, 0.4);
    --notion-orange: rgba(215, 129, 58, 0.4);
    --notion-yellow: rgba(203, 173, 82, 0.4);
    --notion-green: rgba(108, 174, 117, 0.4);
    --notion-blue: rgba(82, 148, 226, 0.4);
    --notion-purple: rgba(154, 109, 215, 0.4);
    --notion-pink: rgba(211, 115, 165, 0.4);
    --notion-red: rgba(223, 84, 82, 0.4);
    --notion-gray-text: #d0d0d0;
    --notion-brown-text: #e0b8a0;
    --notion-orange-text: #f0a060;
    --notion-yellow-text: #e8d080;
    --notion-green-text: #90d898;
    --notion-blue-text: #80c0ff;
    --notion-purple-text: #c8a8f0;
    --notion-pink-text: #f0a0c8;
    --notion-red-text: #f08080;
}

/* === THEMES LIGHT === */

/* Light Classique - Blanc gris noir */
[data-theme="light"] { 
    --bg-primary: #f5f5f5; 
    --bg-secondary: #fafafa; 
    --bg-card: #ffffff; 
    --bg-elevated: #eeeeee; 
    --bg-input: #ffffff; 
    --text-primary: #212121; 
    --text-secondary: #616161; 
    --text-muted: #9e9e9e; 
    --border: rgba(0, 0, 0, 0.12); 
    --border-hover: rgba(0, 0, 0, 0.24); 
    --accent: #424242; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08); 
    --header-bg: rgba(245, 245, 245, 0.98);
    --notion-gray: rgba(158, 158, 158, 0.2);
    --notion-brown: rgba(161, 136, 127, 0.2);
    --notion-orange: rgba(255, 167, 38, 0.2);
    --notion-yellow: rgba(255, 235, 59, 0.25);
    --notion-green: rgba(102, 187, 106, 0.2);
    --notion-blue: rgba(66, 165, 245, 0.2);
    --notion-purple: rgba(171, 71, 188, 0.2);
    --notion-pink: rgba(236, 64, 122, 0.2);
    --notion-red: rgba(239, 83, 80, 0.2);
    --notion-gray-text: #424242;
    --notion-brown-text: #5d4037;
    --notion-orange-text: #e65100;
    --notion-yellow-text: #f9a825;
    --notion-green-text: #2e7d32;
    --notion-blue-text: #1565c0;
    --notion-purple-text: #7b1fa2;
    --notion-pink-text: #c2185b;
    --notion-red-text: #c62828;
}

/* Bolting - Dégradé turquoise → bleu */
[data-theme="bolting"] {
    --bg-primary: #f0f9f8;
    --bg-secondary: #f5fbfa;
    --bg-card: #ffffff;
    --bg-elevated: #e5f4f2;
    --bg-input: #ffffff;
    --text-primary: #1a3a4a;
    --text-secondary: #3a6070;
    --text-muted: #6a9098;
    --border: rgba(45, 184, 166, 0.2);
    --border-hover: rgba(45, 184, 166, 0.4);
    --accent: #2db8a6;
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(45, 184, 166, 0.12);
    --header-bg: rgba(240, 249, 248, 0.98);
    --notion-gray: rgba(100, 140, 150, 0.2);
    --notion-brown: rgba(161, 136, 127, 0.2);
    --notion-orange: rgba(234, 120, 50, 0.18);
    --notion-yellow: rgba(234, 179, 8, 0.2);
    --notion-green: rgba(45, 184, 166, 0.2);
    --notion-blue: rgba(59, 130, 216, 0.18);
    --notion-purple: rgba(124, 100, 200, 0.18);
    --notion-pink: rgba(219, 100, 140, 0.15);
    --notion-red: rgba(220, 80, 80, 0.18);
    --notion-gray-text: #4a6a7a;
    --notion-brown-text: #78450f;
    --notion-orange-text: #c25a0c;
    --notion-yellow-text: #a16207;
    --notion-green-text: #1a8a78;
    --notion-blue-text: #2a70b8;
    --notion-purple-text: #5a4a9a;
    --notion-pink-text: #b8406a;
    --notion-red-text: #c03030;
}

/* Zen Pastel - Turquoise apaisant */
[data-theme="zen-pastel"] { 
    --bg-primary: #e0f0ed; 
    --bg-secondary: #eaf5f3; 
    --bg-card: #f0f8f6; 
    --bg-elevated: #d5ebe7; 
    --bg-input: #f5faf9; 
    --text-primary: #2d4a47; 
    --text-secondary: #4a6a66; 
    --text-muted: #6a8a86; 
    --border: rgba(107, 178, 168, 0.3); 
    --border-hover: rgba(107, 178, 168, 0.5); 
    --accent: #5a9f95; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(107, 178, 168, 0.15); 
    --header-bg: rgba(224, 240, 237, 0.98);
    --notion-gray: rgba(107, 178, 168, 0.2);
    --notion-brown: rgba(186, 160, 140, 0.25);
    --notion-orange: rgba(230, 160, 100, 0.25);
    --notion-yellow: rgba(220, 200, 120, 0.3);
    --notion-green: rgba(107, 178, 148, 0.25);
    --notion-blue: rgba(107, 158, 178, 0.25);
    --notion-purple: rgba(158, 138, 188, 0.25);
    --notion-pink: rgba(198, 148, 168, 0.25);
    --notion-red: rgba(198, 118, 118, 0.25);
    --notion-gray-text: #3a5a56;
    --notion-brown-text: #5a4535;
    --notion-orange-text: #8a5025;
    --notion-yellow-text: #6a5818;
    --notion-green-text: #2a5a3a;
    --notion-blue-text: #2a4a6a;
    --notion-purple-text: #4a3a6a;
    --notion-pink-text: #7a3a5a;
    --notion-red-text: #8a3a3a;
}

/* The Vert - Vert menthe doux */
[data-theme="the-vert"] { 
    --bg-primary: #e2f0e2; 
    --bg-secondary: #ecf5ec; 
    --bg-card: #f2f8f2; 
    --bg-elevated: #d5e8d5; 
    --bg-input: #f6faf6; 
    --text-primary: #2d4a3a; 
    --text-secondary: #4a6a5a; 
    --text-muted: #6a8a7a; 
    --border: rgba(100, 160, 120, 0.3); 
    --border-hover: rgba(100, 160, 120, 0.5); 
    --accent: #5fa878; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(140, 190, 160, 0.15); 
    --header-bg: rgba(226, 240, 226, 0.98);
    --notion-gray: rgba(140, 170, 150, 0.2);
    --notion-brown: rgba(170, 150, 130, 0.25);
    --notion-orange: rgba(210, 170, 120, 0.25);
    --notion-yellow: rgba(200, 190, 130, 0.3);
    --notion-green: rgba(100, 170, 120, 0.3);
    --notion-blue: rgba(120, 160, 180, 0.25);
    --notion-purple: rgba(150, 140, 180, 0.25);
    --notion-pink: rgba(190, 150, 170, 0.25);
    --notion-red: rgba(190, 130, 130, 0.25);
    --notion-gray-text: #3a5a4a;
    --notion-brown-text: #5a4a3a;
    --notion-orange-text: #8a5a2a;
    --notion-yellow-text: #6a6020;
    --notion-green-text: #2a6a3a;
    --notion-blue-text: #2a4a6a;
    --notion-purple-text: #4a3a6a;
    --notion-pink-text: #7a4a5a;
    --notion-red-text: #8a4a4a;
}

/* Rose Poudre - Rose delicat */
[data-theme="rose-poudre"] { 
    --bg-primary: #f5e8e8; 
    --bg-secondary: #f9efef; 
    --bg-card: #fcf5f5; 
    --bg-elevated: #f0dede; 
    --bg-input: #fdf8f8; 
    --text-primary: #4a3a3e; 
    --text-secondary: #6a5a5e; 
    --text-muted: #8a7a7e; 
    --border: rgba(200, 140, 150, 0.3); 
    --border-hover: rgba(200, 140, 150, 0.5); 
    --accent: #c48a95; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(200, 160, 170, 0.15); 
    --header-bg: rgba(245, 232, 232, 0.98);
    --notion-gray: rgba(180, 160, 165, 0.2);
    --notion-brown: rgba(180, 150, 140, 0.25);
    --notion-orange: rgba(220, 170, 140, 0.25);
    --notion-yellow: rgba(220, 200, 150, 0.3);
    --notion-green: rgba(160, 190, 160, 0.25);
    --notion-blue: rgba(160, 170, 200, 0.25);
    --notion-purple: rgba(180, 160, 200, 0.25);
    --notion-pink: rgba(210, 160, 180, 0.3);
    --notion-red: rgba(210, 140, 140, 0.25);
    --notion-gray-text: #4a3a3e;
    --notion-brown-text: #5a4030;
    --notion-orange-text: #8a5030;
    --notion-yellow-text: #7a6020;
    --notion-green-text: #3a6a3a;
    --notion-blue-text: #3a4a7a;
    --notion-purple-text: #5a3a7a;
    --notion-pink-text: #8a3a5a;
    --notion-red-text: #8a3a3a;
}

/* Lavande Douce - Lavande relaxante */
[data-theme="lavande-douce"] { 
    --bg-primary: #ebe6f2; 
    --bg-secondary: #f2eef8; 
    --bg-card: #f6f3fa; 
    --bg-elevated: #e0d8ec; 
    --bg-input: #f8f6fc; 
    --text-primary: #3e3a4a; 
    --text-secondary: #5a5a6a; 
    --text-muted: #7a7a8a; 
    --border: rgba(150, 130, 180, 0.3); 
    --border-hover: rgba(150, 130, 180, 0.5); 
    --accent: #9080b0; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(170, 160, 200, 0.15); 
    --header-bg: rgba(235, 230, 242, 0.98);
    --notion-gray: rgba(160, 155, 175, 0.2);
    --notion-brown: rgba(170, 150, 140, 0.25);
    --notion-orange: rgba(210, 170, 140, 0.25);
    --notion-yellow: rgba(210, 200, 150, 0.3);
    --notion-green: rgba(150, 185, 160, 0.25);
    --notion-blue: rgba(150, 165, 200, 0.25);
    --notion-purple: rgba(160, 140, 200, 0.3);
    --notion-pink: rgba(200, 160, 190, 0.25);
    --notion-red: rgba(200, 140, 150, 0.25);
    --notion-gray-text: #4a4a5a;
    --notion-brown-text: #5a4a3a;
    --notion-orange-text: #8a5a3a;
    --notion-yellow-text: #6a6030;
    --notion-green-text: #3a6a4a;
    --notion-blue-text: #3a4a7a;
    --notion-purple-text: #5a3a8a;
    --notion-pink-text: #7a3a6a;
    --notion-red-text: #8a3a4a;
}

/* Terre Douce - Beige naturel */
[data-theme="terre-douce"] { 
    --bg-primary: #f0ebe2; 
    --bg-secondary: #f5f0e8; 
    --bg-card: #f8f5ef; 
    --bg-elevated: #e8e0d5; 
    --bg-input: #faf8f4; 
    --text-primary: #4a4540; 
    --text-secondary: #6a6560; 
    --text-muted: #8a8580; 
    --border: rgba(180, 165, 140, 0.35); 
    --border-hover: rgba(180, 165, 140, 0.55); 
    --accent: #b0a080; 
    --accent-contrast: #4a4540;
    --shadow-card: 0 2px 12px rgba(190, 180, 160, 0.15); 
    --header-bg: rgba(240, 235, 226, 0.98);
    --notion-gray: rgba(170, 165, 155, 0.22);
    --notion-brown: rgba(180, 155, 130, 0.28);
    --notion-orange: rgba(210, 170, 130, 0.28);
    --notion-yellow: rgba(210, 195, 140, 0.3);
    --notion-green: rgba(160, 180, 150, 0.25);
    --notion-blue: rgba(150, 165, 185, 0.25);
    --notion-purple: rgba(170, 155, 185, 0.25);
    --notion-pink: rgba(195, 160, 170, 0.25);
    --notion-red: rgba(195, 145, 140, 0.25);
    --notion-gray-text: #4a4540;
    --notion-brown-text: #5a4530;
    --notion-orange-text: #8a5520;
    --notion-yellow-text: #6a5a18;
    --notion-green-text: #3a5a38;
    --notion-blue-text: #3a4868;
    --notion-purple-text: #4a3a68;
    --notion-pink-text: #7a4050;
    --notion-red-text: #8a4038;
}

/* Ciel Doux - Bleu ciel apaisant */
[data-theme="ciel-doux"] { 
    --bg-primary: #e0eef5; 
    --bg-secondary: #eaf4f8; 
    --bg-card: #f0f7fa; 
    --bg-elevated: #d5e8f0; 
    --bg-input: #f5fafc; 
    --text-primary: #2a4050; 
    --text-secondary: #4a6070; 
    --text-muted: #6a8090; 
    --border: rgba(100, 150, 190, 0.3); 
    --border-hover: rgba(100, 150, 190, 0.5); 
    --accent: #6a9fc0; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(100, 150, 190, 0.15); 
    --header-bg: rgba(224, 238, 245, 0.98);
    --notion-gray: rgba(120, 150, 170, 0.2);
    --notion-brown: rgba(160, 140, 130, 0.25);
    --notion-orange: rgba(200, 160, 120, 0.25);
    --notion-yellow: rgba(200, 190, 130, 0.3);
    --notion-green: rgba(130, 180, 150, 0.25);
    --notion-blue: rgba(100, 150, 190, 0.3);
    --notion-purple: rgba(150, 140, 190, 0.25);
    --notion-pink: rgba(190, 150, 170, 0.25);
    --notion-red: rgba(190, 130, 130, 0.25);
    --notion-gray-text: #3a5060;
    --notion-brown-text: #5a4a3a;
    --notion-orange-text: #8a5a30;
    --notion-yellow-text: #6a6020;
    --notion-green-text: #3a6a4a;
    --notion-blue-text: #2a5080;
    --notion-purple-text: #4a4080;
    --notion-pink-text: #7a4060;
    --notion-red-text: #8a4040;
}

/* Malibu - Rose corail chaud */
[data-theme="malibu"] { 
    --bg-primary: #fce8ea; 
    --bg-secondary: #fdf0f1; 
    --bg-card: #fef5f6; 
    --bg-elevated: #f8d8dc; 
    --bg-input: #fef8f8; 
    --text-primary: #5a4045; 
    --text-secondary: #7a5a60; 
    --text-muted: #9a7a80; 
    --border: rgba(255, 150, 160, 0.35); 
    --border-hover: rgba(255, 150, 160, 0.55); 
    --accent: #f0909a; 
    --accent-contrast: #ffffff;
    --shadow-card: 0 2px 12px rgba(255, 176, 181, 0.2); 
    --header-bg: rgba(252, 232, 234, 0.98);
    --notion-gray: rgba(200, 180, 182, 0.22);
    --notion-brown: rgba(200, 165, 155, 0.28);
    --notion-orange: rgba(249, 200, 170, 0.35);
    --notion-yellow: rgba(249, 220, 180, 0.35);
    --notion-green: rgba(180, 210, 185, 0.28);
    --notion-blue: rgba(180, 195, 220, 0.28);
    --notion-purple: rgba(200, 180, 210, 0.28);
    --notion-pink: rgba(255, 180, 190, 0.4);
    --notion-red: rgba(255, 160, 165, 0.35);
    --notion-gray-text: #4a4245;
    --notion-brown-text: #5a4238;
    --notion-orange-text: #8a5830;
    --notion-yellow-text: #6a5520;
    --notion-green-text: #3a5a3a;
    --notion-blue-text: #3a4568;
    --notion-purple-text: #5a3a68;
    --notion-pink-text: #8a3a50;
    --notion-red-text: #8a3a3a;
}

/* === THEMES DARK APAISANTS === */

/* Ocean Nuit - Bleu profond */
[data-theme="ocean-nuit"] { 
    --bg-primary: #1a2a30; 
    --bg-secondary: #1f3038; 
    --bg-card: #243840; 
    --bg-elevated: #2a4048; 
    --bg-input: #1f3038; 
    --text-primary: #e0f0f0; 
    --text-secondary: #90b0b8; 
    --text-muted: #608088; 
    --border: rgba(100, 160, 180, 0.15); 
    --border-hover: rgba(100, 160, 180, 0.3); 
    --accent: #70b0c0; 
    --accent-contrast: #1a2a30;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3); 
    --header-bg: rgba(26, 42, 48, 0.95);
    --notion-gray: rgba(120, 150, 160, 0.3);
    --notion-brown: rgba(160, 130, 110, 0.3);
    --notion-orange: rgba(200, 140, 90, 0.3);
    --notion-yellow: rgba(200, 180, 100, 0.35);
    --notion-green: rgba(100, 170, 130, 0.35);
    --notion-blue: rgba(90, 150, 190, 0.35);
    --notion-purple: rgba(140, 120, 180, 0.3);
    --notion-pink: rgba(180, 120, 150, 0.3);
    --notion-red: rgba(190, 110, 110, 0.3);
    --notion-gray-text: #b0c8d0;
    --notion-brown-text: #d0b8a0;
    --notion-orange-text: #e8b070;
    --notion-yellow-text: #e0d090;
    --notion-green-text: #80d0a0;
    --notion-blue-text: #80c0e0;
    --notion-purple-text: #b8a0e0;
    --notion-pink-text: #e0a0c0;
    --notion-red-text: #e09090;
}

/* Foret Profonde - Vert nature */
[data-theme="foret-profonde"] { 
    --bg-primary: #1a2820; 
    --bg-secondary: #1f3028; 
    --bg-card: #243830; 
    --bg-elevated: #2a4038; 
    --bg-input: #1f3028; 
    --text-primary: #e0f0e8; 
    --text-secondary: #90b0a0; 
    --text-muted: #608070; 
    --border: rgba(100, 160, 130, 0.15); 
    --border-hover: rgba(100, 160, 130, 0.3); 
    --accent: #70b890; 
    --accent-contrast: #1a2820;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3); 
    --header-bg: rgba(26, 40, 32, 0.95);
    --notion-gray: rgba(120, 150, 140, 0.3);
    --notion-brown: rgba(160, 140, 110, 0.3);
    --notion-orange: rgba(200, 150, 100, 0.3);
    --notion-yellow: rgba(200, 190, 110, 0.35);
    --notion-green: rgba(100, 180, 130, 0.4);
    --notion-blue: rgba(100, 150, 180, 0.3);
    --notion-purple: rgba(140, 130, 180, 0.3);
    --notion-pink: rgba(180, 130, 150, 0.3);
    --notion-red: rgba(190, 120, 110, 0.3);
    --notion-gray-text: #b0c8c0;
    --notion-brown-text: #d0c0a0;
    --notion-orange-text: #e8c080;
    --notion-yellow-text: #e0e0a0;
    --notion-green-text: #90e0b0;
    --notion-blue-text: #90c0d0;
    --notion-purple-text: #b8b0e0;
    --notion-pink-text: #e0a8c0;
    --notion-red-text: #e0a090;
}

/* Nuit Lavande - Violet nocturne */
[data-theme="nuit-lavande"] { 
    --bg-primary: #221f2a; 
    --bg-secondary: #282530; 
    --bg-card: #302a38; 
    --bg-elevated: #383040; 
    --bg-input: #282530; 
    --text-primary: #f0e8f8; 
    --text-secondary: #b0a0c0; 
    --text-muted: #806888; 
    --border: rgba(150, 130, 180, 0.15); 
    --border-hover: rgba(150, 130, 180, 0.3); 
    --accent: #a890c8; 
    --accent-contrast: #221f2a;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3); 
    --header-bg: rgba(34, 31, 42, 0.95);
    --notion-gray: rgba(140, 130, 160, 0.3);
    --notion-brown: rgba(160, 140, 120, 0.3);
    --notion-orange: rgba(200, 150, 110, 0.3);
    --notion-yellow: rgba(200, 185, 120, 0.35);
    --notion-green: rgba(120, 170, 140, 0.3);
    --notion-blue: rgba(120, 150, 190, 0.3);
    --notion-purple: rgba(150, 130, 200, 0.4);
    --notion-pink: rgba(190, 130, 170, 0.35);
    --notion-red: rgba(190, 120, 130, 0.3);
    --notion-gray-text: #c0b8d0;
    --notion-brown-text: #d0c0a8;
    --notion-orange-text: #e8c090;
    --notion-yellow-text: #e0d8a0;
    --notion-green-text: #98d8b0;
    --notion-blue-text: #98c0e0;
    --notion-purple-text: #c0a8f0;
    --notion-pink-text: #f0a8d0;
    --notion-red-text: #e0a0a8;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; width: 100%; overflow: hidden; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg-primary); color: var(--text-primary); transition: background 0.3s, color 0.3s; }
.app-container { max-width: 500px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; padding-top: var(--safe-top); }
.header { flex-shrink: 0; position: relative; z-index: 100; padding: 10px 10px; display: flex; align-items: center; justify-content: space-between; background: var(--header-bg); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-tabs { flex-shrink: 0; display: flex; padding: 10px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.main-content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 10px 100px 10px; -webkit-overflow-scrolling: touch; }
.loader-overlay { position: fixed; inset: 0; background: transparent; display: none; align-items: center; justify-content: center; z-index: 9999; pointer-events: none; }
.loader-overlay.show { display: flex; }
.loader { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--text-primary); border-radius: 50%; animation: spin 0.8s linear infinite; background: var(--bg-card); padding: 20px; box-sizing: content-box; border-radius: 50%; box-shadow: var(--shadow-card); }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-status { position: fixed; top: 10px; right: 10px; padding: 6px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 500; z-index: 1000; display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 0.3s; }
.sync-status.show { opacity: 1; }
.sync-status.success { background: var(--notion-green); color: var(--notion-green-text); }
.sync-status.error { background: var(--notion-red); color: var(--notion-red-text); }
.sync-status.syncing { background: var(--notion-blue); color: var(--notion-blue-text); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sync-status.syncing .sync-dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
/* Menu 3 points */
.menu-container { position: relative; }
.menu-btn { background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 8px; border-radius: 8px; transition: all 0.2s; }
.menu-btn:hover { background: var(--bg-elevated); }
.menu-dropdown { position: absolute; top: 100%; right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; min-width: 200px; box-shadow: var(--shadow-card); display: none; overflow: hidden; z-index: 200; }
.menu-dropdown.show { display: block; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text-primary); font-size: 14px; cursor: pointer; transition: all 0.2s; border: none; background: none; width: 100%; text-align: left; }
.menu-item:hover { background: var(--bg-elevated); }
.menu-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.menu-user { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.menu-user-name { font-weight: 600; font-size: 14px; }
.menu-user-role { font-size: 12px; color: var(--text-secondary); }

/* Theme Bottom Sheet */
.theme-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); display: none; align-items: flex-end; justify-content: center; z-index: 9999; }
.theme-modal-overlay.show { display: flex; }
.theme-modal { background: var(--bg-card); border-radius: 24px 24px 0 0; width: 100%; max-width: 500px; max-height: 85vh; overflow: hidden; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
.theme-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: relative; }
.theme-modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); }
.theme-modal-header h3 { font-size: 17px; font-weight: 600; color: var(--text-primary); margin: 0; }
.theme-modal-close { width: 32px; height: 32px; border: none; background: var(--bg-elevated); border-radius: 50%; font-size: 18px; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.theme-modal-close:hover { background: var(--bg-primary); color: var(--text-primary); }
.theme-modal-body { padding: 20px; overflow-y: auto; max-height: calc(85vh - 60px); }
.theme-modal-label { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 16px; margin-top: 12px; }
.theme-modal-label:first-child { margin-top: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.theme-card { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; padding: 12px 8px; border-radius: 16px; transition: all 0.2s; border: 3px solid transparent; }
.theme-card:hover { transform: scale(1.03); }
.theme-card.active { border-color: var(--text-primary); }
.theme-color { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15); }
.theme-name { font-size: 12px; color: var(--text-primary); font-weight: 500; text-align: center; font-family: 'Outfit', sans-serif; letter-spacing: 0.2px; line-height: 1.3; }
.theme-card.active .theme-name { font-weight: 700; }

.logo { font-weight: 700; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; background: var(--text-primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 22px; height: 22px; stroke: var(--bg-primary); fill: none; }
.logo-text { color: var(--text-primary); }
.header-actions { display: flex; gap: 8px; }
.theme-toggle, .cart-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text-primary); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.theme-toggle:hover, .cart-btn:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.header-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text-primary); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.header-btn:hover:not(.active) { border-color: var(--border-hover); background: var(--bg-elevated); }
.header-btn[data-section="accueil"].active { background: var(--notion-blue); color: var(--notion-blue-text); border-color: transparent; }
.header-btn[data-section="prospection"].active { background: var(--notion-orange); color: var(--notion-orange-text); border-color: transparent; }
.header-btn[data-section="contrats"].active { background: var(--notion-green); color: var(--notion-green-text); border-color: transparent; }
.cart-btn { position: relative; }
.cart-badge { position: absolute; top: -5px; right: -5px; background: var(--notion-red); color: var(--notion-red-text); font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
/* Navigation avec couleurs Notion */
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab { flex-shrink: 0; padding: 10px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 25px; color: var(--text-secondary); font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.nav-tab:nth-child(1).active { background: var(--notion-blue); color: var(--notion-blue-text); border-color: transparent; }
.nav-tab:nth-child(2).active { background: var(--notion-orange); color: var(--notion-orange-text); border-color: transparent; }
.nav-tab:nth-child(3).active { background: var(--notion-green); color: var(--notion-green-text); border-color: transparent; }
.nav-tab:nth-child(4).active { background: var(--notion-purple); color: var(--notion-purple-text); border-color: transparent; }
.nav-tab:nth-child(5).active { background: var(--notion-red); color: var(--notion-red-text); border-color: transparent; }
.nav-tab:hover:not(.active) { border-color: var(--border-hover); color: var(--text-primary); }
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
.card-header { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-header h2 .icon { width: 28px; height: 28px; background: var(--notion-blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.card-header h2 .icon svg { width: 16px; height: 16px; stroke: var(--notion-blue-text); }
.card-header p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.card-body { padding: 12px 14px; }
#qr-reader { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
#qr-reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 0 !important; }
#qr-reader__dashboard { display: none !important; }
#qr-reader__scan_region { width: 100% !important; height: 100% !important; min-height: 100% !important; }
#qr-reader__scan_region > img { display: none !important; }
#qr-shaded-region { display: none !important; }

/* Scanner Viewfinder */
.scanner-video-container { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
#qr-reader { width: 100% !important; height: 100% !important; }
#qr-reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; }
#qr-reader__scan_region { min-height: 100% !important; }
#qr-reader__dashboard { display: none !important; }
.scanner-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.scanner-viewfinder { width: 300px; height: 150px; position: relative; }
.scanner-corner { position: absolute; width: 30px; height: 30px; border-color: #FF9500; border-style: solid; border-width: 0; transition: border-color 0.2s; }
.scanner-corner.top-left { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 12px; }
.scanner-corner.top-right { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 12px; }
.scanner-corner.bottom-left { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 12px; }
.scanner-corner.bottom-right { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 12px; }
.scanner-viewfinder.detecting .scanner-corner { border-color: #22C55E; animation: pulseGreen 0.5s ease infinite; }
@keyframes pulseGreen { 0%, 100% { border-color: #22C55E; } 50% { border-color: #4ADE80; } }
.scanner-line { position: absolute; left: 10%; width: 80%; height: 2px; background: linear-gradient(90deg, transparent, #FF9500, transparent); top: 50%; animation: scanLine 2s ease-in-out infinite; }
.scanner-viewfinder.detecting .scanner-line { background: linear-gradient(90deg, transparent, #22C55E, transparent); }
@keyframes scanLine { 0%, 100% { top: 20%; opacity: 0.5; } 50% { top: 80%; opacity: 1; } }
.scanner-hint { text-align: center; margin-top: 12px; font-size: 0.8rem; color: var(--text-secondary); }
.manual-entry { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.manual-entry-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 10px; display: block; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.input-group { display: flex; gap: 10px; }
input, select, textarea { font-family: 'Outfit', sans-serif; font-size: 0.95rem; padding: 14px 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary); transition: all 0.2s; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 60px; }
.btn { font-family: 'Outfit', sans-serif; font-size: 0.9rem; font-weight: 600; padding: 14px 20px; border-radius: 10px; border: none; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--notion-blue); color: var(--notion-blue-text); width: 100%; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); width: 100%; }
.btn-secondary:hover { border-color: var(--border-hover); }
.btn-danger { background: var(--notion-red); color: var(--notion-red-text); border: none; width: 100%; }
.btn-danger:hover { filter: brightness(1.1); }
.confirm-delete-icon { width: 60px; height: 60px; margin: 0 auto 16px; background: var(--notion-red); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.confirm-delete-icon svg { width: 28px; height: 28px; stroke: var(--notion-red-text); }
.confirm-delete-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.confirm-delete-text { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }
.confirm-delete-actions { display: flex; gap: 10px; }
.confirm-delete-actions .btn { flex: 1; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinning svg { animation: spin 0.5s linear infinite; }
.btn-sm { padding: 10px 16px; font-size: 0.8rem; }

/* Switch Pro/Particulier */
.pro-switch-container { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: var(--bg-elevated); border-radius: 12px; margin-bottom: 20px; }
.pro-switch-label { font-size: 0.85rem; color: var(--text-secondary); transition: color 0.3s; }
.pro-switch-label.pro-label { color: var(--text-secondary); }
.pro-switch-container:has(input:checked) .pro-switch-label:first-of-type { color: var(--text-secondary); }
.pro-switch-container:has(input:checked) .pro-label { color: var(--notion-blue-text); font-weight: 600; }
.pro-switch-container:has(input:not(:checked)) .pro-switch-label:first-of-type { color: var(--notion-green-text); font-weight: 600; }
.pro-switch { position: relative; width: 50px; height: 28px; }
.pro-switch input { opacity: 0; width: 0; height: 0; }
.pro-switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--notion-green); border-radius: 28px; transition: 0.3s; }
.pro-switch-slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.pro-switch input:checked + .pro-switch-slider { background: var(--notion-blue-text); }
.pro-switch input:checked + .pro-switch-slider:before { transform: translateX(22px); }

.form-section { margin-bottom: 16px; }
.form-section-title { font-size: 0.75rem; font-weight: 600; color: var(--notion-blue-text); text-transform: uppercase; letter-spacing: 0.5px; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.required { color: var(--notion-red-text); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal-actions .btn { flex: 1; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 14px; font-size: 15px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary); box-sizing: border-box; }
.form-group select { height: 46px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b9b9b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-group textarea { min-height: 70px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .form-group { margin-bottom: 14px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); display: none; align-items: flex-end; justify-content: center; z-index: 1000; padding: 0; overflow: hidden; }
.modal-overlay.show { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px 20px 0 0; width: 100%; max-width: 500px; max-height: 92vh; overflow-y: auto; overflow-x: hidden; box-shadow: var(--shadow-card); animation: modalSlideUp 0.3s ease-out; }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg-card); z-index: 10; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 16px; overflow-x: hidden; }
.invoice-modal-fullscreen { position: fixed; inset: 0; max-width: 100%; max-height: 100%; width: 100%; height: 100%; border-radius: 0; display: flex; flex-direction: column; }
#invoice-modal { padding: 0; }
#invoice-modal .modal-header { position: sticky; top: 0; z-index: 10; background: var(--bg-card); }
/* Scanner Fullscreen */
#scanner.section.active { position: fixed; inset: 0; z-index: 500; background: #000; display: flex; flex-direction: column; padding: 0; margin: 0; }
.scanner-fullscreen-header { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-top, 0px)) 16px 12px 16px; background: rgba(0,0,0,0.9); color: white; min-height: 50px; }
.scanner-fullscreen-header h3 { font-size: 16px; font-weight: 600; }
.scanner-close-btn { background: rgba(255,255,255,0.2); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.scanner-fullscreen-body { flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.scanner-video-container { flex: 1; position: relative; overflow: hidden; background: #000; min-height: 0; }
.scanner-video-container video { width: 100%; height: 100%; object-fit: cover; }
.scanner-controls { padding: 16px 16px calc(20px + var(--safe-bottom, 0px)) 16px; background: rgba(0,0,0,0.95); flex-shrink: 0; }
/* Switch 3 options */
.scanner-switch { display: flex; background: rgba(255,255,255,0.1); border-radius: 25px; padding: 4px; margin-bottom: 12px; }
.scanner-switch-option { flex: 1; padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); border-radius: 20px; cursor: pointer; transition: all 0.3s; border: none; background: none; }
.scanner-switch-option.active { background: var(--notion-blue); color: var(--notion-blue-text); }
.scanner-manual-input { display: none; margin-top: 12px; }
.scanner-manual-input.show { display: flex; gap: 10px; }
.scanner-manual-input input { flex: 1; padding: 12px 16px; border-radius: 12px; border: none; background: rgba(255,255,255,0.1); color: white; font-size: 16px; }
.scanner-manual-input input::placeholder { color: rgba(255,255,255,0.4); }
.scanner-manual-input button { padding: 12px 24px; border-radius: 12px; border: none; background: var(--notion-blue); color: var(--notion-blue-text); font-weight: 600; cursor: pointer; }
.scanner-status-bar { text-align: center; padding: 8px; color: rgba(255,255,255,0.7); font-size: 13px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; padding: 4px 8px; line-height: 1; border-radius: 8px; transition: all 0.2s; }
.modal-close:hover { color: #DC2626; background: rgba(220, 38, 38, 0.1); }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; transition: all 0.2s; }
.product-card:hover { border-color: transparent; background: var(--notion-gray); }
.product-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.product-left { flex: 1; min-width: 0; }
.product-right { text-align: right; flex-shrink: 0; }
.product-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-code { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--text-muted); }
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.product-stock { font-size: 0.7rem; color: var(--text-muted); }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.product-sales { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--notion-orange); border-radius: 6px; font-size: 0.7rem; color: var(--notion-orange-text); font-weight: 600; cursor: pointer; transition: all 0.2s; }
.product-sales:hover { filter: brightness(1.1); }
.product-location { display: inline-flex; align-items: center; padding: 4px 10px; background: var(--notion-purple); border-radius: 6px; font-size: 0.7rem; color: var(--notion-purple-text); font-weight: 500; }
.product-actions { display: flex; gap: 8px; align-items: center; }
.product-actions .btn { padding: 8px 14px; font-size: 0.75rem; }
.product-edit-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.product-edit-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.btn-cart { width: 40px; height: 40px; border-radius: 10px; border: none; background: var(--notion-blue); color: var(--notion-blue-text); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.btn-cart:hover { filter: brightness(1.1); transform: scale(1.05); }
.btn-cart svg { width: 22px; height: 22px; }
.held-cart-actions-inline { display: flex; gap: 6px; }
.held-cart-actions-inline .btn-cart { width: 36px; height: 36px; }
.held-cart-actions-inline .btn-cart svg { width: 18px; height: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.stat-value { font-size: 1.3rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.stat-label { font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.search-bar { margin-bottom: 20px; position: relative; }
.search-bar input { padding-left: 44px; }
.search-bar svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--text-muted); }
.search-bar-with-action { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.search-bar-with-action .search-bar { margin-bottom: 0; }
.calendar-btn { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.calendar-btn:hover { background: var(--notion-orange); border-color: transparent; }
.calendar-btn.active { background: var(--notion-orange); border-color: transparent; }
.calendar-btn svg { width: 22px; height: 22px; stroke: var(--text-primary); }
.date-filter-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 12px; padding: 8px 12px; background: var(--notion-orange); border-radius: 8px; display: inline-flex; align-items: center; }
/* Calendar Modal */
.calendar-container { padding: 0; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.calendar-header h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.calendar-nav { display: flex; gap: 8px; }
.calendar-nav button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.calendar-nav button:hover { background: var(--bg-elevated); }
.calendar-nav button svg { width: 18px; height: 18px; stroke: var(--text-primary); }
.calendar-nav-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.calendar-nav-btn:hover { background: var(--bg-elevated); }
.calendar-nav-btn svg { width: 18px; height: 18px; stroke: var(--text-primary); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.calendar-weekday { text-align: center; font-size: 0.7rem; font-weight: 600; color: var(--text-muted); padding: 8px 0; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; background: var(--bg-card); border: 1px solid var(--border); }
.calendar-day:hover { background: var(--bg-elevated); }
.calendar-day.other-month { color: var(--text-muted); opacity: 0.5; }
.calendar-day.today { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.calendar-day.selected { background: var(--notion-blue); color: var(--notion-blue-text); border-color: transparent; font-weight: 600; }
.calendar-day.has-sales { position: relative; }
.calendar-day.has-sales::after { content: ''; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--notion-green-text); }
.calendar-day.has-rdv { position: relative; }
.calendar-day.has-rdv::after { content: ''; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--notion-orange-text); }
.calendar-day.in-range { background: var(--notion-blue); opacity: 0.5; border-color: transparent; }
.calendar-day.range-start, .calendar-day.range-end { background: var(--notion-blue); color: var(--notion-blue-text); border-color: transparent; font-weight: 600; opacity: 1; }
.calendar-range-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 10px 12px; background: var(--bg-elevated); border-radius: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.calendar-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.calendar-actions .btn { flex: 1; }
.space-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.space-zone { aspect-ratio: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; padding: 8px; }
.space-zone:hover { transform: scale(1.02); filter: brightness(1.1); }
.space-zone.zone-empty { background: var(--notion-gray); }
.space-zone.zone-gray { background: var(--notion-gray); }
.space-zone.zone-brown { background: var(--notion-brown); }
.space-zone.zone-orange { background: var(--notion-orange); }
.space-zone.zone-purple { background: var(--notion-purple); }
.space-zone.zone-green { background: var(--notion-green); }
.space-zone.zone-blue { background: var(--notion-blue); }
.space-zone.zone-red { background: var(--notion-red); }
.space-zone.zone-pink { background: var(--notion-pink); }
.space-zone-id { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.space-zone-name { font-size: 0.55rem; color: var(--text-secondary); text-align: center; line-height: 1.2; }
.space-zone-stats { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.space-zone-products { font-size: 0.65rem; color: var(--text-primary); font-weight: 500; display: flex; align-items: center; gap: 2px; }
.space-zone-sales { font-size: 0.65rem; color: var(--text-secondary); display: flex; align-items: center; gap: 2px; }
.cart-items { max-height: 300px; overflow-y: auto; }
.cart-item { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-item-info h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 4px; }
.cart-item-info p { font-size: 0.75rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.cart-item-price { font-weight: 700; color: var(--accent); min-width: 70px; text-align: right; }
.cart-item-remove { background: none; border: none; color: #DC2626; cursor: pointer; padding: 6px; font-size: 1.2rem; border-radius: 6px; transition: background 0.2s; }
.cart-item-remove:hover { background: rgba(220, 38, 38, 0.1); }
.qty-controls { display: flex; align-items: center; gap: 0; background: var(--bg-elevated); border-radius: 8px; overflow: hidden; }
.qty-btn { background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 8px 12px; font-size: 1rem; font-weight: 600; transition: background 0.2s; }
.qty-btn:hover { background: var(--accent); color: var(--accent-contrast); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-btn:disabled:hover { background: none; color: var(--text-primary); }
.qty-value { padding: 8px 12px; font-weight: 600; font-size: 0.9rem; min-width: 40px; text-align: center; background: var(--bg-input); }
.cart-footer { padding: 20px; background: var(--bg-secondary); border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-label { font-size: 1rem; color: var(--text-secondary); }
.cart-total-value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.held-cart-item { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.held-cart-item:hover { border-color: transparent; background: var(--notion-orange); }
.held-cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.held-cart-time { font-size: 0.75rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; display: flex; align-items: center; gap: 6px; }
.held-cart-time svg { width: 14px; height: 14px; stroke: var(--text-muted); }
.held-cart-total { font-weight: 700; color: var(--accent); }
.held-cart-items { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; }
.held-cart-actions { display: flex; gap: 8px; }
.held-cart-actions button { flex: 1; padding: 8px; font-size: 0.75rem; }
.journal-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; transition: all 0.2s; }
.journal-item:hover { border-color: transparent; background: var(--notion-gray); }
.journal-item.selected { border-color: var(--notion-green-text); background: var(--notion-green); }
.journal-item.selected .journal-ticket { color: var(--notion-green-text); }
.journal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.journal-left { flex: 1; min-width: 0; }
.journal-right { text-align: right; flex-shrink: 0; }
.journal-ticket { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.stripe-qr-btn { width: 24px; height: 24px; border: none; background: var(--notion-purple); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.stripe-qr-btn svg { width: 14px; height: 14px; stroke: var(--notion-purple-text); }
.stripe-qr-btn:hover { opacity: 0.8; }
.journal-date { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-bottom: 6px; }
.journal-amount { font-size: 1.15rem; font-weight: 700; color: var(--notion-green-text); margin-bottom: 4px; }
.journal-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.journal-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.journal-client { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; background: var(--notion-blue); color: var(--notion-blue-text); }
.journal-payment { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; }
.journal-payment.espece { background: var(--notion-green); color: var(--notion-green-text); }
.journal-payment.cb { background: var(--notion-blue); color: var(--notion-blue-text); }
.journal-payment.cheque { background: var(--notion-orange); color: var(--notion-orange-text); }
.journal-payment.virement { background: var(--notion-purple); color: var(--notion-purple-text); }
.journal-payment-text { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 600; background: var(--bg-elevated); color: var(--text-muted); }
.journal-payment-text.espece { color: var(--notion-green-text); }
.journal-payment-text.cb { color: var(--notion-blue-text); }
.journal-payment-text.cheque { color: var(--notion-orange-text); }
.journal-payment-text.virement { color: var(--notion-purple-text); }
.journal-seller { font-size: 0.7rem; color: var(--text-muted); }
.journal-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.journal-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.journal-stat-label { font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 4px; order: 1; }
.journal-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); order: 2; }
.journal-stat-btn { cursor: pointer; transition: all 0.2s; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.journal-stat-btn:hover { border-color: transparent; background: var(--notion-purple); }
.journal-stat-btn .journal-stat-label { order: 1; margin-bottom: 6px; }
.journal-stat-icon { width: 24px; height: 24px; order: 2; }
.journal-stat-icon svg { width: 100%; height: 100%; stroke: var(--text-primary); }
/* Plan des ventes par zone */
.sales-map-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.sales-map-zone { aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }
.sales-map-zone:hover { transform: scale(1.05); }
.sales-map-zone-label { font-size: 0.85rem; font-weight: 700; color: inherit; }
.sales-map-zone-value { font-size: 0.7rem; font-weight: 500; opacity: 0.9; }
.sales-map-zone-count { font-size: 0.6rem; opacity: 0.7; }
.sales-map-legend { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.sales-map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-secondary); }
.sales-map-legend-color { width: 12px; height: 12px; border-radius: 4px; }
/* Payment cards filtre journal */
.payment-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.payment-cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.payment-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; transition: all 0.2s; }
.payment-cards-4 .payment-card { padding: 10px 4px; }
.payment-card:hover { border-color: transparent; background: var(--bg-elevated); }
.payment-card.active { border-color: transparent; background: var(--notion-blue); }
.payment-card[data-filter="espece"].active { background: var(--notion-green); }
.payment-card[data-filter="cb"].active { background: var(--notion-blue); }
.payment-card[data-filter="cheque"].active { background: var(--notion-orange); }
.payment-card[data-filter="virement"].active { background: var(--notion-purple); }
.payment-card-icon { width: 36px; height: 36px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.payment-cards-4 .payment-card-icon { width: 28px; height: 28px; margin-bottom: 4px; }
.payment-card-icon svg { width: 24px; height: 24px; stroke: var(--text-secondary); }
.payment-cards-4 .payment-card-icon svg { width: 18px; height: 18px; }
.payment-card.active .payment-card-icon svg { stroke: var(--notion-blue-text); }
.payment-card[data-filter="espece"].active .payment-card-icon svg { stroke: var(--notion-green-text); }
.payment-card[data-filter="cb"].active .payment-card-icon svg { stroke: var(--notion-blue-text); }
.payment-card[data-filter="cheque"].active .payment-card-icon svg { stroke: var(--notion-orange-text); }
.payment-card[data-filter="virement"].active .payment-card-icon svg { stroke: var(--notion-purple-text); }
.payment-card.active .payment-card-label { color: var(--notion-blue-text); }
.payment-card[data-filter="espece"].active .payment-card-label,
.payment-card[data-filter="espece"].active .payment-card-amount,
.payment-card[data-filter="espece"].active .payment-card-count { color: var(--notion-green-text); }
.payment-card[data-filter="cb"].active .payment-card-label,
.payment-card[data-filter="cb"].active .payment-card-amount,
.payment-card[data-filter="cb"].active .payment-card-count { color: var(--notion-blue-text); }
.payment-card[data-filter="cheque"].active .payment-card-label,
.payment-card[data-filter="cheque"].active .payment-card-amount,
.payment-card[data-filter="cheque"].active .payment-card-count { color: var(--notion-orange-text); }
.payment-card[data-filter="virement"].active .payment-card-label,
.payment-card[data-filter="virement"].active .payment-card-amount,
.payment-card[data-filter="virement"].active .payment-card-count { color: var(--notion-purple-text); }
.payment-card-amount { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.payment-card-count { font-size: 0.6rem; color: var(--text-secondary); }
.payment-cards-4 .payment-card-count { font-size: 0.55rem; }
.payment-card.active .payment-card-amount { color: var(--notion-blue-text); }
.payment-card.active .payment-card-count { color: var(--notion-blue-text); }
.payment-card-full { background: var(--bg-card); border: 2px solid var(--border); border-radius: 12px; padding: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; transition: all 0.2s; margin-bottom: 16px; }
.payment-card-full:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.payment-card-full .stripe-logo { width: 60px; height: auto; color: var(--text-secondary); }
.payment-card-full span { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.modal-share { background: transparent; border: none; cursor: pointer; padding: 5px; display: flex; align-items: center; justify-content: center; }
.modal-share svg { width: 20px; height: 20px; stroke: var(--text-secondary); transition: stroke 0.2s; }
.modal-share:hover svg { stroke: var(--accent); }
.filter-label { font-size: 0.7rem; color: var(--accent); text-align: center; margin-bottom: 10px; display: none; }
.filter-label.show { display: block; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-state h3 { color: var(--text-primary); font-weight: 600; margin-bottom: 6px; }
.zone-products-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.zone-products-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.zone-products-header h3 { font-size: 1rem; font-weight: 600; color: var(--accent); }
.client-accordion { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.client-accordion-header { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.2s; }
.client-accordion-header:hover { background: var(--bg-elevated); }
.client-accordion-title { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.client-accordion-title svg { width: 18px; height: 18px; stroke: var(--text-muted); }
.client-accordion-chevron { width: 18px; height: 18px; stroke: var(--text-secondary); transition: transform 0.3s; }
.client-accordion-chevron.open { transform: rotate(180deg); }
.client-accordion-content { padding: 0 16px 16px; }
.client-search-indicator { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.client-search-indicator svg { width: 18px; height: 18px; stroke: var(--accent); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-elevated); color: var(--text-primary); padding: 14px 24px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-card); opacity: 0; transition: all 0.3s; z-index: 1000; max-width: 90%; text-align: center; font-size: 0.9rem; font-weight: 500; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--accent); }
.toast.error { border-color: #DC2626; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@media print { body * { visibility: hidden; } .qr-preview, .qr-preview * { visibility: visible; } .qr-preview { position: absolute; left: 0; top: 0; } }

/* Page Accueil */
/* Dashboard style SumUp */
.dashboard-greeting { padding: 16px 0 20px; }
.dashboard-greeting h1 { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); }
.dashboard-main-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.dashboard-balance-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
.dashboard-balance { font-size: 2.4rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.dashboard-balance-sub { font-size: 0.8rem; color: var(--text-muted); }
.dashboard-actions { display: flex; justify-content: flex-start; gap: 24px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.dashboard-action { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.dashboard-action-icon { width: 52px; height: 52px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.dashboard-action-icon svg { width: 24px; height: 24px; stroke: var(--text-primary); }
.dashboard-action:hover .dashboard-action-icon { background: var(--notion-blue); border-color: transparent; }
.dashboard-action:hover .dashboard-action-icon svg { stroke: var(--notion-blue-text); }
.dashboard-action-label { font-size: 0.75rem; color: var(--text-secondary); text-align: center; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dashboard-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; cursor: pointer; transition: all 0.2s; }
.dashboard-card:hover { border-color: var(--border-hover); }
.dashboard-card-icon { width: 36px; height: 36px; margin-bottom: 12px; }
.dashboard-card-icon svg { width: 24px; height: 24px; stroke: var(--text-secondary); }
.dashboard-card-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.dashboard-card-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
.dashboard-card-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.dashboard-quick-action { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: all 0.2s; margin-bottom: 12px; }
.dashboard-quick-action:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.dashboard-quick-action-icon { width: 44px; height: 44px; background: var(--notion-blue); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dashboard-quick-action-icon svg { width: 22px; height: 22px; stroke: var(--notion-blue-text); }
.dashboard-quick-action-text { flex: 1; }
.dashboard-quick-action-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.dashboard-quick-action-subtitle { font-size: 0.75rem; color: var(--text-muted); }

/* Dashboard RDV Card */
.dashboard-rdv-card { background: var(--bg-card); border-radius: 16px; padding: 16px; margin-top: 16px; border: 1px solid var(--border); }
.dashboard-rdv-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dashboard-rdv-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.dashboard-rdv-title svg { stroke: var(--accent); }
.dashboard-rdv-count { background: var(--accent); color: var(--accent-contrast); padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.dashboard-rdv-list { display: flex; flex-direction: column; gap: 8px; }
.dashboard-rdv-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-elevated); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.dashboard-rdv-item:hover { background: var(--notion-blue); }
.dashboard-rdv-item-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 50px; padding: 8px; background: var(--accent); color: var(--accent-contrast); border-radius: 10px; }
.dashboard-rdv-item-day { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.dashboard-rdv-item-month { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; }
.dashboard-rdv-item-info { flex: 1; }
.dashboard-rdv-item-name { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.dashboard-rdv-item-time { font-size: 0.8rem; color: var(--text-secondary); }

/* Clients Section */
.clients-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.client-card { background: var(--bg-card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; }
.client-card:hover { border-color: transparent; background: var(--notion-purple); }
.client-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.client-card-left { flex: 1; min-width: 0; }
.client-card-right { text-align: right; flex-shrink: 0; }
.client-card-name { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; display: block; margin-bottom: 2px; }
.client-card-email { font-size: 0.75rem; color: var(--text-muted); }
.client-card-phone { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; margin-bottom: 2px; }
.client-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.client-card-invoices { background: var(--notion-blue); color: var(--notion-blue-text); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.client-card-created { font-size: 0.7rem; color: var(--text-muted); }
.client-badge-pro { background: var(--notion-purple); color: var(--notion-purple-text); padding: 3px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.client-edit-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; margin-top: 4px; transition: all 0.2s; }
.client-edit-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.client-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.client-detail-header { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.client-detail-info h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.client-detail-info div { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.invoice-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.invoice-item:hover { border-color: transparent; background: var(--notion-gray); }

/* Section Nouvelle Vente */
.sale-header { display: flex; align-items: center; gap: 12px; padding: 12px 0; margin-bottom: 16px; }
.sale-back-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sale-back-btn svg { width: 20px; height: 20px; }
.sale-header h2 { flex: 1; font-size: 1.2rem; font-weight: 600; }

.sale-type-switch { display: flex; align-items: center; gap: 8px; }
.sale-type-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.devis-switch { position: relative; width: 44px; height: 24px; }
.devis-switch input { opacity: 0; width: 0; height: 0; }
.devis-switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--border); border-radius: 24px; transition: 0.3s; }
.devis-switch-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.devis-switch input:checked + .devis-switch-slider { background: rgba(34, 197, 94, 0.4); }
.devis-switch input:checked + .devis-switch-slider:before { transform: translateX(20px); background: var(--accent); }

.sale-payment-section { margin-bottom: 16px; }
.sale-payment-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 10px; }
.sale-payment-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.sale-payment-card { flex: 1; min-width: 60px; padding: 10px 8px; background: var(--bg-elevated); border: 2px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: all 0.2s; }
.sale-payment-card svg { width: 22px; height: 22px; stroke: var(--text-secondary); }
.sale-payment-card span { font-size: 0.7rem; color: var(--text-secondary); font-weight: 500; }
.sale-payment-card:hover { border-color: var(--text-muted); }
.sale-payment-card.active { border-color: var(--accent); background: rgba(34, 197, 94, 0.1); }
.sale-payment-card.active svg { stroke: var(--accent); }
.sale-payment-card.active span { color: var(--accent); }

.stripe-link-option { margin-top: 12px; padding: 12px; background: var(--bg-elevated); border-radius: 10px; border: 1px solid var(--border); }
.stripe-link-checkbox { display: flex; align-items: center; cursor: pointer; gap: 10px; }
.stripe-link-checkbox input { display: none; }
.stripe-link-checkmark { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.stripe-link-checkbox input:checked + .stripe-link-checkmark { background: var(--accent); border-color: var(--accent); }
.stripe-link-checkbox input:checked + .stripe-link-checkmark::after { content: '✓'; color: white; font-size: 12px; font-weight: bold; }
.stripe-link-label { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }
.stripe-link-info { font-size: 0.75rem; color: var(--text-secondary); margin-top: 8px; margin-left: 30px; }

.sale-card { background: var(--bg-card); border-radius: 16px; cursor: pointer; transition: all 0.2s; }
.sale-card:active { transform: scale(0.98); }

.sale-card-client { border: 2px dashed var(--border); margin-bottom: 16px; min-height: 140px; display: flex; align-items: center; justify-content: center; }
.sale-card-client:hover { border-color: var(--text-muted); }
.sale-card-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.sale-card-icon { width: 50px; height: 50px; margin-bottom: 8px; }
.sale-card-icon svg { width: 100%; height: 100%; stroke: var(--text-muted); }
.sale-card-plus { font-size: 32px; font-weight: 300; color: var(--text-muted); line-height: 1; margin-bottom: 8px; }
.sale-card-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.sale-card-filled { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; width: 100%; }
.sale-client-info { flex: 1; }
.sale-client-name { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.sale-client-details { font-size: 0.85rem; color: var(--text-secondary); }
.sale-client-remove { width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--notion-red); color: var(--notion-red-text); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.sale-products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.sale-card-product { border: 1px solid var(--border); padding: 20px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.sale-card-product:hover { border-color: var(--accent); }
.sale-card-product-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.sale-card-product-icon svg { width: 26px; height: 26px; }
.sale-card-product-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.sale-card-product-subtitle { font-size: 0.75rem; color: var(--text-secondary); }

.sale-items-section { margin-top: 20px; }
.sale-items-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sale-items-header h3 { font-size: 1rem; font-weight: 600; }
.sale-items-count { background: var(--notion-blue); color: var(--notion-blue-text); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.sale-items-list { max-height: 200px; overflow-y: auto; }
.sale-item { background: var(--bg-elevated); border-radius: 10px; padding: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.sale-item-info { flex: 1; }
.sale-item-name { font-size: 0.9rem; font-weight: 500; }
.sale-item-details { font-size: 0.75rem; color: var(--text-secondary); }
.sale-item-price { font-size: 0.95rem; font-weight: 600; color: var(--accent); margin-right: 10px; }
.sale-item-remove { width: 28px; height: 28px; border-radius: 6px; border: none; background: var(--notion-red); color: var(--notion-red-text); font-size: 16px; cursor: pointer; }
.sale-total-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--bg-elevated); border-radius: 12px; margin: 16px 0; }
.sale-total-bar span:first-child { font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.sale-total-amount { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.sale-validate-btn { width: 100%; padding: 16px; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
.sale-validate-btn svg { width: 20px; height: 20px; }

.sale-client-option { padding: 12px; background: var(--bg-elevated); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.sale-client-option:hover { background: rgba(0, 0, 0, 0.3); border-color: var(--accent); }
.sale-client-option-name { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; display: flex; align-items: center; }
.sale-client-option-details { font-size: 0.8rem; color: var(--text-secondary); }

.sale-catalog-item { padding: 12px; background: var(--bg-elevated); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent; }
.sale-catalog-item:hover { background: rgba(0, 0, 0, 0.3); border-color: var(--accent); }
.sale-catalog-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.sale-catalog-item-code { font-size: 0.75rem; color: var(--text-secondary); }
.sale-catalog-item-price { font-size: 1rem; font-weight: 700; color: var(--accent); }

.sale-card-notes { border: 2px dashed var(--border); margin-bottom: 16px; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.sale-card-notes:hover { border-color: var(--text-muted); }
.sale-card-notes-empty { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.sale-card-notes-icon { width: 36px; height: 36px; }
.sale-card-notes-icon svg { width: 100%; height: 100%; stroke: var(--text-muted); }
.sale-card-notes-plus { font-size: 24px; font-weight: 300; color: var(--text-muted); }
.sale-card-notes-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.sale-card-notes-filled { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 16px; width: 100%; gap: 12px; }
.sale-notes-preview { flex: 1; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; max-height: 60px; overflow: hidden; text-overflow: ellipsis; white-space: pre-wrap; }
.sale-notes-edit { width: 32px; height: 32px; min-width: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sale-notes-edit:hover { background: rgba(0, 0, 0, 0.3); border-color: var(--accent); color: var(--accent); }

.sale-notes-templates { margin-top: 16px; }
.sale-notes-templates-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.sale-notes-templates-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sale-notes-template-btn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-primary); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.sale-notes-template-btn:hover { background: rgba(0, 0, 0, 0.3); border-color: var(--accent); color: var(--accent); }

/* Login Page */
.login-overlay { position: fixed; inset: 0; background: var(--bg-primary); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.login-overlay.hidden { display: none; }
.login-container { width: 100%; max-width: 380px; padding: 20px; }
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo svg { width: 60px; height: 60px; stroke: var(--accent); fill: none; }
.login-logo h1 { font-size: 28px; font-weight: 700; color: var(--accent); margin-top: 16px; }
.login-logo p { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.login-card { background: var(--bg-card); border-radius: 16px; padding: 32px 24px; border: 1px solid var(--border); }
.login-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; text-align: center; }
.login-input-group { margin-bottom: 20px; }
.login-input-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.login-input-group input { width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-primary); font-size: 15px; transition: all 0.2s; }
.login-input-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1); }
.login-btn { width: 100%; padding: 14px; border-radius: 10px; border: none; background: var(--accent); color: var(--accent-contrast); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 8px; }
.login-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.login-error { background: rgba(239, 68, 68, 0.1); color: #EF4444; padding: 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: none; text-align: center; }
.login-error.show { display: block; }
.user-badge { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--bg-elevated); border-radius: 20px; font-size: 12px; font-weight: 500; }
.user-badge svg { width: 16px; height: 16px; }
.logout-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.2s; }
.logout-btn:hover { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.journal-seller { background: var(--bg-elevated); padding: 2px 8px; border-radius: 10px; font-size: 11px; margin-left: 8px; color: var(--text-secondary); }
.client-created-by { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Add item button in modals */
.add-item-btn { width: 100%; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; color: var(--text-primary); font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.add-item-btn:hover { border-color: var(--accent); background: var(--bg-elevated); }
.add-item-btn svg { width: 20px; height: 20px; stroke: var(--text-secondary); }

/* Session Modal with tabs */
.session-modal { max-width: 450px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.session-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--bg-secondary); flex-shrink: 0; }
.session-tab { flex: 1; padding: 14px 16px; background: none; border: none; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
.session-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.session-tab:hover { color: var(--text-primary); }

.session-tab-content { flex: 1; overflow-y: auto; background: var(--bg-elevated); }
.session-tab-panel { display: none; padding: 16px; }
.session-tab-panel.active { display: block; }

.session-field-group { background: var(--bg-card); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.session-field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.session-field { margin-bottom: 12px; }
.session-field:last-child { margin-bottom: 0; }
.session-field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.session-field input, .session-field select, .session-field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-primary); color: var(--text-primary); font-size: 15px; }
.session-field input:focus, .session-field select:focus, .session-field textarea:focus { border-color: var(--accent); outline: none; }
.session-field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.session-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.session-modal-footer { padding: 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-shrink: 0; background: var(--bg-secondary); }
.session-modal-footer .btn { flex: 1; padding: 14px; }
.session-modal-footer .btn-success { background: var(--success); color: white; }

/* Session Items List */
.session-items-list { display: flex; flex-direction: column; gap: 8px; }
.session-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--bg-primary); border-radius: 10px; border: 1px solid var(--border); }
.session-item-info { flex: 1; }
.session-item-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.session-item-price { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.session-item-qty { display: flex; align-items: center; gap: 10px; }
.session-item-qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.session-item-qty button:hover { background: var(--accent); color: white; border-color: var(--accent); }
.session-item-qty span { min-width: 24px; text-align: center; font-weight: 600; font-size: 15px; color: var(--text-primary); }
.session-item-remove { width: 32px; height: 32px; border: none; background: none; color: var(--text-muted); cursor: pointer; margin-left: 8px; font-size: 20px; border-radius: 8px; transition: all 0.2s; }
.session-item-remove:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Session Total */
.session-total-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--bg-primary); border-radius: 10px; margin-top: 12px; border: 1px solid var(--border); }
.session-total-bar span:first-child { font-weight: 600; color: var(--text-primary); }
.session-total-amount { font-size: 18px; color: var(--accent); font-weight: 700; }

/* Invoice Status */
.session-invoice-status { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: var(--notion-green); border-radius: 10px; color: var(--notion-green-text); font-weight: 600; }
.session-invoice-status svg { width: 24px; height: 24px; stroke: var(--notion-green-text); }

/* Session Invoices List */
.session-invoices-list { display: flex; flex-direction: column; gap: 8px; }
.session-invoice-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--bg-primary); border-radius: 10px; border: 1px solid var(--border); border-left: 4px solid var(--notion-green-text); cursor: pointer; transition: all 0.2s; }
.session-invoice-item:hover { background: var(--notion-green); }
.session-invoice-item-info { flex: 1; }
.session-invoice-item-date { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.session-invoice-item-details { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.session-invoice-item-amount { font-size: 16px; font-weight: 700; color: var(--notion-green-text); }

.service-price-info { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--notion-green); border-radius: 8px; margin-top: 10px; }
.service-price-label { font-size: 13px; color: var(--notion-green-text); font-weight: 500; }
.service-price-value { font-size: 16px; color: var(--notion-green-text); font-weight: 700; }

.services-select { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tag { padding: 8px 14px; border-radius: 10px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-secondary); transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
.service-tag:hover { border-color: var(--accent); }
.service-tag.selected { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.service-tag-price { font-size: 11px; opacity: 0.8; }
.service-tag.selected .service-tag-price { opacity: 1; }

/* Sessions & RDV cards in modals */
.session-card { background: var(--bg-card); border-radius: 12px; padding: 14px 14px 14px 18px; margin-bottom: 10px; border: 1px solid var(--border); border-left: 4px solid var(--notion-purple); position: relative; cursor: pointer; transition: all 0.2s; }
.session-card:hover { background: var(--notion-purple); border-color: transparent; }
.session-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.session-card-date { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.session-card-duration { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-elevated); padding: 4px 10px; border-radius: 8px; }
.session-card-techniques { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.session-card-technique { font-size: 0.7rem; padding: 3px 8px; border-radius: 6px; background: var(--bg-elevated); color: var(--text-secondary); font-weight: 500; }
.session-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); }
.session-card-info { font-size: 0.75rem; color: var(--text-muted); }
.session-card-actions { display: flex; gap: 8px; }
.session-card-btn { padding: 6px 12px; font-size: 0.75rem; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; transition: all 0.2s; }
.session-card-btn-edit { background: var(--bg-elevated); color: var(--text-primary); }
.session-card-btn-edit:hover { background: var(--bg-tertiary); }
.session-card-btn-delete { background: transparent; color: var(--text-muted); }
.session-card-btn-delete:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Recording Controls - Refined */
.recording-controls { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); }
.recording-btn { width: 40px; height: 40px; border-radius: 10px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; background: var(--bg-elevated); }
.recording-btn svg { width: 20px; height: 20px; stroke: var(--text-secondary); }
.recording-btn:hover { background: var(--accent); }
.recording-btn:hover svg { stroke: var(--accent-contrast); }
.recording-btn.recording { background: var(--accent); }
.recording-btn.recording svg { stroke: var(--accent-contrast); }
.recording-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.recording-status { font-size: 13px; color: var(--text-secondary); }
.recording-timer { font-size: 12px; font-weight: 600; color: var(--accent); font-family: 'Outfit', sans-serif; }
.recording-wave { display: flex; align-items: center; gap: 2px; height: 20px; }
.recording-wave-bar { width: 3px; height: 8px; background: var(--accent); border-radius: 2px; animation: wave 0.8s ease-in-out infinite; }
.recording-wave-bar:nth-child(1) { animation-delay: 0s; }
.recording-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.recording-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.recording-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.recording-wave-bar:nth-child(5) { animation-delay: 0.4s; }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 18px; } }

.btn-generate-bilan { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.btn-generate-bilan:hover { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn-generate-bilan:hover svg { stroke: var(--accent-contrast); }
.btn-generate-bilan:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-generate-bilan.loading { pointer-events: none; }
.btn-generate-bilan.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Input Mode Tabs */
.input-mode-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.input-mode-tab { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.input-mode-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.input-mode-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.input-mode-tab.active svg { stroke: var(--accent-contrast); }
.input-mode-panel { display: none; }
.input-mode-panel.active { display: block; }
.input-mode-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

/* Scan Upload Zone */
.scan-upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; border: 2px dashed var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.scan-upload-zone:hover { border-color: var(--accent); background: var(--bg-elevated); }
.scan-upload-icon { margin-bottom: 12px; color: var(--text-muted); }
.scan-upload-icon svg { stroke: var(--text-muted); }
.scan-upload-text { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.scan-upload-hint { font-size: 12px; color: var(--text-muted); }
.scan-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.scan-preview-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.scan-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.scan-preview-item-number { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; background: var(--accent); color: var(--accent-contrast); border-radius: 50%; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.scan-preview-item-remove { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; background: rgba(0,0,0,0.6); border: none; border-radius: 50%; color: white; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.scan-preview-item:hover .scan-preview-item-remove { opacity: 1; }
.btn-scan-ocr { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 12px; background: var(--accent); border: none; border-radius: 10px; color: var(--accent-contrast); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-scan-ocr:hover { opacity: 0.9; }
.btn-scan-ocr:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-scan-ocr.loading svg { animation: spin 1s linear infinite; }

.rdv-card-item { background: var(--bg-card); border-radius: 12px; padding: 14px 14px 14px 18px; margin-bottom: 10px; border: 1px solid var(--border); border-left: 4px solid var(--notion-orange); display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.2s; }
.rdv-card-item:hover { background: var(--notion-orange); border-color: transparent; }
.rdv-info { flex: 1; }
.rdv-date { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 2px; }
.rdv-time { font-size: 0.8rem; color: var(--text-muted); }
.rdv-status { font-size: 0.7rem; padding: 4px 10px; border-radius: 8px; font-weight: 600; }
.rdv-status.scheduled { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.rdv-status.completed { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.rdv-status.cancelled { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.techniques-select { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.technique-tag { padding: 8px 14px; border-radius: 16px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-secondary); transition: all 0.2s; }
.technique-tag:hover { border-color: var(--accent); }
.technique-tag.selected { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.profile-tag { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-secondary); transition: all 0.2s; }
.profile-tag:hover { border-color: var(--notion-blue); background: var(--notion-blue); color: var(--notion-blue-text); }
.profile-tag.selected { background: var(--notion-blue); color: var(--notion-blue-text); border-color: transparent; }

/* ============ TAPTAP SPECIFIC ============ */

/* Prospection views - no flash transitions */
#prosp-clusters, #prosp-cities, #prosp-streets, #prosp-addresses {
    display: none;
}
#prosp-clusters.active, #prosp-cities.active, #prosp-streets.active, #prosp-addresses.active {
    display: block;
}

/* Section header with back button */
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; }
.section-header .section-title { margin-bottom: 0; }
.back-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.back-btn:hover { background: var(--bg-elevated); }

/* Form field row with icon */
.form-field-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.form-field-row svg { flex-shrink: 0; }
.form-field-row input, .form-field-row select { flex: 1; background: none; border: none; font-size: 1rem; color: var(--text-primary); padding: 0; outline: none; font-family: inherit; }
.form-field-row input::placeholder { color: var(--text-muted); }
.form-field-row select { cursor: pointer; }
.form-field-row select option { background: var(--bg-card); color: var(--text-primary); }

/* Type selector (PAVILLON / APPARTEMENT) */
.type-selector { display: flex; gap: 10px; margin: 16px 0; }
.type-btn { flex: 1; padding: 14px 12px; background: var(--bg-card); border: 2px solid var(--border); border-radius: 10px; cursor: pointer; text-align: center; font-weight: 600; font-size: 0.85rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.type-btn:hover { border-color: var(--border-hover); }
.type-btn.active { border-color: var(--accent); background: var(--bg-elevated); }

/* Technique options */
.tech-option { padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; cursor: pointer; font-weight: 500; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.3px; transition: all 0.2s; }
.tech-option:hover { border-color: var(--border-hover); }
.tech-option.active { background: var(--notion-green); color: var(--notion-green-text); border-color: transparent; }

/* Modal back button */
.modal-back { background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; }

/* Button full width */
.btn-full { width: 100%; margin-top: 20px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* Journal payment colors */
.journal-payment.blue { background: var(--notion-blue); color: var(--notion-blue-text); }
.journal-payment.orange { background: var(--notion-orange); color: var(--notion-orange-text); }
.journal-payment.green { background: var(--notion-green); color: var(--notion-green-text); }
.journal-payment.red { background: var(--notion-red); color: var(--notion-red-text); }

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* CAHIER DE PROSPECTION */
/* ═══════════════════════════════════════════════════════════════════════════════ */

/* Type de bâtiment */
.type-selection { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

/* Qualification status */
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.status-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; background: var(--bg-card); border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.status-btn:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.status-btn.active { border-color: var(--notion-blue-text); background: var(--notion-blue); }
.status-btn span { font-weight: 500; font-size: 0.8rem; }

/* Opérateurs */
.operator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.operator-btn { padding: 12px 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; font-weight: 500; text-align: center; }
.operator-btn:hover { border-color: var(--border-hover); }
.operator-btn.active { border-color: var(--notion-blue-text); background: var(--notion-blue); color: var(--notion-blue-text); }

/* Services tags */
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-checkbox { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; }
.tag-checkbox:hover { border-color: var(--border-hover); }
.tag-checkbox.active, .tag-checkbox:has(input:checked) { border-color: var(--notion-green-text); background: var(--notion-green); color: var(--notion-green-text); }
.tag-checkbox input { display: none; }

/* Priorité */
.priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.priority-btn { padding: 14px 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; font-weight: 600; text-align: center; }
.priority-btn:hover { border-color: var(--border-hover); }
.priority-btn.active { border-color: transparent; }
.priority-btn.chaud.active { background: var(--notion-red); color: var(--notion-red-text); }
.priority-btn.tiede.active { background: var(--notion-orange); color: var(--notion-orange-text); }
.priority-btn.froid.active { background: var(--notion-blue); color: var(--notion-blue-text); }

/* Raisons refus */
.reason-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.reason-btn { padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; }
.reason-btn:hover { border-color: var(--border-hover); }
.reason-btn.active { border-color: var(--notion-red-text); background: var(--notion-red); color: var(--notion-red-text); }

/* Radio options */
.radio-group { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.radio-option { display: flex; align-items: center; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.radio-option:hover { border-color: var(--border-hover); }
.radio-option:has(input:checked) { border-color: var(--notion-blue-text); background: var(--notion-blue); }
.radio-option input { margin-right: 12px; accent-color: var(--notion-blue-text); }
.radio-option span { font-size: 0.9rem; }

/* Progress bar */
.progress-container { margin-bottom: 16px; }
.progress-bar { height: 4px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--notion-green-text); border-radius: 4px; transition: width 0.3s; }
.progress-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; text-align: right; }

/* Appartements grid */
.apartments-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.apartment-card { padding: 16px 12px; background: var(--bg-card); border: 2px solid var(--border); border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.apartment-card:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.apartment-card.absent { border-color: var(--notion-orange-text); background: var(--notion-orange); }
.apartment-card.not-interested { border-color: var(--notion-red-text); background: var(--notion-red); }
.apartment-card.client { border-color: var(--notion-blue-text); background: var(--notion-blue); }
.apartment-card.interested { border-color: var(--notion-green-text); background: var(--notion-green); }
.apartment-number { font-size: 1.5rem; font-weight: 700; }
.apartment-status { font-size: 0.7rem; margin-top: 4px; opacity: 0.8; }

/* Save button */
.save-btn { width: 100%; padding: 16px; background: var(--notion-blue-text); border: none; border-radius: 12px; color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.save-btn:hover { opacity: 0.9; }
.save-btn:active { transform: scale(0.98); }
.save-btn.secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }

/* Form row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Section title */
.section-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-input { width: 100%; padding: 12px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary); font-size: 0.95rem; transition: all 0.2s; }
.form-input:focus { border-color: var(--notion-blue-text); outline: none; }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 80px; }

/* Type buttons for building selection */
.type-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; background: var(--bg-card); border: 2px solid var(--border); border-radius: 14px; cursor: pointer; transition: all 0.2s; }
.type-btn:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.type-btn.active { border-color: var(--notion-blue-text); background: var(--notion-blue); }
.type-btn svg { stroke: var(--text-primary); }
.type-btn span { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

/* Address progress indicator */
.address-progress { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; background: var(--notion-orange); border-radius: 10px; font-size: 0.7rem; font-weight: 600; color: var(--notion-orange-text); vertical-align: middle; }
.address-progress svg { stroke: var(--notion-orange-text); }
.address-progress.done { background: var(--notion-green); color: var(--notion-green-text); }
.address-progress.done svg { stroke: var(--notion-green-text); }
.journal-item.prospected { border-left: 3px solid var(--notion-orange-text); }

/* Sign contract button */
.sign-contract-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 20px; background: var(--notion-green); border: none; border-radius: 12px; color: var(--notion-green-text); font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.sign-contract-btn:hover { opacity: 0.9; transform: scale(0.99); }
.sign-contract-btn:active { transform: scale(0.97); }
.sign-contract-btn svg { stroke: var(--notion-green-text); }

/* Card progress bar (bottom border) */
.card-progress-bar { height: 3px; background: var(--bg-elevated); border-radius: 0 0 8px 8px; margin: 10px -16px -14px -16px; overflow: hidden; }
.card-progress-fill { height: 100%; border-radius: 0 0 0 8px; transition: width 0.3s ease; }
.progress-count { color: var(--notion-orange-text); font-weight: 500; }

/* Fix: overflow hidden sur les cards pour la progress bar */
.journal-item { overflow: hidden; border-radius: 12px; }
.card-progress-bar { margin: 12px -16px -16px -16px; border-radius: 0; }
.card-progress-fill { border-radius: 0; }

/* Fix: Cards avec progress bar - pas d'arrondi en bas */
.journal-item { border-radius: 12px 12px 0 0 !important; overflow: visible !important; }
.card-progress-bar { margin: 12px -16px -14px -16px; height: 4px; border-radius: 0 0 12px 12px; }
.card-progress-fill { height: 100%; border-radius: 0 0 12px 0; }

/* Fix final: Card avec coins arrondis + progress bar à l'intérieur */
.journal-item { 
    border-radius: 12px !important; 
    overflow: hidden !important; 
    position: relative !important;
}
.card-progress-bar { 
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important; 
    margin: 0 !important;
    border-radius: 0 !important;
    background: var(--bg-elevated) !important;
}
.card-progress-fill { 
    height: 100% !important; 
    border-radius: 0 !important; 
}

/* Progress bar plus fine */
.card-progress-bar { height: 2px !important; }

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* CONTRACT DETAIL MODAL                                                           */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.contract-detail-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.contract-detail-tab {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.contract-detail-tab.active {
    color: var(--notion-blue-text);
    background: var(--bg-card);
}

.contract-detail-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--notion-blue-text);
}

.contract-detail-content {
    padding: 16px;
    max-height: 50vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    max-width: 60%;
}

.detail-value.status-green { color: var(--notion-green-text); }
.detail-value.status-orange { color: var(--notion-orange-text); }
.detail-value.status-red { color: var(--notion-red-text); }
.detail-value.status-blue { color: var(--notion-blue-text); }

.detail-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-badge.green { background: var(--notion-green); color: var(--notion-green-text); }
.detail-badge.orange { background: var(--notion-orange); color: var(--notion-orange-text); }
.detail-badge.red { background: var(--notion-red); color: var(--notion-red-text); }
.detail-badge.blue { background: var(--notion-blue); color: var(--notion-blue-text); }

/* Contact actions */
.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.detail-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.detail-action-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

.detail-action-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* DATE RANGE PICKER                                                               */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.calendar-btn svg {
    stroke: var(--accent);
}

.date-range-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.date-preset-btn {
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.date-preset-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.date-preset-btn.active {
    background: var(--notion-blue);
    border-color: transparent;
    color: var(--notion-blue-text);
}

.date-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-top: 12px;
}

.date-range-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-range-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.date-range-field input {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.date-range-field input:focus {
    outline: none;
    border-color: var(--accent);
}

.month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 12px;
}

.month-selector-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.month-selector-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}

.month-selector-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Header Calendar Button */
.header-calendar-btn {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 10px !important;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

.header-calendar-btn svg {
    stroke: var(--accent);
}

.header-date-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header Badge Notifications */
.header-btn {
    position: relative;
}

.header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badge-pop 0.3s ease-out;
}

.header-badge-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.header-badge-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4);
}

.header-badge-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

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

/* Tab Badges (onglets contrats) */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.nav-tab.active .tab-badge {
    background: rgba(255,255,255,0.2);
    color: inherit;
}

.tab-badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.tab-badge-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.tab-badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tab-badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.nav-tab.active .tab-badge-red,
.nav-tab.active .tab-badge-orange,
.nav-tab.active .tab-badge-blue,
.nav-tab.active .tab-badge-green {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* Switch Fixe/Mobile */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px 10px;
}

.section-title-row .section-title {
    padding: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contract-type-switch {
    display: flex;
    background: var(--bg-elevated);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.switch-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.switch-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.switch-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Container des switches */
.contract-switches {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Switch RBO */
.rbo-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.rbo-switch:hover {
    background: var(--border-hover);
}

.rbo-switch.active {
    background: var(--notion-red);
}

.rbo-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rbo-switch.active .rbo-label {
    color: var(--notion-red-text);
}

.rbo-toggle {
    width: 28px;
    height: 16px;
    background: var(--border);
    border-radius: 8px;
    position: relative;
    transition: all 0.2s;
}

.rbo-toggle.active {
    background: rgba(239, 68, 68, 0.4);
}

.rbo-toggle-knob {
    width: 12px;
    height: 12px;
    background: var(--text-secondary);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.2s;
}

.rbo-toggle.active .rbo-toggle-knob {
    left: 14px;
    background: var(--notion-red-text);
}

.rbo-count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 14px;
    text-align: center;
}

.rbo-switch.active .rbo-count {
    color: var(--notion-red-text);
}
