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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --bg: #0a0e27;
    --bg-secondary: rgba(20, 25, 45, 0.95);
    --bg-card: rgba(30, 35, 55, 0.85);
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --border: rgba(99, 102, 241, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.4);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.4);
    --glow-danger: 0 0 20px rgba(239, 68, 68, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #4c1d95 50%, #581c87 75%, #7c3aed 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modal de mot de passe */
.password-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.password-modal-content {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.98) 0%, rgba(20, 25, 45, 0.98) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    padding: 50px;
    border-radius: 24px;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(99, 102, 241, 0.3) inset;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.password-modal-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.password-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1rem;
}

#password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#password-input {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    color: var(--text);
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: inherit;
}

#password-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 4px 16px rgba(99, 102, 241, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2) inset;
    background: linear-gradient(135deg, rgba(30, 35, 55, 1) 0%, rgba(20, 25, 45, 1) 100%);
    transform: translateY(-2px) scale(1.01);
}

#password-submit-btn {
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(99, 102, 241, 0.2) inset;
    letter-spacing: 0.3px;
}

#password-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--secondary) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(99, 102, 241, 0.5),
        0 0 30px rgba(99, 102, 241, 0.3) inset;
    filter: brightness(1.1);
}

#password-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.password-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--danger-light);
    font-size: 0.95rem;
    font-weight: 600;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 32px;
    padding: 45px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(99, 102, 241, 0.2) inset,
        0 0 60px rgba(99, 102, 241, 0.1);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.4s ease;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 32px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

.sync-bar {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.sync-bar #sync-bar-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sync-bar input[type="text"] {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.9rem;
}

.sync-bar button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
}

.sync-bar button:hover {
    background: var(--primary-light);
}

.sync-bar #sync-connected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sync-bar #sync-btn-change {
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 10px;
    font-size: 0.8rem;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 30%, #c084fc 60%, #e879f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.03em;
    filter: drop-shadow(0 0 30px rgba(129, 140, 248, 0.5));
    animation: titleGlow 4s ease-in-out infinite;
    position: relative;
}

header h1 .emoji-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    color: inherit;
    display: inline-block;
    filter: none;
    animation: none;
}

@keyframes titleGlow {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 30px rgba(129, 140, 248, 0.5));
        transform: scale(1);
    }
    50% { 
        filter: brightness(1.3) drop-shadow(0 0 50px rgba(129, 140, 248, 0.8));
        transform: scale(1.01);
    }
}

.date-info {
    margin-bottom: 25px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.date-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.date-info:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(99, 102, 241, 0.3) inset;
    border-color: rgba(99, 102, 241, 0.6);
}

.date-info p {
    margin: 5px 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.date-info #date-actuelle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.date-info #progression-mois {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.summary-card .sub-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: normal;
}

.progress-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.indicator-card {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.indicator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s ease;
}

.indicator-card:hover::before {
    left: 100%;
}

.indicator-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(99, 102, 241, 0.3),
        0 0 30px rgba(99, 102, 241, 0.2) inset;
    border-color: rgba(99, 102, 241, 0.5);
}

.indicator-card h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-month {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-light) 100%);
    background-size: 200% 100%;
    animation: progressShine 2s ease infinite;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

@keyframes progressShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.indicator-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.indicator-amount {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 12px 0;
    letter-spacing: -0.02em;
}

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.summary-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.5));
    border-radius: 24px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(10px);
}

.summary-card:hover::before {
    opacity: 1;
}

.summary-card:hover::after {
    opacity: 0.6;
}

.summary-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 
        0 16px 48px rgba(99, 102, 241, 0.4),
        0 0 40px rgba(99, 102, 241, 0.2) inset;
    border-color: rgba(99, 102, 241, 0.6);
}

.summary-card h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-card .amount {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.summary-card.balance .amount {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-card.balance .amount.negative {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 18px 32px;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.5),
        0 0 30px rgba(99, 102, 241, 0.3) inset;
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--text);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.card {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.95) 0%, rgba(20, 25, 45, 0.95) 100%);
    backdrop-filter: blur(25px) saturate(150%);
    padding: 35px;
    border-radius: 24px;
    margin-bottom: 30px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(99, 102, 241, 0.2) inset;
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group input,
.form-group select {
    flex: 1;
    min-width: 150px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 4px 16px rgba(99, 102, 241, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2) inset;
    background: linear-gradient(135deg, rgba(30, 35, 55, 1) 0%, rgba(20, 25, 45, 1) 100%);
    transform: translateY(-2px) scale(1.01);
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.form-group button {
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(99, 102, 241, 0.2) inset;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.form-group button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-group button:hover::before {
    width: 300px;
    height: 300px;
}

.form-group button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.form-group button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.liste-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.8) 0%, rgba(20, 25, 45, 0.8) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    padding: 20px 24px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.05) inset;
    position: relative;
}

.item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 18px 0 0 18px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.item:hover::before {
    opacity: 1;
}

.item:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(10px) translateY(-3px);
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.3),
        0 0 20px rgba(99, 102, 241, 0.15) inset;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.95) 0%, rgba(20, 25, 45, 0.95) 100%);
}

.item-info {
    flex: 1;
}

.item-info .item-desc {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.item-info .item-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.item-montant {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 15px;
    letter-spacing: -0.01em;
}

.item-montant.depense {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-actions button {
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.4),
        0 0 20px rgba(239, 68, 68, 0.2) inset;
    letter-spacing: 0.3px;
}

.item-actions button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(239, 68, 68, 0.5),
        0 0 30px rgba(239, 68, 68, 0.3) inset;
    background: linear-gradient(135deg, var(--danger-light) 0%, var(--danger) 100%);
    filter: brightness(1.1);
}

.item-actions button:active {
    transform: translateY(0);
}

.item-over-budget {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.budget-resume {
    animation: fadeIn 0.3s;
}

.budget-restant-form {
    margin-top: 15px;
    padding: 16px 20px;
    background: rgba(51, 65, 85, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

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

.budget-restant-form[style*="display: block"] {
    display: block !important;
}

/* Styles pour les notes/tâches */
.note-item {
    position: relative;
}

.note-completee {
    opacity: 0.6;
}

.note-text-completee {
    text-decoration: line-through;
    color: var(--text-secondary) !important;
}

.note-checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
}

.note-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(51, 65, 85, 0.6);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.note-checkbox:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.note-checkbox:checked {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    border-color: var(--success);
}

.note-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.note-checkbox-label {
    display: none;
}

/* Optimisations de performance */
* {
    will-change: auto;
}

.item, .summary-card, .indicator-card {
    contain: layout style paint;
}

/* Réduction des animations sur les appareils lents */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Styles pour les nouvelles sections */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.stat-card h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text);
    font-weight: 600;
}

canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
}

/* Mode clair */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-secondary: rgba(241, 245, 249, 0.9);
    --bg-card: rgba(226, 232, 240, 0.8);
    --text: #0f172a;
    --text-secondary: #475569;
    --border: rgba(71, 85, 105, 0.3);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 50%, #fce7f3 100%);
}

[data-theme="light"] .container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

[data-theme="light"] .card,
[data-theme="light"] .summary-card,
[data-theme="light"] .indicator-card,
[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .item {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] input,
[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--text);
}

/* Animations pour les notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


.budget-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.budget-item {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    padding: 28px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    position: relative;
}

.budget-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(99, 102, 241, 0.3),
        0 0 30px rgba(99, 102, 241, 0.2) inset;
    border-color: rgba(99, 102, 241, 0.5);
}

.budget-item label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.budget-item input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.budget-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(30, 41, 59, 0.8);
}

.budget-item input:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.budget-progress {
    width: 100%;
    height: 12px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 30%, var(--warning) 70%, var(--danger) 100%);
    background-size: 200% 100%;
    animation: progressShine 3s ease infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    box-shadow: 
        0 0 12px rgba(16, 185, 129, 0.5),
        0 0 20px rgba(16, 185, 129, 0.3) inset;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.budget-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.budget-info .reste {
    float: right;
    font-weight: 600;
}

.budget-info .reste.over {
    color: var(--danger);
}

.budget-info .reste.ok {
    color: var(--success);
}

.filter-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group select {
    flex: 1;
    padding: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

footer button {
    padding: 16px 36px;
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2) inset;
    letter-spacing: 0.3px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

/* Rappels */
.rappel-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

.opacity-50 {
    opacity: 0.5;
}

footer button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(99, 102, 241, 0.3) inset;
    filter: brightness(1.1);
}

footer button:active {
    transform: translateY(0);
}

/* Styles pour le calendrier */
#calendrier-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

#calendrier-container > div {
    transition: all 0.3s ease;
}

/* Modal calendrier */
#modal-calendrier {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

#modal-calendrier[style*="display: flex"] {
    display: flex !important;
}

#modal-calendrier > div {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.98) 0%, rgba(20, 25, 45, 0.98) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    padding: 40px;
    border-radius: 24px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(99, 102, 241, 0.3) inset;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#modal-calendrier-date {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
}

#modal-calendrier-note {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(15px);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
}

#modal-calendrier-note:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 4px 16px rgba(99, 102, 241, 0.3);
}

#modal-calendrier-nouvel-evenement {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(15px);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#modal-calendrier-nouvel-evenement:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#modal-calendrier button[onclick="ajouterEvenementCalendrier()"]:hover,
#modal-calendrier button[onclick="sauvegarderNoteCalendrier()"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

#modal-calendrier button[onclick="fermerModalCalendrier()"]:hover {
    background: rgba(30, 35, 55, 1);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

/* Boutons du calendrier */
button[onclick*="changerMoisCalendrier"] {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button[onclick*="changerMoisCalendrier"]:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Styles pour la routine quotidienne */
.routine-person-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.routine-person-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
}

.routine-section {
    margin-bottom: 20px;
}

.routine-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.routine-section-header h3,
.routine-section-header h4 {
    margin-bottom: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.routine-progress {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.routine-progress.complete {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--success-light);
}

.routine-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.8) 0%, rgba(20, 25, 45, 0.8) 100%);
    backdrop-filter: blur(15px) saturate(150%);
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.routine-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

.routine-item.routine-done {
    opacity: 0.6;
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(20, 25, 45, 0.8) 100%);
}

.routine-item.routine-done .routine-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.routine-checkbox {
    width: 28px;
    height: 28px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(51, 65, 85, 0.6);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.routine-checkbox:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.routine-checkbox:checked {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    border-color: var(--success);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.routine-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.routine-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.3s ease;
}

.routine-delete {
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
    opacity: 0.7;
}

.routine-item:hover .routine-delete {
    opacity: 1;
}

.routine-delete:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.5);
}

/* Styles pour les routines Lucas (bleu) */
.routine-card.routine-lucas {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.95) 0%, rgba(20, 25, 45, 0.95) 100%);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.2) inset,
        0 0 20px rgba(59, 130, 246, 0.1);
}

.routine-card.routine-lucas:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.3) inset,
        0 0 30px rgba(59, 130, 246, 0.2);
}

.routine-card.routine-lucas .routine-person-header {
    border-bottom-color: rgba(59, 130, 246, 0.3);
}

.routine-card.routine-lucas .routine-person-header h3 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.routine-card.routine-lucas .routine-section-header h4 {
    color: #93c5fd;
    font-weight: 600;
}

.routine-card.routine-lucas .routine-progress {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.routine-card.routine-lucas .routine-item {
    border-color: rgba(59, 130, 246, 0.2);
}

.routine-card.routine-lucas .routine-item:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.routine-card.routine-lucas .routine-checkbox:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
}

.routine-card.routine-lucas .form-group button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.4),
        0 0 20px rgba(59, 130, 246, 0.2) inset;
}

.routine-card.routine-lucas .form-group button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.5),
        0 0 25px rgba(59, 130, 246, 0.3) inset;
}

/* Styles pour les routines Zinira (rose) */
.routine-card.routine-zinira {
    border-color: rgba(236, 72, 153, 0.4);
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.95) 0%, rgba(20, 25, 45, 0.95) 100%);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(236, 72, 153, 0.2) inset,
        0 0 20px rgba(236, 72, 153, 0.1);
}

.routine-card.routine-zinira:hover {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(236, 72, 153, 0.3) inset,
        0 0 30px rgba(236, 72, 153, 0.2);
}

.routine-card.routine-zinira .routine-person-header {
    border-bottom-color: rgba(236, 72, 153, 0.3);
}

.routine-card.routine-zinira .routine-person-header h3 {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.routine-card.routine-zinira .routine-section-header h4 {
    color: #f9a8d4;
    font-weight: 600;
}

.routine-card.routine-zinira .routine-progress {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(219, 39, 119, 0.2) 100%);
    border-color: rgba(236, 72, 153, 0.4);
    color: #f9a8d4;
}

.routine-card.routine-zinira .routine-item {
    border-color: rgba(236, 72, 153, 0.2);
}

.routine-card.routine-zinira .routine-item:hover {
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.25);
}

.routine-card.routine-zinira .routine-checkbox:hover {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.2);
}

.routine-card.routine-zinira .form-group button {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    box-shadow: 
        0 6px 20px rgba(236, 72, 153, 0.4),
        0 0 20px rgba(236, 72, 153, 0.2) inset;
}

.routine-card.routine-zinira .form-group button:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    box-shadow: 
        0 8px 25px rgba(236, 72, 153, 0.5),
        0 0 25px rgba(236, 72, 153, 0.3) inset;
}

/* Responsive - Tablette */
@media (max-width: 1024px) {
    .container {
        padding: 30px;
        border-radius: 24px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .progress-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .budget-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        border-radius: 20px;
    }

    .container::before {
        border-radius: 20px;
    }

    header {
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 2rem;
        margin-bottom: 15px;
        line-height: 1.2;
    }

    .date-info {
        padding: 16px;
        margin-bottom: 15px;
        border-radius: 16px;
    }

    .date-info p {
        font-size: 0.9rem;
    }

    .date-info #date-actuelle {
        font-size: 1.1rem;
    }

    .summary {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 15px;
    }

    .summary-card {
        padding: 20px;
        border-radius: 16px;
    }

    .summary-card h3 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .summary-card .amount {
        font-size: 2rem;
    }

    .progress-indicators {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 15px;
    }

    .indicator-card {
        padding: 20px;
        border-radius: 16px;
    }

    .indicator-card h4 {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .indicator-amount {
        font-size: 1.5rem;
    }

    .tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        min-width: auto;
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .card {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .form-group {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 15px;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .form-group button {
        width: 100%;
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    .liste-items {
        gap: 8px;
    }

    .item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
        border-radius: 14px;
    }

    .item-info {
        width: 100%;
    }

    .item-info .item-desc {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .item-info .item-details {
        font-size: 0.85rem;
    }

    .item-montant {
        font-size: 1.3rem;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .item-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .item-actions button {
        width: auto;
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .budget-categories {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .budget-item {
        padding: 20px;
        border-radius: 16px;
    }

    .budget-item label {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .budget-item input {
        padding: 12px 14px;
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .budget-progress {
        margin-bottom: 10px;
    }

    .budget-info {
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 18px;
        border-radius: 14px;
    }

    .stat-card h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .filter-group {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .filter-group select {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }

    footer {
        margin-top: 30px;
        padding-top: 20px;
        flex-direction: column;
        gap: 10px;
    }

    footer button {
        width: 100%;
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    /* Calendrier responsive */
    .calendrier-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .calendrier-header h3 {
        font-size: 1.2rem;
        text-align: center;
    }

    .calendrier-nav-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .calendrier-nav-buttons button {
        flex: 1;
        min-width: 0;
    }

    #calendrier-container {
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }

    #calendrier-container > div {
        min-height: 60px;
        padding: 8px 4px;
        font-size: 0.85rem;
    }

    button[onclick*="changerMoisCalendrier"] {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Modal calendrier responsive */
    #modal-calendrier > div {
        padding: 24px;
        border-radius: 20px;
        max-width: 95%;
        width: 95%;
    }

    /* Modal mot de passe responsive */
    .password-modal-content {
        padding: 30px;
        border-radius: 20px;
        max-width: 90%;
    }

    .password-modal-content h2 {
        font-size: 1.6rem;
    }

    .password-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    #password-input {
        padding: 14px 18px;
        font-size: 1rem;
    }

    #password-submit-btn {
        padding: 14px 28px;
        font-size: 1rem;
    }

    #modal-calendrier-date {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    #modal-calendrier-note {
        min-height: 100px;
        padding: 12px;
        font-size: 0.95rem;
    }

    #modal-calendrier-nouvel-evenement {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    #modal-calendrier button[onclick="ajouterEvenementCalendrier()"] {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    #modal-calendrier button[onclick="fermerModalCalendrier()"],
    #modal-calendrier button[onclick="sauvegarderNoteCalendrier()"] {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1;
    }

    /* Sync bar responsive */
    .sync-bar {
        padding: 10px 15px;
        border-radius: 10px;
        margin-bottom: 15px;
    }

    .sync-bar #sync-status {
        font-size: 0.85rem;
    }
}

/* Responsive - Petit mobile */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 16px;
        border-radius: 16px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .summary-card {
        padding: 16px;
    }

    .summary-card .amount {
        font-size: 1.8rem;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tab-btn {
        min-width: auto;
        padding: 10px 8px;
        font-size: 0.85rem;
        white-space: normal;
        flex: 0 1 auto;
        text-align: center;
        line-height: 1.2;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .card {
        padding: 16px;
    }

    .card h3 {
        font-size: 1.1rem;
    }

    .form-group input,
    .form-group select,
    .form-group button {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .item {
        padding: 12px;
    }

    .item-montant {
        font-size: 1.2rem;
    }

    .budget-item {
        padding: 16px;
    }

    .budget-item input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .calendrier-header h3 {
        font-size: 1.1rem;
    }

    .calendrier-nav-buttons button {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    #calendrier-container > div {
        min-height: 50px;
        padding: 6px 2px;
        font-size: 0.75rem;
    }

    #modal-calendrier > div {
        padding: 20px;
        max-height: 90vh;
    }

    #modal-calendrier-date {
        font-size: 1.2rem;
    }

    .indicator-card {
        padding: 16px;
    }

    .indicator-amount {
        font-size: 1.3rem;
    }
}

/* Amélioration du touch sur mobile */
@media (hover: none) and (pointer: coarse) {
    .tab-btn,
    .form-group button,
    .item-actions button,
    footer button {
        min-height: 44px;
        min-width: 44px;
    }

    .item {
        padding: 16px;
    }

    #calendrier-container > div {
        min-height: 60px;
    }
}

/* Orientation paysage sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .summary-card {
        padding: 12px;
    }

    .summary-card .amount {
        font-size: 1.5rem;
    }

    .progress-indicators {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Améliorations supplémentaires pour mobile */
@media (max-width: 768px) {
    /* Notes et tâches */
    .note-item {
        padding: 12px;
        flex-wrap: wrap;
    }

    .note-checkbox-container {
        width: 100%;
        margin-bottom: 8px;
    }

    /* Objectifs */
    .objectif-item,
    .objectif-card {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Choses à acheter */
    .achat-item {
        padding: 14px;
        flex-direction: column;
        gap: 10px;
    }

    .achat-item .achat-info {
        width: 100%;
    }

    .achat-item .achat-prix {
        font-size: 1.2rem;
        margin: 8px 0;
    }

    /* Historique */
    .historique-item {
        padding: 14px;
        flex-direction: column;
        gap: 10px;
    }

    /* Statistiques */
    canvas {
        max-width: 100%;
        height: auto;
    }

    /* Progress bars */
    .progress-bar-container {
        height: 10px;
    }

    .progress-bar-month {
        height: 10px;
    }

    /* Inputs et textareas */
    textarea {
        min-height: 80px;
        font-size: 0.9rem;
        padding: 12px;
    }

    /* Labels */
    label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    /* Espacement général */
    .section-header {
        margin-bottom: 15px;
    }

    .card {
        margin-bottom: 15px;
    }
}

/* Très petit mobile */
@media (max-width: 360px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 12px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .tabs {
        gap: 4px;
    }

    .tab-btn {
        min-width: auto;
        padding: 8px 6px;
        font-size: 0.75rem;
        white-space: normal;
        flex: 0 1 auto;
        text-align: center;
        line-height: 1.2;
    }

    .summary-card .amount {
        font-size: 1.5rem;
    }

    .indicator-amount {
        font-size: 1.2rem;
    }

    .item-montant {
        font-size: 1.1rem;
    }

    .form-group input,
    .form-group select,
    .form-group button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}
